bonobo-object

bonobo-object

Functions

Properties

gpointer poa Read / Write / Construct Only

Signals

void destroy Run Last
void system-exception Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── BonoboObject
        ├── BonoboGenericFactory
        ├── BonoboStorageMem
        ├── BonoboEventSource
        ├── BonoboPersist
        ├── BonoboMonikerExtender
        ├── BonoboItemContainer
        ├── BonoboStreamMem
        ├── BonoboItemHandler
        ├── BonoboListener
        ╰── BonoboMoniker

Description

Functions

BONOBO_OBJREF()

#define BONOBO_OBJREF(o)          (bonobo_object_corba_objref(BONOBO_OBJECT(o)))

BonoboObjectPOAFn ()

void
(*BonoboObjectPOAFn) (PortableServer_Servant servant,
                      CORBA_Environment *ev);

bonobo_object_add_interface ()

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.

Parameters

object

The BonoboObject to which an interface is going to be added.

 

newobj

The BonoboObject containing the new interface to be added.

 

bonobo_object_query_local_interface ()

BonoboObject *
bonobo_object_query_local_interface (BonoboObject *object,
                                     const char *repo_id);

Parameters

object

A BonoboObject which is the aggregate of multiple objects.

 

repo_id

The id of the interface being queried.

 

Returns

A BonoboObject for the requested interface.


bonobo_object_query_interface ()

Bonobo_Unknown
bonobo_object_query_interface (BonoboObject *object,
                               const char *repo_id,
                               CORBA_Environment *opt_ev);

Parameters

object

A BonoboObject to be queried for a given interface.

 

repo_id

The name of the interface to be queried.

 

opt_ev

optional exception environment

 

Returns

The CORBA interface named repo_id for object .


bonobo_object_query_remote ()

Bonobo_Unknown
bonobo_object_query_remote (Bonobo_Unknown unknown,
                            const char *repo_id,
                            CORBA_Environment *opt_ev);

A helper wrapper for query interface

Parameters

unknown

an unknown object ref ( or NIL )

 

repo_id

the interface to query for

 

opt_ev

an optional exception environment

 

Returns

the interface or CORBA_OBJECT_NIL


bonobo_object_corba_objref ()

Bonobo_Unknown
bonobo_object_corba_objref (BonoboObject *object);

Parameters

object

A BonoboObject whose CORBA object is requested.

 

Returns

The CORBA interface object for which object is a wrapper.


bonobo_object_dup_ref ()

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.

Parameters

object

a Bonobo_Unknown corba object

 

opt_ev

an optional exception environment

 

Returns

duplicated & ref'd corba object reference.


bonobo_object_release_unref ()

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.

Parameters

object

a Bonobo_Unknown corba object

 

opt_ev

an optional exception environment

 

Returns

CORBA_OBJECT_NIL.


bonobo_object_ref ()

gpointer
bonobo_object_ref (gpointer obj);

Increments the reference count for the aggregate BonoboObject.

Parameters

obj

A BonoboObject you want to ref-count

 

Returns

object


bonobo_object_idle_unref ()

void
bonobo_object_idle_unref (gpointer obj);

bonobo_object_unref ()

gpointer
bonobo_object_unref (gpointer obj);

Decrements the reference count for the aggregate BonoboObject.

Parameters

obj

A BonoboObject you want to unref.

 

Returns

NULL.


bonobo_object_set_immortal ()

void
bonobo_object_set_immortal (BonoboObject *object,
                            gboolean immortal);

bonobo_object_trace_refs ()

gpointer
bonobo_object_trace_refs (gpointer obj,
                          const char *fn,
                          int line,
                          gboolean ref);

bonobo_object_dump_interfaces ()

void
bonobo_object_dump_interfaces (BonoboObject *object);

bonobo_object_check_env ()

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.

Parameters

object

The object on which we operate

 

ev

CORBA Environment to check

 

BONOBO_OBJECT_CHECK()

#define             BONOBO_OBJECT_CHECK(o,c,e)

bonobo_unknown_ping ()

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.

Parameters

object

a CORBA object reference of type Bonobo::Unknown

 

opt_ev

optional exception environment

 

Returns

TRUE if the Bonobo::Unknown object is alive.


bonobo_object_list_unref_all ()

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.

Parameters

list

A list of BonoboObjects *s

 

bonobo_object_slist_unref_all ()

void
bonobo_object_slist_unref_all (GSList **list);

bonobo_object ()

BonoboObject *
bonobo_object (gpointer p);

This function can be passed a BonoboObject * or a PortableServer_Servant, and it will return a BonoboObject *.

Parameters

p

a pointer to something

 

Returns

a BonoboObject or NULL on error.


bonobo_object_fast()

#define             bonobo_object_fast(o)

bonobo_object_from_servant()

#define       bonobo_object_from_servant(s) ((BonoboObject *)(((guchar *) (s)) - BONOBO_OBJECT_HEADER_SIZE))

bonobo_object_get_servant()

#define       bonobo_object_get_servant(o)  ((PortableServer_Servant)((guchar *)(o) + BONOBO_OBJECT_HEADER_SIZE))

bonobo_object_get_poa ()

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.

Parameters

object

the object associated with an interface

 

Returns

the poa, never NIL.


bonobo_type_unique ()

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.

Parameters

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.

 

Returns

the constructed GType.


bonobo_type_setup ()

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.

Parameters

type

The type to initialize

 

init_fn

the POA_init function for the CORBA interface or NULL

 

fini_fn

NULL or a custom POA free fn.

 

epv_struct_offset

the offset in the class structure where the epv is or 0

 

Returns

TRUE on success, FALSE on error.


BONOBO_TYPE_FUNC_FULL()

#define             BONOBO_TYPE_FUNC_FULL(class_name, corba_name, parent, prefix)

BONOBO_TYPE_FUNC()

#define             BONOBO_TYPE_FUNC(class_name, parent, prefix)

Types and Values

BONOBO_OBJECT_TYPE

#define BONOBO_OBJECT_TYPE        BONOBO_TYPE_OBJECT /* deprecated, you should use BONOBO_TYPE_OBJECT */

struct BonoboObject

struct BonoboObject;

BonoboObjectClass

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;

Property Details

The “poa” property

  “poa”                      gpointer

Custom CORBA POA.

Owner: BonoboObject

Flags: Read / Write / Construct Only

Signal Details

The “destroy” signal

void
user_function (BonoboObject *bonoboobject,
               gpointer      user_data)

Flags: Run Last


The “system-exception” signal

void
user_function (BonoboObject         *bonoboobject,
               CorbaObject          *arg1,
               BonoboCorbaException *arg2,
               gpointer              user_data)

Flags: Run Last