[telepathy-mission-control/master] Remove McdDispatchOperation from public API/ABI
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Sep 8 10:40:45 PDT 2009
---
src/Makefile.am | 1 -
src/mcd-dispatch-operation-priv.h | 44 ++++++++++++++++++++++-
src/mcd-dispatch-operation.c | 44 +++++++++++-----------
src/mcd-dispatch-operation.h | 71 -------------------------------------
src/mcd-dispatcher.c | 29 +++++++--------
5 files changed, 79 insertions(+), 110 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b4c9db1..b303fa6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,7 +11,6 @@ mc_headers = \
mcd-account-conditions.h \
mcd-account-manager.h \
mcd-debug.h \
- mcd-dispatch-operation.h \
mcd-mission.h \
mcd-operation.h \
mcd-master.h \
diff --git a/src/mcd-dispatch-operation-priv.h b/src/mcd-dispatch-operation-priv.h
index c216edc..4e8df70 100644
--- a/src/mcd-dispatch-operation-priv.h
+++ b/src/mcd-dispatch-operation-priv.h
@@ -24,10 +24,52 @@
#ifndef __MCD_DISPATCH_OPERATION_PRIV_H__
#define __MCD_DISPATCH_OPERATION_PRIV_H__
-#include "mcd-dispatch-operation.h"
+#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/enums.h>
G_BEGIN_DECLS
+typedef struct _McdDispatchOperation McdDispatchOperation;
+typedef struct _McdDispatchOperationPrivate McdDispatchOperationPrivate;
+typedef struct _McdDispatchOperationClass McdDispatchOperationClass;
+
+#include "mcd-account.h"
+
+struct _McdDispatchOperation
+{
+ GObject parent;
+ McdDispatchOperationPrivate *priv;
+};
+
+struct _McdDispatchOperationClass
+{
+ GObjectClass parent_class;
+};
+
+
+#define MC_DISPATCH_OPERATION_DBUS_OBJECT_BASE "/org/freedesktop/Telepathy/DispatchOperation/"
+
+G_GNUC_INTERNAL GType _mcd_dispatch_operation_get_type (void);
+
+G_GNUC_INTERNAL const gchar *_mcd_dispatch_operation_get_path
+ (McdDispatchOperation *operation);
+G_GNUC_INTERNAL GHashTable *_mcd_dispatch_operation_get_properties
+ (McdDispatchOperation *operation);
+G_GNUC_INTERNAL gboolean _mcd_dispatch_operation_is_claimed
+ (McdDispatchOperation *operation);
+G_GNUC_INTERNAL const gchar *_mcd_dispatch_operation_get_handler
+ (McdDispatchOperation *operation);
+G_GNUC_INTERNAL void _mcd_dispatch_operation_handle_with
+ (McdDispatchOperation *operation, const gchar *handler_path,
+ GError **error);
+
+#define MCD_TYPE_DISPATCH_OPERATION (_mcd_dispatch_operation_get_type ())
+#define MCD_DISPATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperation))
+#define MCD_DISPATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperationClass))
+#define MCD_IS_DISPATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MCD_TYPE_DISPATCH_OPERATION))
+#define MCD_IS_DISPATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MCD_TYPE_DISPATCH_OPERATION))
+#define MCD_DISPATCH_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperationClass))
+
G_GNUC_INTERNAL McdDispatchOperation *_mcd_dispatch_operation_new (
TpDBusDaemon *dbus_daemon, GList *channels, GStrv possible_handlers);
G_GNUC_INTERNAL void _mcd_dispatch_operation_lose_channel (
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 6ffbb42..b035247 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -67,7 +67,7 @@ static const McdInterfaceData dispatch_operation_interfaces[] = {
{ G_TYPE_INVALID, }
};
-G_DEFINE_TYPE_WITH_CODE (McdDispatchOperation, mcd_dispatch_operation,
+G_DEFINE_TYPE_WITH_CODE (McdDispatchOperation, _mcd_dispatch_operation,
G_TYPE_OBJECT,
MCD_DBUS_INIT_INTERFACES (dispatch_operation_interfaces);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES, properties_iface_init);
@@ -262,7 +262,7 @@ dispatch_operation_handle_with (TpSvcChannelDispatchOperation *self,
{
GError *error = NULL;
- mcd_dispatch_operation_handle_with (MCD_DISPATCH_OPERATION (self),
+ _mcd_dispatch_operation_handle_with (MCD_DISPATCH_OPERATION (self),
handler_name, &error);
if (error)
{
@@ -327,7 +327,7 @@ mcd_dispatch_operation_constructor (GType type, guint n_params,
GObjectConstructParam *params)
{
GObjectClass *object_class =
- (GObjectClass *)mcd_dispatch_operation_parent_class;
+ (GObjectClass *)_mcd_dispatch_operation_parent_class;
GObject *object;
McdDispatchOperation *operation;
McdDispatchOperationPrivate *priv;
@@ -448,7 +448,7 @@ mcd_dispatch_operation_finalize (GObject *object)
g_free (priv->object_path);
g_free (priv->claimer);
- G_OBJECT_CLASS (mcd_dispatch_operation_parent_class)->finalize (object);
+ G_OBJECT_CLASS (_mcd_dispatch_operation_parent_class)->finalize (object);
}
static void
@@ -484,11 +484,11 @@ mcd_dispatch_operation_dispose (GObject *object)
g_object_unref (priv->dbus_daemon);
priv->dbus_daemon = NULL;
}
- G_OBJECT_CLASS (mcd_dispatch_operation_parent_class)->dispose (object);
+ G_OBJECT_CLASS (_mcd_dispatch_operation_parent_class)->dispose (object);
}
static void
-mcd_dispatch_operation_class_init (McdDispatchOperationClass * klass)
+_mcd_dispatch_operation_class_init (McdDispatchOperationClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
g_type_class_add_private (object_class,
@@ -518,7 +518,7 @@ mcd_dispatch_operation_class_init (McdDispatchOperationClass * klass)
}
static void
-mcd_dispatch_operation_init (McdDispatchOperation *operation)
+_mcd_dispatch_operation_init (McdDispatchOperation *operation)
{
McdDispatchOperationPrivate *priv;
@@ -554,21 +554,21 @@ _mcd_dispatch_operation_new (TpDBusDaemon *dbus_daemon,
return MCD_DISPATCH_OPERATION (obj);
}
-/**
- * mcd_dispatch_operation_get_path:
+/*
+ * _mcd_dispatch_operation_get_path:
* @operation: the #McdDispatchOperation.
*
* Returns: the D-Bus object path of @operation.
*/
const gchar *
-mcd_dispatch_operation_get_path (McdDispatchOperation *operation)
+_mcd_dispatch_operation_get_path (McdDispatchOperation *operation)
{
g_return_val_if_fail (MCD_IS_DISPATCH_OPERATION (operation), NULL);
return operation->priv->object_path;
}
-/**
- * mcd_dispatch_operation_get_properties:
+/*
+ * _mcd_dispatch_operation_get_properties:
* @operation: the #McdDispatchOperation.
*
* Gets the immutable properties of @operation.
@@ -577,7 +577,7 @@ mcd_dispatch_operation_get_path (McdDispatchOperation *operation)
* not incremented.
*/
GHashTable *
-mcd_dispatch_operation_get_properties (McdDispatchOperation *operation)
+_mcd_dispatch_operation_get_properties (McdDispatchOperation *operation)
{
McdDispatchOperationPrivate *priv;
@@ -615,14 +615,14 @@ mcd_dispatch_operation_get_properties (McdDispatchOperation *operation)
return priv->properties;
}
-/**
- * mcd_dispatch_operation_is_claimed:
+/*
+ * _mcd_dispatch_operation_is_claimed:
* @operation: the #McdDispatchOperation.
*
* Returns: %TRUE if the operation was claimed, %FALSE otherwise.
*/
gboolean
-mcd_dispatch_operation_is_claimed (McdDispatchOperation *operation)
+_mcd_dispatch_operation_is_claimed (McdDispatchOperation *operation)
{
g_return_val_if_fail (MCD_IS_DISPATCH_OPERATION (operation), FALSE);
return (operation->priv->claimer != NULL);
@@ -648,14 +648,14 @@ _mcd_dispatch_operation_is_finished (McdDispatchOperation *self)
return self->priv->finished;
}
-/**
- * mcd_dispatch_operation_get_handler:
+/*
+ * _mcd_dispatch_operation_get_handler:
* @operation: the #McdDispatchOperation.
*
* Returns: the well-known name of the choosen channel handler.
*/
const gchar *
-mcd_dispatch_operation_get_handler (McdDispatchOperation *operation)
+_mcd_dispatch_operation_get_handler (McdDispatchOperation *operation)
{
g_return_val_if_fail (MCD_IS_DISPATCH_OPERATION (operation), NULL);
return operation->priv->handler;
@@ -696,9 +696,9 @@ mcd_dispatch_operation_check_handle_with (McdDispatchOperation *self,
}
void
-mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
- const gchar *handler_name,
- GError **error)
+_mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
+ const gchar *handler_name,
+ GError **error)
{
McdDispatchOperationPrivate *priv;
diff --git a/src/mcd-dispatch-operation.h b/src/mcd-dispatch-operation.h
index 918afa5..e69de29 100644
--- a/src/mcd-dispatch-operation.h
+++ b/src/mcd-dispatch-operation.h
@@ -1,71 +0,0 @@
-/* vi: set et sw=4 ts=4 cino=t0,(0: */
-/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * mcd-operation.h - the Telepathy DispatchOperation D-Bus interface (service side)
- *
- * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2008 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __MCD_DISPATCH_OPERATION_H__
-#define __MCD_DISPATCH_OPERATION_H__
-
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/enums.h>
-
-G_BEGIN_DECLS
-#define MCD_TYPE_DISPATCH_OPERATION (mcd_dispatch_operation_get_type ())
-#define MCD_DISPATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperation))
-#define MCD_DISPATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperationClass))
-#define MCD_IS_DISPATCH_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), MCD_TYPE_DISPATCH_OPERATION))
-#define MCD_IS_DISPATCH_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), MCD_TYPE_DISPATCH_OPERATION))
-#define MCD_DISPATCH_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), MCD_TYPE_DISPATCH_OPERATION, McdDispatchOperationClass))
-
-typedef struct _McdDispatchOperation McdDispatchOperation;
-typedef struct _McdDispatchOperationPrivate McdDispatchOperationPrivate;
-typedef struct _McdDispatchOperationClass McdDispatchOperationClass;
-
-#include "mcd-account.h"
-
-struct _McdDispatchOperation
-{
- GObject parent;
- McdDispatchOperationPrivate *priv;
-};
-
-struct _McdDispatchOperationClass
-{
- GObjectClass parent_class;
-};
-
-
-#define MC_DISPATCH_OPERATION_DBUS_OBJECT_BASE "/org/freedesktop/Telepathy/DispatchOperation/"
-
-GType mcd_dispatch_operation_get_type (void);
-
-const gchar *mcd_dispatch_operation_get_path (McdDispatchOperation *operation);
-GHashTable *mcd_dispatch_operation_get_properties
- (McdDispatchOperation *operation);
-gboolean mcd_dispatch_operation_is_claimed (McdDispatchOperation *operation);
-const gchar *mcd_dispatch_operation_get_handler
- (McdDispatchOperation *operation);
-void mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
- const gchar *handler_path,
- GError **error);
-
-G_END_DECLS
-#endif
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 998d696..58497d9 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -53,7 +53,6 @@
#include "mcd-channel-priv.h"
#include "mcd-dispatcher-context.h"
#include "mcd-dispatcher-priv.h"
-#include "mcd-dispatch-operation.h"
#include "mcd-dispatch-operation-priv.h"
#include "mcd-handler-map-priv.h"
#include "mcd-misc.h"
@@ -954,7 +953,7 @@ mcd_dispatcher_run_handlers (McdDispatcherContext *context)
* one we'll consider. */
if (context->operation)
{
- const gchar *approved_handler = mcd_dispatch_operation_get_handler (
+ const gchar *approved_handler = _mcd_dispatch_operation_get_handler (
context->operation);
if (approved_handler != NULL && approved_handler[0] != '\0')
@@ -1169,7 +1168,7 @@ mcd_dispatcher_run_observers (McdDispatcherContext *context)
if (context->operation)
{
dispatch_operation_path =
- mcd_dispatch_operation_get_path (context->operation);
+ _mcd_dispatch_operation_get_path (context->operation);
_mcd_dispatch_operation_block_finished (context->operation);
}
@@ -1223,14 +1222,14 @@ add_dispatch_operation_cb (TpClient *proxy, const GError *error,
{
DEBUG ("AddDispatchOperation %s (context %p) on approver %s failed: "
"%s",
- mcd_dispatch_operation_get_path (context->operation),
+ _mcd_dispatch_operation_get_path (context->operation),
context, tp_proxy_get_object_path (proxy), error->message);
}
else
{
DEBUG ("Approver %s accepted AddDispatchOperation %s (context %p)",
tp_proxy_get_object_path (proxy),
- mcd_dispatch_operation_get_path (context->operation),
+ _mcd_dispatch_operation_get_path (context->operation),
context);
if (!context->awaiting_approval)
@@ -1300,9 +1299,9 @@ mcd_dispatcher_run_approvers (McdDispatcherContext *context)
if (!matched) continue;
dispatch_operation =
- mcd_dispatch_operation_get_path (context->operation);
+ _mcd_dispatch_operation_get_path (context->operation);
properties =
- mcd_dispatch_operation_get_properties (context->operation);
+ _mcd_dispatch_operation_get_properties (context->operation);
channel_details =
_mcd_dispatch_operation_dup_channel_details (context->operation);
@@ -1489,7 +1488,7 @@ on_operation_finished (McdDispatchOperation *operation,
if (context->dispatcher->priv->operation_list_active)
{
tp_svc_channel_dispatcher_interface_operation_list_emit_dispatch_operation_finished (
- context->dispatcher, mcd_dispatch_operation_get_path (operation));
+ context->dispatcher, _mcd_dispatch_operation_get_path (operation));
}
/* Because of our calls to _mcd_dispatch_operation_block_finished,
@@ -1508,7 +1507,7 @@ on_operation_finished (McdDispatchOperation *operation,
context->channels_handled = TRUE;
}
- else if (mcd_dispatch_operation_is_claimed (operation))
+ else if (_mcd_dispatch_operation_is_claimed (operation))
{
GList *list;
@@ -1591,8 +1590,8 @@ _mcd_dispatcher_enter_state_machine (McdDispatcher *dispatcher,
{
tp_svc_channel_dispatcher_interface_operation_list_emit_new_dispatch_operation (
dispatcher,
- mcd_dispatch_operation_get_path (context->operation),
- mcd_dispatch_operation_get_properties (context->operation));
+ _mcd_dispatch_operation_get_path (context->operation),
+ _mcd_dispatch_operation_get_properties (context->operation));
}
g_signal_connect (context->operation, "finished",
@@ -1711,9 +1710,9 @@ _mcd_dispatcher_get_property (GObject * obj, guint prop_id,
TP_HASH_TYPE_STRING_VARIANT_MAP);
g_value_set_boxed (va->values + 0,
- mcd_dispatch_operation_get_path (context->operation));
+ _mcd_dispatch_operation_get_path (context->operation));
g_value_set_boxed (va->values + 1,
- mcd_dispatch_operation_get_properties (
+ _mcd_dispatch_operation_get_properties (
context->operation));
g_ptr_array_add (operations, va);
@@ -3103,7 +3102,7 @@ mcd_dispatcher_context_unref (McdDispatcherContext * context,
{
tp_svc_channel_dispatcher_interface_operation_list_emit_dispatch_operation_finished (
context->dispatcher,
- mcd_dispatch_operation_get_path (context->operation));
+ _mcd_dispatch_operation_get_path (context->operation));
}
g_object_unref (context->operation);
@@ -3659,7 +3658,7 @@ _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
* same channel has been requested, the approval operation must
* terminate */
if (G_LIKELY (context->operation))
- mcd_dispatch_operation_handle_with (context->operation,
+ _mcd_dispatch_operation_handle_with (context->operation,
NULL, NULL);
}
else
--
1.5.6.5
More information about the telepathy-commits
mailing list