Sophie

Sophie

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

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>DBusServer</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>DBusServer<br>
<small>
[<a class="el" href="group__DBus.html">D-BUS message system public API</a>]</small>
</h1>Server that listens for new connections. 
<a href="#_details">More...</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef DBusServer&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a15">DBusServer</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>An opaque object representing a server that listens for connections from other applications.</em> <a href="#a15">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>DBusServer *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a1">dbus_server_listen</a> (const char *<a class="el" href="structDBusServer.html#m4">address</a>, <a class="el" href="structDBusError.html">DBusError</a> *error)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Listens for new connections on the given address.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>DBusServer *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a2">dbus_server_ref</a> (DBusServer *server)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Increments the reference count of a DBusServer.</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__DBusServer.html#a3">dbus_server_unref</a> (DBusServer *server)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decrements the reference count of a DBusServer.</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__DBusServer.html#a4">dbus_server_disconnect</a> (DBusServer *server)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Releases the server's address and stops listening for new clients.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a5">dbus_server_get_is_connected</a> (DBusServer *server)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns <a class="el" href="group__DBusMacros.html#a2">TRUE</a> if the server is still listening for new connections.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>char *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a6">dbus_server_get_address</a> (DBusServer *server)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns the address of the server, as a newly-allocated string which must be freed by the caller.</em> <a href="#a6">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__DBusServer.html#a7">dbus_server_set_new_connection_function</a> (DBusServer *server, DBusNewConnectionFunction function, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets a function to be used for handling new connections.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a8">dbus_server_set_watch_functions</a> (DBusServer *server, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the watch functions for the connection.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a9">dbus_server_set_timeout_functions</a> (DBusServer *server, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the timeout functions for the connection.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a10">dbus_server_set_auth_mechanisms</a> (DBusServer *server, const char **mechanisms)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the authentication mechanisms that this server offers to clients, as a list of SASL mechanisms.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a11">dbus_server_allocate_data_slot</a> (<a class="el" href="group__DBusTypes.html#a4">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Allocates an integer ID to be used for storing application-specific data on any DBusServer.</em> <a href="#a11">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__DBusServer.html#a12">dbus_server_free_data_slot</a> (<a class="el" href="group__DBusTypes.html#a4">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Deallocates a global ID for server data slots.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusServer.html#a13">dbus_server_set_data</a> (DBusServer *server, int slot, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_func)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Stores a pointer on a DBusServer, along with an optional function to be used for freeing the data when the data is set again, or when the server is finalized.</em> <a href="#a13">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__DBusServer.html#a14">dbus_server_get_data</a> (DBusServer *server, int slot)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Retrieves data previously set with <a class="el" href="group__DBusServer.html#a13">dbus_server_set_data</a>().</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Server that listens for new connections.
<p>

<p>
 Types and functions related to DBusServer. A DBusServer represents a server that other applications can connect to. Each connection from another application is represented by a <a class="el" href="structDBusConnection.html">DBusConnection</a>.
<p>
<dl compact><dt><b>
<a class="el" href="todo.html#_todo000045">Todo: </a></b><dd>
Thread safety hasn't been looked at for <a class="el" href="group__DBusServer.html#a15">DBusServer</a> 
<p>
 Need notification to apps of disconnection, may matter for some transports </dl> <hr><h2>Typedef Documentation</h2>
<a name="a15" doxytag="dbus-server.h::DBusServer"></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"> DBusServer
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
An opaque object representing a server that listens for connections from other applications.
<p>
Each time a connection is made, a new <a class="el" href="structDBusConnection.html">DBusConnection</a> is created and made available via an application-provided DBusNewConnectionFunction. The DBusNewConnectionFunction is provided with <a class="el" href="group__DBusServer.html#a7">dbus_server_set_new_connection_function</a>(). 
<p>
Definition at line <a class="el" href="dbus-server_8h-source.html#l00036">36</a> of file <a class="el" href="dbus-server_8h-source.html">dbus-server.h</a>.    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a11" doxytag="dbus-server.c::dbus_server_allocate_data_slot"></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="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_allocate_data_slot </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__DBusTypes.html#a4">dbus_int32_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>slot_p</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>
Allocates an integer ID to be used for storing application-specific data on any <a class="el" href="structDBusServer.html">DBusServer</a>.
<p>
The allocated ID may then be used with <a class="el" href="group__DBusServer.html#a13">dbus_server_set_data</a>() and <a class="el" href="group__DBusServer.html#a14">dbus_server_get_data</a>(). The slot must be initialized with -1. If a nonnegative slot is passed in, the refcount is incremented on that slot, rather than creating a new slot.
<p>
The allocated slot is global, i.e. all <a class="el" href="structDBusServer.html">DBusServer</a> objects will have a slot with the given integer ID reserved.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>slot_p</em>&nbsp;</td><td>
address of global variable storing the slot ID </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a3">FALSE</a> on no memory </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00684">684</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.    </td>
  </tr>
