[Nautilus-list] Bonobo/OAF final patch



The long CC list is because the gnome lists are acting slow as
molasses.

With the patch below and latest OAF, Bonobo/OAF works OK. The GOAD
case still works. But I would like to switch over to OAF as the
default as soon as possible after this. The patch includes docs on how
to convert controls and containers, as well as a script to convert
.goad/.gnorba files to .oafinfo. I will also do at minimum the
nautilus, eog and gtkhtml modules myself.


I would like to check in this patch Monday night at the latest if
there are no objections.

I would also appreciate feeback on appropriate timing for making oaf
the default for CVS bonobo. I would prefer to do it right when I check
in this patch, actually (--enable-oaf=no will still get you the
goadized version).

2000-04-16  Maciej Stachowiak  <mjs eazel com>

	Made --enable-oaf=yes work properly:

	* configure.in, accondig.h: define USING_OAF when using OAF so
	test programs can compile either way.
	
	
	* bonobo/Makefile.am: install bonobo-object-directory.h
	
	* bonobo/bonobo-selector.h, bonobo/bonobo-selector.c
	(bonobo_selector_get_selected_id, bonobo_selector_select_id): New
	functions to let you select an object ID without caring if you are
	using GOAD or OAF.

	* bonobo/bonobo-object-directory.h,
	bonobo/bonobo-object-directory-oaf.c,
	bonobo/bonobo-object-directory-goad.c
	(od_name_service_get): New function to bstract getting the name
	service.
	
	* bonobo/bonobo-moniker-client.c: Don't include gnorba headers;
	include bonobo-object-directory.h with <> instead of "".
	(bonobo_moniker_find_in_naming_service, bonobo_moniker_unregister,
	bonobo_moniker_register): Use the OD interface to get the name
	service

	* bonobo/Makefile.am, components/Makefile.am
	components/application-x-gnomine/Makefile.am,
	components/audio-ulaw/Makefile.am,
	components/image-x-png/Makefile.am,
	components/text-plain/Makefile.am, gshell/Makefile.am
	samples/bonobo-class/Makefile.am,
	samples/compound-doc/Makefile.am, samples/controls/Makefile.am,
	tests/Makefile.am: Properly conditionally link against OAF or
	GNORBA libs; distribute both .gnorba and .oaf files, and install
	the appropriate ones.

	* bonobo/sample-item.c, bonobo/sample-server.c,
	bonobo/selector_test.c, bonobo/test-bw.c,
	bonobo/test-container-autoload.c, bonobo/test-container.c,
	bonobo/test-storage.c,
	components/application-x-gnomine/bonobo-application-x-mines.c,
	components/audio-ulaw/bonobo-audio-ulaw.c,
	components/audio-ulaw/bonobo-audio-ulaw.h,
	components/image-x-png/bonobo-image-x-png.c,
	components/text-plain/bonobo-text-plain.c, doc/goad2oaf.txt,
	samples/bonobo-class/echo-client.c, samples/bonobo-class/echo.c,
	samples/bonobo-class/main.c,
	samples/compound-doc/paint-component-simple.c,
	samples/compound-doc/sample-container.c,
	samples/controls/bonobo-calculator-control.c,
	samples/controls/bonobo-clock-control.c,
	samples/controls/sample-control-container.c,
	samples/controls/sample-control-factory.c: Converted to work with
	either GOAD or OAF.

	* gnorba2oafinfo.pl: Script to convert .gnorba/.goad files to
	.oafinfo.

	* item.oafinfo, sample.oafinfo, application-x-mines.oafinfo,
	audio-ulaw.oafinfo, image-x-png.oafinfo, text-plain.oafinfo,
	echo.oafinfo, paint-component-simple.oafinfo,
	bonobo-calculator-control.oafinfo, bonobo-clock-control.oafinfo:
	New OAF activation records translated from corresponding .gnorba
	files.


Index: acconfig.h
===================================================================
RCS file: /cvs/gnome/bonobo/acconfig.h,v
retrieving revision 1.3
diff -u -r1.3 acconfig.h
--- acconfig.h	2000/04/09 20:07:03	1.3
+++ acconfig.h	2000/04/17 04:40:12
@@ -7,3 +7,4 @@
 #undef HAVE_LC_MESSAGES
 #undef HAVE_STPCPY
 #undef HAVE_ORBIT
+#undef USING_OAF
Index: configure.in
===================================================================
RCS file: /cvs/gnome/bonobo/configure.in,v
retrieving revision 1.70
diff -u -r1.70 configure.in
--- configure.in	2000/04/14 02:55:05	1.70
+++ configure.in	2000/04/17 04:40:12
@@ -84,6 +84,10 @@
 
 AM_CONDITIONAL(OAF, test "x$enable_oaf" = "xyes")
 
+if test "x$enable_oaf" = "xyes"; then
+	AC_DEFINE(USING_OAF)
+fi
+
 AM_PATH_GDK_PIXBUF(0.6.0, ,AC_MSG_ERROR([Need gdk-pixbuf!]))
 
 BONOBO_INCLUDEDIR="$BONOBO_INCLUDEDIR `$GNOME_CONFIG --cflags gnomeui gdk_pixbuf $GNORBA_LIBNAME` $OAF_CFLAGS"
@@ -104,8 +108,6 @@
 else
     AC_MSG_ERROR(Did not find gnome-print installed)
 fi
-
-AM_CONDITIONAL(OAF, test "x$enable_oaf" = "xyes")
 
 BONOBO_LIBDIR='-L${libdir}'
 BONOBO_INCLUDEDIR="$BONOBO_INCLUDEDIR `$GNOME_CONFIG --cflags gnomeui $GNORBA_LIBNAME print` $OAF_CFLAGS"
Index: gnorba2oafinfo.pl
===================================================================
RCS file: gnorba2oafinfo.pl
diff -N gnorba2oafinfo.pl
--- /dev/null	Tue May  5 16:32:27 1998
+++ gnorba2oafinfo.pl	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+sub id_trans {
+    ($goad_id) = @_; 
+    
+    if (! $goad_to_oaf{$goad_id}) {
+	$goad_to_oaf{$goad_id} = "OAFIID:$goad_id:" . `uuidgen`;
+	chomp $goad_to_oaf{$goad_id};
+    }
+
+    return $goad_to_oaf{$goad_id};
+}
+
+
+sub printserver () {
+    if ($have_server_record) {
+	$new_id = id_trans "${server_record{goadid}}";
+	$new_location = "${server_record{location_info}}";
+	$type = "${server_record{type}}";
+	
+	if ($type eq "factory") {
+	    $new_location = id_trans $new_location;
+	}
+
+	print OUTFILE "<oaf_server iid=\"${new_id}\" type=\"${type}\" location=\"${new_location}\">\n";
+
+	if ($server_record{repo_id}) {
+	    print OUTFILE "<oaf_attribute name=\"repo_ids\" type=\"stringv\">\n";
+	    $_ = $server_record{"repo_id"};
+	    @repo_ids = split (/[ \t]+/);
+
+	    foreach $id (@repo_ids) {
+		print OUTFILE "<item value=\"${id}\"/>\n";
+	    }
+	    print OUTFILE "</oaf_attribute>\n";
+	}
+
+
+	if ($server_record{description}) {
+	    print OUTFILE "<oaf_attribute name=\"description\" type=\"string\" value=\"${server_record{description}}\"/>\n";
+	}
+	print OUTFILE "</oaf_server>\n\n";
+    }
+}
+
+for $file (@ARGV) {
+    $have_server_record = 0;
+    $server_record{"description"} = "";
+    $server_record{"repo_id"} = "";
+    $server_record{"location_info"} = "";
+    $server_record{"type"} = "";
+
+    open INFILE, "<$file";
+    $out = $file;
+    $out =~ s/.(gnorba|goad)/.oafinfo/;
+    open OUTFILE, ">$out";
+
+    print "XXX - Writing to $out\n";
+
+    print OUTFILE "<oaf_info>\n\n";
+
+    while (<INFILE>) {
+	chomp;
+	if (/^\[.*\]/) {
+	    # output old server info
+	    $foo = $_;
+	    printserver;
+	    $_ = $foo;
+	    
+	    # begin new server record
+	    s/\[|\]//g;
+	    $server_record{"goadid"} = $_;
+	    
+	    $have_server_record = 1;
+	    $server_record{"description"} = "";
+	    $server_record{"repo_id"} = "";
+	    $server_record{"location_info"} = "";
+	    $server_record{"type"} = "";
+	    
+	} elsif  (/.*=.*/) {
+	    $name = $_;
+	    $value = $_;
+	    
+	    $name =~ s/=.*//;
+	$value =~ s/.*=//;
+	    
+	    # print "${name}=${value}\n";
+	    
+	    $server_record{$name}=$value;
+	}
+	
+	
+    }
+    
+    printserver;
+    
+    
+    print OUTFILE "</oaf_info>\n";
+
+    close INFILE;
+    close OUTFILE;
+
+}
+
+
+
Index: bonobo/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/Makefile.am,v
retrieving revision 1.85
diff -u -r1.85 Makefile.am
--- bonobo/Makefile.am	2000/04/11 21:54:30	1.85
+++ bonobo/Makefile.am	2000/04/17 04:40:12
@@ -1,9 +1,6 @@
-corbadir = $(sysconfdir)/CORBA/servers
 
-corba_DATA = sample.gnorba item.gnorba
-
 if OAF
-OBJECT_DIRECTORY_LIBS=$(OAF_LIBS)
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOME_LIBS)
 OBJECT_DIRECTORY_IMPL=bonobo-object-directory-oaf.c
 else
 OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
@@ -35,9 +32,6 @@
 
 lib_LTLIBRARIES = libbonobo.la libbonobo-print.la
 
-if OAF
-test_programs =
-else
 test_programs = \
 	test-container 		\
 	sample-server 		\
@@ -46,7 +40,6 @@
 	selector_test		\
 	test-storage		\
 	test-bw
-endif
 
 noinst_PROGRAMS = 		\
 	$(test_programs)
@@ -82,7 +75,6 @@
 	bonobo-arg.h			\
 	bonobo-arg.c			\
 	$(CORBA_SOURCE)			\
-	bonobo-object-directory.h	\
 	bonobo-object-directory.c	\
 	$(OBJECT_DIRECTORY_IMPL)	\
 	bonobo-ui-handler.c		\
@@ -149,6 +141,7 @@
 	bonobo-moniker-client.h		\
 	bonobo-object.h			\
 	bonobo-object-client.h		\
+	bonobo-object-directory.h	\
 	bonobo-object-io.h		\
 	bonobo-persist-file.h		\
 	bonobo-persist-stream.h		\
@@ -215,5 +208,19 @@
 BUILT_SOURCES=$(CORBA_SOURCE)
 
 CLEANFILES += $(BUILT_SOURCES)
+
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES = sample.gnorba item.gnorba
+OAF_FILES =  sample.oafinfo item.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
+
 
