| Top |
GObject
╰── BonoboObject
├── BonoboGenericFactory
├── BonoboStorageMem
├── BonoboEventSource
├── BonoboPersist
├── BonoboMonikerExtender
├── BonoboItemContainer
├── BonoboStreamMem
├── BonoboItemHandler
├── BonoboListener
╰── BonoboMoniker
void (*BonoboObjectPOAFn) (PortableServer_Servant servant,CORBA_Environment *ev);
void bonobo_object_add_interface (BonoboObject *object,BonoboObject *newobj);
Adds the interfaces supported by newobj
to the list of interfaces
for object
. This function adds the interfaces supported by
newobj
to the list of interfaces support by object
. It should never
be used when the object has been exposed to the world. This is a firm
part of the contract.
BonoboObject * bonobo_object_query_local_interface (BonoboObject *object,const char *repo_id);
object |
A BonoboObject which is the aggregate of multiple objects. |
|
repo_id |
The id of the interface being queried. |
Bonobo_Unknown bonobo_object_query_interface (BonoboObject *object,const char *repo_id,CORBA_Environment *opt_ev);
Bonobo_Unknown bonobo_object_query_remote (Bonobo_Unknown unknown,const char *repo_id,CORBA_Environment *opt_ev);
A helper wrapper for query interface
Bonobo_Unknown bonobo_object_dup_ref (Bonobo_Unknown object,CORBA_Environment *opt_ev);
This function returns a duplicated CORBA Object reference; it also bumps the ref count on the object. This is ideal to use in any method returning a Bonobo_Object in a CORBA impl. If object is CORBA_OBJECT_NIL it is returned unaffected.
Bonobo_Unknown bonobo_object_release_unref (Bonobo_Unknown object,CORBA_Environment *opt_ev);
This function releases a CORBA Object reference; it also decrements the ref count on the bonobo object. This is the converse of bonobo_object_dup_ref. We tolerate object == CORBA_OBJECT_NIL silently.
gpointer
bonobo_object_ref (gpointer obj);
Increments the reference count for the aggregate BonoboObject.
gpointer
bonobo_object_unref (gpointer obj);
Decrements the reference count for the aggregate BonoboObject.
void bonobo_object_set_immortal (BonoboObject *object,gboolean immortal);
gpointer bonobo_object_trace_refs (gpointer obj,const char *fn,int line,gboolean ref);
void bonobo_object_check_env (BonoboObject *object,CORBA_Object corba_object,CORBA_Environment *ev);
This routine verifies the ev
environment for any fatal system
exceptions. If a system exception occurs, the object raises a
"system_exception" signal. The idea is that GObjects which are
used to wrap a CORBA interface can use this function to notify
the user if a fatal exception has occurred, causing the object
to become defunct.
gboolean bonobo_unknown_ping (Bonobo_Unknown object,CORBA_Environment *opt_ev);
Pings the object object
using the ref/unref methods from Bonobo::Unknown.
You can use this one to see if a remote object has gone away.
void
bonobo_object_list_unref_all (GList **list);
This routine unrefs all valid objects in
the list and then removes them from list
if
they have not already been so removed.
BonoboObject *
bonobo_object (gpointer p);
This function can be passed a BonoboObject * or a PortableServer_Servant, and it will return a BonoboObject *.
#define bonobo_object_from_servant(s) ((BonoboObject *)(((guchar *) (s)) - BONOBO_OBJECT_HEADER_SIZE))
#define bonobo_object_get_servant(o) ((PortableServer_Servant)((guchar *)(o) + BONOBO_OBJECT_HEADER_SIZE))
PortableServer_POA
bonobo_object_get_poa (BonoboObject *object);
Gets the POA associated with this part of the BonoboObject aggregate it is possible to have different POAs per interface.
GType bonobo_type_unique (GType parent_type,BonoboObjectPOAFn init_fn,BonoboObjectPOAFn fini_fn,int epv_struct_offset,const GTypeInfo *info,const gchar *type_name);
This function is the main entry point for deriving bonobo server interfaces.
parent_type |
the parent GType |
|
init_fn |
a POA initialization function |
|
fini_fn |
a POA finialization function or NULL |
|
epv_struct_offset |
the offset into the struct that the epv commences at, or 0 if we are inheriting a plain GObject from a BonoboObject, adding no new CORBA interfaces |
|
info |
the standard GTypeInfo. |
|
type_name |
the name of the type being registered. |
gboolean bonobo_type_setup (GType type,BonoboObjectPOAFn init_fn,BonoboObjectPOAFn fini_fn,int epv_struct_offset);
This function initializes a type derived from BonoboObject, such that when you instantiate a new object of this type with g_type_new the CORBA object will be correctly created and embedded.
#define BONOBO_OBJECT_TYPE BONOBO_TYPE_OBJECT /* deprecated, you should use BONOBO_TYPE_OBJECT */
typedef struct {
GObjectClass parent_class;
/* signals. */
void (*destroy) (BonoboObject *object);
void (*system_exception) (BonoboObject *object,
CORBA_Object cobject,
CORBA_Environment *ev);
BonoboObjectPOAFn poa_init_fn;
BonoboObjectPOAFn poa_fini_fn;
POA_Bonobo_Unknown__vepv *vepv;
/* The offset of this class' additional epv */
int epv_struct_offset;
PortableServer_ServantBase__epv base_epv;
POA_Bonobo_Unknown__epv epv;
gpointer dummy[4];
} BonoboObjectClass;
“destroy” signalvoid user_function (BonoboObject *bonoboobject, gpointer user_data)
Flags: Run Last
“system-exception” signalvoid user_function (BonoboObject *bonoboobject, CorbaObject *arg1, BonoboCorbaException *arg2, gpointer user_data)
Flags: Run Last