</table>
<a name="a4" doxytag="dbus-server.c::dbus_server_disconnect"></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_server_disconnect </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>server</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>
Releases the server's address and stops listening for new clients.
<p>
If called more than once, only the first call has an effect. Does not modify the server's reference count.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00498">498</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="structDBusServerVTable.html#m1">DBusServerVTable::disconnect</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00076">disconnected</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00055">vtable</a>.    </td>
  </tr>
</table>
<a name="a12" doxytag="dbus-server.c::dbus_server_free_data_slot"></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_server_free_data_slot </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__DBusTypes.html#a4">dbus_int32_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>slot_p</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>
Deallocates a global ID for server data slots.
<p>
<a class="el" href="group__DBusServer.html#a14">dbus_server_get_data</a>() and <a class="el" href="group__DBusServer.html#a13">dbus_server_set_data</a>() may no longer be used with this slot. Existing data stored on existing <a class="el" href="structDBusServer.html">DBusServer</a> objects will be freed when the server is finalized, but may not be retrieved (and may only be replaced if someone else reallocates the slot).<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>slot_p</em>&nbsp;</td><td>
address of the slot to deallocate </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00703">703</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.    </td>
  </tr>
</table>
<a name="a6" doxytag="dbus-server.c::dbus_server_get_address"></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"> char* dbus_server_get_address </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>server</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>
Returns the address of the server, as a newly-allocated string which must be freed by the caller.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the address or <a class="el" href="group__DBusMacros.html#a4">NULL</a> if no memory </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00532">532</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00059">address</a>.    </td>
  </tr>
</table>
<a name="a14" doxytag="dbus-server.c::dbus_server_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_server_get_data </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>slot</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>
Retrieves data previously set with <a class="el" href="group__DBusServer.html#a13">dbus_server_set_data</a>().
<p>
The slot must still be allocated (must not have been freed).<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server </td></tr>
<tr><td valign=top><em>slot</em>&nbsp;</td><td>
the slot to get data from </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the data, or <a class="el" href="group__DBusMacros.html#a4">NULL</a> if not found </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00767">767</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00063">slot_list</a>.    </td>
  </tr>
</table>
<a name="a5" doxytag="dbus-server.c::dbus_server_get_is_connected"></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="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_get_is_connected </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>server</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>
Returns <a class="el" href="group__DBusMacros.html#a2">TRUE</a> if the server is still listening for new connections.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00517">517</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00076">disconnected</a>.    </td>
  </tr>
</table>
<a name="a1" doxytag="dbus-server.c::dbus_server_listen"></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="structDBusServer.html">DBusServer</a>* dbus_server_listen </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>address</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="structDBusError.html">DBusError</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>error</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>
Listens for new connections on the given address.
<p>
Returns <a class="el" href="group__DBusMacros.html#a4">NULL</a> if listening fails for any reason. Otherwise returns a new <a class="el" href="group__DBusServer.html#a15">DBusServer</a>. <a class="el" href="group__DBusServer.html#a7">dbus_server_set_new_connection_function</a>() and <a class="el" href="group__DBusServer.html#a8">dbus_server_set_watch_functions</a>() should be called immediately to render the server fully functional.
<p>

<p>
<dl compact><dt><b>
<a class="el" href="todo.html#_todo000046">Todo: </a></b><dd>
error messages on bad address could really be better. DBusResultCode is a bit limiting here.</dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>address</em>&nbsp;</td><td>
the address of this server. </td></tr>
<tr><td valign=top><em>error</em>&nbsp;</td><td>
location to store rationale for failure. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
a new <a class="el" href="structDBusServer.html">DBusServer</a>, or <a class="el" href="group__DBusMacros.html#a4">NULL</a> on failure. </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00270">270</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.    </td>
  </tr>
</table>
<a name="a2" doxytag="dbus-server.c::dbus_server_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="structDBusServer.html">DBusServer</a>* dbus_server_ref </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>server</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 of a <a class="el" href="structDBusServer.html">DBusServer</a>.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the server </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00456">456</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00054">refcount</a>.    </td>
  </tr>
</table>
<a name="a10" doxytag="dbus-server.c::dbus_server_set_auth_mechanisms"></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="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_set_auth_mechanisms </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char **&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>mechanisms</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 authentication mechanisms that this server offers to clients, as a list of SASL mechanisms.
<p>
This function only affects connections created *after* it is called. Pass <a class="el" href="group__DBusMacros.html#a4">NULL</a> instead of an array to use all available mechanisms.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server </td></tr>
<tr><td valign=top><em>mechanisms</em>&nbsp;</td><td>
<a class="el" href="group__DBusMacros.html#a4">NULL</a>-terminated array of mechanisms </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a3">FALSE</a> if no memory </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00643">643</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00074">auth_mechanisms</a>.    </td>
  </tr>
