]> git.0d.be Git - empathy.git/commitdiff
Add empathy_contact_manager_initialized()
authorDavyd Madeley <davyd@madeley.id.au>
Sat, 25 Apr 2009 01:39:55 +0000 (09:39 +0800)
committerDavyd Madeley <davyd@madeley.id.au>
Wed, 15 Jul 2009 10:12:15 +0000 (11:12 +0100)
libempathy/empathy-contact-manager.c
libempathy/empathy-contact-manager.h

index 5ce463c4ca75ad0d1aa572127559ec27fd971697..302fad3c53f269ded86efbd39a3a25befebc2ca0 100644 (file)
@@ -204,6 +204,23 @@ contact_manager_constructor (GType type,
        return retval;
 }
 
+/**
+ * empathy_contact_manager_initialized:
+ *
+ * Reports whether or not the singleton has already been created.
+ *
+ * There can be instances where you want to access the #EmpathyContactManager
+ * only if it has been set up for this process.
+ *
+ * Returns: %TRUE if the #EmpathyContactManager singleton has previously
+ * been initialized.
+ */
+gboolean
+empathy_contact_manager_initialized (void)
+{
+       return (manager_singleton != NULL);
+}
+
 static void
 empathy_contact_manager_class_init (EmpathyContactManagerClass *klass)
 {
index d68b4ea268d95ece29229c14bf201a7087ea6471..97e21464ac54c092f553afde54af80c7f5801f05 100644 (file)
@@ -50,6 +50,7 @@ struct _EmpathyContactManagerClass {
 };
 
 GType                  empathy_contact_manager_get_type (void) G_GNUC_CONST;
+gboolean               empathy_contact_manager_initialized (void);
 EmpathyContactManager *empathy_contact_manager_dup_singleton  (void);
 EmpathyTpContactList * empathy_contact_manager_get_list (EmpathyContactManager *manager,
                                                         TpConnection          *connection);