From 0ffd79d9eacd8e9049779e19c9f9c0f3e11e48c4 Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 1 Nov 2002 13:26:26 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'RELEASE_1_0_1'. svn path=/tags/RELEASE_1_0_1/; revision=18481 --- wombat/.cvsignore | 15 -- wombat/ChangeLog | 350 ----------------------------- wombat/Evolution-Wombat.idl | 19 -- wombat/GNOME_Evolution_WombatLDAP.oaf.in | 76 ------- wombat/GNOME_Evolution_WombatNOLDAP.oaf.in | 75 ------- wombat/Makefile.am | 82 ------- wombat/wombat-moniker.c | 159 ------------- wombat/wombat-moniker.h | 11 - wombat/wombat-private-moniker.c | 171 -------------- wombat/wombat-private-moniker.h | 11 - wombat/wombat.c | 305 ------------------------- 11 files changed, 1274 deletions(-) delete mode 100644 wombat/.cvsignore delete mode 100644 wombat/ChangeLog delete mode 100644 wombat/Evolution-Wombat.idl delete mode 100644 wombat/GNOME_Evolution_WombatLDAP.oaf.in delete mode 100644 wombat/GNOME_Evolution_WombatNOLDAP.oaf.in delete mode 100644 wombat/Makefile.am delete mode 100644 wombat/wombat-moniker.c delete mode 100644 wombat/wombat-moniker.h delete mode 100644 wombat/wombat-private-moniker.c delete mode 100644 wombat/wombat-private-moniker.h delete mode 100644 wombat/wombat.c (limited to 'wombat') diff --git a/wombat/.cvsignore b/wombat/.cvsignore deleted file mode 100644 index 8f01d12584..0000000000 --- a/wombat/.cvsignore +++ /dev/null @@ -1,15 +0,0 @@ -.deps -.libs -.pure -Makefile -Makefile.in -*.lo -*.la -wombat-stubs.c -wombat-skels.c -wombat-common.c -wombat.h -wombat -wombat.pure -GNOME_Evolution_Wombat.oaf -GNOME_Evolution_Wombat.oaf.in diff --git a/wombat/ChangeLog b/wombat/ChangeLog deleted file mode 100644 index a01b4af975..0000000000 --- a/wombat/ChangeLog +++ /dev/null @@ -1,350 +0,0 @@ -2002-08-01 Chris Toshok - - * wombat.c (last_calendar_gone_cb): remove the annoying fprintf - about Queueing termination, since we never actually terminate. - -2002-07-25 Chris Toshok - - * wombat.c (main): add a silly "up and running" message. - -2002-07-22 Dan Winship - - * Makefile.am (wombat_LDADD): Include libpcsfile.a, libpasfile.a - and (if ENABLE_LDAP) libpasldap.a - -2002-07-15 Peter Williams - - * Makefile.am (EXTRA_DIST): Apparently we can't remove - $(idl_DATA) from $(EXTRA_DIST). - -2002-07-08 Peter Williams - - * wombat.idl: Renamed to Evolution-Wombat.idl, since - we're installing it now and should play nice namespacily. - - * Makefile.am: Rename wombat.idl and install it. - -2002-04-26 Jeffrey Stedfast - - * Makefile.am: Removed dependency on libibex. - -2002-04-04 Jeffrey Stedfast - - * Makefile.am: Re-Add $(WOMBAT_LIBS) so wombat actually links. - -2002-04-04 Ettore Perazzoli - - * Makefile.am (wombat_LDADD): Put DB3_LDADD and LDAP_LIBS on the - top so the PAS backend uses the right version of DB3 and always - links to LDAP. - -2002-03-19 Dan Winship - - * Makefile.am (wombat_LDADD): s/libversit.la/libversit.a/ - -2002-01-28 Radek Doulik - - * Makefile.am (wombat_LDADD): added DB3_LDADD - -2002-01-27 Ettore Perazzoli - - * Makefile.am: Use WOMBAT_LIBS and WOMBAT_CFLAGS. - -2001-10-29 Damon Chaplin - - * Makefile.am (wombat_LDADD): use libical-evolution.la - -2001-10-29 Chris Toshok - - * wombat.c (dump_backends): new function, ifdef'ed DEBUG_BACKENDS. - (main): add SIGUSR2 handler for dump_backends, ifdef'ed - DEBUG_BACKENDS. - -2001-10-22 Ettore Perazzoli - - * wombat.c (main): Register the public ConfigDatabase interface - last to work around an OAF race condition. - -2001-10-11 Chris Toshok - - * Makefile.am (wombat_SOURCES): add wombat-private-moniker.[ch]. - - * GNOME_Evolution_WombatLDAP.oaf.in: add wombat-private - factory/moniker. - - * GNOME_Evolution_WombatNOLDAP.oaf.in: same. - - * wombat-private-moniker.[ch]: xmldb for private database -- non - configuration settings, basically. - -2001-10-02 Chris Toshok - - * GNOME_Evolution_WombatNOLDAP.oaf.in: add - addressbook:supported_protocols containing just the file protocol. - - * GNOME_Evolution_WombatLDAP.oaf.in: add - addressbook:supported_protocols containing both ldap and file. - - * Makefile.am (OAF_IN_FILE): we have to possible files now, since - the addressbook looks up factories by corba interface and the - protocols supported by the factory (as listed in the .oaf file.) - - * .cvsignore: ignore GNOME_Evolution_Wombat.oaf.in, since it's - generated now. - -2001-09-26 Chris Toshok - - * wombat.c (setup_pas): add OAFIID parameter to the call to the - pas_book_factory_activate function, as with the calendar stuff. - -2001-09-19 Rodrigo Moya - - * wombat.c (setup_pcs): add OAFIID parameter to the call to the - cal_factory_oaf_register function - -2001-08-02 Jon Trowbridge - - * Makefile.am: Added camel dependency (now needed by ebook). - -2001-07-10 Peter Williams - - * Makefile.am (EXTRA_DIST): Distribute wombat.idl. - -2001-06-24 Federico Mena Quintero - - * wombat.c (main): Shut down gnome-vfs. - -2001-06-22 Jeffrey Stedfast - - * Makefile.am (wombat_LDADD): Added libwombat/libwombat.la - -2001-06-21 Rodrigo Moya - - * wombat.idl: added new interface (WombatClient) - -2001-06-18 Dan Winship - - * Makefile.am (wombat_LDADD): Add libedb3util - -2001-06-03 Ettore Perazzoli - - * Makefile.am (wombat_LDADD): Move `$(DB3_LDADD)' before libeutil. - -2001-05-31 Christopher James Lahey - - * Makefile.am (wombat_LDADD): Added db3 libs. - -2001-04-03 Dietmar Maurer - - * wombat-moniker.c (wombat_lookup_db): fix ref. counting problem - -2001-03-27 Dietmar Maurer - - * wombat-moniker.c (wombat_moniker_resolve): we can now resolve to - storages and streams. - -2001-03-26 Kjartan Maraas - - * wombat.c: Replace includes - and add to remove warnings from newer gcc. - -2001-03-21 JP Rosevear - - * Makefile.am: add wombat-moniker.h as a source so it gets disted - -2001-03-21 Dietmar Maurer - - * wombat.c (setup_config): initialise the moniker factory - - * GNOME_Evolution_Wombat.oaf.in: added the necessary entries for - the wombat moniker. - - * wombat-moniker.[ch]: wombat is now a moniker - -2001-03-15 Jon Trowbridge - - * wombat.c (main): If we can't initialize a service on startup, - tell us which one before terminating. - -2001-02-27 Federico Mena Quintero - - * wombat.c (init_corba): Use VERSION and the Wombat description - for gnome_init_with_popt_table(). - -2001-02-16 Federico Mena Quintero - - * wombat.c (main): Unref the factories if we failed to initialize - anything. - (setup_pcs): Call cal_factory_oaf_register(). Removed the OAF - registration code from here; now it is in the CalFactory itself. - -2001-02-12 Kjartan Maraas - - * Makefile.am: xml-i18n-tools setup. - * GNOME_Evolution_Wombat.oaf.in: Mark strings for translation. - -2001-02-08 JP Rosevear - - * Makefile.am: Remove useless ldflags - -2001-01-17 Federico Mena Quintero - - * wombat.c (setup_pcs): Return a success value. - (setup_pas): Likewise. - (setup_config): Likewise. - (main): Exit if we could not initialize all of the Wombat - services. - (init_corba): Check the return value of gnome_init_with_popt_table(). - (main): Call bindtextdomain() and textdomain(). - -2000-12-23 Ettore Perazzoli - - * Makefile.am (INCLUDES): Add `-I$(top_builddir)/calendar/pcs' for - builddir compliance. - -2000-12-13 Ettore Perazzoli - - * Makefile.am (INCLUDES): Sigh. - `-I$(top_builddir)/libical/src/libical'. - -2000-12-11 Federico Mena Quintero - - * Makefile.am (wombat_LDADD): Link to the libical shared library. - -2000-11-11 Matt Bissiri - - * wombat.oafinfo: - Update the remaining "IDL:Evolution*" to "IDL:GNOME/Evolution*" - to sync up with yesterday's IDL re-scoping. - -2000-10-23 Dan Winship - - * Makefile.am (INCLUDES): Update EVOLUTION_LOCALEDIR - -2000-09-25 Federico Mena Quintero - - * Makefile.am (INCLUDES): Add the libical include path. - -2000-09-25 Jeffrey Stedfast - - * Makefile.am: ename moved so link against - e-util/ename/libename.la - -2000-08-26 JP Rosevear - - * Makefile.am: Remove gnorba related code - - * wombat.c: Remove gnorba related code - - * wombat.gnorba: Kill - -2000-08-24 Federico Mena Quintero - - * Makefile.am (wombat_LDADD): Reorder libical libs. - -2000-08-02 Federico Mena Quintero - - * wombat.c (setup_pcs): Register the iCalendar file backend instad - of the old IMC backend. - -2000-05-13 Ettore Perazzoli - - * Makefile.am (INCLUDES): GNOME includes should come last, so that - we are sure we pick our own includes instead of the installed - ones, if any. - -2000-05-10 Christopher James Lahey - - * Makefile.am: Added an include for the pcs directory. - -2000-05-08 Federico Mena Quintero - - * wombat.c (setup_pcs): Register the "file" method with the IMC - backend. - -2000-05-05 Chris Toshok - * .cvsignore: ignore wombat.pure - - * Makefile.am: add support for building wombat.pure - -2000-05-01 Federico Mena Quintero - - * wombat.c (main): Doh, also unref the pas_book_factory when we - are done. - -2000-04-30 Federico Mena Quintero - - * wombat.c (setup_pas): Connect to the "last_book_gone" signal of - the book factory. - (last_book_gone_cb): Handle the "last_book_gone" signal. - (termination_handler): Check if the book factory has zero running - backends. - -2000-04-30 Christopher James Lahey - - * Makefile.am: Added ename libs to LDADD. - -2000-04-27 Ettore Perazzoli - - * wombat.c - (register_pcs): New function for registering into the name - service. Varies according on whether we are `USING_OAF' or not. - (init_corba): New function for initializing the CORBA stuff. - Implementation depends on `USING_OAF'. - (init_bonobo): Use `init_corba'. - - * Makefile.am: Updated for OAF. - -2000-04-25 Federico Mena Quintero - - * wombat.c (cal_factory pas_book_factory): New module-wide - variables for the PAS and PCS factories. - (setup_pcs): Connect to the "last_calendar_gone" signal of the - calendar factory. - (last_calendar_gone_cb): Queue a termination job. - (queue_termination): Function to queue a termination job. We have - to use a timeout to reduce the probability of running into GOAD's - race condition with factories. - (termination_handler): Check that the PCS and the PAS have zero - backends. If so, exit the main loop. - (setup_vfs): Use EXIT_FAILURE instead of 1. - (init_bonobo): Likewise. - (main): Destroy the factories and exit Wombat. Wheee! - -2000-04-16 Federico Mena Quintero - - * Makefile.am (INCLUDES): Removed spurious calendar directories - from the include path. Added "wombat" log domain for glib. - (wombat_LDADD): Link libpcs.a instead of the old shared library. - - * wombat.c: cal-factory.h is an internal include file. * wombat.c - (setup_pcs): We should NOT share a CORBA_environment across all - functions! Use our own CORBA_environment. - (init_bonobo): Use our own CORBA_environment. Free the exception - after initializing GOAD, and present some error messages if - necessary. (Should g_message()s for exceptional situations be - marked for translation?). - -2000-04-15 Ettore Perazzoli - - * Makefile.am (INCLUDES): Added - `-I$(top_builddir)/addressbook/backend/pas', and - `-I$(top_builddir)/calendar/pcs' because that's where the - IDL-generated files go. - -2000-04-14 Chris Toshok - - * Makefile.am (wombat_LDADD): use BONOBO_VFS_GNOME_LIBS instead of - BONOBO_HTML_GNOME_LIBS. fixes freebsd's problem running wombat. - -2000-04-14 Federico Mena Quintero - - * wombat.c (setup_pcs): Must pass "object" for the kind to - goad_server_register(); "server" is meaningless. - (setup_pcs): Do not free the CORBA environment more than once. - Also, fix error messages. - - * wombat.gnorba: The GOAD ID is "evolution:calendar-factory", not - "evolution:calendar-server". - - * ChangeLog: Started the ChangeLog for Wombat. diff --git a/wombat/Evolution-Wombat.idl b/wombat/Evolution-Wombat.idl deleted file mode 100644 index 2c9538bfce..0000000000 --- a/wombat/Evolution-Wombat.idl +++ /dev/null @@ -1,19 +0,0 @@ -/* - * The Evolution Personal Organization Server. - * - * Copyright 2000, Ximian, Inc. - */ - -module GNOME { -module Evolution { - - interface WombatClient { - string getPassword (in string prompt, in string key); - void forgetPassword (in string key); - }; - - interface Config { - - }; -}; -}; diff --git a/wombat/GNOME_Evolution_WombatLDAP.oaf.in b/wombat/GNOME_Evolution_WombatLDAP.oaf.in deleted file mode 100644 index 9fc4ec2602..0000000000 --- a/wombat/GNOME_Evolution_WombatLDAP.oaf.in +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wombat/GNOME_Evolution_WombatNOLDAP.oaf.in b/wombat/GNOME_Evolution_WombatNOLDAP.oaf.in deleted file mode 100644 index 88671c411e..0000000000 --- a/wombat/GNOME_Evolution_WombatNOLDAP.oaf.in +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wombat/Makefile.am b/wombat/Makefile.am deleted file mode 100644 index 46438d7f2d..0000000000 --- a/wombat/Makefile.am +++ /dev/null @@ -1,82 +0,0 @@ -INCLUDES = \ - -DG_LOG_DOMAIN=\"wombat\" \ - -I$(top_srcdir)/e-util \ - -I$(top_srcdir) \ - -I$(top_srcdir)/addressbook/backend \ - -I$(top_builddir)/addressbook/backend \ - -I$(top_srcdir)/calendar \ - -I$(top_srcdir)/calendar \ - -I$(top_builddir)/calendar \ - -I$(top_srcdir)/libical/src/libical \ - -I$(top_builddir)/libical/src/libical \ - -DEVOLUTION_DATADIR=\""$(datadir)"\" \ - -DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \ - $(WOMBAT_CFLAGS) - -bin_PROGRAMS = \ - wombat - -wombat_SOURCES = \ - wombat-moniker.c \ - wombat-moniker.h \ - wombat-private-moniker.c \ - wombat-private-moniker.h \ - wombat.c - -if ENABLE_LDAP -LDAP_STUFF = \ - $(top_builddir)/addressbook/backend/pas/libpasldap.a \ - $(LDAP_LIBS) -endif - -wombat_LDADD = \ - $(top_builddir)/addressbook/backend/pas/libpasfile.a \ - $(DB3_LDADD) \ - $(LDAP_STUFF) \ - $(top_builddir)/addressbook/backend/pas/libpas.a \ - $(top_builddir)/addressbook/backend/ebook/libebook.la \ - $(top_builddir)/camel/libcamel.la \ - $(top_builddir)/e-util/ename/libename.la \ - $(top_builddir)/calendar/pcs/libpcsfile.a \ - $(top_builddir)/calendar/pcs/libpcs.a \ - $(top_builddir)/calendar/cal-util/libcal-util.la \ - $(top_builddir)/libical/src/libical/libical-evolution.la \ - $(top_builddir)/libversit/libversit.a \ - $(top_builddir)/e-util/libedb3util.la \ - $(top_builddir)/e-util/libeutil.la \ - $(top_builddir)/libwombat/libwombat.la \ - $(WOMBAT_LIBS) - -oafdir = $(datadir)/oaf - -if ENABLE_LDAP -OAF_IN_FILE=GNOME_Evolution_WombatLDAP.oaf.in -else -OAF_IN_FILE=GNOME_Evolution_WombatNOLDAP.oaf.in -endif - -GNOME_Evolution_Wombat.oaf.in: $(OAF_IN_FILE) - cp $< $@ - -oaf_in_files = GNOME_Evolution_Wombat.oaf.in -oaf_DATA = $(oaf_in_files:.oaf.in=.oaf) - -@XML_I18N_MERGE_OAF_RULE@ - -idldir = $(datadir)/idl - -idl_DATA = Evolution-Wombat.idl - -EXTRA_DIST = $(oaf_DATA) $(oaf_in_files) $(idl_DATA) \ - GNOME_Evolution_WombatLDAP.oaf.in GNOME_Evolution_WombatNOLDAP.oaf.in - -if ENABLE_PURIFY -PLINK = $(LIBTOOL) --mode=link $(PURIFY) $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ - -all-local: wombat.pure - -wombat.pure: wombat - @rm -f wombat.pure - $(PLINK) $(wombat_LDFLAGS) $(wombat_OBJECTS) $(wombat_LDADD) $(LIBS) - -endif diff --git a/wombat/wombat-moniker.c b/wombat/wombat-moniker.c deleted file mode 100644 index e53cb94758..0000000000 --- a/wombat/wombat-moniker.c +++ /dev/null @@ -1,159 +0,0 @@ -#include - -#include -#include -#include -#include -#include "wombat-moniker.h" - -#define DEFAULT_DB_URL "xmldb:" EVOLUTION_DATADIR "/evolution/config.xmldb" -#define USER_DB_URL "xmldb:~/evolution/config.xmldb" - -#define DB_URL (DEFAULT_DB_URL "#" USER_DB_URL) - -static Bonobo_Storage -wombat_root_storage (CORBA_Environment *ev) -{ - static BonoboStorage *root = NULL; - char *path; - - if (!root) { - path = g_strconcat (g_get_home_dir (), "/evolution/config", - NULL); - - root = bonobo_storage_open_full (BONOBO_IO_DRIVER_FS, path, - Bonobo_Storage_CREATE, 0664, - ev); - - g_free (path); - - if (BONOBO_EX (ev) || !root) - return CORBA_OBJECT_NIL; - } - - return BONOBO_OBJREF (root); -} - -static Bonobo_Storage -wombat_lookup_storage (const char *name, - CORBA_Environment *ev) -{ - Bonobo_Storage root; - - if ((root = wombat_root_storage (ev)) == CORBA_OBJECT_NIL) - return CORBA_OBJECT_NIL; - - if (!strcmp (name, "")) - return bonobo_object_dup_ref (root, ev); - - return Bonobo_Storage_openStorage (root, name, Bonobo_Storage_CREATE, - ev); -} - -static Bonobo_Storage -wombat_lookup_stream (const char *name, - CORBA_Environment *ev) -{ - Bonobo_Storage root; - - if (!strcmp (name, "")) { - bonobo_exception_set (ev, ex_Bonobo_Storage_NotFound); - return CORBA_OBJECT_NIL; - } - - if ((root = wombat_root_storage (ev)) == CORBA_OBJECT_NIL) - return CORBA_OBJECT_NIL; - - - return Bonobo_Storage_openStream (root, name, Bonobo_Storage_CREATE, - ev); -} - -static CORBA_Object -wombat_lookup_db (CORBA_Environment *ev) -{ - static CORBA_Object db = CORBA_OBJECT_NIL; - - if (db == CORBA_OBJECT_NIL) - db = bonobo_get_object (DB_URL, - "IDL:Bonobo/ConfigDatabase:1.0", ev); - - bonobo_object_dup_ref (db, ev); - - return db; -} - -static Bonobo_Unknown -wombat_moniker_resolve (BonoboMoniker *moniker, - const Bonobo_ResolveOptions *options, - const CORBA_char *interface, - CORBA_Environment *ev) -{ - CORBA_Object db; - Bonobo_Moniker parent; - const gchar *name; - Bonobo_Storage storage; - Bonobo_Stream stream; - - parent = bonobo_moniker_get_parent (moniker, ev); - if (BONOBO_EX (ev)) - return CORBA_OBJECT_NIL; - - name = bonobo_moniker_get_name (moniker); - - if (parent != CORBA_OBJECT_NIL) { - - g_warning ("wombat: parent moniker are not supproted"); - - bonobo_object_release_unref (parent, ev); - - bonobo_exception_set (ev, ex_Bonobo_Moniker_InterfaceNotFound); - - return CORBA_OBJECT_NIL; - } - - if (!strcmp (interface, "IDL:Bonobo/Storage:1.0")) { - - storage = wombat_lookup_storage (name, ev); - - return storage; - } - - if (!strcmp (interface, "IDL:Bonobo/Stream:1.0")) { - - stream = wombat_lookup_stream (name, ev); - - return stream; - } - - if (!strcmp (interface, "IDL:Bonobo/ConfigDatabase:1.0")) { - - if (strcmp (name, "")) - g_warning ("wombat: unused moniker name"); - - if ((db = wombat_lookup_db (ev)) != CORBA_OBJECT_NIL) - return db; - } - - bonobo_exception_set (ev, ex_Bonobo_Moniker_InterfaceNotFound); - return CORBA_OBJECT_NIL; -} - -BonoboObject * -wombat_moniker_factory (BonoboGenericFactory *this, - const char *object_id, - void *data) -{ - g_return_val_if_fail (object_id != NULL, NULL); - - if (!strcmp (object_id, "OAFIID:Bonobo_Moniker_wombat")) - - return BONOBO_OBJECT (bonobo_moniker_simple_new ( - "wombat:", wombat_moniker_resolve)); - - else - g_warning ("Failing to manufacture a '%s'", object_id); - - return NULL; -} - diff --git a/wombat/wombat-moniker.h b/wombat/wombat-moniker.h deleted file mode 100644 index 46ebcf79c8..0000000000 --- a/wombat/wombat-moniker.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _MONIKER_WOMBAT_H_ -#define _MONIKER_WOMBAT_H_ - -#include - -BonoboObject * -wombat_moniker_factory (BonoboGenericFactory *this, - const char *object_id, - void *data); - -#endif diff --git a/wombat/wombat-private-moniker.c b/wombat/wombat-private-moniker.c deleted file mode 100644 index ae790f39ed..0000000000 --- a/wombat/wombat-private-moniker.c +++ /dev/null @@ -1,171 +0,0 @@ -#include - -#include -#include - -#include -#include -#include -#include -#include "wombat-private-moniker.h" - -#define USER_DB_URL "xmldb:~/evolution/private/config.xmldb" - -#define DB_URL (USER_DB_URL) - -static Bonobo_Storage -wombat_private_root_storage (CORBA_Environment *ev) -{ - static BonoboStorage *root = NULL; - char *path; - - if (!root) { - path = g_strconcat (g_get_home_dir (), "/evolution/private/config", - NULL); - - root = bonobo_storage_open_full (BONOBO_IO_DRIVER_FS, path, - Bonobo_Storage_CREATE, 0664, - ev); - - g_free (path); - - if (BONOBO_EX (ev) || !root) - return CORBA_OBJECT_NIL; - } - - return BONOBO_OBJREF (root); -} - -static Bonobo_Storage -wombat_private_lookup_storage (const char *name, - CORBA_Environment *ev) -{ - Bonobo_Storage root; - - if ((root = wombat_private_root_storage (ev)) == CORBA_OBJECT_NIL) - return CORBA_OBJECT_NIL; - - if (!strcmp (name, "")) - return bonobo_object_dup_ref (root, ev); - - return Bonobo_Storage_openStorage (root, name, Bonobo_Storage_CREATE, - ev); -} - -static Bonobo_Storage -wombat_private_lookup_stream (const char *name, - CORBA_Environment *ev) -{ - Bonobo_Storage root; - - if (!strcmp (name, "")) { - bonobo_exception_set (ev, ex_Bonobo_Storage_NotFound); - return CORBA_OBJECT_NIL; - } - - if ((root = wombat_private_root_storage (ev)) == CORBA_OBJECT_NIL) - return CORBA_OBJECT_NIL; - - - return Bonobo_Storage_openStream (root, name, Bonobo_Storage_CREATE, - ev); -} - -static CORBA_Object -wombat_private_lookup_db (CORBA_Environment *ev) -{ - static CORBA_Object db = CORBA_OBJECT_NIL; - - /* kinda crappy, but make sure permissions for the directory - are correct whenever someone new opens the db. */ - char *private_dir_path; - - private_dir_path = g_strconcat (g_get_home_dir (), - "/evolution/private", - NULL); - chmod (private_dir_path, 0700); - g_free (private_dir_path); - - if (db == CORBA_OBJECT_NIL) - db = bonobo_get_object (DB_URL, - "IDL:Bonobo/ConfigDatabase:1.0", ev); - - bonobo_object_dup_ref (db, ev); - - return db; -} - -static Bonobo_Unknown -wombat_private_moniker_resolve (BonoboMoniker *moniker, - const Bonobo_ResolveOptions *options, - const CORBA_char *interface, - CORBA_Environment *ev) -{ - CORBA_Object db; - Bonobo_Moniker parent; - const gchar *name; - Bonobo_Storage storage; - Bonobo_Stream stream; - - parent = bonobo_moniker_get_parent (moniker, ev); - if (BONOBO_EX (ev)) - return CORBA_OBJECT_NIL; - - name = bonobo_moniker_get_name (moniker); - - if (parent != CORBA_OBJECT_NIL) { - - g_warning ("wombat: parent moniker are not supproted"); - - bonobo_object_release_unref (parent, ev); - - bonobo_exception_set (ev, ex_Bonobo_Moniker_InterfaceNotFound); - - return CORBA_OBJECT_NIL; - } - - if (!strcmp (interface, "IDL:Bonobo/Storage:1.0")) { - - storage = wombat_private_lookup_storage (name, ev); - - return storage; - } - - if (!strcmp (interface, "IDL:Bonobo/Stream:1.0")) { - - stream = wombat_private_lookup_stream (name, ev); - - return stream; - } - - if (!strcmp (interface, "IDL:Bonobo/ConfigDatabase:1.0")) { - - if (strcmp (name, "")) - g_warning ("wombat: unused moniker name"); - - if ((db = wombat_private_lookup_db (ev)) != CORBA_OBJECT_NIL) - return db; - } - - bonobo_exception_set (ev, ex_Bonobo_Moniker_InterfaceNotFound); - return CORBA_OBJECT_NIL; -} - -BonoboObject * -wombat_private_moniker_factory (BonoboGenericFactory *this, - const char *object_id, - void *data) -{ - g_return_val_if_fail (object_id != NULL, NULL); - - if (!strcmp (object_id, "OAFIID:Bonobo_Moniker_wombat_private")) - - return BONOBO_OBJECT (bonobo_moniker_simple_new ( - "wombat-private:", wombat_private_moniker_resolve)); - - else - g_warning ("Failing to manufacture a '%s'", object_id); - - return NULL; -} - diff --git a/wombat/wombat-private-moniker.h b/wombat/wombat-private-moniker.h deleted file mode 100644 index 2c2bbbca8e..0000000000 --- a/wombat/wombat-private-moniker.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _MONIKER_WOMBAT_PRIVATE_H_ -#define _MONIKER_WOMBAT_PRIVATE_H_ - -#include - -BonoboObject * -wombat_private_moniker_factory (BonoboGenericFactory *this, - const char *object_id, - void *data); - -#endif diff --git a/wombat/wombat.c b/wombat/wombat.c deleted file mode 100644 index 80ca51513f..0000000000 --- a/wombat/wombat.c +++ /dev/null @@ -1,305 +0,0 @@ -/* Wombat personal information server - main file - * - * Author: Nat Friedman - * - * Copyright 2000, Ximian, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* define this if you need/want to be able to send USR2 to wombat and - get a list of the active backends */ -/*#define DEBUG_BACKENDS*/ - -#include -#ifdef DEBUG_BACKENDS -#include -#endif -#include -#include -#include -#include -#include -#include -#include - -#include "pas/pas-book-factory.h" -#include "pas/pas-backend-file.h" - -#include "calendar/pcs/cal-factory.h" -#include "calendar/pcs/cal-backend-file.h" - -#ifdef HAVE_LDAP -#include "pas/pas-backend-ldap.h" -#endif - -#include "wombat-moniker.h" -#include "wombat-private-moniker.h" - -#define CAL_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_CalendarFactory" -#define PAS_BOOK_FACTORY_OAF_ID "OAFIID:GNOME_Evolution_Wombat_ServerFactory" - -/* The and addressbook calendar factories */ - -static CalFactory *cal_factory; -static PASBookFactory *pas_book_factory; - -/* Timeout interval in milliseconds for termination */ -#define EXIT_TIMEOUT 5000 - -/* Timeout ID for termination handler */ -static guint termination_handler_id; - - - -/* Termination */ - -/* Termination handler. Checks if both factories have zero running backends, - * and if so terminates the program. - */ -static gboolean -termination_handler (gpointer data) -{ - if (cal_factory_get_n_backends (cal_factory) == 0 - && pas_book_factory_get_n_backends (pas_book_factory) == 0) { - fprintf (stderr, "termination_handler(): Terminating the Wombat. Have a nice day.\n"); - gtk_main_quit (); - } - - termination_handler_id = 0; - return FALSE; -} - -/* Queues a timeout for handling termination of Wombat */ -static void -queue_termination (void) -{ - if (termination_handler_id) - return; - - termination_handler_id = g_timeout_add (EXIT_TIMEOUT, termination_handler, NULL); -} - - - -static void -last_book_gone_cb (PASBookFactory *factory, gpointer data) -{ - queue_termination (); -} - -static gboolean -setup_pas (int argc, char **argv) -{ - pas_book_factory = pas_book_factory_new (); - - if (!pas_book_factory) - return FALSE; - - pas_book_factory_register_backend ( - pas_book_factory, "file", pas_backend_file_new); - -#ifdef HAVE_LDAP - pas_book_factory_register_backend ( - pas_book_factory, "ldap", pas_backend_ldap_new); -#endif - - gtk_signal_connect (GTK_OBJECT (pas_book_factory), - "last_book_gone", - GTK_SIGNAL_FUNC (last_book_gone_cb), - NULL); - - if (!pas_book_factory_activate (pas_book_factory, PAS_BOOK_FACTORY_OAF_ID)) { - bonobo_object_unref (BONOBO_OBJECT (pas_book_factory)); - pas_book_factory = NULL; - return FALSE; - } - - return TRUE; -} - - - -/* Personal calendar server */ - -/* Callback used when the calendar factory has no more running backends */ -static void -last_calendar_gone_cb (CalFactory *factory, gpointer data) -{ - queue_termination (); -} - -/* Creates the calendar factory object and registers it */ -static gboolean -setup_pcs (int argc, char **argv) -{ - cal_factory = cal_factory_new (); - - if (!cal_factory) { - g_message ("setup_pcs(): Could not create the calendar factory"); - return FALSE; - } - - cal_factory_register_method (cal_factory, "file", CAL_BACKEND_FILE_TYPE); - - if (!cal_factory_oaf_register (cal_factory, CAL_FACTORY_OAF_ID)) { - bonobo_object_unref (BONOBO_OBJECT (cal_factory)); - cal_factory = NULL; - return FALSE; - } - - gtk_signal_connect (GTK_OBJECT (cal_factory), - "last_calendar_gone", - GTK_SIGNAL_FUNC (last_calendar_gone_cb), - NULL); - - return TRUE; -} - - - -static gboolean -setup_config (int argc, char **argv) -{ - BonoboGenericFactory *factory; - char *oafiid = "OAFIID:Bonobo_Moniker_wombat_Factory"; - - factory = bonobo_generic_factory_new_multi (oafiid, - wombat_moniker_factory, - NULL); - - // bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); - - - return TRUE; -} - -static gboolean -setup_private (int argc, char **argv) -{ - BonoboGenericFactory *factory; - char *oafiid = "OAFIID:Bonobo_Moniker_wombat_private_Factory"; - - factory = bonobo_generic_factory_new_multi (oafiid, - wombat_private_moniker_factory, - NULL); - - // bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory)); - - - return TRUE; -} - -static void -setup_vfs (int argc, char **argv) -{ - if (!gnome_vfs_init ()) { - g_message (_("setup_vfs(): could not initialize GNOME-VFS")); - exit (EXIT_FAILURE); - } -} - - - -static void -init_corba (int *argc, char **argv) -{ - if (gnome_init_with_popt_table ("wombat", VERSION, - *argc, argv, oaf_popt_options, 0, NULL) != 0) { - g_message (_("init_corba(): could not initialize GNOME")); - exit (EXIT_FAILURE); - } - - oaf_init (*argc, argv); -} - -static void -init_bonobo (int *argc, char **argv) -{ - init_corba (argc, argv); - - if (!bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL)) { - g_message (_("init_bonobo(): could not initialize Bonobo")); - exit (EXIT_FAILURE); - } -} - -#ifdef DEBUG_BACKENDS -static void -dump_backends (int signal) -{ - pas_book_factory_dump_active_backends (pas_book_factory); - cal_factory_dump_active_backends (cal_factory); -} -#endif - -int -main (int argc, char **argv) -{ - gboolean did_pas=FALSE, did_pcs=FALSE, did_config=FALSE, did_private=FALSE; - - bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); - textdomain (PACKAGE); - - g_message ("Starting wombat"); - -#ifdef DEBUG_BACKENDS - signal (SIGUSR2, dump_backends); -#endif - - init_bonobo (&argc, argv); - setup_vfs (argc, argv); - - /*g_log_set_always_fatal (G_LOG_LEVEL_ERROR | - G_LOG_LEVEL_CRITICAL | - G_LOG_LEVEL_WARNING);*/ - - if (!( (did_pas = setup_pas (argc, argv)) - && (did_pcs = setup_pcs (argc, argv)) - && (did_private = setup_private (argc, argv)) - /* WARNING: Do not change the order here. `setup_config()' must - come last, to work around an OAF race condition. */ - && (did_config = setup_config (argc, argv)))) { - - const gchar *failed = NULL; - - if (!did_pas) - failed = "PAS"; - else if (!did_pcs) - failed = "PCS"; - else if (!did_config) - failed = "Config"; - else if (!did_private) - failed = "Private Config"; - - g_message ("main(): could not initialize Wombat service \"%s\"; terminating", failed); - - if (pas_book_factory) { - bonobo_object_unref (BONOBO_OBJECT (pas_book_factory)); - pas_book_factory = NULL; - } - - if (cal_factory) { - bonobo_object_unref (BONOBO_OBJECT (cal_factory)); - cal_factory = NULL; - } - - exit (EXIT_FAILURE); - } - - g_print ("Wombat up and running\n"); - - bonobo_main (); - - bonobo_object_unref (BONOBO_OBJECT (cal_factory)); - cal_factory = NULL; - - bonobo_object_unref (BONOBO_OBJECT (pas_book_factory)); - pas_book_factory = NULL; - - gnome_vfs_shutdown (); - - return 0; -} -- cgit v1.2.3