aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/pas')
-rw-r--r--addressbook/backend/pas/pas-book-factory.c23
-rw-r--r--addressbook/backend/pas/pas-book-factory.h2
2 files changed, 25 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-book-factory.c b/addressbook/backend/pas/pas-book-factory.c
index cb7b291a9e..6d4bcd8eb1 100644
--- a/addressbook/backend/pas/pas-book-factory.c
+++ b/addressbook/backend/pas/pas-book-factory.c
@@ -114,6 +114,29 @@ pas_book_factory_get_n_backends (PASBookFactory *factory)
return g_hash_table_size (factory->priv->active_server_map);
}
+static void
+dump_active_server_map_entry (gpointer key, gpointer value, gpointer data)
+{
+ char *uri;
+ PASBackend *backend;
+
+ uri = key;
+ backend = PAS_BACKEND (value);
+
+ g_message (" %s: %p", uri, backend);
+}
+
+void
+pas_book_factory_dump_active_backends (PASBookFactory *factory)
+{
+ g_message ("Active PAS backends");
+
+ g_hash_table_foreach (factory->priv->active_server_map,
+ dump_active_server_map_entry,
+ NULL);
+
+}
+
/* Callback used when a backend loses its last connected client */
static void
backend_last_client_gone_cb (PASBackend *backend, gpointer data)
diff --git a/addressbook/backend/pas/pas-book-factory.h b/addressbook/backend/pas/pas-book-factory.h
index 22d4a87b3e..1936701296 100644
--- a/addressbook/backend/pas/pas-book-factory.h
+++ b/addressbook/backend/pas/pas-book-factory.h
@@ -35,6 +35,8 @@ void pas_book_factory_register_backend (PASBookFactory
int pas_book_factory_get_n_backends (PASBookFactory *factory);
+void pas_book_factory_dump_active_backends (PASBookFactory *factory);
+
gboolean pas_book_factory_activate (PASBookFactory *factory, const char *iid);
GtkType pas_book_factory_get_type (void);