BonoboObjectClient

Name

BonoboObjectClient -- Object activation routines

Synopsis



typedef     BonoboObjectClient;
typedef     BonoboObjectClientClass;
void        (*BonoboObjectClientAsyncCallback)
                                            (BonoboObjectClient *o,
                                             const char *error,
                                             gpointer user_data);
BonoboObjectClient* bonobo_object_client_from_corba
                                            (Bonobo_Unknown o);
BonoboObjectClient* bonobo_object_client_construct
                                            (BonoboObjectClient *object_client,
                                             CORBA_Object corba_object);
BonoboObjectClient* bonobo_object_activate  (const char *iid,
                                             gint oaf_flags);
void        bonobo_object_activate_async    (const char *iid,
                                             gint oaf_flags,
                                             BonoboObjectClientAsyncCallback callback,
                                             gpointer user_data);
gboolean    bonobo_object_client_has_interface
                                            (BonoboObjectClient *object,
                                             const char *interface_desc,
                                             CORBA_Environment *opt_ev);
Bonobo_Unknown bonobo_object_client_query_interface
                                            (BonoboObjectClient *object,
                                             const char *interface_desc,
                                             CORBA_Environment *opt_ev);
void        bonobo_object_client_ref        (BonoboObjectClient *object_client,
                                             BonoboObject *opt_exception_obj);
void        bonobo_object_client_unref      (BonoboObjectClient *object_client,
                                             BonoboObject *opt_exception_obj);

Description

The BonoboObjectClient object is used primarly to activate Bonobo components (mainly by using bonobo_object_activate()). The CORBA object reference to the Bonobo object is wrapped in a BonoboObject.

The BonoboObjectClient object is also used to wrap an arbitrary Bonobo::Unknown CORBA object reference into a BonoboObject (by using bonobo_object_client_from_corba()).

The main activation entry point is the bonobo_object_activate() function. This is a high-level routine that knows how to activate components or activate and restore components. bonobo_object_activate() uses the supplied OAFIID to activate the object with OAF (GOAD activation is no longer supported). If you want to activate an object with a moniker, use bonobo_get_object() instead.

Details

BonoboObjectClient

typedef struct {
	BonoboObject parent;
} BonoboObjectClient;


BonoboObjectClientClass

typedef struct {
	BonoboObjectClass parent_class;
} BonoboObjectClientClass;


BonoboObjectClientAsyncCallback ()

void        (*BonoboObjectClientAsyncCallback)
                                            (BonoboObjectClient *o,
                                             const char *error,
                                             gpointer user_data);

o :

error :

user_data :


bonobo_object_client_from_corba ()

BonoboObjectClient* bonobo_object_client_from_corba
                                            (Bonobo_Unknown o);

Wraps the corba_object CORBA object reference in a BonoboObjectClient object. This is typically used if you got a CORBA object yourself and not through one of the activation routines and you want to have a BonoboObjectClient handle to use in any of the Bonobo routines.

o :

Returns :

A wrapped BonoboObjectClient.


bonobo_object_client_construct ()

BonoboObjectClient* bonobo_object_client_construct
                                            (BonoboObjectClient *object_client,
                                             CORBA_Object corba_object);

Initializes object_client with the CORBA object for the Bonobo::Unknown interface provided in corba_object.

object_client :

The BonoboObjectClient object to construct

corba_object :

The remote CORBA object this object_client refers to

Returns :

the initialized BonoboObjectClient object.


bonobo_object_activate ()

BonoboObjectClient* bonobo_object_activate  (const char *iid,
                                             gint oaf_flags);

This activates the object from the IID using OAF; you probably don't want to do this, you might want to use bonobo_get_object which does object activation through the moniker system.

You might also consider doing property-based activation using the the OAF-based capabilities.

iid :

an OAFIID

oaf_flags :

activation flags

Returns :

An activated object client or NULL on failure.


bonobo_object_activate_async ()

void        bonobo_object_activate_async    (const char *iid,
                                             gint oaf_flags,
                                             BonoboObjectClientAsyncCallback callback,
                                             gpointer user_data);

This activates the object from the IID using OAF; you probably don't want to do this; instead do capability based activation using OAF directly.

iid :

an OAFIID

oaf_flags :

activation flags

callback :

a callback function

user_data :

user data


bonobo_object_client_has_interface ()

gboolean    bonobo_object_client_has_interface
                                            (BonoboObjectClient *object,
                                             const char *interface_desc,
                                             CORBA_Environment *opt_ev);

Queries the object to see if it implements the interface described by interface_desc. Basically a thin Bonobo_Unknown::query_interface wrapper.

object :

object to query interface of

interface_desc :

interface description

opt_ev :

optional exception environment, or NULL

Returns :

TRUE if the interface is available else FALSE.


bonobo_object_client_query_interface ()

Bonobo_Unknown bonobo_object_client_query_interface
                                            (BonoboObjectClient *object,
                                             const char *interface_desc,
                                             CORBA_Environment *opt_ev);

Queries the object to see if it implements the interface described by interface_desc. Basically a thin Bonobo_Unknown::query_interface wrapper.

object :

object to query interface of

interface_desc :

interface description

opt_ev :

optional exception environment, or NULL

Returns :

A valid Bonobo_Unknown reference or CORBA_OBJECT_NIL if anything untoward happens.


bonobo_object_client_ref ()

void        bonobo_object_client_ref        (BonoboObjectClient *object_client,
                                             BonoboObject *opt_exception_obj);

Increments the Bonobo ref count on the remote object.

object_client :

the object client

opt_exception_obj :

optional CORBA exception environment


bonobo_object_client_unref ()

void        bonobo_object_client_unref      (BonoboObjectClient *object_client,
                                             BonoboObject *opt_exception_obj);

Decrements the Bonobo ref count on the remote object.

object_client :

the object client

opt_exception_obj :

optional CORBA exception environment

See Also

BonoboMoniker BonoboObject