<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>DBusMessageHandler</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.15 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>DBusMessageHandler<br> <small> [<a class="el" href="group__DBus.html">D-BUS message system public API</a>]</small> </h1>Message processor. <a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Functions</h2></td></tr> <tr><td nowrap align=right valign=top>DBusMessageHandler * </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a0">dbus_message_handler_new</a> (DBusHandleMessageFunction <a class="el" href="structDBusMessageHandler.html#m1">function</a>, void *<a class="el" href="structDBusMessageHandler.html#m2">user_data</a>, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> <a class="el" href="structDBusMessageHandler.html#m3">free_user_data</a>)</td></tr> <tr><td> </td><td><font size=-1><em>Creates a new message handler.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>DBusMessageHandler * </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a1">dbus_message_handler_ref</a> (DBusMessageHandler *handler)</td></tr> <tr><td> </td><td><font size=-1><em>Increments the reference count on a message handler.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a2">dbus_message_handler_unref</a> (DBusMessageHandler *handler)</td></tr> <tr><td> </td><td><font size=-1><em>Decrements the reference count on a message handler, freeing the handler if the count reaches 0.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void * </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a3">dbus_message_handler_get_data</a> (DBusMessageHandler *handler)</td></tr> <tr><td> </td><td><font size=-1><em>Gets the user data for the handler (the same user data passed to the handler function.).</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a4">dbus_message_handler_set_data</a> (DBusMessageHandler *handler, void *<a class="el" href="structDBusMessageHandler.html#m2">user_data</a>, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> <a class="el" href="structDBusMessageHandler.html#m3">free_user_data</a>)</td></tr> <tr><td> </td><td><font size=-1><em>Sets the user data for the handler (the same user data to be passed to the handler function).</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a5">dbus_message_handler_set_function</a> (DBusMessageHandler *handler, DBusHandleMessageFunction <a class="el" href="structDBusMessageHandler.html#m1">function</a>)</td></tr> <tr><td> </td><td><font size=-1><em>Sets the handler function.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Message processor. <p> <p> A DBusMessageHandler is an object that can send and receive messages. Typically the handler is registered with one or more <a class="el" href="structDBusConnection.html">DBusConnection</a> objects and processes some types of messages received from the connection. <hr><h2>Function Documentation</h2> <a name="a3" doxytag="dbus-message-handler.c::dbus_message_handler_get_data"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void* dbus_message_handler_get_data </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> * </td> <td class="mdname1" valign="top" nowrap> <em>handler</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Gets the user data for the handler (the same user data passed to the handler function.). <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>handler</em> </td><td> the handler </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> the user data </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00250">250</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00053">user_data</a>. </td> </tr> </table> <a name="a0" doxytag="dbus-message-handler.c::dbus_message_handler_new"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a>* dbus_message_handler_new </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">DBusHandleMessageFunction </td> <td class="mdname" nowrap> <em>function</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>user_data</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> </td> <td class="mdname" nowrap> <em>free_user_data</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new message handler. <p> The handler function may be <a class="el" href="group__DBusMacros.html#a4">NULL</a> for a no-op handler or a handler to be assigned a function later.<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>function</em> </td><td> function to call to handle a message </td></tr> <tr><td valign=top><em>user_data</em> </td><td> data to pass to the function </td></tr> <tr><td valign=top><em>free_user_data</em> </td><td> function to call to free the user data </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> a new <a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> or <a class="el" href="group__DBusMacros.html#a4">NULL</a> if no memory. </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00168">168</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00056">connections</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00054">free_user_data</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00052">function</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00050">refcount</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00053">user_data</a>, and <a class="el" href="dbus-sysdeps_8h-source.html#l00192">DBusAtomic::value</a>. </td> </tr> </table> <a name="a1" doxytag="dbus-message-handler.c::dbus_message_handler_ref"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> <a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a>* dbus_message_handler_ref </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> * </td> <td class="mdname1" valign="top" nowrap> <em>handler</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Increments the reference count on a message handler. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>handler</em> </td><td> the handler </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> the handler </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00195">195</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00050">refcount</a>. </td> </tr> </table> <a name="a4" doxytag="dbus-message-handler.c::dbus_message_handler_set_data"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void dbus_message_handler_set_data </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> * </td> <td class="mdname" nowrap> <em>handler</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>void * </td> <td class="mdname" nowrap> <em>user_data</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap><a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> </td> <td class="mdname" nowrap> <em>free_user_data</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Sets the user data for the handler (the same user data to be passed to the handler function). <p> Frees any previously-existing user data with the previous free_user_data function.<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>handler</em> </td><td> the handler </td></tr> <tr><td valign=top><em>user_data</em> </td><td> the user data </td></tr> <tr><td valign=top><em>free_user_data</em> </td><td> free function for the data </td></tr> </table> </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00272">272</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00054">free_user_data</a>, and <a class="el" href="dbus-message-handler_8c-source.html#l00053">user_data</a>. </td> </tr> </table> <a name="a5" doxytag="dbus-message-handler.c::dbus_message_handler_set_function"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void dbus_message_handler_set_function </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> * </td> <td class="mdname" nowrap> <em>handler</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>DBusHandleMessageFunction </td> <td class="mdname" nowrap> <em>function</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Sets the handler function. <p> Call <a class="el" href="group__DBusMessageHandler.html#a4">dbus_message_handler_set_data</a>() to set the user data for the function.<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>handler</em> </td><td> the handler </td></tr> <tr><td valign=top><em>function</em> </td><td> the function </td></tr> </table> </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00302">302</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00052">function</a>. </td> </tr> </table> <a name="a2" doxytag="dbus-message-handler.c::dbus_message_handler_unref"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void dbus_message_handler_unref </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> * </td> <td class="mdname1" valign="top" nowrap> <em>handler</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Decrements the reference count on a message handler, freeing the handler if the count reaches 0. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>handler</em> </td><td> the handler </td></tr> </table> </dl> <p> Definition at line <a class="el" href="dbus-message-handler_8c-source.html#l00211">211</a> of file <a class="el" href="dbus-message-handler_8c-source.html">dbus-message-handler.c</a>. <p> References <a class="el" href="dbus-message-handler_8c-source.html#l00056">connections</a>, <a class="el" href="dbus-list_8h-source.html#l00039">DBusList::data</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00054">free_user_data</a>, <a class="el" href="dbus-message-handler_8c-source.html#l00050">refcount</a>, and <a class="el" href="dbus-message-handler_8c-source.html#l00053">user_data</a>. </td> </tr> </table> <hr><address align="right"><small>Generated on Wed Jun 2 06:01:35 2004 for D-BUS by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address> </body> </html>