[next] telepathy-glib: tp_client_factory_dup_account_manager: rename to _ensure_account_manager

Simon McVittie smcv at kemper.freedesktop.org
Thu Apr 3 07:25:27 PDT 2014


Module: telepathy-glib
Branch: next
Commit: d1a3f5bf60c774510e83d68d87b369d1e948f2da
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=d1a3f5bf60c774510e83d68d87b369d1e948f2da

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Tue Apr  1 14:14:14 2014 +0100

tp_client_factory_dup_account_manager: rename to _ensure_account_manager

Xavier was going for "singletons use _dup_, objects that are per-path
use _ensure_" but we agreed that using _ensure_ for both was less
confusing.

---

 docs/reference/telepathy-glib/telepathy-glib-sections.txt |    2 +-
 telepathy-glib/account-manager.c                          |    2 +-
 telepathy-glib/client-factory.c                           |    4 ++--
 telepathy-glib/client-factory.h                           |    3 ++-
 tests/dbus/account-manager.c                              |    2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index e958afd..b53bdbd 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -5730,7 +5730,7 @@ tp_client_factory_can_set_default
 tp_client_factory_get_dbus_daemon
 tp_client_factory_get_dbus_connection
 <SUBSECTION>
-tp_client_factory_dup_account_manager
+tp_client_factory_ensure_account_manager
 <SUBSECTION>
 tp_client_factory_ensure_account
 tp_client_factory_dup_account_features
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index a013826..b3c497b 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -698,7 +698,7 @@ tp_account_manager_dup (void)
       return NULL;
     }
 
-  self = tp_client_factory_dup_account_manager (factory);
+  self = tp_client_factory_ensure_account_manager (factory);
 
   g_object_unref (factory);
 
diff --git a/telepathy-glib/client-factory.c b/telepathy-glib/client-factory.c
index ff1d8e5..6da6225 100644
--- a/telepathy-glib/client-factory.c
+++ b/telepathy-glib/client-factory.c
@@ -625,7 +625,7 @@ tp_client_factory_get_dbus_connection (TpClientFactory *self)
 }
 
 /**
- * tp_client_factory_dup_account_manager:
+ * tp_client_factory_ensure_account_manager:
  * @self: a #TpClientFactory object
  *
  * <!-- -->
@@ -635,7 +635,7 @@ tp_client_factory_get_dbus_connection (TpClientFactory *self)
  * Since: 0.UNRELEASED
  */
 TpAccountManager *
-tp_client_factory_dup_account_manager (TpClientFactory *self)
+tp_client_factory_ensure_account_manager (TpClientFactory *self)
 {
   TpAccountManager *account_manager;
 
diff --git a/telepathy-glib/client-factory.h b/telepathy-glib/client-factory.h
index 889a861..1f18913 100644
--- a/telepathy-glib/client-factory.h
+++ b/telepathy-glib/client-factory.h
@@ -132,7 +132,8 @@ gboolean tp_client_factory_can_set_default (void);
 TpDBusDaemon *tp_client_factory_get_dbus_daemon (TpClientFactory *self);
 GDBusConnection *tp_client_factory_get_dbus_connection (TpClientFactory *self);
 
-TpAccountManager *tp_client_factory_dup_account_manager (TpClientFactory *self);
+TpAccountManager *tp_client_factory_ensure_account_manager (
+    TpClientFactory *self);
 
 /* TpAccount */
 TpAccount *tp_client_factory_ensure_account (TpClientFactory *self,
diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c
index 2bd254d..8e89827 100644
--- a/tests/dbus/account-manager.c
+++ b/tests/dbus/account-manager.c
@@ -54,7 +54,7 @@ account_manager_new (TpDBusDaemon *dbus)
   TpAccountManager *am;
 
   factory = tp_client_factory_new (dbus);
-  am = tp_client_factory_dup_account_manager (factory);
+  am = tp_client_factory_ensure_account_manager (factory);
   g_object_unref (factory);
 
   return am;



More information about the telepathy-commits mailing list