mcd-dispatcher-context

mcd-dispatcher-context

Synopsis




#define     MCD_PLUGIN_INIT_FUNC
#define     MCD_FILTER_IN
#define     MCD_FILTER_OUT
            McdDispatcherContext;
void        (*McdFilterFunc)                (McdDispatcherContext *ctx);
#define     MCD_FILTER_PRIORITY_CRITICAL
#define     MCD_FILTER_PRIORITY_SYSTEM
#define     MCD_FILTER_PRIORITY_USER
#define     MCD_FILTER_PRIORITY_NOTICE
#define     MCD_FILTER_PRIORITY_LOW
            McdFilter;
void        mcd_dispatcher_register_filter  (McdDispatcher *dispatcher,
                                             McdFilterFunc filter,
                                             GQuark channel_type_quark,
                                             guint filter_flags,
                                             guint priority);
void        mcd_dispatcher_unregister_filter
                                            (McdDispatcher *dispatcher,
                                             McdFilterFunc filter,
                                             GQuark channel_type_quark,
                                             guint filter_flags);
void        mcd_dispatcher_register_filters (McdDispatcher *dispatcher,
                                             McdFilter *filters,
                                             GQuark channel_type_quark,
                                             guint filter_flags);
McdDispatcher* mcd_dispatcher_context_get_dispatcher
                                            (McdDispatcherContext *ctx);
const TpChan* mcd_dispatcher_context_get_channel_object
                                            (McdDispatcherContext *ctx);
const TpConn* mcd_dispatcher_context_get_connection_object
                                            (McdDispatcherContext *ctx);
McdChannel* mcd_dispatcher_context_get_channel
                                            (McdDispatcherContext *ctx);
const McdConnection* mcd_dispatcher_context_get_connection
                                            (McdDispatcherContext *ctx);
McdChannelHandler* mcd_dispatcher_context_get_chan_handler
                                            (McdDispatcherContext *ctx);
GPtrArray*  mcd_dispatcher_context_get_members
                                            (McdDispatcherContext *ctx);
void        mcd_dispatcher_context_process  (McdDispatcherContext *ctx,
                                             gboolean result);

Description

Details

MCD_PLUGIN_INIT_FUNC

#define MCD_PLUGIN_INIT_FUNC  "mcd_filters_init"


MCD_FILTER_IN

#define MCD_FILTER_IN  1<<0


MCD_FILTER_OUT

#define MCD_FILTER_OUT 1<<1


McdDispatcherContext

typedef struct _McdDispatcherContext McdDispatcherContext;


McdFilterFunc ()

void        (*McdFilterFunc)                (McdDispatcherContext *ctx);

ctx :

MCD_FILTER_PRIORITY_CRITICAL

#define MCD_FILTER_PRIORITY_CRITICAL 10000


MCD_FILTER_PRIORITY_SYSTEM

#define MCD_FILTER_PRIORITY_SYSTEM   20000


MCD_FILTER_PRIORITY_USER

#define MCD_FILTER_PRIORITY_USER     30000


MCD_FILTER_PRIORITY_NOTICE

#define MCD_FILTER_PRIORITY_NOTICE   40000


MCD_FILTER_PRIORITY_LOW

#define MCD_FILTER_PRIORITY_LOW	     50000


McdFilter

typedef struct {
    McdFilterFunc func;
    guint priority;
} McdFilter;


mcd_dispatcher_register_filter ()

void        mcd_dispatcher_register_filter  (McdDispatcher *dispatcher,
                                             McdFilterFunc filter,
                                             GQuark channel_type_quark,
                                             guint filter_flags,
                                             guint priority);

Indicates to Mission Control that we want to register a filter for a unique combination of channel type/filter flags.

dispatcher : The McdDispatcher.
filter : the filter function to be registered.
channel_type_quark : Quark indicating the channel type.
filter_flags : The flags for the filter, such as incoming/outgoing.
priority : The priority of the filter.

mcd_dispatcher_unregister_filter ()

void        mcd_dispatcher_unregister_filter
                                            (McdDispatcher *dispatcher,
                                             McdFilterFunc filter,
                                             GQuark channel_type_quark,
                                             guint filter_flags);

Indicates to Mission Control that we will not want to have a filter for particular unique channel type/filter flags combination anymore.

dispatcher : The McdDispatcher.
filter : the filter function to be registered.
channel_type_quark : Quark indicating the channel type.
filter_flags : The flags for the filter, such as incoming/outgoing.

mcd_dispatcher_register_filters ()

void        mcd_dispatcher_register_filters (McdDispatcher *dispatcher,
                                             McdFilter *filters,
                                             GQuark channel_type_quark,
                                             guint filter_flags);

Convenience function to register a batch of filters at once.

dispatcher : The McdDispatcher.
filters : a zero-terminated array of McdFilter elements.
channel_type_quark : Quark indicating the channel type.
filter_flags : The flags for the filter, such as incoming/outgoing.

mcd_dispatcher_context_get_dispatcher ()

McdDispatcher* mcd_dispatcher_context_get_dispatcher
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_channel_object ()

const TpChan* mcd_dispatcher_context_get_channel_object
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_connection_object ()

const TpConn* mcd_dispatcher_context_get_connection_object
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_channel ()

McdChannel* mcd_dispatcher_context_get_channel
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_connection ()

const McdConnection* mcd_dispatcher_context_get_connection
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_chan_handler ()

McdChannelHandler* mcd_dispatcher_context_get_chan_handler
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_get_members ()

GPtrArray*  mcd_dispatcher_context_get_members
                                            (McdDispatcherContext *ctx);

ctx :
Returns :

mcd_dispatcher_context_process ()

void        mcd_dispatcher_context_process  (McdDispatcherContext *ctx,
                                             gboolean result);

ctx :
result :