-EXTRA_DIST = $(corba_DATA)
+EXTRA_DIST = $(GOAD_FILES) $(OAF_FILES)
Index: bonobo/bonobo-moniker-client.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-moniker-client.c,v
retrieving revision 1.10
diff -u -r1.10 bonobo-moniker-client.c
--- bonobo/bonobo-moniker-client.c	2000/04/04 16:13:00	1.10
+++ bonobo/bonobo-moniker-client.c	2000/04/17 04:40:12
@@ -12,9 +12,8 @@
 #include <bonobo/bonobo-moniker.h>
 #include <bonobo/Bonobo.h>
 #include <bonobo/bonobo-moniker-client.h>
+#include <bonobo/bonobo-object-directory.h>
 #include <gtk/gtk.h>
-#include "libgnorba/gnorba.h"
-#include "bonobo-object-directory.h"
 
 /**
  * bonobo_moniker_find_in_naming_service:
@@ -47,7 +46,7 @@
 	nc[2].id   = (char *)name;
 	nc[2].kind = (char *)goad_id;
 
-	name_server = gnome_name_service_get();
+	name_server = od_name_service_get (&ev);
 
 	g_assert(name_server != CORBA_OBJECT_NIL);
 
@@ -96,7 +95,7 @@
 	CosNaming_Name          nom;
 	CORBA_Object name_server;
 	CORBA_Environment ev;
-	char *name, *goad_id;
+	char *name, *id;
 
 	g_return_if_fail (BONOBO_IS_MONIKER (moniker));
 
@@ -104,7 +103,7 @@
 	 * 1. Fetch values we stored
 	 */
 	name = gtk_object_get_data (GTK_OBJECT (moniker), "gnome-moniker-name");
-	goad_id = gtk_object_get_data (GTK_OBJECT (moniker), "gnome-moniker-kind");
+	id = gtk_object_get_data (GTK_OBJECT (moniker), "gnome-moniker-kind");
 
 	/*
 	 * 2. Unbind from the name server
@@ -117,9 +116,9 @@
 	CORBA_exception_init (&ev);
 
 	nc[2].id   = (char *)name;
-	nc[2].kind = (char *)goad_id;
+	nc[2].kind = (char *)id;
 
-	name_server = gnome_name_service_get ();
+	name_server = od_name_service_get (&ev);
 	g_assert (name_server != CORBA_OBJECT_NIL);
 
 	CosNaming_NamingContext_unbind (name_server, &nom, &ev);
@@ -131,7 +130,7 @@
 	 * 3. Shutdown the registration information we kept arond
 	 */
 	g_free (name);
-	g_free (goad_id);
+	g_free (id);
 
 	set_moniker_data (GTK_OBJECT (moniker), NULL, NULL);
 }
@@ -186,7 +185,7 @@
 	nc[2].id   = (char *)name;
 	nc[2].kind = (char *)goad_id;
 
-	name_server = gnome_name_service_get ();
+	name_server = od_name_service_get (&ev);
 	g_assert (name_server != CORBA_OBJECT_NIL);
 
 	server = bonobo_object_corba_objref (BONOBO_OBJECT (moniker));
Index: bonobo/bonobo-object-client.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-object-client.h,v
retrieving revision 1.15
diff -u -r1.15 bonobo-object-client.h
--- bonobo/bonobo-object-client.h	2000/04/08 11:45:18	1.15
+++ bonobo/bonobo-object-client.h	2000/04/17 04:40:12
@@ -48,3 +48,5 @@
 
 #endif /* _BONOBO_OBJECT_CLIENT_H_ */
 
+
+
Index: bonobo/bonobo-object-directory-goad.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-object-directory-goad.c,v
retrieving revision 1.2
diff -u -r1.2 bonobo-object-directory-goad.c
--- bonobo/bonobo-object-directory-goad.c	2000/02/28 19:02:40	1.2
+++ bonobo/bonobo-object-directory-goad.c	2000/04/17 04:40:12
@@ -141,3 +141,9 @@
                   "This program requires a Bonobo compiled to use OAF instead.");
         exit(1);
 }
+
+CORBA_Object
+od_name_service_get (CORBA_Environment *ev)
+{
+	return gnome_name_service_get ();
+}
Index: bonobo/bonobo-object-directory-oaf.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-object-directory-oaf.c,v
retrieving revision 1.1
diff -u -r1.1 bonobo-object-directory-oaf.c
--- bonobo/bonobo-object-directory-oaf.c	2000/01/25 22:04:41	1.1
+++ bonobo/bonobo-object-directory-oaf.c	2000/04/17 04:40:12
@@ -37,17 +37,15 @@
         iter = required_ids;
 
         while (*iter) {
-                *query_components = g_strconcat("repo_ids.has(",
+                *query_components = g_strconcat("repo_ids.has('",
                                                 *iter,
-                                                ")",
+                                                "')",
                                                 NULL);
                 ++iter;
         }
 
         query = g_strjoinv(" and ", query_components);
 
-        printf("OAF query: %s\n", query); /* debug spew */
-
         g_strfreev(query_components);
 
         CORBA_exception_init(&ev);
@@ -55,16 +53,20 @@
         g_free(query);
         CORBA_exception_free(&ev);
 
-        if (servers == NULL)
+        if (servers == NULL) {
                 return NULL;
+	}
 
         i = 0;
         while (i < servers->_length) {
                 OAF_ServerInfo *oafinfo = &servers->_buffer[i];
                 ODServerInfo *info;
 
+		/* FIXME: should try to get "description" attribute if
+		   present, otherwise use iid for description. */
+
                 info = od_server_info_new(oafinfo->iid,
-                                          "OAF servers have no description?");
+                                          /* description */ oafinfo->iid);
 
                 retval = g_list_prepend(retval, info);
 
@@ -149,4 +151,10 @@
 od_assert_using_oaf  (void)
 {
         return;
+}
+
+CORBA_Object
+od_name_service_get (CORBA_Environment *ev)
+{
+	return oaf_name_service_get (ev);
 }
Index: bonobo/bonobo-object-directory.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-object-directory.h,v
retrieving revision 1.1
diff -u -r1.1 bonobo-object-directory.h
--- bonobo/bonobo-object-directory.h	2000/01/25 22:04:41	1.1
+++ bonobo/bonobo-object-directory.h	2000/04/17 04:40:12
@@ -48,6 +48,7 @@
 void                 od_assert_using_goad           (void);
 void                 od_assert_using_oaf            (void);
 
+CORBA_Object         od_name_service_get            (CORBA_Environment *ev);
 
 END_GNOME_DECLS
 
Index: bonobo/bonobo-selector.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-selector.c,v
retrieving revision 1.21
diff -u -r1.21 bonobo-selector.c
--- bonobo/bonobo-selector.c	2000/02/16 10:27:55	1.21
+++ bonobo/bonobo-selector.c	2000/04/17 04:40:12
@@ -154,6 +154,17 @@
 	
 }
 
+/**
+ * bonobo_selector_get_selected_id:
+ * @sel: A BonoboSelector widget.
+ *
+ * Returns: A newly-allocated string containing the ID of the
+ * currently-selected CORBA server (i.e., the corba server whose name
+ * is highlighted in the list).  The user of this function is
+ * responsible for freeing this. It will give a GOAD or OAF id
+ * depending on the activation framework you are using.
+ */
+
 static gchar *
 bonobo_selector_get_selected_id (BonoboSelector *sel)
 {
@@ -161,8 +172,6 @@
 	gchar *text;
 	BonoboSelectorPrivate *priv; 
 
-	od_assert_using_goad();
-	
 	g_return_val_if_fail (sel != NULL, NULL);
 	priv = sel->priv;	
 	selection = GTK_CLIST (priv->clist)->selection;
@@ -173,7 +182,26 @@
 	return g_strdup (text);
 }
 
