[empathy] Add empathy_contact_manager_initialized()



commit 24f3f86b2bd9c42a9ea9f498980f0d255e35bb32
Author: Davyd Madeley <davyd madeley id au>
Date:   Sat Apr 25 09:39:55 2009 +0800

    Add empathy_contact_manager_initialized()

 libempathy/empathy-contact-manager.c |   17 +++++++++++++++++
 libempathy/empathy-contact-manager.h |    1 +
 2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 5ce463c..302fad3 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -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)
 {
diff --git a/libempathy/empathy-contact-manager.h b/libempathy/empathy-contact-manager.h
index d68b4ea..97e2146 100644
--- a/libempathy/empathy-contact-manager.h
+++ b/libempathy/empathy-contact-manager.h
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]