16 Sep 2002 async   » (Journeyer)

Bonobo:

[Note: mmeeks tells me i am on crack. BonoboObjects are only used on the server side (although one must realise that a program can be both a client and a server at the same time). i had wanted to treat bonoboobjects as location independent, but that isn't really the intention. they just add a layer on top of the corba C bindings to make it a bit more understandable and convienent. which is a good thing]

i think i figured out my problem in making bonobo objects.

here's the source for the example object i've been working on (and a tarball of the same).

so here is what i learned:

  • a BonoboObject serves as both the server object and the client object, ie they have both the POA for the server side and the corba_ref.
  • the client_object_do_method(BonoboObject *) calls are usually wrappers that the client side can call which in turn call the idl stubs on the corba object. the corba reference is stored inside the bonobo object.
  • the server side implementation functions are passed a POA Servant which is in the struct of the server side BonoboObject. from this servant you can get the pointer to the object's struct and use it within the implementation.

  • when you setup the client side BonoboObject with a reference to a Bonobo_Unknown or CORBA_Object, you have to set the BONOBO_OBJECT(obj)->corba_objref to the reference you get. otherwise, when you call bonobo_object_query, you will not be calling the queryInterface method with the right corba_objref, and you will say to yourself, "where the heck are my intefaces?"

the actual issues might be somewhere else (this maybe should happen automagically, and i'm just not doing it right), but at least i can get it to work now.

hopefully now voltron can get back to work on his project.

hooray!

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!