Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-release > by-pkgid > 926d2d1e3111287cee1b0a4fad4fb4f6 > files > 192

lib64dbus-1_3-devel-0.92-6mdv2007.0.x86_64.rpm

<!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> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </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 *&nbsp;</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>&nbsp;</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 *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a1">dbus_message_handler_ref</a> (DBusMessageHandler *handler)</td></tr>
<tr><td>&nbsp;</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&nbsp;</td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a2">dbus_message_handler_unref</a> (DBusMessageHandler *handler)</td></tr>
<tr><td>&nbsp;</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 *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusMessageHandler.html#a3">dbus_message_handler_get_data</a> (DBusMessageHandler *handler)</td></tr>
<tr><td>&nbsp;</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&nbsp;</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>&nbsp;</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&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">DBusHandleMessageFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <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>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>free_user_data</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
function to call to handle a message </td></tr>
<tr><td valign=top><em>user_data</em>&nbsp;</td><td>
data to pass to the function </td></tr>
<tr><td valign=top><em>free_user_data</em>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <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>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>free_user_data</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
the handler </td></tr>
<tr><td valign=top><em>user_data</em>&nbsp;</td><td>
the user data </td></tr>
<tr><td valign=top><em>free_user_data</em>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusHandleMessageFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>function</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
the handler </td></tr>
<tr><td valign=top><em>function</em>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusMessageHandler.html">DBusMessageHandler</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>handler</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>