aboutsummaryrefslogtreecommitdiffstats
path: root/wombat
diff options
context:
space:
mode:
authornobody <nobody@localhost>2003-04-02 01:15:53 +0800
committernobody <nobody@localhost>2003-04-02 01:15:53 +0800
commit2e5b2bbb530b642dda56b332cfd93810ac415098 (patch)
treee2b63c11a404a5dd99d407c989c8846fd0d5379d /wombat
parent5cda225087bfdc66e19edb703689e8af655e171c (diff)
downloadgsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar.gz
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar.bz2
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar.lz
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar.xz
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.tar.zst
gsoc2013-evolution-df972cbc7f7065aff0e4ea77ebd695c7e771acb3.zip
This commit was manufactured by cvs2svn to create tagEVOLUTION_1_2_4
'EVOLUTION_1_2_4'. svn path=/tags/EVOLUTION_1_2_4/; revision=20614
Diffstat (limited to 'wombat')
-rw-r--r--wombat/ChangeLog132
-rw-r--r--wombat/Makefile.am75
-rw-r--r--wombat/wombat-interface-check.c25
-rw-r--r--wombat/wombat-interface-check.h15
-rw-r--r--wombat/wombat-moniker.c184
5 files changed, 246 insertions, 185 deletions
diff --git a/wombat/ChangeLog b/wombat/ChangeLog
index 931f09a9df..3904410daf 100644
--- a/wombat/ChangeLog
+++ b/wombat/ChangeLog
@@ -1,131 +1,15 @@
-2003-03-28 Ettore Perazzoli <ettore@ximian.com>
+2002-11-26 Ettore Perazzoli <ettore@ximian.com>
- * GNOME_Evolution_WombatLDAP.server.in.in: Add InterfaceCheck
- object.
- * GNOME_Evolution_WombatNOLDAP.server.in.in: Likewise.
+ * wombat-moniker.c (wombat_lookup_interface_check): New function
+ to return a WombatInterfaceCheck object.
+ (wombat_moniker_resolve): Use it to return the interface check
+ object when requested to.
- * wombat-interface-check.c: New, from evolution-1-2-branch.
- * wombat-interface-check.h: Likewise.
+ * wombat-interface-check.c: New.
+ * wombat-interface-check.h: New.
- * wombat.c (setup_pas): Removed argc/argv args.
- (setup_pcs): Likewise.
- (setup_interface_check): New interface to set up the
- InterfaceCheck object.
- (main): Call the latter.
+ * Evolution-Wombat.idl: New interface WombatInterfaceCheck.
-2003-03-13 Dan Winship <danw@ximian.com>
-
- * Makefile.am (GNOME_Evolution_Wombat.server.in.in): Make this
- depend on Makefile so it gets regenerated if you switch from
- --without-openldap to --with-openldap
-
-2003-02-21 Dan Winship <danw@ximian.com>
-
- * Makefile.am (evolution_wombat_LDADD): cleanup
-
-2003-02-19 Chris Toshok <toshok@ximian.com>
-
- * wombat.c (termination_handler): gtk_main_quit =>
- bonobo_main_quit.
-
-2003-02-07 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: privlibexecdir not evolibexecdir for the server file
-
-2003-02-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: cleanup
-
- * wombat.c (main): s/PACKAGE/GETTEXT_PACKAGE/ in gettext init
-
-2003-02-01 Hans Petter Jansson <hpj@ximian.com>
-
- * Makefile.am: Make .server file point to where wombat is now
- installed.
-
-2003-01-29 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Install wombat to
- $(libexecdir)/evolution/$(BASE_VERSION)
-
-2003-01-27 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Rename wombat to evolution-wombat.
- * GNOME_Evolution_WombatLDAP.server.in.in: Updated accordingly.
- * GNOME_Evolution_WombatNOLDAP.server.in.in: Likewise.
-
-2003-01-14 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Do not dist the .server.in files; just dist the
- .server.in.in ones.
- (EXTRA_DIST): Add GNOME_Evolution_WombatLDAP.server.in.in and
- GNOME_Evolution_WombatNOLDAP.server.in.in
-
-2003-01-06 Dan Winship <danw@ximian.com>
-
- * Makefile.am: Remove idldir definition. It's defined in
- configure.in now.
-
-2002-12-06 Hans Petter Jansson <hpj@ximian.com>
-
- * GNOME_Evolution_WombatNOLDAP.server.in.in: It appears that
- Ettore's @LIBEXECDIR@ change didn't make it in for this file.
- Fixed that.
-
-2002-11-16 Chris Toshok <toshok@ximian.com>
-
- * GNOME_Evolution_WombatLDAP.server.in.in: remove the moniker
- cruft.
-
- * GNOME_Evolution_WombatNOLDAP.server.in.in: same.
-
-2002-11-15 Ettore Perazzoli <ettore@ximian.com>
-
- * Makefile.am: Added rule to create
- GNOME_Evolution_Wombat.server.in from
- GNOME_Evolution_Wombat.server.in.in, substituting @LIBEXECDIR@.
- Also install wombat in $libexecdir instead of $bindir.
-
- * GNOME_Evolution_WombatNOLDAP.server.in.in: Renamed from
- GNOME_Evolution_WombatNOLDAP.server.in. Changed the location from
- "wombat" to "@LIBEXECDIR@/wombat".
-
- * GNOME_Evolution_WombatLDAP.server.in.in: Renamed from
- GNOME_Evolution_WombatLDAP.server.in. Changed the location from
- "wombat" to "@LIBEXECDIR@/wombat".
-
-2002-11-07 Rodrigo Moya <rodrigo@ximian.com>
-
- * wombat.c: re-enabled calendar parts.
-
-2002-11-06 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am (wombat_LDADD): remove libcamel.la from the link for
- the time being.
-
- * wombat.c: ifdef out (#ifdef PENDING_PORT_WORK) the calendar
- stuff, since it doesn't link at the moment - undefined symbols in
- pcs. Also, include gtk.h so the gtk_* in the calendar portions
- will still work.
-
-2002-11-05 Chris Toshok <toshok@ximian.com>
-
- * Makefile.am: change over from .oaf files to .server files and
- remove the moniker stuff from the build.
-
- * wombat.c: port over to gnome2, and nuke all the config moniker
- stuff.
-
- * wombat-moniker.[ch]: remove
-
- * wombat-private-moniker.[ch]: remove
-
- * GNOME_Evolution_WombatLDAP.server.in: rename the oaf.in file to this.
-
- * GNOME_Evolution_WombatNOLDAP.server.in: rename the oaf.in file to this.
-
- * .cvsignore: s/oaf/server
-
2002-08-01 Chris Toshok <toshok@ximian.com>
* wombat.c (last_calendar_gone_cb): remove the annoying fprintf
diff --git a/wombat/Makefile.am b/wombat/Makefile.am
index 311adad020..d95b288c5b 100644
--- a/wombat/Makefile.am
+++ b/wombat/Makefile.am
@@ -1,9 +1,5 @@
INCLUDES = \
-DG_LOG_DOMAIN=\"wombat\" \
- -DPREFIX=\"$(prefix)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DLIBDIR=\"$(libdir)\" \
-I$(top_srcdir)/e-util \
-I$(top_srcdir) \
-I$(top_srcdir)/addressbook/backend \
@@ -13,35 +9,36 @@ INCLUDES = \
-I$(top_builddir)/calendar \
-I$(top_srcdir)/libical/src/libical \
-I$(top_builddir)/libical/src/libical \
+ -DEVOLUTION_DATADIR=\""$(datadir)"\" \
-DEVOLUTION_LOCALEDIR=\""$(localedir)"\" \
$(WOMBAT_CFLAGS)
-IDLS = \
- Evolution-Wombat.idl
+bin_PROGRAMS = \
+ wombat
-IDL_GENERATED_H = \
- Evolution-Wombat.h
+WOMBAT_IDL = Evolution-Wombat.idl
-IDL_GENERATED_C = \
+WOMBAT_IDL_GENERATED = \
+ Evolution-Wombat.h \
Evolution-Wombat-common.c \
Evolution-Wombat-skels.c \
Evolution-Wombat-stubs.c
-IDL_GENERATED = $(IDL_GENERATED_H) $(IDL_GENERATED_C)
+$(WOMBAT_IDL_GENERATED): $(WOMBAT_IDL)
+ $(ORBIT_IDL) -I $(srcdir) -I $(datadir)/idl `$(GNOME_CONFIG) --cflags idl` $(WOMBAT_IDL)
-$(IDL_GENERATED_H): $(IDLS)
- $(ORBIT_IDL) -I $(srcdir) $(IDL_INCLUDES) $(srcdir)/Evolution-Wombat.idl
+idldir = $(datadir)/idl
-$(IDL_GENERATED_C): $(IDL_GENERATED_H)
+idl_DATA = $(WOMBAT_IDL)
-
-privlibexec_PROGRAMS = \
- evolution-wombat
-
-evolution_wombat_SOURCES = \
- $(IDL_GENERATED) \
+wombat_SOURCES = \
+ $(WOMBAT_IDL_GENERATED) \
wombat-interface-check.c \
wombat-interface-check.h \
+ wombat-moniker.c \
+ wombat-moniker.h \
+ wombat-private-moniker.c \
+ wombat-private-moniker.h \
wombat.c
if ENABLE_LDAP
@@ -50,52 +47,50 @@ LDAP_STUFF = \
$(LDAP_LIBS)
endif
-evolution_wombat_LDADD = \
+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
-SERVER_IN_FILE=GNOME_Evolution_WombatLDAP.server.in.in
+OAF_IN_FILE=GNOME_Evolution_WombatLDAP.oaf.in
else
-SERVER_IN_FILE=GNOME_Evolution_WombatNOLDAP.server.in.in
+OAF_IN_FILE=GNOME_Evolution_WombatNOLDAP.oaf.in
endif
-GNOME_Evolution_Wombat.server.in.in: $(SERVER_IN_FILE) Makefile
+GNOME_Evolution_Wombat.oaf.in: $(OAF_IN_FILE)
cp $< $@
-server_in_files = GNOME_Evolution_Wombat.server.in.in
-
-server_DATA = $(server_in_files:.server.in.in=.server)
-$(server_in_files:.server.in.in=.server.in): $(server_in_files)
- sed -e "s|\@LIBEXECDIR\@|$(privlibexecdir)|" $< > $@
-
-@INTLTOOL_SERVER_RULE@
+oaf_in_files = GNOME_Evolution_Wombat.oaf.in
+oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
-idl_DATA = $(IDLS)
+@XML_I18N_MERGE_OAF_RULE@
-EXTRA_DIST = $(server_DATA) \
- $(server_in_files) \
- $(idl_DATA) \
- GNOME_Evolution_WombatLDAP.server.in.in \
- GNOME_Evolution_WombatNOLDAP.server.in.in
+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: evolution-wombat.pure
+all-local: wombat.pure
-evolution-wombat.pure: evolution-wombat
- @rm -f evolution-wombat.pure
- $(PLINK) $(evolution_wombat_LDFLAGS) $(evolution_wombat_OBJECTS) $(evolution_wombat_LDADD) $(LIBS)
+wombat.pure: wombat
+ @rm -f wombat.pure
+ $(PLINK) $(wombat_LDFLAGS) $(wombat_OBJECTS) $(wombat_LDADD) $(LIBS)
endif
diff --git a/wombat/wombat-interface-check.c b/wombat/wombat-interface-check.c
index f7766cd218..aae981389a 100644
--- a/wombat/wombat-interface-check.c
+++ b/wombat/wombat-interface-check.c
@@ -4,9 +4,8 @@
* Copyright (C) 2002 Ximian, Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -30,8 +29,8 @@
#include <gal/util/e-util.h>
-#define PARENT_TYPE bonobo_object_get_type ()
-static BonoboObjectClass *parent_class = NULL;
+#define PARENT_TYPE bonobo_x_object_get_type ()
+static BonoboXObjectClass *parent_class = NULL;
static CORBA_char *
@@ -43,15 +42,15 @@ impl__get_interfaceVersion (PortableServer_Servant servant,
static void
-wombat_interface_check_class_init (WombatInterfaceCheckClass *class)
+class_init (WombatInterfaceCheckClass *class)
{
- parent_class = g_type_class_ref (PARENT_TYPE);
+ parent_class = gtk_type_class (PARENT_TYPE);
class->epv._get_interfaceVersion = impl__get_interfaceVersion;
}
static void
-wombat_interface_check_init (WombatInterfaceCheck *interface_check)
+init (WombatInterfaceCheck *interface_check)
{
/* (Nothing to initialize here.) */
}
@@ -60,11 +59,11 @@ wombat_interface_check_init (WombatInterfaceCheck *interface_check)
WombatInterfaceCheck *
wombat_interface_check_new (void)
{
- return g_object_new (WOMBAT_TYPE_INTERFACE_CHECK, NULL);
+ return gtk_type_new (WOMBAT_TYPE_INTERFACE_CHECK);
}
-BONOBO_TYPE_FUNC_FULL (WombatInterfaceCheck,
- GNOME_Evolution_WombatInterfaceCheck,
- PARENT_TYPE,
- wombat_interface_check)
+E_MAKE_X_TYPE (wombat_interface_check, "WombatInterfaceCheck", WombatInterfaceCheck,
+ class_init, init, PARENT_TYPE,
+ POA_GNOME_Evolution_WombatInterfaceCheck__init,
+ GTK_STRUCT_OFFSET (WombatInterfaceCheckClass, epv))
diff --git a/wombat/wombat-interface-check.h b/wombat/wombat-interface-check.h
index 9cd00b5b62..cc0b2e27b5 100644
--- a/wombat/wombat-interface-check.h
+++ b/wombat/wombat-interface-check.h
@@ -4,9 +4,8 @@
* Copyright (C) 2002 Ximian, Inc.
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,7 +27,7 @@
#include <config.h>
#endif
-#include <bonobo/bonobo-object.h>
+#include <bonobo/bonobo-xobject.h>
#include "Evolution-Wombat.h"
#ifdef __cplusplus
@@ -48,18 +47,18 @@ typedef struct _WombatInterfaceCheckPrivate WombatInterfaceCheckPrivate;
typedef struct _WombatInterfaceCheckClass WombatInterfaceCheckClass;
struct _WombatInterfaceCheck {
- BonoboObject parent;
+ BonoboXObject parent;
};
struct _WombatInterfaceCheckClass {
- BonoboObjectClass parent_class;
+ BonoboXObjectClass parent_class;
POA_GNOME_Evolution_WombatInterfaceCheck__epv epv;
};
-GType wombat_interface_check_get_type (void);
-WombatInterfaceCheck *wombat_interface_check_new (void);
+GtkType wombat_interface_check_get_type (void);
+WombatInterfaceCheck *wombat_interface_check_new (void);
#ifdef __cplusplus
}
diff --git a/wombat/wombat-moniker.c b/wombat/wombat-moniker.c
new file mode 100644
index 0000000000..3b625fb3f6
--- /dev/null
+++ b/wombat/wombat-moniker.c
@@ -0,0 +1,184 @@
+#include <config.h>
+
+#include <bonobo/bonobo-moniker-simple.h>
+#include <bonobo/bonobo-moniker-util.h>
+#include <bonobo/bonobo-exception.h>
+#include <bonobo/bonobo-storage.h>
+
+#include "wombat-moniker.h"
+
+#include "wombat-interface-check.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 CORBA_Object
+wombat_lookup_interface_check (void)
+{
+ static WombatInterfaceCheck *object = NULL;
+ CORBA_Environment ev;
+ CORBA_Object corba_objref;
+
+ if (object == NULL)
+ object = wombat_interface_check_new ();
+
+ bonobo_object_ref (BONOBO_OBJECT (object));
+
+ CORBA_exception_init (&ev);
+ corba_objref = CORBA_Object_duplicate (BONOBO_OBJREF (object), &ev);
+ CORBA_exception_free (&ev);
+
+ return corba_objref;
+}
+
+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;
+ }
+
+ if (!strcmp (interface, "IDL:GNOME/Evolution/WombatInterfaceCheck:1.0"))
+ return wombat_lookup_interface_check ();
+
+ 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;
+}
+