</table>
<a name="a13" doxytag="dbus-server.c::dbus_server_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"> <a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_set_data </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>slot</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>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_data_func</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>
Stores a pointer on a <a class="el" href="structDBusServer.html">DBusServer</a>, along with an optional function to be used for freeing the data when the data is set again, or when the server is finalized.
<p>
The slot number must have been allocated with <a class="el" href="group__DBusServer.html#a11">dbus_server_allocate_data_slot</a>().<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server </td></tr>
<tr><td valign=top><em>slot</em>&nbsp;</td><td>
the slot number </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
the data to store </td></tr>
<tr><td valign=top><em>free_data_func</em>&nbsp;</td><td>
finalizer function for the data </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a2">TRUE</a> if there was enough memory to store the data </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00724">724</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00063">slot_list</a>.    </td>
  </tr>
</table>
<a name="a7" doxytag="dbus-server.c::dbus_server_set_new_connection_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_server_set_new_connection_function </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusNewConnectionFunction&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>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_data_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 a function to be used for handling new connections.
<p>
The given function is passed each new connection as the connection is created. If the new connection function increments the connection's reference count, the connection will stay alive. Otherwise, the connection will be unreferenced and closed.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
<tr><td valign=top><em>function</em>&nbsp;</td><td>
a function to handle new connections. </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
data to pass to the new connection handler. </td></tr>
<tr><td valign=top><em>free_data_function</em>&nbsp;</td><td>
function to free the data. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00552">552</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00068">new_connection_data</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00070">new_connection_free_data_function</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00066">new_connection_function</a>.    </td>
  </tr>
</table>
<a name="a9" doxytag="dbus-server.c::dbus_server_set_timeout_functions"></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="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_set_timeout_functions </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusAddTimeoutFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>add_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusRemoveTimeoutFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>remove_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusTimeoutToggledFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>toggled_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>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_data_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 timeout functions for the connection.
<p>
These functions are responsible for making the application's main loop aware of timeouts.
<p>
This function behaves exactly like <a class="el" href="group__DBusConnection.html#a37">dbus_connection_set_timeout_functions</a>(); see the documentation for that routine.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
<tr><td valign=top><em>add_function</em>&nbsp;</td><td>
function to add a timeout. </td></tr>
<tr><td valign=top><em>remove_function</em>&nbsp;</td><td>
function to remove a timeout. </td></tr>
<tr><td valign=top><em>toggled_function</em>&nbsp;</td><td>
function to notify when the timeout is enabled/disabled </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
data to pass to add_function and remove_function. </td></tr>
<tr><td valign=top><em>free_data_function</em>&nbsp;</td><td>
function to be called to free the data. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a3">FALSE</a> on failure (no memory) </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00617">617</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00057">timeouts</a>.    </td>
  </tr>
</table>
<a name="a8" doxytag="dbus-server.c::dbus_server_set_watch_functions"></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="group__DBusTypes.html#a2">dbus_bool_t</a> dbus_server_set_watch_functions </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>server</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusAddWatchFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>add_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusRemoveWatchFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>remove_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusWatchToggledFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>toggled_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>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_data_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 watch functions for the connection.
<p>
These functions are responsible for making the application's main loop aware of file descriptors that need to be monitored for events.
<p>
This function behaves exactly like <a class="el" href="group__DBusConnection.html#a36">dbus_connection_set_watch_functions</a>(); see the documentation for that routine.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
<tr><td valign=top><em>add_function</em>&nbsp;</td><td>
function to begin monitoring a new descriptor. </td></tr>
<tr><td valign=top><em>remove_function</em>&nbsp;</td><td>
function to stop monitoring a descriptor. </td></tr>
<tr><td valign=top><em>toggled_function</em>&nbsp;</td><td>
function to notify when the watch is enabled/disabled </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
data to pass to add_function and remove_function. </td></tr>
<tr><td valign=top><em>free_data_function</em>&nbsp;</td><td>
function to be called to free the data. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a3">FALSE</a> on failure (no memory) </dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00584">584</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-server-protected_8h-source.html#l00056">watches</a>.    </td>
  </tr>
</table>
<a name="a3" doxytag="dbus-server.c::dbus_server_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_server_unref </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>server</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 of a <a class="el" href="structDBusServer.html">DBusServer</a>.
<p>
Finalizes the server if the reference count reaches zero. The server connection will be closed as with <a class="el" href="group__DBusServer.html#a4">dbus_server_disconnect</a>() when the server is finalized.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>server</em>&nbsp;</td><td>
the server. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00474">474</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="structDBusServerVTable.html#m0">DBusServerVTable::finalize</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00054">refcount</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00055">vtable</a>.    </td>
  </tr>
</table>
<hr><address align="right"><small>Generated on Wed Jun 9 05:01:28 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>