[telepathy-mission-control/master] McdDispatcher, McdDispatchOperation, McdMaster: move unexported stuff to new -priv headers

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Apr 15 05:52:44 PDT 2009


---
 src/Makefile.am                   |    3 ++
 src/mcd-account-requests.c        |    1 +
 src/mcd-account.c                 |    1 +
 src/mcd-connection.c              |    1 +
 src/mcd-dispatch-operation-priv.h |   39 ++++++++++++++++++++++++
 src/mcd-dispatch-operation.c      |    1 +
 src/mcd-dispatch-operation.h      |    5 +--
 src/mcd-dispatcher-priv.h         |   59 +++++++++++++++++++++++++++++++++++++
 src/mcd-dispatcher.c              |    2 +
 src/mcd-dispatcher.h              |   23 --------------
 src/mcd-master-priv.h             |   38 +++++++++++++++++++++++
 src/mcd-master.c                  |    1 +
 src/mcd-master.h                  |    3 --
 13 files changed, 147 insertions(+), 30 deletions(-)
 create mode 100644 src/mcd-dispatch-operation-priv.h
 create mode 100644 src/mcd-dispatcher-priv.h
 create mode 100644 src/mcd-master-priv.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 5fcdbf6..680c198 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -127,6 +127,7 @@ libmissioncontrol_server_la_SOURCES = \
 	mcd-dbusprop.c \
 	mcd-debug.c \
 	mcd-dispatch-operation.c \
+	mcd-dispatch-operation-priv.h \
 	mcd-enum-types.c \
 	mcd-enum-types.h \
 	mcd-signals-marshal.c \
@@ -136,10 +137,12 @@ libmissioncontrol_server_la_SOURCES = \
 	mcd-operation.c \
 	mcd-controller.c \
 	mcd-master.c \
+	mcd-master-priv.h \
 	mcd-manager.c \
 	mcd-connection.c \
 	mcd-connection-priv.h \
 	mcd-dispatcher.c \
+	mcd-dispatcher-priv.h \
 	mcd-channel.c \
 	mcd-channel-priv.h \
 	mcd-service.c \
diff --git a/src/mcd-account-requests.c b/src/mcd-account-requests.c
index fe3b5ba..ca1431e 100644
--- a/src/mcd-account-requests.c
+++ b/src/mcd-account-requests.c
@@ -38,6 +38,7 @@
 #include "mcd-account-priv.h"
 #include "mcd-account-requests.h"
 #include "mcd-account-manager.h"
+#include "mcd-dispatcher-priv.h"
 #include "mcd-channel-priv.h"
 #include "mcd-misc.h"
 #include "_gen/interfaces.h"
diff --git a/src/mcd-account.c b/src/mcd-account.c
index 2fcd9d6..5c60bf6 100644
--- a/src/mcd-account.c
+++ b/src/mcd-account.c
@@ -50,6 +50,7 @@
 #include "mcd-signals-marshal.h"
 #include "mcd-manager.h"
 #include "mcd-master.h"
+#include "mcd-master-priv.h"
 #include "mcd-dbusprop.h"
 #include "_gen/interfaces.h"
 #include "_gen/gtypes.h"
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 39cab7a..8e00bda 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -58,6 +58,7 @@
 #include "mcd-account-priv.h"
 #include "mcd-channel-priv.h"
 #include "mcd-connection-priv.h"
+#include "mcd-dispatcher-priv.h"
 #include "mcd-account-connection.h"
 #include "mcd-channel.h"
 #include "mcd-provisioning-factory.h"