-static gchar *
+
+
+/**
+ * gnome_bonobo_select_id:
+ * @title: The title to be used for the dialog.
+ * @interfaces_required: A list of required interfaces.  See
+ * bonobo_selector_new().
+ *
+ * Calls bonobo_selector_new() to create a new
+ * BonoboSelector widget with the specified paramters, @title and
+ * @interfaces_required.  Then runs the dialog modally and allows
+ * the user to make a selection.
+ *
+ * Returns: The ID of the selected server, or NULL if no server is
+ * selected.  The ID string has been allocated with g_strdup. The ID
+ * returned is GOAD or OAF as appropriate to the activation framework
+ * being used.
+ */
+
+gchar *
 gnome_bonobo_select_id (const gchar *title,
 			const gchar **interfaces_required)
 {
Index: bonobo/bonobo-selector.h
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/bonobo-selector.h,v
retrieving revision 1.10
diff -u -r1.10 bonobo-selector.h
--- bonobo/bonobo-selector.h	2000/01/25 22:04:41	1.10
+++ bonobo/bonobo-selector.h	2000/04/17 04:40:12
@@ -35,6 +35,11 @@
 
 GtkWidget  *bonobo_selector_new			(const gchar *title,
 							 const gchar **interfaces_required);
+
+gchar	   *bonobo_selector_get_selected_id   (BonoboSelector *sel);
+gchar	   *gnome_bonobo_select_id                  (const gchar *title,
+							 const gchar **interfaces_required);
+
 gchar	   *bonobo_selector_get_selected_goad_id  (BonoboSelector *sel);
 gchar	   *gnome_bonobo_select_goad_id			(const gchar *title,
 							 const gchar **interfaces_required);
Index: bonobo/item.oafinfo
===================================================================
RCS file: item.oafinfo
diff -N item.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ item.oafinfo	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,18 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:test_canvas_item_factory:db20642e-25a0-46d0-bbe0-84b79ab64e05" type="exe" location="./sample-item">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Test object canvas item server factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:test_canvas_item:82a8a7cc-8b08-401b-9501-4debf6c96619" type="factory" location="OAFIID:test_canvas_item_factory:db20642e-25a0-46d0-bbe0-84b79ab64e05">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Test server canvas item component"/>
+</oaf_server>
+
+</oaf_info>
Index: bonobo/sample-item.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/sample-item.c,v
retrieving revision 1.3
diff -u -r1.3 sample-item.c
--- bonobo/sample-item.c	2000/01/25 11:35:52	1.3
+++ bonobo/sample-item.c	2000/04/17 04:40:12
@@ -1,7 +1,13 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo/Bonobo.h>
 #include <bonobo/bonobo.h>
 
@@ -43,8 +49,13 @@
 static void
 init_server_factory (void)
 {
+#if USING_OAF
+	bonobo_embeddable_factory_new (
+		"OAFIID:test_canvas_item_factory:db20642e-25a0-46d0-bbe0-84b79ab64e05", bonobo_item_factory, NULL);
+#else
 	bonobo_embeddable_factory_new (
 		"Test_item_server_factory", bonobo_item_factory, NULL);
+#endif
 }
 
 int
@@ -52,8 +63,15 @@
 {
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("MyServer", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table ("MyServer", "1.0", &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 	
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error ("Can not bonobo_init\n");
Index: bonobo/sample-server.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/sample-server.c,v
retrieving revision 1.18
diff -u -r1.18 sample-server.c
--- bonobo/sample-server.c	2000/01/25 11:35:52	1.18
+++ bonobo/sample-server.c	2000/04/17 04:40:12
@@ -1,7 +1,13 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo/Bonobo.h>
 #include <bonobo/bonobo.h>
 
@@ -38,8 +44,13 @@
 static void
 init_server_factory (void)
 {
-	bonobo_embeddable_factory_new (
+#if USING_OAF
+	bonobo_generic_factory_new (
+		"OAFIID:test_bonobo_object_factory:e455e593-a827-4c94-85d5-432249a02fa1", bonobo_object_factory, NULL);
+#else
+	bonobo_generic_factory_new (
 		"Test_server_factory", bonobo_object_factory, NULL);
+#endif
 }
 
 int
@@ -47,8 +58,15 @@
 {
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("MyServer", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table ("MyServer", "1.0", &argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 	
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error ("Can not bonobo_init\n");
Index: bonobo/sample.oafinfo
===================================================================
RCS file: sample.oafinfo
diff -N sample.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ sample.oafinfo	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,18 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:test_bonobo_object_factory:e455e593-a827-4c94-85d5-432249a02fa1" type="exe" location="./sample-server">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Test object server factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:test_bonobo_object:b1ff15bb-d54f-4814-ba53-d67d3afd70fe" type="factory" location="OAFIID:test_bonobo_object_factory:e455e593-a827-4c94-85d5-432249a02fa1">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Test server component"/>
+</oaf_server>
+
+</oaf_info>
Index: bonobo/selector_test.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/selector_test.c,v
retrieving revision 1.9
diff -u -r1.9 selector_test.c
--- bonobo/selector_test.c	2000/02/16 10:27:55	1.9
+++ bonobo/selector_test.c	2000/04/17 04:40:12
@@ -1,9 +1,16 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
+#include <config.h>
+#include <gnome.h>
 #include <gtk/gtk.h>
 #include <bonobo/bonobo-object.h>
 #include <bonobo/bonobo-selector.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
 
 CORBA_Environment ev;
 CORBA_ORB orb;
@@ -19,8 +26,16 @@
 	GtkWidget *button;
 
 	CORBA_exception_init (&ev);
+
+#if USING_OAF
+        gnome_init_with_popt_table("BonoboSel Test", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init ("BonoboSel Test", "1.0", &argc, argv, 0, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 
 	window = gnome_app_new ("selector_test", "Bonobo Selection Test");
 	gtk_signal_connect (GTK_OBJECT (window), "delete_event", 
@@ -29,12 +44,12 @@
 	vbox = gtk_vbox_new (TRUE, 0);
 	gnome_app_set_contents (GNOME_APP (window), vbox);
 	
-	button = gtk_button_new_with_label ("Get goad id");
+	button = gtk_button_new_with_label ("Get id");
 	gtk_signal_connect (GTK_OBJECT (button), "clicked",
 		GTK_SIGNAL_FUNC (noact_callback), NULL);
 	gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 5);
 
-	button = gtk_button_new_with_label ("Get goad id of panel applet");
+	button = gtk_button_new_with_label ("Get id of panel applet");
 	gtk_signal_connect (GTK_OBJECT (button), "clicked",
 		GTK_SIGNAL_FUNC (panel_callback), NULL);
 	gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 5);
@@ -52,7 +67,11 @@
 	const gchar *ints [] = { "IDL:Bonobo/Applet:1.0", NULL };
 	gchar *text;
 
+#if USING_OAF
+
+#else
 	text = gnome_bonobo_select_goad_id (_("Select an object"), ints);
+#endif
 
 	g_print("%s\n", text);
 	if (text != NULL)
@@ -64,7 +83,7 @@
 	/* This is also a demonstration of default being what we just did above */ 
 	gchar *text;
 
-	text = gnome_bonobo_select_goad_id (_("Select an object"), NULL);
+	text = gnome_bonobo_select_id (_("Select an object"), NULL);
 	g_print("%s\n", text);
 	if (text != NULL)
 		g_free(text);
Index: bonobo/test-bw.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/test-bw.c,v
retrieving revision 1.6
diff -u -r1.6 test-bw.c
--- bonobo/test-bw.c	2000/01/25 22:04:42	1.6
+++ bonobo/test-bw.c	2000/04/17 04:40:12
@@ -2,7 +2,12 @@
 #include <config.h>
 #include <gnome.h>
 #include <bonobo/bonobo.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
 
 typedef struct {
 	GtkWidget  *box;
@@ -29,17 +34,31 @@
 	GtkWidget *box;
 	GtkWidget *button;
 	closure_t  cl;
+	CORBA_ORB orb;
 
 	if (argc == 2 && argv[1])
 		cl.component_name = argv[1];
-	else
-		cl.component_name = "embeddable:paint-component-simple";
+	else {
+#if USING_OAF
+                cl.component_name = "OAFIID:paint_component_simple:9c04da1c-d44c-4041-9991-fed1ed1ed079";
+#else
+	        cl.component_name = "embeddable:paint-component-simple";
+#endif
+	}
 
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("MyShell", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init ("MyShell", "1.0", &argc, argv, 0, &ev);
+	orb = gnome_CORBA_ORB ();
+#endif
 
-	if (bonobo_init (gnome_CORBA_ORB (), NULL, NULL) == FALSE)
+	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error ("Cannot bonobo_init");
 
 	app = gnome_app_new ("test-bw", "Test Bonobo Widget");
Index: bonobo/test-container-autoload.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/test-container-autoload.c,v
retrieving revision 1.27
diff -u -r1.27 test-container-autoload.c
--- bonobo/test-container-autoload.c	2000/02/16 10:27:55	1.27
+++ bonobo/test-container-autoload.c	2000/04/17 04:40:12
@@ -21,14 +21,21 @@
  *----------------------------------------------------------------------*/
 
 /*
- * This program will automatically load Embeddables from the goad
+ * This program will automatically load Embeddables from the
  * activation library.
  */
 
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo/bonobo.h>
+#include <bonobo/bonobo-object-directory.h>
 
 #include <bonobo/bonobo-stream-fs.h>
 
@@ -36,8 +43,7 @@
 CORBA_ORB orb;
 
 /* the list of servers given to us by libgnorba */
-GoadServerList *gslist = NULL;
-GoadServer *servers = NULL;
+GList *servers = NULL;
 
 typedef struct {
 	GtkWidget *app;
@@ -52,14 +58,14 @@
  * and do the actual libgnorba-based activation of the embedded object */
 static BonoboObjectClient *
 launch_server (BonoboClientSite *client_site,
-	       BonoboContainer *container, char *goadid)
+	       BonoboContainer *container, ODServerInfo *server_info)
 {
 	BonoboObjectClient *object_server;
 	
 	bonobo_container_add (container, BONOBO_OBJECT (client_site));
 
-	object_server = bonobo_object_activate_with_goad_id (
-		NULL, goadid, 0, NULL);
+	object_server = bonobo_object_activate (od_server_info_get_id (server_info),
+						0);
 
 	if (!object_server) {
 		g_warning (_("Can not activate object_server\n"));
@@ -182,11 +188,11 @@
 } /* create_persist_file_dialog_cb */
 
 
-/* Given the goad_id for a Embeddable, activate such
+/* Given the id for a Embeddable, activate such
  * an object, and put it in our container.
  * Also include a few buttons to manipulate it with */
 static BonoboObjectClient *
-add_object_to_container (char *server_goadid)
+add_object_to_container (ODServerInfo *server_info)
 {
 	GtkWidget *frame, *hbox, *vbox, *btn;
 	BonoboViewFrame *view_frame;
@@ -194,18 +200,18 @@
 	BonoboObjectClient *server;
 	BonoboClientSite *client_site;
 	
-	g_assert (app && server_goadid);
+	g_assert (app && server_info);
 
 	client_site = bonobo_client_site_new (app->container);
 
-	server = launch_server (client_site, app->container, server_goadid);
+	server = launch_server (client_site, app->container, server_info);
 	if (server == NULL)
 		return NULL;
 
 	view_frame = bonobo_client_site_new_view (client_site, CORBA_OBJECT_NIL);
 	view_widget = bonobo_view_frame_get_wrapper (view_frame);
 
-	frame = gtk_frame_new (server_goadid);
+	frame = gtk_frame_new (view_widget);
 	gtk_widget_show (frame);
 	gtk_box_pack_start (GTK_BOX (app->box), frame, TRUE, TRUE, 0);
 
@@ -245,8 +251,8 @@
 static void
 clean_up_and_quit ()
 {
-	if (gslist)
-		goad_server_list_free (gslist);
+	if (servers)
+		g_list_free (servers);
 
 	CORBA_exception_free (&ev);
 	
@@ -262,13 +268,13 @@
  * has been selected. Fire up such an object and put it
  * in our container */
 static void
-embed_bonobo_object_cb (GtkWidget *widget, GoadServer *server)
+embed_bonobo_object_cb (GtkWidget *widget, ODServerInfo *server_info)
 {
 	BonoboObjectClient *object;
 
-	g_assert (server);
+	g_assert (server_info);
 	
-	object = add_object_to_container (server->server_id);
+	object = add_object_to_container (server_info);
 
 	if (object == NULL)
 	{
@@ -279,37 +285,24 @@
 } /* embed_bonobo_object_cb */
  
 
-static gboolean
-string_in_array(const char *string, const gchar **array)
-{
-	int i;
-	for(i = 0; array[i]; i++) {
-		if(!strcmp(string, array[i]))
-			return TRUE;
-	}
-
-	return FALSE;
-} /* string_in_array */
 
-/* Given a GoadServer (which contains a goad_id,
- * description, etc.), add a menuitem which will
- * allow the activation of that type of object */
+/* FIXME: just use bonobo-selector instead */
 static void
-add_object_to_menu (GnomeApp *app, GoadServer *sai)
+add_object_to_menu (GnomeApp *app, ODServerInfo *server_info)
 {
 	GnomeUIInfo entry[2];
 	gchar *description;
 	
-	g_assert (sai && app);
+	g_assert (server_info && app);
 
 	description = g_strdup_printf("Add \"%s\" Embeddable",
-				      sai->description);
+				      od_server_info_get_id (server_info));
 	
 	entry[0].type = GNOME_APP_UI_ITEM;
 	entry[0].label = description;
 	entry[0].hint = NULL;
 	entry[0].moreinfo = embed_bonobo_object_cb;
-	entry[0].user_data = sai;
+	entry[0].user_data = server_info;
 	entry[0].unused_data = NULL;
 	entry[0].pixmap_type = GNOME_APP_PIXMAP_NONE;
 	entry[0].pixmap_info = NULL;
@@ -332,32 +325,16 @@
 static void
 add_objects_to_menu (GnomeApp *app)
 {
-	int i;
+	GList *p;
+	static const char *required_interfaces[] = {"IDL:Bonobo/Embeddable:1.0"};
 
 	/* get a list of servers from gnorba */
-	gslist = goad_server_list_get ();
+	servers = od_get_server_list (required_interfaces);
 
-	if (!gslist) {
-		g_print ("Couldn't get a GoadServerList!\n");
-		return;
-	}
 
-	servers = gslist->list;
-	if (!servers) {
-		g_print ("The GoadServerList was empty!\n");
-		return;
-	}
-
-	/* for each item from that list that has a
-	 * bonobo_object interface, add it to the menu */
-	for (i = 0; servers[i].repo_id; i++)
+	for (p = servers; p != NULL; p = p->next)
 	{
-		if (string_in_array ("IDL:Bonobo/Embeddable:1.0",
-				     (const gchar**)servers[i].repo_id))
-		{
-			add_object_to_menu (app, &servers[i]);
-		}
-		
+		add_object_to_menu (app, (ODServerInfo *) p->data);
 	}
 } /* add_objects_to_menu */
 
@@ -409,11 +386,16 @@
 main (int argc, char *argv [])
 {
 	CORBA_exception_init (&ev);
-	
-	gnome_CORBA_init ("test-container-autoload", "1.0",
-			  &argc, argv, 0, &ev);
 	
+#if USING_OAF
+        gnome_init_with_popt_table("test-container-autoload", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
+	gnome_CORBA_init ("test-container-autoload", "1.0", &argc, argv, 0, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 	
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Can not bonobo_init\n"));
Index: bonobo/test-container.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/test-container.c,v
retrieving revision 1.54
diff -u -r1.54 test-container.c
--- bonobo/test-container.c	2000/02/16 10:27:55	1.54
+++ bonobo/test-container.c	2000/04/17 04:40:12
@@ -12,7 +12,13 @@
  
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <gdk/gdkprivate.h>
 #include <gdk/gdkx.h>
 #include <bonobo.h>
@@ -41,7 +47,11 @@
  */
 BonoboViewFrame *active_view_frame;
 
-char *server_goadid = "Test_server_bonobo_object";
+#if USING_OAF
+char *server_id = "OAFIID:test_bonobo_object:b1ff15bb-d54f-4814-ba53-d67d3afd70fe";
+#else
+char *server_id = "Test_server_bonobo_object";
+#endif
 
 typedef struct {
 	GtkWidget *app;
@@ -52,14 +62,14 @@
 } Application;
 
 static BonoboObjectClient *
-launch_server (BonoboClientSite *client_site, BonoboContainer *container, char *goadid)
+launch_server (BonoboClientSite *client_site, BonoboContainer *container, char *id)
 {
 	BonoboObjectClient *object_server;
 	
 	bonobo_container_add (container, BONOBO_OBJECT (client_site));
 
 	printf ("Launching...\n");
-	object_server = bonobo_object_activate_with_goad_id (NULL, goadid, 0, NULL);
+	object_server = bonobo_object_activate (id, 0);
 	printf ("Return: %p\n", object_server);
 	if (!object_server){
 		g_warning (_("Can not activate object_server\n"));
@@ -218,14 +228,14 @@
 } /* add_view */
 
 static BonoboObjectClient *
-add_cmd (GtkWidget *widget, Application *app, char *server_goadid,
+add_cmd (GtkWidget *widget, Application *app, char *server_id,
 	 BonoboClientSite **client_site)
 {
 	BonoboObjectClient *server;
 	
 	*client_site = bonobo_client_site_new (app->container);
 
-	server = launch_server (*client_site, app->container, server_goadid);
+	server = launch_server (*client_site, app->container, server_id);
 	if (server == NULL)
 		return NULL;
 
@@ -252,7 +262,7 @@
 add_demo_cmd (GtkWidget *widget, Application *app)
 {
 	BonoboClientSite *client_site;
-	add_cmd (widget, app, server_goadid, &client_site);
+	add_cmd (widget, app, server_id, &client_site);
 }
 
 static void
@@ -262,8 +272,15 @@
 	BonoboStream *stream;
 	Bonobo_PersistStream persist;
 
+#if USING_OAF
+	object = add_cmd (widget, app, "OAFIID:bonobo_image-x-png:716e8910-656b-4b3b-b5cd-5eda48b71a79",
+			  &image_client_site);
+#else
 	object = add_cmd (widget, app, "embeddable:image-x-png",
 			  &image_client_site);
+#endif
+
+
 	if (object == NULL) {
 		gnome_warning_dialog (_("Could not launch bonobo object."));
 		return;
@@ -303,7 +320,12 @@
 	BonoboStream *stream;
 	Bonobo_PersistStream persist;
 
+#if USING_OAF
+	/* FIXME: use the OAFIID of the pdf component once ported. */
+	object = add_cmd (widget, app, "bonobo-object:application-x-pdf", &image_client_site);
+#else
 	object = add_cmd (widget, app, "bonobo-object:application-x-pdf", &image_client_site);
+#endif
 	if (object == NULL)
 	  {
 	    gnome_warning_dialog (_("Could not launch bonobo object."));
@@ -353,7 +375,9 @@
 	BonoboClientSite *client_site;
 	BonoboMoniker *moniker;
 	char *moniker_string_rep;
-	
+
+	/* FIXME: the GOADID thing there is almost certainly wrong for OAF,
+	   but I have no clue what it is supposed to do. */
 	moniker = bonobo_moniker_new ();
 	bonobo_moniker_set_server (
 		moniker,
@@ -417,9 +441,18 @@
 	
 	client_site = bonobo_client_site_new (app->container);
 
+#if USING_OAF
+	server = launch_server (client_site, app->container, "OAFIID:test_canvas_item:82a8a7cc-8b08-401b-9501-4debf6c96619");
+#else
 	server = launch_server (client_site, app->container, "Test_item_server_bonobo_object");
+#endif
+
 	if (server == NULL){
+#if USING_OAF
+		g_warning ("Can not activate OAFIID:test_canvas_item:82a8a7cc-8b08-401b-9501-4debf6c96619");
+#else
 		g_warning ("Can not activate Test_item_server_bonobo_object");
+#endif
 		return;
 	}
 	CORBA_exception_init (&ev);
@@ -490,7 +523,12 @@
 {
 	BonoboObjectClient *object;
 
+#if USING_OAF
+	object = add_cmd (widget, app, "OAFIID:paint_component_simple:9c04da1c-d44c-4041-9991-fed1ed1ed079", &paint_client_site);
+#else
 	object = add_cmd (widget, app, "embeddable:paint-component-simple", &paint_client_site);
+#endif
+
 	if (object == NULL)
 	  {
 	    gnome_warning_dialog (_("Could not launch Embeddable."));
@@ -519,8 +557,13 @@
 	BonoboObjectClient *object;
 	BonoboStream *stream;
 	Bonobo_PersistStream persist;
+
+#if USING_OAF
+	object = add_cmd (widget, app, "OAFIID:bonobo_text-plain:26e1f6ba-90dd-4783-b304-6122c4b6c821", &text_client_site);
+#else
+	object = add_cmd (widget, app, "bonobo-object:hello", &text_client_site);
+#endif
 
-	object = add_cmd (widget, app, "embeddable:text-plain", &text_client_site);
 	if (object == NULL)
 	  {
 	    gnome_warning_dialog (_("Could not launch Embeddable."));
@@ -783,13 +826,20 @@
 	Application *app;
 
 	if (argc != 1){
-		server_goadid = argv [1];
+		server_id = argv [1];
 	}
 	
 	CORBA_exception_init (&ev);
 	
+#if USING_OAF
+        gnome_init_with_popt_table("MyShell", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init ("MyShell", "1.0", &argc, argv, 0, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 	
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Can not bonobo_init\n"));
Index: bonobo/test-storage.c
===================================================================
RCS file: /cvs/gnome/bonobo/bonobo/test-storage.c,v
retrieving revision 1.5
diff -u -r1.5 test-storage.c
--- bonobo/test-storage.c	2000/01/25 11:35:52	1.5
+++ bonobo/test-storage.c	2000/04/17 04:40:12
@@ -1,6 +1,12 @@
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <gdk/gdkprivate.h>
 #include <gdk/gdkx.h>
 #include <bonobo/bonobo.h>
@@ -25,8 +31,15 @@
 	
 	CORBA_exception_init (&ev);
 	
+#if USING_OAF
+        gnome_init_with_popt_table("MyShell", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init ("MyShell", "1.0", &argc, argv, 0, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 	
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Can not bonobo_init\n"));
Index: components/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/components/Makefile.am,v
retrieving revision 1.10
diff -u -r1.10 Makefile.am
--- components/Makefile.am	2000/01/25 22:04:44	1.10
+++ components/Makefile.am	2000/04/17 04:40:12
@@ -1,8 +1,4 @@
-if OAF
-SUBDIRS =
-else
 SUBDIRS =  application-x-gnomine image-x-png text-plain audio-ulaw
-endif
 
 Keysdir   = $(datadir)/mime-info
 Keys_DATA = bonobo.keys
Index: components/application-x-gnomine/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/components/application-x-gnomine/Makefile.am,v
retrieving revision 1.5
diff -u -r1.5 Makefile.am
--- components/application-x-gnomine/Makefile.am	2000/02/01 23:55:51	1.5
+++ components/application-x-gnomine/Makefile.am	2000/04/17 04:40:12
@@ -1,3 +1,9 @@
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
 scoredir=$(localstatedir)/games
 Gamesdir = $(datadir)/gnome/apps/Games
 
@@ -30,15 +36,8 @@
 bonobo_application_x_mines_LDADD =		\
 	$(GNOME_LIBDIR)				\
 	$(top_builddir)/bonobo/libbonobo.la	\
-	$(GNOMEGNORBA_LIBS)
-
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = application-x-mines.gnorba
+	$(OBJECT_DIRECTORY_LIBS)
 
-EXTRA_DIST = flag.xpm mine.xpm face-cool.xpm face-sad.xpm \
-	face-smile.xpm face-win.xpm face-worried.xpm \
-	gnomine.desktop README AUTHORS $(gnorba_DATA)
-
 Games_DATA = gnomine.desktop
 
 #install-data-local:
@@ -56,3 +55,21 @@
 #	-chown games.games $(DESTDIR)$(scoredir)/gnomine.Custom.scores
 #	-chmod 664 $(DESTDIR)$(scoredir)/gnomine.Custom.scores	
 #	-chgrp games $(DESTDIR)$(bindir)/gnomine && chmod 2111 $(DESTDIR)$(bindir)/gnomine
+
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES = application-x-mines.gnorba
+OAF_FILES = application-x-mines.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
+
+EXTRA_DIST = flag.xpm mine.xpm face-cool.xpm face-sad.xpm \
+	face-smile.xpm face-win.xpm face-worried.xpm \
+	gnomine.desktop README AUTHORS $(GOAD_FILES) $(OAF_FILES)
+
Index: components/application-x-gnomine/application-x-mines.oafinfo
===================================================================
RCS file: application-x-mines.oafinfo
diff -N application-x-mines.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ application-x-mines.oafinfo	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,18 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_application-x-mines_factory:79eddfb6-12fd-4588-a02c-3eb50e67137d" type="exe" location="bonobo-application-x-mines">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="bonobo GnoMines object factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_application-x-mines:804d34a8-57dd-428b-9c94-7aa3a8365230" type="factory" location="OAFIID:bonobo_application-x-mines_factory:79eddfb6-12fd-4588-a02c-3eb50e67137d">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+<item value="IDL:Bonobo/Unknown:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="bonobo GnoMines object"/>
+</oaf_server>
+
+</oaf_info>
Index: components/application-x-gnomine/bonobo-application-x-mines.c
===================================================================
RCS file: /cvs/gnome/bonobo/components/application-x-gnomine/bonobo-application-x-mines.c,v
retrieving revision 1.10
diff -u -r1.10 bonobo-application-x-mines.c
--- components/application-x-gnomine/bonobo-application-x-mines.c	2000/04/01 19:11:41	1.10
+++ components/application-x-gnomine/bonobo-application-x-mines.c	2000/04/17 04:40:12
@@ -10,8 +10,14 @@
 
 #include <config.h>
 #include <gnome.h>
-#include <bonobo.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
+#include <bonobo.h>
 
 #include "minefield.h"
 
@@ -372,10 +378,16 @@
 init_simple_mines_factory (void)
 {
 	BonoboEmbeddableFactory *factory;
+#if USING_OAF
+	factory = bonobo_embeddable_factory_new (
+	 "OAFIID:bonobo_application-x-mines_factory:79eddfb6-12fd-4588-a02c-3eb50e67137d",
+		embeddable_factory, NULL);
 
+#else
 	factory = bonobo_embeddable_factory_new (
 		"embeddable-factory:application-x-mines",
 		embeddable_factory, NULL);
+#endif
 }
 
 static void
@@ -389,13 +401,20 @@
 
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("application-x-mines", VERSION,
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
 		"application-x-mines", VERSION,
 		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+	orb = gnome_CORBA_ORB ();
+#endif
 
 	CORBA_exception_free (&ev);
 
-	orb = gnome_CORBA_ORB ();
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Could not initialize Bonobo!"));
 }
Index: components/audio-ulaw/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/components/audio-ulaw/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- components/audio-ulaw/Makefile.am	2000/01/25 17:42:47	1.7
+++ components/audio-ulaw/Makefile.am	2000/04/17 04:40:12
@@ -1,6 +1,13 @@
 
 # SUBDIRS = doc
 
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
+
 bin_PROGRAMS = bonobo-audio-ulaw
 
 bonobo_audio_ulaw_SOURCES =	\
@@ -23,11 +30,21 @@
 	$(top_builddir)/bonobo/libbonobo.la	\
 	$(GTK_LIBS)				\
 	$(GNOME_LIBDIR)				\
-	$(GNOMEGNORBA_LIBS)			\
+	$(OBJECT_DIRECTORY_LIBS)		\
 	$(INTLLIBS)
+
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES = audio-ulaw.gnorba
+OAF_FILES = audio-ulaw.oafinfo
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = audio-ulaw.gnorba
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
 
-EXTRA_DIST = $(gnorba_DATA)
+extra_DIST = $(GOAD_FILES) $(OAF_FILES)
 
Index: components/audio-ulaw/audio-ulaw.oafinfo
===================================================================
RCS file: audio-ulaw.oafinfo
diff -N audio-ulaw.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ audio-ulaw.oafinfo	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,21 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_audio-ulaw_factory:823935e2-c944-42e7-a462-75cc76b18abb" type="exe" location="bonobo-audio-ulaw">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="audio/ulaw bonobo object factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_audio-ulaw:9f72fd65-ce2b-4942-8440-e26967da7d88" type="factory" location="OAFIID:bonobo_audio-ulaw_factory:823935e2-c944-42e7-a462-75cc76b18abb">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+<item value="IDL:Bonobo/PersistStream:1.0"/>
+<item value="IDL:Bonobo/ProgressiveDataSink:1.0"/>
+<item value="IDL:Bonobo/Persist:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="audio/ulaw bonobo object"/>
+</oaf_server>
+
+</oaf_info>
Index: components/audio-ulaw/bonobo-audio-ulaw.c
===================================================================
RCS file: /cvs/gnome/bonobo/components/audio-ulaw/bonobo-audio-ulaw.c,v
retrieving revision 1.14
diff -u -r1.14 bonobo-audio-ulaw.c
--- components/audio-ulaw/bonobo-audio-ulaw.c	2000/01/25 11:45:29	1.14
+++ components/audio-ulaw/bonobo-audio-ulaw.c	2000/04/17 04:40:12
@@ -415,9 +415,15 @@
 static void
 init_bonobo_audio_ulaw_factory (void)
 {
+#if USING_OAF
 	factory = bonobo_embeddable_factory_new (
+	 "OAFIID:bonobo_audio-ulaw_factory:823935e2-c944-42e7-a462-75cc76b18abb",
+		 embeddable_factory, NULL);
+#else
+	factory = bonobo_embeddable_factory_new (
 		"embeddable-factory:audio-ulaw",
 		 embeddable_factory, NULL);
+#endif
 } /* init_bonobo_audio_ulaw_factory */
 
 static void
@@ -428,13 +434,21 @@
 
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("bonobo-audio-ulaw", VERSION,
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb =oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
 		"bonobo-audio-ulaw", VERSION,
 		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 
+	orb = gnome_CORBA_ORB ();
+#endif
+
 	color_init();
 
-	orb = gnome_CORBA_ORB ();
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("I could not initialize Bonobo"));
 
Index: components/audio-ulaw/bonobo-audio-ulaw.h
===================================================================
RCS file: /cvs/gnome/bonobo/components/audio-ulaw/bonobo-audio-ulaw.h,v
retrieving revision 1.6
diff -u -r1.6 bonobo-audio-ulaw.h
--- components/audio-ulaw/bonobo-audio-ulaw.h	2000/01/25 11:45:29	1.6
+++ components/audio-ulaw/bonobo-audio-ulaw.h	2000/04/17 04:40:12
@@ -1,5 +1,11 @@
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 
 #ifndef __BONOBO_AUDIO_ULAW_H__
Index: components/image-x-png/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/components/image-x-png/Makefile.am,v
retrieving revision 1.9
diff -u -r1.9 Makefile.am
--- components/image-x-png/Makefile.am	2000/02/17 04:26:16	1.9
+++ components/image-x-png/Makefile.am	2000/04/17 04:40:12
@@ -1,3 +1,8 @@
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
 
 SUBDIRS = doc
 
@@ -19,12 +24,22 @@
 	$(top_builddir)/bonobo/libbonobo.la	\
 	$(GTK_LIBS)				\
 	$(GNOME_LIBDIR)				\
-	$(GNOMEGNORBA_LIBS)			\
+	$(OBJECT_DIRECTORY_LIBS)                \
 	$(INTLLIBS)				\
 	-lpng -lz
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = image-x-png.gnorba
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
 
-EXTRA_DIST = $(gnorba_DATA)
+GOAD_FILES = image-x-png.gnorba
+OAF_FILES = image-x-png.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
+
+extra_DIST = $(GOAD_FILES) $(OAF_FILES)
+
 
Index: components/image-x-png/bonobo-image-x-png.c
===================================================================
RCS file: /cvs/gnome/bonobo/components/image-x-png/bonobo-image-x-png.c,v
retrieving revision 1.28
diff -u -r1.28 bonobo-image-x-png.c
--- components/image-x-png/bonobo-image-x-png.c	2000/04/08 11:45:19	1.28
+++ components/image-x-png/bonobo-image-x-png.c	2000/04/17 04:40:12
@@ -11,7 +11,13 @@
  */
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 #include <png.h>
 
@@ -456,18 +462,31 @@
 init_bonobo_image_x_png_factory (void)
 {
 	BonoboEmbeddableFactory *factory;
-	
+
+#if USING_OAF
+	factory = bonobo_embeddable_factory_new (
+	 "OAFIID:bonobo_image-x-png_factory:c4fb0eaa-e907-4192-ae7a-7a64c4f779c4",
+		bonobo_object_factory, NULL);
+#else
 	factory = bonobo_embeddable_factory_new (
 		"bonobo-object-factory:image-x-png",
 		bonobo_object_factory, NULL);
+#endif
 }
 
 static void
 init_server_factory (int argc, char **argv)
 {
+#if USING_OAF
+        gnome_init_with_popt_table("bonobo-image-x-png", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
 		"bonobo-image-x-png", "1.0",
 		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+#endif
 
 	if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
 		g_error (_("I could not initialize Bonobo"));
Index: components/image-x-png/image-x-png.oafinfo
===================================================================
RCS file: image-x-png.oafinfo
diff -N image-x-png.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ image-x-png.oafinfo	Mon Apr 17 00:40:12 2000
@@ -0,0 +1,20 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_image-x-png_factory:c4fb0eaa-e907-4192-ae7a-7a64c4f779c4" type="exe" location="bonobo-image-x-png">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="image/x-png embeddable factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_image-x-png:716e8910-656b-4b3b-b5cd-5eda48b71a79" type="factory" location="OAFIID:bonobo_image-x-png_factory:c4fb0eaa-e907-4192-ae7a-7a64c4f779c4">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+<item value="IDL:Bonobo/PersistStream:1.0"/>
+<item value="IDL:Bonobo/Persist:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="image/x-png bonobo object"/>
+</oaf_server>
+
+</oaf_info>
Index: components/text-plain/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/components/text-plain/Makefile.am,v
retrieving revision 1.7
diff -u -r1.7 Makefile.am
--- components/text-plain/Makefile.am	2000/01/25 17:42:50	1.7
+++ components/text-plain/Makefile.am	2000/04/17 04:40:12
@@ -1,4 +1,10 @@
 
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
 bin_PROGRAMS = bonobo-text-plain
 
 bonobo_text_plain_SOURCES =	\
@@ -16,11 +22,20 @@
 	$(top_builddir)/bonobo/libbonobo.la	\
 	$(GTK_LIBS)				\
 	$(GNOME_LIBDIR)				\
-	$(GNOMEGNORBA_LIBS)			\
+	$(OBJECT_DIRECTORY_LIBS)		\
 	$(INTLLIBS)
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES = text-plain.gnorba
+OAF_FILES = text-plain.oafinfo
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = text-plain.gnorba
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
 
-EXTRA_DIST = $(gnorba_DATA)
+extra_DIST = $(GOAD_FILES) $(OAF_FILES)
 
Index: components/text-plain/bonobo-text-plain.c
===================================================================
RCS file: /cvs/gnome/bonobo/components/text-plain/bonobo-text-plain.c,v
retrieving revision 1.39
diff -u -r1.39 bonobo-text-plain.c
--- components/text-plain/bonobo-text-plain.c	2000/03/10 05:15:51	1.39
+++ components/text-plain/bonobo-text-plain.c	2000/04/17 04:40:13
@@ -7,7 +7,13 @@
  */
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 
 /* XPM */
@@ -868,9 +874,15 @@
 static void
 init_bonobo_text_plain_factory (void)
 {
+#if USING_OAF
+	factory = bonobo_embeddable_factory_new (
+                "OAFIID:bonobo_text-plain_factory:ac6af073-f87c-4f69-b6a2-2ae4aea0bb85",
+		embeddable_factory, NULL);
+#else
 	factory = bonobo_embeddable_factory_new (
 		"embeddable-factory:text-plain",
 		embeddable_factory, NULL);
+#endif
 } /* init_bonobo_text_plain_factory */
 
 static void
@@ -881,9 +893,16 @@
 
 	CORBA_exception_init (&ev);
 	
+#if USING_OAF
+        gnome_init_with_popt_table("bonobo-text-plain", VERSION,
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
 		"bonobo-text-plain", VERSION,
 		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+#endif
 
 	if (bonobo_init (CORBA_OBJECT_NIL, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
 		g_error (_("I could not initialize Bonobo"));
Index: components/text-plain/text-plain.oafinfo
===================================================================
RCS file: text-plain.oafinfo
diff -N text-plain.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ text-plain.oafinfo	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,21 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_text-plain_factory:ac6af073-f87c-4f69-b6a2-2ae4aea0bb85" type="exe" location="bonobo-text-plain">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="text/plain embeddable factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_text-plain:26e1f6ba-90dd-4783-b304-6122c4b6c821" type="factory" location="OAFIID:bonobo_text-plain_factory:ac6af073-f87c-4f69-b6a2-2ae4aea0bb85">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+<item value="IDL:Bonobo/ProgressiveDataSink:1.0"/>
+<item value="IDL:Bonobo/PersistStream:1.0"/>
+<item value="IDL:Bonobo/Persist:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="text/plain component"/>
+</oaf_server>
+
+</oaf_info>
Index: doc/goad2oaf.txt
===================================================================
RCS file: goad2oaf.txt
diff -N goad2oaf.txt
--- /dev/null	Tue May  5 16:32:27 1998
+++ goad2oaf.txt	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,56 @@
+
+Converting from GOAD to OAF
+
+Components
+
+* Change your configure script to check for the right way to link and
+  compile against OAF. The oaf-config program (with the --libs and
+  --cflags options) should give you the appropriate link and compile
+  options.
+
+* Convert your .goad or .gnorba files to .oafinfo files. The
+  gnorba2oafinfo.pl Perl script should give you a good start on
+  this. You need the `uuidgen' program (available with e2fstools 1.17)
+  to run this script. However, take a look at the results by hand. It
+  embeds to old goad ID as the human-readbale part of the OAFIID. This
+  may not be entirely appropriate. Also, make sure that you fully list
+  all the IDL interfaces your object supports in the repo_ids
+  attribute, including both inherited ones and ones accessible through
+  query_interface. For example, an Embeddable that also provides the
+  PersistStream interface should list "IDL:Bonobo/Embeddable:1.0",
+  "IDL:Bonobo/Unknown:1.0", "IDL:Bonobo/PersistStream:1.0" and
+  "IDL:Bonobo/Persist:1.0".
+
+* Make your Makefiles install the .oafinfo files. The proper directory
+  is $(datadir)/oaf
+
+* Change your Makefiles to link against OAF instead of GNORBA. To do
+  this, replace references to $(GNOME_GNORBA_LIBS) with $(GNOME_LIBS)
+  $(OAF_LIBS). This assumes your configure script set $(OAF_LIBS)
+  properly.
+
+* Replace GOAD IDs with the appropriate OAFIIDs in your code.
+
+* Instead of including <libgnorba/gnorba.h>, include
+  <liboaf/liboaf.h>.
+
+* Instead of calling gnome_CORBA_init_with_popt_table, call
+  gnome_init_with_popt_table (making sure to include the OAF popt
+  table) and oaf_init. If you need to get the orb, use the results
+  from oaf_init instead of calling gnome_CORBA_orb.
+
+Containers
+
+* Most of the above steps will apply. Obviously, there will be no
+  .oafinfo files to convert however.
+
+* Replace calls that try to be explicit about using the GOAD ID with
+  the OAF ones or generic ones. For instance, replace
+  bonobo_object_activate_with_goad_id with just plain
+  bonobo_object_activate; replace bonobo_select_goad_id with
+  bonobo_select_id.
+
+* Long-term, OAF objects will have some standardized properties based
+  on which you can query. For instance, controls or embeddables which
+  can read a certain set of mime types will have a property to
+  indicate this.
Index: gshell/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/gshell/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- gshell/Makefile.am	2000/01/25 22:04:45	1.6
+++ gshell/Makefile.am	2000/04/17 04:40:13
@@ -1,3 +1,9 @@
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
 INCLUDES = \
 	-I$(top_srcdir) -I$(top_srcdir)/bonobo \
 	-I$(top_builddir) \
@@ -6,11 +12,7 @@
         $(GNOME_INCLUDEDIR)				\
         $(GTK_CFLAGS)
 
-if OAF
-bin_PROGRAMS =
-else
 bin_PROGRAMS = gshell
-endif
 
 gshell_SOURCES = gshell.h gshell.c inout.h inout.c menu.h menu.c
 
Index: samples/bonobo-class/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/samples/bonobo-class/Makefile.am,v
retrieving revision 1.2
diff -u -r1.2 Makefile.am
--- samples/bonobo-class/Makefile.am	2000/04/02 01:16:32	1.2
+++ samples/bonobo-class/Makefile.am	2000/04/17 04:40:13
@@ -5,6 +5,12 @@
 bin_PROGRAMS     = bonobo-echo echo-client
 noinst_LIBRARIES = libEcho.a
 
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
 bonobo_echo_SOURCES =		\
 	main.c			\
 	echo.c			\
@@ -14,7 +20,7 @@
 	$(top_builddir)/bonobo/libbonobo.la	\
 	$(GTK_LIBS)				\
 	$(GNOME_LIBDIR)				\
-	$(GNOMEGNORBA_LIBS)			\
+	$(OBJECT_DIRECTORY_LIBS)                \
 	libEcho.a				\
 	$(INTLLIBS)
 
@@ -22,7 +28,7 @@
 	$(top_builddir)/bonobo/libbonobo.la	\
 	$(GTK_LIBS)				\
 	$(GNOME_LIBDIR)				\
-	$(GNOMEGNORBA_LIBS)			\
+	$(OBJECT_DIRECTORY_LIBS)                \
 	libEcho.a				\
 	$(INTLLIBS)
 
@@ -37,14 +43,25 @@
 $(ECHO_CORBA_GENERATED): Echo.idl 
 	orbit-idl -I`$(GNOME_CONFIG) --datadir`/idl -I$(top_srcdir)/idl $(srcdir)/Echo.idl
 	touch my_echo_idl
+
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES = echo.gnorba
+OAF_FILES = echo.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = echo.gnorba
 
 idldir    = $(datadir)/idl
 idl_DATA  = Echo.idl
 
-EXTRA_DIST = $(gnorba_DATA) $(idl_DATA)
+EXTRA_DIST = $(GOAD_FILES) $(OAF_FILES) $(idl_DATA)
 
 INCLUDES = 						\
         -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
Index: samples/bonobo-class/echo-client.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/bonobo-class/echo-client.c,v
retrieving revision 1.2
diff -u -r1.2 echo-client.c
--- samples/bonobo-class/echo-client.c	2000/03/27 04:12:37	1.2
+++ samples/bonobo-class/echo-client.c	2000/04/17 04:40:13
@@ -5,8 +5,15 @@
  *   Miguel de Icaza  (miguel helixcode com)
  *
  */
+
+
 #include <config.h>
-#include <libgnorba/gnorba.h>
+#include <gnome.h>
+#ifdef USING_OAF
+#include <liboaf/liboaf.h>
+#else
+#indluce <libgnorba/libgnorba.h>
+#endif
 #include <bonobo.h>
 #include "Echo.h"
 
@@ -17,9 +24,17 @@
 {
 	CORBA_exception_init (&ev);
 	
+#if USING_OAF
+        gnome_init_with_popt_table("echo-client", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+
+	oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
-		"graph", VERSION,
-		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+      	"echo-client", "1.0",
+	&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
+#endif
 
 	if (bonobo_init (NULL, NULL, NULL) == FALSE)
 		g_error (_("I could not initialize Bonobo"));
@@ -37,10 +52,19 @@
 	Demo_Echo echo_server;
 
 	init_bonobo (argc, argv);
+
+#if USING_OAF
+	server = bonobo_object_activate ("OAFIID:demo_echo:fe45dab2-ae27-45e9-943d-34a49eefca96", 0);
+#else
+	server = bonobo_object_activate ("GOADID:demo_echo", 0);
 
-	server = bonobo_object_activate ("GOADID:demo:echo", 0);
+#endif
 	if (!server){
-		printf ("Could not create an instance of the GOADID:demo:echo component");
+#ifdef USING_OAF
+		printf ("Could not create an instance of the OAFIID:demo_echo:fe45dab2-ae27-45e9-943d-34a49eefca96 component");
+#else
+		printf ("Could not create an instance of the GOADID:demo:echo");
+#endif
 		return 1;
 	}
 
@@ -52,7 +76,7 @@
 	/*
 	 * Send a message
 	 */
-	Demo_Echo_echo (echo_server, "This is the message from the client", &ev);
+	Demo_Echo_echo (echo_server, "This is the message from the client\n", &ev);
 
 	/*
 	 * Notify we are no longer interested in their services:
Index: samples/bonobo-class/echo.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/bonobo-class/echo.c,v
retrieving revision 1.2
diff -u -r1.2 echo.c
--- samples/bonobo-class/echo.c	2000/03/27 04:12:37	1.2
+++ samples/bonobo-class/echo.c	2000/04/17 04:40:13
@@ -37,7 +37,6 @@
 {
 	Echo *echo = ECHO (object);
 
-	printf ("Echo server being destroyed\n");
 	g_free (echo->instance_data);
 	
 	GTK_OBJECT_CLASS (echo_parent_class)->destroy (object);
@@ -153,11 +152,13 @@
 	POA_Demo_Echo *servant;
 	CORBA_Environment ev;
 
-	servant = (POA_Demo_Echo *) g_new (BonoboObjectServant, 1);
+	servant = (POA_Demo_Echo *) g_new0 (BonoboObjectServant, 1);
 	servant->vepv = &echo_vepv;
 
 	CORBA_exception_init (&ev);
 	POA_Demo_Echo__init ((PortableServer_Servant) servant, &ev);
+	ORBIT_OBJECT_KEY(servant->_private)->object = NULL;
+
 	if (ev._major != CORBA_NO_EXCEPTION){
 		g_free (servant);
 		CORBA_exception_free (&ev);
@@ -179,6 +180,7 @@
 	Demo_Echo corba_echo;
 
 	echo = gtk_type_new (echo_get_type ());
+
 	corba_echo = create_echo (BONOBO_OBJECT (echo));
 
 	if (corba_echo == CORBA_OBJECT_NIL){
Index: samples/bonobo-class/echo.oafinfo
===================================================================
RCS file: echo.oafinfo
diff -N echo.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ echo.oafinfo	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,17 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:demo_echo_factory:a7080731-d06c-42d2-852e-179c538f6ee5" type="exe" location="bonobo-echo">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Bonobo Echo server factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:demo_echo:fe45dab2-ae27-45e9-943d-34a49eefca96" type="factory" location="OAFIID:demo_echo_factory:a7080731-d06c-42d2-852e-179c538f6ee5">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Empty:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Bonobo Echo server sample program"/>
+</oaf_server>
+
+</oaf_info>
Index: samples/bonobo-class/main.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/bonobo-class/main.c,v
retrieving revision 1.1
diff -u -r1.1 main.c
--- samples/bonobo-class/main.c	2000/03/27 03:53:34	1.1
+++ samples/bonobo-class/main.c	2000/04/17 04:40:13
@@ -7,7 +7,14 @@
  * (C) 1999, 2000 Helix Code, Inc.  http://www.helixcode.com
  */
 #include <config.h>
+#include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 #include "Echo.h"
 #include "echo.h"
@@ -30,11 +37,17 @@
 static void
 init_server_factory (int argc, char **argv)
 {
+#if USING_OAF
+        gnome_init_with_popt_table("echo", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
-		"echo", "1.0",
-		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
-
+      	"echo", "1.0",
+	&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("I could not initialize Bonobo"));
@@ -58,8 +71,10 @@
 	Echo *echo;
 
 	echo = echo_new ();
-	if (echo == NULL)
+	
+	if (echo == NULL) {
 		return NULL;
+	}
 
 	active_echo_servers++;
 
@@ -76,8 +91,11 @@
 	/*
 	 * Creates and registers our Factory for Echo servers
 	 */
-	factory = bonobo_generic_factory_new (
-		"GOADID:echo-factory:demo:echo", echo_factory, NULL);
+#if USING_OAF
+	factory = bonobo_generic_factory_new ("OAFIID:demo_echo_factory:a7080731-d06c-42d2-852e-179c538f6ee5", echo_factory, NULL);
+#else
+	factory = bonobo_generic_factory_new ("GOADID:echo-factory:demo:echo", echo_factory, NULL);
+#endif
 
 	if (factory == NULL)
 		g_error ("It was not possible to register a new echo factory");
@@ -103,7 +121,7 @@
 	/*
 	 * Main loop
 	 */
-	printf ("Echo component is active\n");
+	puts ("Echo component is active");
 	gtk_main ();
 
 	CORBA_exception_free (&ev);
Index: samples/compound-doc/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/samples/compound-doc/Makefile.am,v
retrieving revision 1.5
diff -u -r1.5 Makefile.am
--- samples/compound-doc/Makefile.am	2000/04/09 20:07:04	1.5
+++ samples/compound-doc/Makefile.am	2000/04/17 04:40:13
@@ -1,12 +1,14 @@
 
-if OAF
-bin_PROGRAMS =
-else
 bin_PROGRAMS = paint-component-simple sample-container
-endif
 
 GPRINT_LIBS = $(top_builddir)/bonobo/libbonobo-print.la
 
+if OAF
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
+else
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
+endif
+
 INCLUDES =	\
         -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
 	-I$(srcdir) -I$(top_srcdir) 			\
@@ -20,21 +22,40 @@
 
 paint_component_simple_LDADD = 			\
 	$(top_builddir)/bonobo/libbonobo.la	\
-	$(BONOBO_LIBS)				\
 	$(GPRINT_LIBS)				\
-	$(INTLLIBS)
+	$(BONOBO_LIBS)				\
+	$(INTLLIBS)                             \
+	$(OBJECT_DIRECTORY_LIBS)
 
 sample_container_SOURCES =		\
 	sample-container.c
 
 sample_container_LDADD = 			\
 	$(top_builddir)/bonobo/libbonobo.la	\
+	$(GPRINT_LIBS)				        \
 	$(BONOBO_LIBS)				\
-	$(GPRINT_LIBS)				\
+	$(GTK_LIBS)					\
+	$(GNOME_LIBDIR)					\
+	$(OBJECT_DIRECTORY_LIBS)			\
 	$(INTLLIBS)
+
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
+
+GOAD_FILES =    paint-component-simple.gnorba
+OAF_FILES =	paint-component-simple.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
+
+oafdir = $(datadir)/oaf
+oaf_DATA = paint-component-simple.oafinfo
+
+extra_DIST = $(GOAD_FILES) $(OAF_FILES)
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA = paint-component-simple.gnorba
 
-EXTRA_DIST = $(gnorba_DATA)
 
Index: samples/compound-doc/paint-component-simple.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/compound-doc/paint-component-simple.c,v
retrieving revision 1.24
diff -u -r1.24 paint-component-simple.c
--- samples/compound-doc/paint-component-simple.c	2000/04/13 18:33:55	1.24
+++ samples/compound-doc/paint-component-simple.c	2000/04/17 04:40:13
@@ -10,8 +10,14 @@
 
 #include <config.h>
 #include <gnome.h>
-#include <bonobo.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
+#include <bonobo.h>
 #include <bonobo/bonobo-print.h>
 #include <libgnomeprint/gnome-print.h>
 
@@ -19,7 +25,7 @@
  * Number of running objects
  */ 
 static int running_objects = 0;
-static BonoboEmbeddableFactory *factory = NULL;
+static BonoboGenericFactory *factory = NULL;
 
 /*
  * The Embeddable data.
@@ -579,12 +585,12 @@
 
 
 /*
- * When a container asks our EmbeddableFactory for a new paint
+ * When a container asks our GenericFactory for a new paint
  * component, this function is called.  It creates the new
  * BonoboEmbeddable object and returns it.
  */
 static BonoboObject *
-embeddable_factory (BonoboEmbeddableFactory *this,
+embeddable_factory (BonoboGenericFactory *this,
 		    void *data)
 {
 	BonoboEmbeddable *embeddable;
@@ -689,7 +695,7 @@
 	return BONOBO_OBJECT (embeddable);
 }
 
-static BonoboEmbeddableFactory *
+static BonoboGenericFactory *
 init_simple_paint_factory (void)
 {
 	/*
@@ -698,9 +704,15 @@
 	 * component, it will ask the factory to create one, and the
 	 * factory will invoke our embeddable_factory() function.
 	 */
-	return bonobo_embeddable_factory_new (
-		"embeddable-factory:paint-component-simple",
-		embeddable_factory, NULL);
+#if USING_OAF
+         return bonobo_generic_factory_new (
+			    "OAFIID:paint_component_simple_factory:301d4c2f-3f2b-404d-99e5-3fde72a1e601",
+			     embeddable_factory, NULL);
+#else
+         return bonobo_generic_factory_new (
+			     "embeddable-factory:paint-component-simple",
+			     embeddable_factory, NULL);  
+#endif
 }
 
 static void
@@ -711,13 +723,21 @@
 
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("bonobo-simple-paint", VERSION,
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
 		"bonobo-simple-paint", VERSION,
 		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 
 	CORBA_exception_free (&ev);
-
 	orb = gnome_CORBA_ORB ();
+#endif
+
+
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Could not initialize Bonobo!"));
 }
Index: samples/compound-doc/paint-component-simple.oafinfo
===================================================================
RCS file: paint-component-simple.oafinfo
diff -N paint-component-simple.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ paint-component-simple.oafinfo	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,19 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:paint_component_simple_factory:301d4c2f-3f2b-404d-99e5-3fde72a1e601" type="exe" location="paint-component-simple">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="simple paint embeddable factory"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:paint_component_simple:9c04da1c-d44c-4041-9991-fed1ed1ed079" type="factory" location="OAFIID:paint_component_simple_factory:301d4c2f-3f2b-404d-99e5-3fde72a1e601">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Embeddable:1.0"/>
+<item value="IDL:Bonobo/Print:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="A simple paint component"/>
+</oaf_server>
+
+</oaf_info>
Index: samples/compound-doc/sample-container.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/compound-doc/sample-container.c,v
retrieving revision 1.25
diff -u -r1.25 sample-container.c
--- samples/compound-doc/sample-container.c	2000/04/14 14:51:34	1.25
+++ samples/compound-doc/sample-container.c	2000/04/17 04:40:13
@@ -13,7 +13,12 @@
 #include <config.h>
 #include <gnome.h>
 #include <bonobo.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
 
 #include <libgnomeprint/gnome-printer.h>
 #include <libgnomeprint/gnome-print.h>
@@ -534,8 +539,7 @@
 	/*
 	 * Launch the component.
 	 */
-	object_server = bonobo_object_activate_with_goad_id (
-		NULL, component_goad_id, 0, NULL);
+	object_server = bonobo_object_activate (component_goad_id, 0);
 
 	if (object_server == NULL)
 		return NULL;
@@ -732,24 +736,33 @@
 container_add_embeddable_cmd (GtkWidget *widget, Container *container)
 {
 	char *required_interfaces[2] = { "IDL:Bonobo/Embeddable:1.0", NULL };
-	char *goad_id;
+	char *id;
 
 	/*
 	 * Ask the user to select a component.
 	 */
-	goad_id = gnome_bonobo_select_goad_id (
+#if USING_OAF
+	puts ("oaf");
+	id = gnome_bonobo_select_oaf_id (
+		_("Select an embeddable Bonobo component to add"),
+		(const gchar **) required_interfaces);
+
+#else
+	id = gnome_bonobo_select_goad_id (
 		_("Select an embeddable Bonobo component to add"),
 		(const gchar **) required_interfaces);
+
+#endif
 
-	if (goad_id == NULL)
+	if (id == NULL)
 		return;
 
 	/*
 	 * Activate it.
 	 */
-	container_activate_component (container, goad_id);
+	container_activate_component (container, id);
 
-	g_free (goad_id);
+	g_free (id);
 }
 
 static void
@@ -885,11 +898,17 @@
 
 	CORBA_exception_init (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("sample-container", "1.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init ("sample-container", "1.0", &argc, argv, 0, &ev);
 
 	CORBA_exception_free (&ev);
-
 	orb = gnome_CORBA_ORB ();
+#endif
 
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Could not initialize Bonobo!\n"));
Index: samples/controls/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- samples/controls/Makefile.am	2000/01/25 22:04:49	1.4
+++ samples/controls/Makefile.am	2000/04/17 04:40:13
@@ -1,8 +1,10 @@
 
+bin_PROGRAMS = sample-control-factory sample-control-container
+
 if OAF
-bin_PROGRAMS =
+OBJECT_DIRECTORY_LIBS=$(OAF_LIBS) $(GNOMEUI_LIBS)
 else
-bin_PROGRAMS = sample-control-factory sample-control-container
+OBJECT_DIRECTORY_LIBS=$(GNOMEGNORBA_LIBS)
 endif
 
 INCLUDES =	\
@@ -24,7 +26,7 @@
 	$(top_builddir)/bonobo/libbonobo.la		\
 	$(GTK_LIBS)					\
 	$(GNOME_LIBDIR)					\
-	$(GNOMEGNORBA_LIBS)					\
+	$(OBJECT_DIRECTORY_LIBS)			\
 	$(INTLLIBS)
 
 sample_control_container_SOURCES =			\
@@ -34,14 +36,26 @@
 	$(top_builddir)/bonobo/libbonobo.la		\
 	$(GTK_LIBS)					\
 	$(GNOME_LIBDIR)					\
-	$(GNOMEGNORBA_LIBS)					\
+	$(OBJECT_DIRECTORY_LIBS)			\
 	$(INTLLIBS)
+
+goaddir = $(sysconfdir)/CORBA/servers
+oafdir = $(datadir)/oaf
 
-gnorbadir = $(sysconfdir)/CORBA/servers
-gnorba_DATA =	bonobo-clock-control.gnorba		\
+GOAD_FILES =	bonobo-clock-control.gnorba		\
 		bonobo-calculator-control.gnorba
+
+OAF_FILES =	bonobo-clock-control.oafinfo		\
+		bonobo-calculator-control.oafinfo
+
+#if OAF
+goad_DATA = $(GOAD_FILES)
+#else
+oaf_DATA = $(OAF_FILES)
+#endif
+
 
-EXTRA_DIST = $(gnorba_DATA)
+EXTRA_DIST = $(GOAD_FILES) $(OAF_FILES)
 
 
 
Index: samples/controls/bonobo-calculator-control.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/bonobo-calculator-control.c,v
retrieving revision 1.5
diff -u -r1.5 bonobo-calculator-control.c
--- samples/controls/bonobo-calculator-control.c	2000/04/01 19:11:41	1.5
+++ samples/controls/bonobo-calculator-control.c	2000/04/17 04:40:13
@@ -10,10 +10,8 @@
 
 #include <config.h>
 #include <gnome.h>
-#include <libgnorba/gnorba.h>
-#include <bonobo.h>
-
 #include <libgnomeui/gnome-calculator.h>
+#include <bonobo.h>
 
 #include "bonobo-calculator-control.h"
 
@@ -91,9 +89,10 @@
 
 	bonobo_calc_control_factory =
 		bonobo_generic_factory_new (
-			"control-factory:calculator",
+  		        "OAFIID:bonobo_calculator_factory:0f55cdac-47fc-4d5b-9111-26c84a244fe2",
 			bonobo_calculator_factory, NULL);
 
 	if (bonobo_calc_control_factory == NULL)
 		g_error ("I could not register a BonoboCalculator factory.");
 }
+
Index: samples/controls/bonobo-calculator-control.oafinfo
===================================================================
RCS file: bonobo-calculator-control.oafinfo
diff -N bonobo-calculator-control.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ bonobo-calculator-control.oafinfo	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,18 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_calculator_factory:0f55cdac-47fc-4d5b-9111-26c84a244fe2" type="exe" location="sample-control-factory">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Factory for the sample BonoboCalculator control"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f" type="factory" location="OAFIID:bonobo_calculator_factory:0f55cdac-47fc-4d5b-9111-26c84a244fe2">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Control:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="A sample Bonobo control which displays a calculator."/>
+</oaf_server>
+
+</oaf_info>
Index: samples/controls/bonobo-clock-control.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/bonobo-clock-control.c,v
retrieving revision 1.11
diff -u -r1.11 bonobo-clock-control.c
--- samples/controls/bonobo-clock-control.c	2000/04/08 11:45:21	1.11
+++ samples/controls/bonobo-clock-control.c	2000/04/17 04:40:13
@@ -10,7 +10,6 @@
 
 #include <config.h>
 #include <gnome.h>
-#include <libgnorba/gnorba.h>
 #include <bonobo.h>
 
 #include <libgnomeui/gtk-clock.h>
@@ -113,16 +112,16 @@
 {
 	BonoboPropertyBag  *pb;
 	BonoboControl      *control;
-	GtkWidget	   *button;
+	GtkWidget	   *entry;
 
 	/* Create the control. */
-	button = gtk_button_new_with_label ("Bonobo");
-	gtk_widget_show (button);
+	entry = gtk_entry_new ();
+	gtk_widget_show (entry);
 
-	control = bonobo_control_new (button);
+	control = bonobo_control_new (entry);
 	pb = bonobo_property_bag_new (NULL, NULL, NULL);
 	bonobo_control_set_property_bag (control, pb);
-	bonobo_property_bag_add_gtk_args (pb, GTK_OBJECT (button));
+	bonobo_property_bag_add_gtk_args (pb, GTK_OBJECT (entry));
 
 	return BONOBO_OBJECT (control);
 }
@@ -138,7 +137,7 @@
 
 	bonobo_clock_control_factory =
 		bonobo_generic_factory_new (
-			"control-factory:clock",
+			"OAFIID:bonobo_clock_factory:ec4961f3-7a16-4ace-9463-b112e4bc4186",
 			bonobo_clock_factory, NULL);
 
 	if (bonobo_clock_control_factory == NULL)
@@ -146,7 +145,7 @@
 
 	bonobo_entry_control_factory =
 		bonobo_generic_factory_new (
-			"control-factory:entry",
+			"OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6",
 			bonobo_entry_factory, NULL);
 
 	if (bonobo_entry_control_factory == NULL)
Index: samples/controls/bonobo-clock-control.oafinfo
===================================================================
RCS file: bonobo-clock-control.oafinfo
diff -N bonobo-clock-control.oafinfo
--- /dev/null	Tue May  5 16:32:27 1998
+++ bonobo-clock-control.oafinfo	Mon Apr 17 00:40:13 2000
@@ -0,0 +1,33 @@
+<oaf_info>
+
+<oaf_server iid="OAFIID:bonobo_clock_factory:ec4961f3-7a16-4ace-9463-b112e4bc4186" type="exe" location="sample-control-factory">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Factory for the sample BonoboClock control"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_clock:d42cc651-44ae-4f69-a10d-a0b6b2cc6ecc" type="factory" location="OAFIID:bonobo_clock_factory:ec4961f3-7a16-4ace-9463-b112e4bc4186">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Control:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="A sample Bonobo control which displays a clock."/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6" type="exe" location="sample-control-factory">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:GNOME/GenericFactory:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="Factory for the sample GtkEntry control"/>
+</oaf_server>
+
+<oaf_server iid="OAFIID:bonobo_entry:04e49c0b-95e2-4305-88a7-9f6721ddfa51" type="factory" location="OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6">
+<oaf_attribute name="repo_ids" type="stringv">
+<item value="IDL:Bonobo/Unknown:1.0"/>
+<item value="IDL:Bonobo/Control:1.0"/>
+</oaf_attribute>
+<oaf_attribute name="description" type="string" value="A sample Bonbobo control wrapping a Gtk Entry widget."/>
+</oaf_server>
+
+</oaf_info>
Index: samples/controls/sample-control-container.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/sample-control-container.c,v
retrieving revision 1.12
diff -u -r1.12 sample-control-container.c
--- samples/controls/sample-control-container.c	2000/04/01 19:11:41	1.12
+++ samples/controls/sample-control-container.c	2000/04/17 04:40:13
@@ -9,7 +9,13 @@
  */
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 
 BonoboPropertyBagClient *pbc;
@@ -160,7 +166,7 @@
 	gnome_app_set_contents (GNOME_APP (app), box);
 
 	control = bonobo_widget_new_control (
-		"control:calculator",
+		"OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f",
 		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
 	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
 
@@ -169,11 +175,17 @@
 			    (GtkSignalFunc)incr_calc, control);
 
 	control = bonobo_widget_new_control (
-		"control:clock",
+		"OAFIID:bonobo_clock:d42cc651-44ae-4f69-a10d-a0b6b2cc6ecc",
 		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
 	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
 
 	proplist = create_proplist (control);
+
+	control = bonobo_widget_new_control (
+		"OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6",
+		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
+
 	gtk_box_pack_start (GTK_BOX (box), proplist, TRUE, TRUE, 0);
 
 	gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
@@ -190,12 +202,18 @@
 	CORBA_ORB orb;
 
 	CORBA_exception_init (&ev);
-
-	gnome_CORBA_init ("sample-control-container", "1.0", &argc, argv, 0, &ev);
-
-	CORBA_exception_free (&ev);
 
+#if USING_OAF
+        gnome_init_with_popt_table("sample-control-container", "0.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
+	gnome_CORBA_init_with_popt_table (
+      	"sample-control-container", "0.0",
+	&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 	orb = gnome_CORBA_ORB ();
+#endif
 
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error ("Could not initialize Bonobo\n");
Index: samples/controls/sample-control-factory.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/sample-control-factory.c,v
retrieving revision 1.6
diff -u -r1.6 sample-control-factory.c
--- samples/controls/sample-control-factory.c	2000/02/09 03:18:03	1.6
+++ samples/controls/sample-control-factory.c	2000/04/17 04:40:13
@@ -10,7 +10,13 @@
 
 #include <config.h>
 #include <gnome.h>
+
+#if USING_OAF
+#include <liboaf/liboaf.h>
+#else
 #include <libgnorba/gnorba.h>
+#endif
+
 #include <bonobo.h>
 
 #include "bonobo-clock-control.h"
@@ -23,12 +29,17 @@
 init_bonobo (int argc, char **argv)
 {
 
+#if USING_OAF
+        gnome_init_with_popt_table("sample-control-factory", "0.0",
+				   argc, argv,
+				   oaf_popt_options, 0, NULL); 
+	orb = oaf_init (argc, argv);
+#else
 	gnome_CORBA_init_with_popt_table (
-		"sample-control-factory", "0.0",
-		&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
-
+      	"sample-control-factory", "0.0",
+	&argc, argv, NULL, 0, NULL, GNORBA_INIT_SERVER_FUNC, &ev);
 	orb = gnome_CORBA_ORB ();
-
+#endif
 	if (bonobo_init (orb, NULL, NULL) == FALSE)
 		g_error (_("Could not initialize Bonobo"));
 }
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/gnome/bonobo/tests/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- tests/Makefile.am	2000/01/25 22:04:50	1.4
+++ tests/Makefile.am	2000/04/17 04:40:13
@@ -1,8 +1,4 @@
-if OAF
-bin_PROGRAMS=
-else
 bin_PROGRAMS=test-properties-server test-properties-client
-endif
 
 INCLUDES =	\
         -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]