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
This commit is contained in:
Federico Mena Quintero
2000-04-14 11:09:04 +00:00
committed by Federico Mena Quintero
parent b78276823e
commit 780baefeb6
4 changed files with 56 additions and 38 deletions

11
wombat/ChangeLog Normal file
View File

@ -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.

View File

@ -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`

View File

@ -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);
/* FIXME: should Wombat die if it gets errors here? */
if (ev._major != CORBA_NO_EXCEPTION || result == -1) {
g_message ("create_cal_factory(): "
"could not register the calendar factory");
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

View File

@ -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