Commit d5048c11 authored by Dave Camp's avatar Dave Camp

Synced with my local copy. Now uses oaf and can view structures.

parent 803d3346
2000-05-22 Dave Camp <campd@oit.edu>
* generic-factory-impl.c (impl_Bonobo_GenericFactory_create_object):
check for the oaf iid rather than the goad id.
* gdf-event-server.c (main): Initialize and use oaf rather than gnorba.
* Makefile.am: Use OAF_CFLAGS and OAF_LIBS
2000-02-20 Dave Camp <campd@oit.edu>
* event-channel-impl.c (impl_CosEventChannelAdmin_ProxyPushConsumer_push): Took out an unnecessary trace.
......
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datatdir)/locals"\" \
-I$(top_srcdir)/src/lib -I$(includedir) $(GNOME_INCLUDEDIR)
-I$(top_srcdir)/src/lib -I$(includedir) $(GNOME_INCLUDEDIR) \
$(OAF_CFLAGS)
bin_PROGRAMS = \
gdf-event-server
......@@ -14,4 +15,5 @@ gdf_event_server_SOURCES = \
event-channel.h
gdf_event_server_LDADD = \
$(OAF_LIBS) \
../lib/libgdf.la
......@@ -22,6 +22,9 @@
* Boston, MA 02111-1307, USA.
*/
#include <gnome.h>
#include <liboaf/liboaf.h>
#include "gdf-event-server.h"
#include "event-channel.h"
#include "generic-factory.h"
......@@ -38,14 +41,13 @@ signal_handler(int signo)
int
main (int argc, char *argv[])
{
CORBA_ORB orb;
CORBA_Object nameserver;
CORBA_Environment ev;
CosEventChannelAdmin_EventChannelFactory factory;
PortableServer_POA poa;
PortableServer_POAManager pm;
struct sigaction act;
sigset_t empty_mask;
OAF_RegistrationResult result;
sigemptyset(&empty_mask);
act.sa_handler = signal_handler;
......@@ -63,26 +65,49 @@ main (int argc, char *argv[])
CORBA_exception_init (&ev);
#if 0 /* goad stuff */
goad_register_arguments ();
orb = gnome_CORBA_init ("gdf-event-server", VERSION, &argc, argv,
GNORBA_INIT_SERVER_FUNC, &ev);
#endif
gnome_init_with_popt_table ("gdf-event-server", VERSION, argc, argv,
oaf_popt_options, 0, NULL);
oaf_init (argc, argv);
poa = (PortableServer_POA)
CORBA_ORB_resolve_initial_references (orb, "RootPOA", &ev);
CORBA_ORB_resolve_initial_references (oaf_orb_get (),
"RootPOA", &ev);
factory = impl_Bonobo_GenericFactory__create (poa, &ev);
#if 0 /* goad stuff */
nameserver = gnome_name_service_get ();
goad_server_register (nameserver, factory,
"gdf_event_channel_factory",
"object",
&ev);
#endif
result = oaf_active_server_register ("OAFIID:gdf_event_channel_factory:b0007e1e-e684-4294-9ac5-ae9454e413f0",
factory);
switch (result) {
case OAF_REG_SUCCESS :
break;
case OAF_REG_NOT_LISTED:
g_error ("Cannot register the commander because it is not listed.");
return 1;
case OAF_REG_ALREADY_ACTIVE:
g_error ("Cannot register the commander because it is already active."); return 1;
case OAF_REG_ERROR :
default :
g_error ("Cannot register the commander because of an unknown error.");
return 1;
}
pm = PortableServer_POA__get_the_POAManager (poa, &ev);
PortableServer_POAManager_activate (pm, &ev);
//CORBA_ORB_run (orb, &ev);
/*CORBA_ORB_run (orb, &ev);*/
gtk_main ();
CORBA_exception_free (&ev);
......
......@@ -102,13 +102,13 @@ impl_Bonobo_GenericFactory__destroy(impl_POA_Bonobo_GenericFactory *servant,
static CORBA_Object
impl_Bonobo_GenericFactory_create_object (impl_POA_Bonobo_GenericFactory *servant,
const CORBA_char *obj_goad_id,
const CORBA_char *obj_iid,
const GNOME_stringlist *params,
CORBA_Environment *ev)
{
CORBA_Object retval = CORBA_OBJECT_NIL;
if (!strcmp (obj_goad_id, "gdf_event_channel")) {
if (!strcmp (obj_iid, "OAFIID:gdf_event_channel:1124b7ed-752c-4091-9b6c-c426fdd50517")) {
retval = impl_CosEventChannelAdmin_EventChannel__create
(servant->poa, ev);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment