summaryrefslogtreecommitdiff
path: root/addressbook/libebook/e-book.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-09-30 16:49:15 +0000
committerChris Toshok <toshok@src.gnome.org>2004-09-30 16:49:15 +0000
commit88cc5fde8dbc62f3c9d5c6304b91722d6f314fb8 (patch)
tree9721a468f6091f30e804cf4369d8f6cbba1df254 /addressbook/libebook/e-book.c
parentdd7565375dac0b53e48e40dd31ad6f64c9d0460f (diff)
downloadevolution-data-server-88cc5fde8dbc62f3c9d5c6304b91722d6f314fb8.tar.gz
this function takes an EBookBackendFactory* now, instead of an
2004-09-30 Chris Toshok <toshok@ximian.com> * libedata-book/e-data-book-factory.c (e_data_book_factory_register_backend): this function takes an EBookBackendFactory* now, instead of an EBookBackendFactoryFn. (e_data_book_factory_register_backends): new function. Get the extensions that implement E_TYPE_BOOK_BACKEND_FACTORY, and register them. (e_data_book_factory_lookup_backend_factory): use an EBookBackendFactory instead of EBookBackendFactoryFn. (impl_GNOME_Evolution_Addressbook_BookFactory_getBook): change to match the EBookBackendFactoryFn -> EBookBackendFactory switch. * libedata-book/e-book-backend.h: remove typedef for EBookBackendFactoryFn. * libedata-book/e-book-backend-sync.h: remove typedef for EBookBackendSyncFactoryFn, since it wasn't ever used (and even the non-sync version is obsolete now.) * libedata-book/e-book-backend-factory.[ch]: new file, superclass for all dynamically loaded addressbook factories. * libedata-book/Makefile.am (libedata_book_la_SOURCES): add e-book-backend-factory.c (libedata_bookinclude_HEADERS): add e-book-backend-factory.h * libebook/e-book.c (activate_factories_for_uri): don't look for factories based on the supported_protocol property, since we can't use those anymore with dynamically loaded backends. * backends/file/e-book-backend-file-factory.[ch]: new files, subclass EBookBackendFactory. * backends/file/Makefile.am (extension_LTLIBRARIES): libebookbackendfile.la is no longer noinst. (libebookbackendfile_la_SOURCES): add e-book-backend-file-factory.[ch]. * backends/groupwise/e-book-backend-groupwise-factory.[ch]: new files, subclass EBookBackendFactory. * backends/groupwise/Makefile.am (extension_LTLIBRARIES): libebookbackendgroupwise.la is no longer noinst. (libebookbackendfile_la_SOURCES): add e-book-backend-groupwise-factory.[ch]. * backends/ldap/e-book-backend-ldap-factory.[ch]: new files, subclass EBookBackendFactory. * backends/ldap/Makefile.am (extension_LTLIBRARIES): libebookbackendldap.la is no longer noinst. (libebookbackendfile_la_SOURCES): add e-book-backend-ldap-factory.[ch]. * backends/vcf/e-book-backend-vcf-factory.[ch]: new files, subclass EBookBackendFactory. * backends/vcf/Makefile.am (extension_LTLIBRARIES): libebookbackendvcf.la is no longer noinst. (libebookbackendfile_la_SOURCES): add e-book-backend-vcf-factory.[ch].
Diffstat (limited to 'addressbook/libebook/e-book.c')
-rw-r--r--addressbook/libebook/e-book.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index 1870df678..c6f4fa112 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -2771,19 +2771,10 @@ activate_factories_for_uri (EBook *book, const char *uri)
CORBA_Environment ev;
Bonobo_ServerInfoList *info_list = NULL;
int i;
- char *protocol, *query, *colon;
+ char *query;
GList *factories = NULL;
- colon = strchr (uri, ':');
- if (!colon) {
- g_warning ("e_book_load_uri: Unable to determine protocol in the URI\n");
- return FALSE;
- }
-
- protocol = g_strndup (uri, colon-uri);
- query = g_strdup_printf ("repo_ids.has ('IDL:GNOME/Evolution/DataServer/BookFactory:" BASE_VERSION "')"
- " AND addressbook:supported_protocols.has ('%s')", protocol
- );
+ query = "repo_ids.has ('IDL:GNOME/Evolution/DataServer/BookFactory:" BASE_VERSION "')";
CORBA_exception_init (&ev);
@@ -2799,7 +2790,7 @@ activate_factories_for_uri (EBook *book, const char *uri)
}
if (info_list->_length == 0) {
- g_warning ("Can't find installed BookFactory that handles protocol '%s'.", protocol);
+ g_warning ("Can't find installed BookFactories");
CORBA_exception_free (&ev);
goto done;
}
@@ -2824,8 +2815,6 @@ activate_factories_for_uri (EBook *book, const char *uri)
done:
if (info_list)
CORBA_free (info_list);
- g_free (query);
- g_free (protocol);
return factories;
}