diff --git a/src/mcd-dispatch-operation-priv.h b/src/mcd-dispatch-operation-priv.h
new file mode 100644
index 0000000..b68a177
--- /dev/null
+++ b/src/mcd-dispatch-operation-priv.h
@@ -0,0 +1,39 @@
+/* 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_PRIV_H__
+#define __MCD_DISPATCH_OPERATION_PRIV_H__
+
+#include "mcd-dispatch-operation.h"
+
+G_BEGIN_DECLS
+
+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 (
+    McdDispatchOperation *self, McdChannel *channel, GList **channels);
+
+G_END_DECLS
+
+#endif
+
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index 97f965c..f000155 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -25,6 +25,7 @@
 
 #include "config.h"
 #include "mcd-dispatch-operation.h"
+#include "mcd-dispatch-operation-priv.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/src/mcd-dispatch-operation.h b/src/mcd-dispatch-operation.h
index d09fb70..93515fd 100644
--- a/src/mcd-dispatch-operation.h
+++ b/src/mcd-dispatch-operation.h
@@ -58,10 +58,6 @@ struct _McdDispatchOperationClass
 #define MC_DISPATCH_OPERATION_DBUS_OBJECT_BASE "/org/freedesktop/Telepathy/DispatchOperation/"
 
 GType mcd_dispatch_operation_get_type (void);
-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 (
-    McdDispatchOperation *self, McdChannel *channel, GList **channels);
 
 const gchar *mcd_dispatch_operation_get_path (McdDispatchOperation *operation);
 GHashTable *mcd_dispatch_operation_get_properties
@@ -73,4 +69,5 @@ void mcd_dispatch_operation_handle_with (McdDispatchOperation *operation,
                                          const gchar *handler_path,
                                          GError **error);
 
+G_END_DECLS
 #endif
diff --git a/src/mcd-dispatcher-priv.h b/src/mcd-dispatcher-priv.h
new file mode 100644
index 0000000..e93e4d7
--- /dev/null
+++ b/src/mcd-dispatcher-priv.h
@@ -0,0 +1,59 @@
+/* vi: set et sw=4 ts=8 cino=t0,(0: */
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
+/*
+ * This file is part of mission-control
+ *
+ * Copyright (C) 2007 Nokia Corporation. 
+ *
+ * Contact: Naba Kumar  <naba.kumar at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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_DISPATCHER_PRIV_H
+#define MCD_DISPATCHER_PRIV_H
+
+#include "mcd-dispatcher.h"
+
+G_BEGIN_DECLS
+
+/* retrieves the channel handlers' capabilities, in a format suitable for being
+ * used as a parameter for the telepathy "AdvertiseCapabilities" method */
+G_GNUC_INTERNAL GPtrArray *_mcd_dispatcher_get_channel_capabilities (
+    McdDispatcher *dispatcher, const gchar *protocol);
+
+/* retrieves the channel handlers' capabilities, in a format suitable for being
+ * used as a parameter for the telepathy "SetSelfCapabilities" method */
+G_GNUC_INTERNAL GPtrArray *_mcd_dispatcher_get_channel_enhanced_capabilities (
+    McdDispatcher *dispatcher);
+
+/* not exported */
+void _mcd_dispatcher_add_request (McdDispatcher *dispatcher,
+                                  McdAccount *account, McdChannel *channel);
+G_GNUC_INTERNAL void _mcd_dispatcher_take_channels (
+    McdDispatcher *dispatcher, GList *channels, gboolean requested);
+G_GNUC_INTERNAL
+void _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
+                                          McdChannel *channel,
+                                          McdChannel *request);
+G_GNUC_INTERNAL
+void _mcd_dispatcher_recover_channel (McdDispatcher *dispatcher,
+                                      McdChannel *channel);
+
+G_END_DECLS
+
+#endif /* MCD_DISPATCHER_H */
+
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index ba08e74..e8ddc9d 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -51,7 +51,9 @@
 #include "mcd-chan-handler.h"
 #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-misc.h"
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/gtypes.h>
diff --git a/src/mcd-dispatcher.h b/src/mcd-dispatcher.h
index 6d90b83..52144f3 100644
--- a/src/mcd-dispatcher.h
+++ b/src/mcd-dispatcher.h
@@ -92,29 +92,6 @@ McdDispatcher *mcd_dispatcher_new (TpDBusDaemon *dbus_daemon,
 gint mcd_dispatcher_get_channel_type_usage (McdDispatcher * dispatcher,
 					    GQuark chan_type_quark);
 
-/* retrieves the channel handlers' capabilities, in a format suitable for being
- * used as a parameter for the telepathy "AdvertiseCapabilities" method */
-G_GNUC_INTERNAL GPtrArray *_mcd_dispatcher_get_channel_capabilities (
-    McdDispatcher *dispatcher, const gchar *protocol);
-
-/* retrieves the channel handlers' capabilities, in a format suitable for being
- * used as a parameter for the telepathy "SetSelfCapabilities" method */
-G_GNUC_INTERNAL GPtrArray *_mcd_dispatcher_get_channel_enhanced_capabilities (
-    McdDispatcher *dispatcher);
-
-/* not exported */
-void _mcd_dispatcher_add_request (McdDispatcher *dispatcher,
-                                  McdAccount *account, McdChannel *channel);
-G_GNUC_INTERNAL void _mcd_dispatcher_take_channels (
-    McdDispatcher *dispatcher, GList *channels, gboolean requested);
-G_GNUC_INTERNAL
-void _mcd_dispatcher_add_channel_request (McdDispatcher *dispatcher,
-                                          McdChannel *channel,
-                                          McdChannel *request);
-G_GNUC_INTERNAL
-void _mcd_dispatcher_recover_channel (McdDispatcher *dispatcher,
-                                      McdChannel *channel);
-
 G_END_DECLS
 
 #endif /* MCD_DISPATCHER_H */
diff --git a/src/mcd-master-priv.h b/src/mcd-master-priv.h
new file mode 100644
index 0000000..8b61721
--- /dev/null
+++ b/src/mcd-master-priv.h
@@ -0,0 +1,38 @@
+/* vi: set et sw=4 ts=8 cino=t0,(0: */
+/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4; tab-width: 8 -*- */
+/*
+ * This file is part of mission-control
+ *
+ * Copyright (C) 2007 Nokia Corporation. 
+ *
+ * Contact: Naba Kumar  <naba.kumar at nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * 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_MASTER_PRIV_H
+#define MCD_MASTER_PRIV_H
+
+#include "mcd-master.h"
+
+G_BEGIN_DECLS
+
+G_GNUC_INTERNAL
+gboolean _mcd_master_account_conditions_satisfied (McdMaster *master,
+                                                   McdAccount *account);
+
+G_END_DECLS
+#endif
diff --git a/src/mcd-master.c b/src/mcd-master.c
index e8c59bc..d52d32e 100644
--- a/src/mcd-master.c
+++ b/src/mcd-master.c
@@ -56,6 +56,7 @@
 #include <dbus/dbus-glib-lowlevel.h>
 
 #include "mcd-master.h"
+#include "mcd-master-priv.h"
 #include "mcd-proxy.h"
 #include "mcd-manager.h"
 #include "mcd-dispatcher.h"
diff --git a/src/mcd-master.h b/src/mcd-master.h
index 192c0fb..e9e4720 100644
--- a/src/mcd-master.h
+++ b/src/mcd-master.h
@@ -80,9 +80,6 @@ void mcd_master_add_connection_parameter (McdMaster *master, const gchar *name,
 void mcd_master_get_nth_account_connection (McdMaster *master, gint i,
 					    McdAccountConnectionFunc *func,
 					    gpointer *userdata);
-G_GNUC_INTERNAL
-gboolean _mcd_master_account_conditions_satisfied (McdMaster *master,
-                                                   McdAccount *account);
 
 G_END_DECLS
 #endif /* MCD_MASTER_H */
-- 
1.5.6.5




More information about the telepathy-commits mailing list