McdDispatcher

McdDispatcher — Dispatcher class to dispatch channels to handlers

Stability Level

Unstable, unless otherwise indicated

Synopsis


#include <mcd-dispatcher.h>

                    McdDispatcher;
McdDispatcher *     mcd_dispatcher_new                  (TpDBusDaemon *dbus_daemon,
                                                         McdMaster *master);
gint                mcd_dispatcher_get_channel_type_usage
                                                        (McdDispatcher *dispatcher,
                                                         GQuark chan_type_quark);
void                mcd_dispatcher_add_filter           (McdDispatcher *dispatcher,
                                                         McdFilterFunc filter,
                                                         guint priority,
                                                         gpointer user_data);
void                mcd_dispatcher_add_filters          (McdDispatcher *dispatcher,
                                                         const McdFilter *filters);

Object Hierarchy

  GObject
   +----McdMission
         +----McdDispatcher

Implemented Interfaces

McdDispatcher implements TpSvcChannelDispatcher, TpSvcChannelDispatcherInterfaceOperationList and TpSvcDBusProperties.

Properties

  "dbus-daemon"              TpDBusDaemon*         : Read / Write / Construct
  "dispatch-operations"      GPtrArray_GValueArray_DBusGObjectPath+GHashTable_gchararray+GValue___*  : Read
  "interfaces"               GStrv*                : Read
  "mcd-master"               McdMaster*            : Read / Write / Construct

Signals

  "channel-added"                                  : Run Last / Has Details
  "channel-removed"                                : Run Last / Has Details
  "dispatch-completed"                             : Run Last
  "dispatch-failed"                                : Run Last / Has Details
  "dispatched"                                     : Run Last / Has Details

Description

FIXME

Details

McdDispatcher

typedef struct _McdDispatcher McdDispatcher;


mcd_dispatcher_new ()

McdDispatcher *     mcd_dispatcher_new                  (TpDBusDaemon *dbus_daemon,
                                                         McdMaster *master);

dbus_daemon :

master :

Returns :


mcd_dispatcher_get_channel_type_usage ()

gint                mcd_dispatcher_get_channel_type_usage
                                                        (McdDispatcher *dispatcher,
                                                         GQuark chan_type_quark);

dispatcher :

chan_type_quark :

Returns :


mcd_dispatcher_add_filter ()

void                mcd_dispatcher_add_filter           (McdDispatcher *dispatcher,
                                                         McdFilterFunc filter,
                                                         guint priority,
                                                         gpointer user_data);

Register a filter into the dispatcher chain: filter will be invoked whenever channels need to be dispatched.

dispatcher :

The McdDispatcher.

filter :

the filter function to be registered.

priority :

The priority of the filter.

user_data :

user data to be passed to filter on invocation.

mcd_dispatcher_add_filters ()

void                mcd_dispatcher_add_filters          (McdDispatcher *dispatcher,
                                                         const McdFilter *filters);

Convenience function to add a batch of filters at once.

dispatcher :

The McdDispatcher.

filters :

a zero-terminated array of McdFilter elements.

Property Details

The "dbus-daemon" property

  "dbus-daemon"              TpDBusDaemon*         : Read / Write / Construct

DBus daemon.


The "dispatch-operations" property

  "dispatch-operations"      GPtrArray_GValueArray_DBusGObjectPath+GHashTable_gchararray+GValue___*  : Read

A dbus-glib a(oa{sv}).


The "interfaces" property

  "interfaces"               GStrv*                : Read

Interfaces.


The "mcd-master" property

  "mcd-master"               McdMaster*            : Read / Write / Construct

McdMaster.

Signal Details

The "channel-added" signal

void                user_function                      (McdDispatcher *mcddispatcher,
                                                        McdChannel    *arg1,
                                                        gpointer       user_data)          : Run Last / Has Details

mcddispatcher :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "channel-removed" signal

void                user_function                      (McdDispatcher *mcddispatcher,
                                                        McdChannel    *arg1,
                                                        gpointer       user_data)          : Run Last / Has Details

mcddispatcher :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.

The "dispatch-completed" signal

void                user_function                      (McdDispatcher *dispatcher,
                                                        gpointer       context,
                                                        gpointer       user_data)       : Run Last

This signal is emitted when a dispatch operation has terminated. One can inspect context to get the status of the channels. After this signal returns, context is no longer valid.

dispatcher :

the McdDispatcher.

context :

a McdDispatcherContext.

user_data :

user data set when the signal handler was connected.

The "dispatch-failed" signal

void                user_function                      (McdDispatcher *mcddispatcher,
                                                        McdChannel    *arg1,
                                                        gpointer       arg2,
                                                        gpointer       user_data)          : Run Last / Has Details

mcddispatcher :

the object which received the signal.

arg1 :

arg2 :

user_data :

user data set when the signal handler was connected.

The "dispatched" signal

void                user_function                      (McdDispatcher *mcddispatcher,
                                                        McdChannel    *arg1,
                                                        gpointer       user_data)          : Run Last / Has Details

mcddispatcher :

the object which received the signal.

arg1 :

user_data :

user data set when the signal handler was connected.