bonobo-event-source

bonobo-event-source

Functions

Object Hierarchy

    GObject
    ╰── BonoboObject
        ╰── BonoboEventSource

Description

Functions

bonobo_event_source_new ()

BonoboEventSource *
bonobo_event_source_new (void);

Creates a new BonoboEventSource object. Typically this object will be exposed to clients through CORBA and they will register and unregister functions to be notified of events that this EventSource generates.

To notify clients of an event, use the bonobo_event_source_notify_listeners() function.

Returns

A new BonoboEventSource server object.


bonobo_event_source_notify_listeners ()

void
bonobo_event_source_notify_listeners (BonoboEventSource *event_source,
                                      const char *event_name,
                                      const CORBA_any *opt_value,
                                      CORBA_Environment *opt_ev);

This will notify all clients that have registered with this EventSource (through the addListener or addListenerWithMask methods) of the availability of the event named event_name . The value CORBA::any value is passed to all listeners.

event_name can not contain comma separators, as commas are used to separate the various event names.

Parameters

event_source

the Event Source that will emit the event.

 

event_name

Name of the event being emitted

 

opt_value

A CORBA_any value that contains the data that is passed to interested clients, or NULL for an empty value

 

opt_ev

A CORBA_Environment where a failure code can be returned, can be NULL.

 

bonobo_event_source_notify_listeners_full ()

void
bonobo_event_source_notify_listeners_full
                               (BonoboEventSource *event_source,
                                const char *path,
                                const char *type,
                                const char *subtype,
                                const CORBA_any *opt_value,
                                CORBA_Environment *opt_ev);

bonobo_event_source_client_remove_listener ()

void
bonobo_event_source_client_remove_listener
                               (Bonobo_Unknown object,
                                Bonobo_Listener listener,
                                CORBA_Environment *opt_ev);

bonobo_event_source_client_add_listener ()

void
bonobo_event_source_client_add_listener
                               (Bonobo_Unknown object,
                                BonoboListenerCallbackFn event_callback,
                                const char *opt_mask,
                                CORBA_Environment *opt_ev,
                                gpointer user_data);

bonobo_event_source_has_listener ()

gboolean
bonobo_event_source_has_listener (BonoboEventSource *event_source,
                                  const char *event_name);

This method determines if there are any listeners for the event to be broadcast. This can be used to detect whether it is worth constructing a potentialy expensive state update, before sending it to no-one.

Parameters

event_source

the Event Source that will emit the event.

 

event_name

Name of the event being emitted

 

Returns

TRUE if it's worth sending, else FALSE


bonobo_event_source_client_add_listener_closure ()

void
bonobo_event_source_client_add_listener_closure
                               (Bonobo_Unknown object,
                                GClosure *callback,
                                const char *opt_mask,
                                CORBA_Environment *opt_ev);

bonobo_event_source_client_add_listener_full ()

Bonobo_Listener
bonobo_event_source_client_add_listener_full
                               (Bonobo_Unknown object,
                                GClosure *callback,
                                const char *opt_mask,
                                CORBA_Environment *opt_ev);

bonobo_event_source_ignore_listeners ()

void
bonobo_event_source_ignore_listeners (BonoboEventSource *event_source);

Instructs the event source to de-register any listeners that are added from the global running context.