[telepathy-glib/master] Publicize tp_dbus_daemon_{request, release}_name

Will Thompson will.thompson at collabora.co.uk
Mon May 18 03:58:35 PDT 2009


---
 docs/reference/telepathy-glib-sections.txt |    4 +++-
 telepathy-glib/base-connection-manager.c   |    4 +---
 telepathy-glib/base-connection.c           |    6 ++----
 telepathy-glib/dbus-internal.h             |    5 -----
 telepathy-glib/dbus.c                      |   28 +++++++++++++++++-----------
 telepathy-glib/dbus.h                      |    5 +++++
 6 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 122bfa2..ad3f9dc 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -1492,8 +1492,10 @@ TpDBusDaemonClass
 tp_dbus_daemon_dup
 tp_dbus_daemon_new
 TpDBusDaemonNameOwnerChangedCb
-tp_dbus_daemon_watch_name_owner
 tp_dbus_daemon_cancel_name_owner_watch
+tp_dbus_daemon_release_name
+tp_dbus_daemon_request_name
+tp_dbus_daemon_watch_name_owner
 <SUBSECTION>
 tp_cli_dbus_daemon_call_add_match
 tp_cli_dbus_daemon_call_get_connection_se_linux_security_context
diff --git a/telepathy-glib/base-connection-manager.c b/telepathy-glib/base-connection-manager.c
index 90924ec..4785aca 100644
--- a/telepathy-glib/base-connection-manager.c
+++ b/telepathy-glib/base-connection-manager.c
@@ -42,8 +42,6 @@
 #include <telepathy-glib/gtypes.h>
 #include <telepathy-glib/util.h>
 
-#include "telepathy-glib/dbus-internal.h"
-
 #define DEBUG_FLAG TP_DEBUG_PARAMS
 #include "telepathy-glib/debug-internal.h"
 
@@ -999,7 +997,7 @@ tp_base_connection_manager_register (TpBaseConnectionManager *self)
   string = g_string_new (TP_CM_BUS_NAME_BASE);
   g_string_append (string, cls->cm_dbus_name);
 
