new libbonobo API



One of the python bindings hackers (Gustavo Carneiro) has been working on some new APIs that allow the aggregation of CORBA interfaces not implemented in C into a Bonobo component.

This essentially allows you to wrap a BonoboObject around an object reference (the servant will probably still need to be implemented with ORBit2 due to the difficulties of colocating two ORBs in a single process though). The new API looks like this:
  BonoboObject* bonobo_foreign_object_new (CORBA_Object corba_objref);

The idea is that the language binding user could implement the interface as usual for their language, activate the servant and create a BonoboObject wrapper around the objref. The Bonobo::Unknown methods (ref, unref and queryInterface) of the interface would need to be proxied to the BonoboObject wrapper so that those methods keep the correct semantics (they would be proxied to bonobo_object_ref(), bonobo_object_unref() and bonobo_object_local_query_interface() respectively).

It looks like this simple interface will be enough for the Python bindings to allow implementation of custom interfaces for components. It would be good to hear what other language binding authors think (in particular, LBs for C++ which are _very_ different to Python). Comments would be appreciated on either this list or the bugzilla bug:
   http://bugzilla.gnome.org/show_bug.cgi?id=109973


As a bit of background, the reason for needing this interface is the weird way Bonobo builds up the vepv ('vector of entry point vectors') for servants. You create a GObject subclass of the interface, and store the epv for the interface at the end of the class struct. Interfaces that derive from other interfaces correspond to GObject classes that derive from other classes. Bonobo has some helpers to gather these epvs into the final vepv, which covers over some of the more ugly parts of the CORBA C mapping. Unfortunately, this makes things very difficult for language bindings that perform calls differently.

The above API allows you to create a BonoboObject instance without having to deal with all the C convenience routines.

James.
<mailto:gjc inescporto pt>

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/






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