aboutsummaryrefslogtreecommitdiffstats
path: root/wombat
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-04-14 19:09:04 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-04-14 19:09:04 +0800
commit780baefeb6ccdbf33efd36beda2c4b50d1f569b3 (patch)
treeb4037511ee9564606bb1d5295ecef1d0120d8ec0 /wombat
parentb78276823ea3f4bc645a7829b0b5e32f5ecc3fec (diff)
downloadgsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.gz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.bz2
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.lz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.xz
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.tar.zst
gsoc2013-evolution-780baefeb6ccdbf33efd36beda2c4b50d1f569b3.zip
Must pass "object" for the kind to goad_server_register(); "server" is
2000-04-14 Federico Mena Quintero <federico@helixcode.com> * 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. svn path=/trunk/; revision=2423
Diffstat (limited to 'wombat')
-rw-r--r--wombat/ChangeLog11
-rw-r--r--wombat/Makefile.am43
-rw-r--r--wombat/wombat.c36
-rw-r--r--wombat/wombat.gnorba4
4 files changed, 56 insertions, 38 deletions
diff --git a/wombat/ChangeLog b/wombat/ChangeLog
new file mode 100644
index 0000000000..3aae05db0d
--- /dev/null
+++ b/wombat/ChangeLog
@@ -0,0 +1,11 @@
+2000-04-14 Federico Mena Quintero <federico@helixcode.com>
+
+ * 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/Makefile.am b/wombat/Makefile.am
index 002ce7d355..dd6a5e7fef 100644
--- a/wombat/Makefile.am
+++ b/wombat/Makefile.am
@@ -1,13 +1,13 @@
-INCLUDES = \
- $(EXTRA_GNOME_CFLAGS) \
- $(GNOME_INCLUDEDIR) \
- -I$(top_srcdir)/e-util \
- -I$(top_srcdir) \
- -I$(top_srcdir)/addressbook/backend/pas \
- -I$(top_srcdir)/calendar/pcs \
- -I$(top_srcdir)/calendar/cal-util \
- -DEVOLUTION_VERSION=\""$(VERSION)"\" \
- -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\"
+INCLUDES = \
+ $(EXTRA_GNOME_CFLAGS) \
+ $(GNOME_INCLUDEDIR) \
+ -I$(top_srcdir)/e-util \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/addressbook/backend/pas \
+ -I$(top_srcdir)/calendar/pcs \
+ -I$(top_srcdir)/calendar/cal-util \
+ -DEVOLUTION_VERSION=\""$(VERSION)"\" \
+ -DEVOLUTION_LOCALEDIR=\""$(datadir)/locale"\"
bin_PROGRAMS = \
wombat
@@ -15,17 +15,18 @@ bin_PROGRAMS = \
wombat_SOURCES = \
wombat.c
-wombat_LDADD = \
- $(EXTRA_GNOME_LIBS) \
- $(BONOBO_HTML_GNOME_LIBS) \
- $(top_builddir)/addressbook/backend/pas/libpas.la \
- $(top_builddir)/addressbook/backend/ebook/libebook.la \
- $(top_builddir)/calendar/pcs/libpcs.la \
- $(top_builddir)/libical/src/libical/libical.la \
- $(top_builddir)/calendar/cal-util/libcalutil.la \
- $(top_builddir)/libversit/libversit.la \
- $(top_builddir)/e-util/libeutil.la \
- -lgnomevfs $(LDAP_LIBS)
+wombat_LDADD = \
+ $(EXTRA_GNOME_LIBS) \
+ $(BONOBO_HTML_GNOME_LIBS) \
+ $(top_builddir)/addressbook/backend/pas/libpas.la \
+ $(top_builddir)/addressbook/backend/ebook/libebook.la \
+ $(top_builddir)/calendar/pcs/libpcs.la \
+ $(top_builddir)/libical/src/libical/libical.la \
+ $(top_builddir)/calendar/cal-util/libcalutil.la \
+ $(top_builddir)/libversit/libversit.la \
+ $(top_builddir)/e-util/libeutil.la \
+ -lgnomevfs \
+ $(LDAP_LIBS)
wombat_LDFLAGS = `gnome-config --libs gnorba`
diff --git a/wombat/wombat.c b/wombat/wombat.c
index 989df9b484..24cae9713c 100644
--- a/wombat/wombat.c
+++ b/wombat/wombat.c
@@ -38,17 +38,19 @@ setup_pas (int argc, char **argv)
pas_book_factory_activate (factory);
}
-
+/* Creates the calendar factory object and registers it with GOAD */
static void
setup_pcs (int argc, char **argv)
{
+ CalFactory *factory;
int result;
CORBA_Object object;
- CalFactory *factory = cal_factory_new ();
-
+
+ factory = cal_factory_new ();
+
if (!factory) {
- g_message ("%s: %d: couldn't create a Calendar factory\n",
- __FILE__, __LINE__);
+ g_message ("setup_pcs(): Could not create the calendar factory");
+ return;
}
object = bonobo_object_corba_objref (BONOBO_OBJECT (factory));
@@ -57,26 +59,30 @@ setup_pcs (int argc, char **argv)
result = goad_server_register (CORBA_OBJECT_NIL,
object,
"evolution:calendar-factory",
- "server",
+ "object",
&ev);
- if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ /* FIXME: should Wombat die if it gets errors here? */
- g_message ("create_cal_factory(): "
- "could not register the calendar factory");
+ if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
+ g_message ("setup_pcs(): could not register the calendar factory");
bonobo_object_unref (BONOBO_OBJECT (factory));
CORBA_exception_free (&ev);
-
+ return;
} else if (result == -2) {
-
- g_message ("create_cal_factory(): "
- "a calendar factory is already registered");
+ g_message ("setup_pcs(): a calendar factory is already registered");
bonobo_object_unref (BONOBO_OBJECT (factory));
CORBA_exception_free (&ev);
-
+ return;
}
- CORBA_exception_free (&ev);
+ /* FIXME: we never connect to the destroy signal of the factory. We
+ * need to add a signal to it to indicate that the last client died.
+ * The PAS factory needs to have the same thing. When Wombat sees that
+ * both factories have lost all their clients, it should destroy the
+ * factories and terminate. */
+
+ CORBA_exception_free (&ev);
}
static void
diff --git a/wombat/wombat.gnorba b/wombat/wombat.gnorba
index 165722b8ce..d170bebc15 100644
--- a/wombat/wombat.gnorba
+++ b/wombat/wombat.gnorba
@@ -4,8 +4,8 @@ repo_id=IDL:Evolution/BookFactory:1.0 IDL:Bonobo/Unknown:1.0
description=The Personal Addressbook Server
location_info=wombat
-[evolution:calendar-server]
+[evolution:calendar-factory]
type=exe
repo_id=IDL:Evolution/Calendar/CalFactory:1.0 IDL:Bonobo/Unknown:1.0
-description=The Personal Calendar Server
+description=The Personal Calendar Server; calendar factory
location_info=wombat