Problem with c++ and bonobo interface



Hi,

First of all sorry to have been disconnected for so long from the
project, blame epiphany, not me ;)

So I'm trying to add a getToplevelItemId to the bonobo interface (patch
attached). I add a getToplevelItemId to importer.cc and call it from the
bonobo interface implementation.
Though, when running the test I get:

repo_ids.has ('IDL:GNOME/StorageTranslator:1.0') AND
bonobo:supported_mime_types.has ('text/html')
** (process:22267): WARNING **: An exception occured 'g_module_open of
`/opt/gnome26/lib/bonobo/libstoragetranslator-main' failed with
`/opt/gnome26/lib/bonobo/libstoragetranslator-main.so: undefined symbol:
_ZN13ImageImporter17getToplevelItemIDEv''
 
I'm not that clued about c++, but shouldnt getToplevelItemID inherited
from the base Importer class ?!

Anyone knows what is going on ?

Marco
Index: idl/GNOME_StorageTranslator.idl
===================================================================
RCS file: /cvs/gnome/storage/libstorage-translators/idl/GNOME_StorageTranslator.idl,v
retrieving revision 1.2
diff -u -r1.2 GNOME_StorageTranslator.idl
--- idl/GNOME_StorageTranslator.idl	22 Sep 2003 18:05:48 -0000	1.2
+++ idl/GNOME_StorageTranslator.idl	1 Nov 2003 10:17:13 -0000
@@ -10,6 +10,8 @@
     void startImport ();
     void startExport ();
 
+    string getToplevelItemId ();
+
     long importChunk (in iobuf buffer);
     long exportChunk (out iobuf buffer);
 
Index: src/importer.cc
===================================================================
RCS file: /cvs/gnome/storage/libstorage-translators/src/importer.cc,v
retrieving revision 1.5
diff -u -r1.5 importer.cc
--- src/importer.cc	22 Sep 2003 18:05:49 -0000	1.5
+++ src/importer.cc	1 Nov 2003 10:17:15 -0000
@@ -39,6 +39,15 @@
 const char* Importer::A_TIME_LENGTH = STORAGE_FILE_DURATION;
 const char* Importer::A_PAGES = STORAGE_FILE_PAGES;
 
+char *
+Importer::getToplevelItemId ()
+{
+	StorageItem *item;
+
+	item = getToplevelItem ();
+
+	return storage_item_get_id (item);
+}
 
 /*
 inline StorageItem *Importer::newStorageItem(StorageItemType t) {
Index: src/importer.hh
===================================================================
RCS file: /cvs/gnome/storage/libstorage-translators/src/importer.hh,v
retrieving revision 1.2
diff -u -r1.2 importer.hh
--- src/importer.hh	22 Sep 2003 18:05:49 -0000	1.2
+++ src/importer.hh	1 Nov 2003 10:17:15 -0000
@@ -24,6 +24,8 @@
   virtual GnomeVFSResult importChunk (const char *buffer, gsize bufferSize) = 0;
   virtual GnomeVFSResult finishImport ();
 
+  char * getToplevelItemId ();
+
  protected:
   // Variables
 
Index: src/storage-translator.cc
===================================================================
RCS file: /cvs/gnome/storage/libstorage-translators/src/storage-translator.cc,v
retrieving revision 1.2
diff -u -r1.2 storage-translator.cc
--- src/storage-translator.cc	22 Sep 2003 18:05:49 -0000	1.2
+++ src/storage-translator.cc	1 Nov 2003 10:17:16 -0000
@@ -67,6 +67,21 @@
 {
 }
 
+static CORBA_char *
+impl_storage_translator_getToplevelItemId (PortableServer_Servant  servant,
+				           CORBA_Environment *ev)
+{
+	StorageTranslator *storage_translator = STORAGE_TRANSLATOR (bonobo_object (servant));
+	char *id;
+	CORBA_char *result;
+
+	id = storage_translator->priv->importer->getToplevelItemId();
+	result = CORBA_string_dup (id);
+	g_free (id);
+
+	return result;
+}
+
 static void
 impl_storage_translator_finishImport (PortableServer_Servant  servant,
 				     CORBA_Environment *ev)
@@ -133,6 +148,7 @@
 
 	epv->startImport  = impl_storage_translator_startImport;
 	epv->startExport  = impl_storage_translator_startExport;
+	epv->getToplevelItemId  = impl_storage_translator_getToplevelItemId;
 	epv->importChunk  = impl_storage_translator_importChunk;
 	epv->exportChunk  = impl_storage_translator_exportChunk;
 	epv->finishImport = impl_storage_translator_finishImport;


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