From 9420ec95745a249279df14edcecf316f61ee0a54 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 29 Oct 2001 22:40:16 +0000 Subject: add prototype for pas_book_factory_dump_active_backends. 2001-10-29 Chris Toshok * backend/pas/pas-book-factory.h: add prototype for pas_book_factory_dump_active_backends. * backend/pas/pas-book-factory.c (pas_book_factory_dump_active_backends): new function. (dump_active_server_map_entry): new function. svn path=/trunk/; revision=14371 --- addressbook/ChangeLog | 11 ++++++++++- addressbook/backend/pas/pas-book-factory.c | 23 +++++++++++++++++++++++ addressbook/backend/pas/pas-book-factory.h | 2 ++ 3 files changed, 35 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 9a9b602d0d..cc4d49d593 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +2001-10-29 Chris Toshok + + * backend/pas/pas-book-factory.h: add prototype for + pas_book_factory_dump_active_backends. + + * backend/pas/pas-book-factory.c + (pas_book_factory_dump_active_backends): new function. + (dump_active_server_map_entry): new function. + 2001-10-29 Jon Trowbridge * gui/component/select-names/e-select-names-completion.c @@ -60,7 +69,6 @@ (field_activated): Stop editing on the activate signal and remove the focus from the text. Fixes Ximian bug #12286. ->>>>>>> 1.897 2001-10-28 JP Rosevear * conduit/address-conduit.h: tidy @@ -69,6 +77,7 @@ * conduit/address-conduit.c (add_record): unref ecard when done +>>>>>>> 1.898 2001-10-28 Jon Trowbridge * backend/ebook/e-card.c (e_card_date_from_string): Expose this 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); -- cgit v1.2.3