Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

DBusMessageHandler
[D-BUS message system public API]

Message processor. More...

Functions

DBusMessageHandler * dbus_message_handler_new (DBusHandleMessageFunction function, void *user_data, DBusFreeFunction free_user_data)
 Creates a new message handler. More...

DBusMessageHandler * dbus_message_handler_ref (DBusMessageHandler *handler)
 Increments the reference count on a message handler. More...

void dbus_message_handler_unref (DBusMessageHandler *handler)
 Decrements the reference count on a message handler, freeing the handler if the count reaches 0. More...

void * dbus_message_handler_get_data (DBusMessageHandler *handler)
 Gets the user data for the handler (the same user data passed to the handler function.). More...

void dbus_message_handler_set_data (DBusMessageHandler *handler, void *user_data, DBusFreeFunction free_user_data)
 Sets the user data for the handler (the same user data to be passed to the handler function). More...

void dbus_message_handler_set_function (DBusMessageHandler *handler, DBusHandleMessageFunction function)
 Sets the handler function. More...


Detailed Description

Message processor.

A DBusMessageHandler is an object that can send and receive messages. Typically the handler is registered with one or more DBusConnection objects and processes some types of messages received from the connection.


Function Documentation

void* dbus_message_handler_get_data DBusMessageHandler   handler
 

Gets the user data for the handler (the same user data passed to the handler function.).

Parameters:
handler  the handler
Returns:
the user data

Definition at line 250 of file dbus-message-handler.c.

References user_data.

DBusMessageHandler* dbus_message_handler_new DBusHandleMessageFunction    function,
void *    user_data,
DBusFreeFunction    free_user_data
 

Creates a new message handler.

The handler function may be NULL for a no-op handler or a handler to be assigned a function later.

Parameters:
function  function to call to handle a message
user_data  data to pass to the function
free_user_data  function to call to free the user data
Returns:
a new DBusMessageHandler or NULL if no memory.

Definition at line 168 of file dbus-message-handler.c.

References connections, free_user_data, function, refcount, user_data, and DBusAtomic::value.

DBusMessageHandler* dbus_message_handler_ref DBusMessageHandler   handler
 

Increments the reference count on a message handler.

Parameters:
handler  the handler
Returns:
the handler

Definition at line 195 of file dbus-message-handler.c.

References refcount.

void dbus_message_handler_set_data DBusMessageHandler   handler,
void *    user_data,
DBusFreeFunction    free_user_data
 

Sets the user data for the handler (the same user data to be passed to the handler function).

Frees any previously-existing user data with the previous free_user_data function.

Parameters:
handler  the handler
user_data  the user data
free_user_data  free function for the data

Definition at line 272 of file dbus-message-handler.c.

References free_user_data, and user_data.

void dbus_message_handler_set_function DBusMessageHandler   handler,
DBusHandleMessageFunction    function
 

Sets the handler function.

Call dbus_message_handler_set_data() to set the user data for the function.

Parameters:
handler  the handler
function  the function

Definition at line 302 of file dbus-message-handler.c.

References function.

void dbus_message_handler_unref DBusMessageHandler   handler
 

Decrements the reference count on a message handler, freeing the handler if the count reaches 0.

Parameters:
handler  the handler

Definition at line 211 of file dbus-message-handler.c.

References connections, DBusList::data, free_user_data, refcount, and user_data.


Generated on Wed Jun 2 06:01:35 2004 for D-BUS by doxygen1.2.15