-  if (!_tp_dbus_daemon_request_name (bus_proxy, string->str, TRUE, &error))
+  if (!tp_dbus_daemon_request_name (bus_proxy, string->str, TRUE, &error))
     {
       g_warning ("%s", error->message);
       g_error_free (error);
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index 8adf71b..a301299 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -250,8 +250,6 @@
 #include <telepathy-glib/svc-generic.h>
 #include <telepathy-glib/util.h>
 
-#include "telepathy-glib/dbus-internal.h"
-
 #define DEBUG_FLAG TP_DEBUG_CONNECTION
 #include "telepathy-glib/debug-internal.h"
 
@@ -499,7 +497,7 @@ tp_base_connection_dispose (GObject *object)
     {
       if (self->bus_name != NULL)
         {
-          _tp_dbus_daemon_release_name (priv->bus_proxy, self->bus_name, NULL);
+          tp_dbus_daemon_release_name (priv->bus_proxy, self->bus_name, NULL);
         }
 
       g_object_unref (priv->bus_proxy);
@@ -1541,7 +1539,7 @@ tp_base_connection_register (TpBaseConnection *self,
   g_free (safe_proto);
   g_free (unique_name);
 
-  if (!_tp_dbus_daemon_request_name (priv->bus_proxy, self->bus_name, FALSE,
+  if (!tp_dbus_daemon_request_name (priv->bus_proxy, self->bus_name, FALSE,
         error))
     {
       g_free (self->bus_name);
diff --git a/telepathy-glib/dbus-internal.h b/telepathy-glib/dbus-internal.h
index c480ca0..8465c6f 100644
--- a/telepathy-glib/dbus-internal.h
+++ b/telepathy-glib/dbus-internal.h
@@ -29,11 +29,6 @@ G_BEGIN_DECLS
 gboolean _tp_dbus_daemon_get_name_owner (TpDBusDaemon *self, gint timeout_ms,
     const gchar *well_known_name, gchar **unique_name, GError **error);
 
-gboolean _tp_dbus_daemon_request_name (TpDBusDaemon *self,
-    const gchar *well_known_name, gboolean idempotent, GError **error);
-gboolean _tp_dbus_daemon_release_name (TpDBusDaemon *self,
-    const gchar *well_known_name, GError **error);
-
 void _tp_register_dbus_glib_marshallers (void);
 
 G_END_DECLS
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index da323cc..91b53d4 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -1034,7 +1034,7 @@ _tp_dbus_daemon_get_name_owner (TpDBusDaemon *self,
 }
 
 /**
- * _tp_dbus_daemon_request_name:
+ * tp_dbus_daemon_request_name:
  * @self: a TpDBusDaemon
  * @well_known_name: a well-known name to acquire
  * @idempotent: whether to consider it to be a success if this process
@@ -1044,13 +1044,16 @@ _tp_dbus_daemon_get_name_owner (TpDBusDaemon *self,
  * Claim the given well-known name without queueing, allowing replacement
  * or replacing an existing name-owner.
  *
- * For internal use by TpBaseConnection, TpBaseConnectionManager.
+ * Returns: %TRUE if @well_known_name was claimed, or %FALSE and sets @error if
+ *          an error occurred.
+ *
+ * Since: 0.7.UNRELEASED
  */
 gboolean
-_tp_dbus_daemon_request_name (TpDBusDaemon *self,
-                              const gchar *well_known_name,
-                              gboolean idempotent,
-                              GError **error)
+tp_dbus_daemon_request_name (TpDBusDaemon *self,
+                             const gchar *well_known_name,
+                             gboolean idempotent,
+                             GError **error)
 {
   TpProxy *as_proxy = (TpProxy *) self;
   DBusGConnection *gconn = as_proxy->dbus_connection;
@@ -1105,19 +1108,22 @@ _tp_dbus_daemon_request_name (TpDBusDaemon *self,
 }
 
 /**
- * _tp_dbus_daemon_release_name:
+ * tp_dbus_daemon_release_name:
  * @self: a TpDBusDaemon
  * @well_known_name: a well-known name to acquire
  * @error: used to raise an error if %FALSE is returned
  *
  * Release the given well-known name.
  *
- * For internal use by TpBaseConnection, TpBaseConnectionManager.
+ * Returns: %TRUE if @well_known_name was released, or %FALSE and sets @error
+ *          if an error occurred.
+ *
+ * Since: 0.7.UNRELEASED
  */
 gboolean
-_tp_dbus_daemon_release_name (TpDBusDaemon *self,
-                              const gchar *well_known_name,
-                              GError **error)
+tp_dbus_daemon_release_name (TpDBusDaemon *self,
+                             const gchar *well_known_name,
+                             GError **error)
 {
   TpProxy *as_proxy = (TpProxy *) self;
   DBusGConnection *gconn = as_proxy->dbus_connection;
diff --git a/telepathy-glib/dbus.h b/telepathy-glib/dbus.h
index 949b48a..966cc8d 100644
--- a/telepathy-glib/dbus.h
+++ b/telepathy-glib/dbus.h
@@ -65,6 +65,11 @@ gboolean tp_dbus_daemon_cancel_name_owner_watch (TpDBusDaemon *self,
     const gchar *name, TpDBusDaemonNameOwnerChangedCb callback,
     gconstpointer user_data);
 
+gboolean tp_dbus_daemon_request_name (TpDBusDaemon *self,
+    const gchar *well_known_name, gboolean idempotent, GError **error);
+gboolean tp_dbus_daemon_release_name (TpDBusDaemon *self,
+    const gchar *well_known_name, GError **error);
+
 typedef enum
 {
   TP_DBUS_NAME_TYPE_UNIQUE = 1,
-- 
1.5.6.5




More information about the telepathy-commits mailing list