|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/devhelp/books/dbus/api/ |
Upload File : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>D-Bus: DBusServer</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul></div>
<h1>DBusServer<br>
<small>
[<a class="el" href="group__DBus.html">D-Bus low-level 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></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="structDBusServer.html">DBusServer</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g39dc10dc2cbe727cf312c51b25b4341e">DBusServer</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An opaque object representing a server that listens for connections from other applications. <a href="#g39dc10dc2cbe727cf312c51b25b4341e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(*) </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g86c64a45e0834df26a8feae3079f6fbf">DBusNewConnectionFunction</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, <a class="el" href="structDBusConnection.html">DBusConnection</a> *new_connection, void *data)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Called when a new connection to the server is available. <a href="#g86c64a45e0834df26a8feae3079f6fbf"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#geb56ec61286bff89fa482fd6138cd13b">dbus_server_listen</a> (const char *address, <a class="el" href="structDBusError.html">DBusError</a> *error)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Listens for new connections on the given address. <a href="#geb56ec61286bff89fa482fd6138cd13b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structDBusServer.html">DBusServer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g5c4406913d2a92093ce50e0521b37b5b">dbus_server_ref</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Increments the reference count of a <a class="el" href="structDBusServer.html">DBusServer</a>. <a href="#g5c4406913d2a92093ce50e0521b37b5b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g8cd88699638aafda3512802b551fe87b">dbus_server_unref</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Decrements the reference count of a <a class="el" href="structDBusServer.html">DBusServer</a>. <a href="#g8cd88699638aafda3512802b551fe87b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g3833573bd7b5dd61e77610edbcb49297">dbus_server_disconnect</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Releases the server's address and stops listening for new clients. <a href="#g3833573bd7b5dd61e77610edbcb49297"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g07c657d8e980c3ffc38c4293fa34ab09">dbus_server_get_is_connected</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> if the server is still listening for new connections. <a href="#g07c657d8e980c3ffc38c4293fa34ab09"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g369647e80a931ea4bc53a859d43ac36a">dbus_server_get_address</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the address of the server, as a newly-allocated string which must be freed by the caller. <a href="#g369647e80a931ea4bc53a859d43ac36a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g895b1c025268911584f4d15dd7c96512">dbus_server_get_id</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the unique ID of the server, as a newly-allocated string which must be freed by the caller. <a href="#g895b1c025268911584f4d15dd7c96512"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#gcf6686c9b7d53124b7f2ef1349a30148">dbus_server_set_new_connection_function</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, <a class="el" href="group__DBusServer.html#g86c64a45e0834df26a8feae3079f6fbf">DBusNewConnectionFunction</a> function, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a function to be used for handling new connections. <a href="#gcf6686c9b7d53124b7f2ef1349a30148"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g60ed22313c5fbe06c06924acd62959a2">dbus_server_set_watch_functions</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, <a class="el" href="group__DBusConnection.html#g985b712fc165afa66e5901859b68b9de">DBusAddWatchFunction</a> add_function, <a class="el" href="group__DBusConnection.html#g6a48c42c4bde24911cae7fda0d1f1589">DBusRemoveWatchFunction</a> remove_function, <a class="el" href="group__DBusConnection.html#gfa7e0f7856f8ebbe66475979ef54ed9e">DBusWatchToggledFunction</a> toggled_function, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the watch functions for the server. <a href="#g60ed22313c5fbe06c06924acd62959a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#gb5767a964cd2049c985434ad64ae1169">dbus_server_set_timeout_functions</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, <a class="el" href="group__DBusConnection.html#g0f4e9f850546dfbe3a27edea05e5e590">DBusAddTimeoutFunction</a> add_function, <a class="el" href="group__DBusConnection.html#gb11e8c56bd8637deca1439be635f6ca7">DBusRemoveTimeoutFunction</a> remove_function, <a class="el" href="group__DBusConnection.html#g1e98eb88ce848204d419495be5e1d228">DBusTimeoutToggledFunction</a> toggled_function, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the timeout functions for the server. <a href="#gb5767a964cd2049c985434ad64ae1169"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g516ec5f045cf0ddd05a52b2a8bf3f641">dbus_server_set_auth_mechanisms</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, const char **mechanisms)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the authentication mechanisms that this server offers to clients, as a <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>-terminated array of mechanism names. <a href="#g516ec5f045cf0ddd05a52b2a8bf3f641"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#ge9d33d128e7563bff6a902ebd443ef5e">dbus_server_allocate_data_slot</a> (<a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates an integer ID to be used for storing application-specific data on any <a class="el" href="structDBusServer.html">DBusServer</a>. <a href="#ge9d33d128e7563bff6a902ebd443ef5e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g9065202df7477e5cbf1ae084c59a9ecc">dbus_server_free_data_slot</a> (<a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deallocates a global ID for server data slots. <a href="#g9065202df7477e5cbf1ae084c59a9ecc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">dbus_server_set_data</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, int slot, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_func)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">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. <a href="#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusServer.html#gd56f156ff7a60fb1306a82f80e1b0877">dbus_server_get_data</a> (<a class="el" href="structDBusServer.html">DBusServer</a> *server, int slot)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves data previously set with <a class="el" href="group__DBusServer.html#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">dbus_server_set_data()</a>. <a href="#gd56f156ff7a60fb1306a82f80e1b0877"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Server that listens for new connections.
<p>
A <a class="el" href="structDBusServer.html">DBusServer</a> 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></dt><dd>Thread safety hasn't been tested much for <a class="el" href="structDBusServer.html">DBusServer</a> <p>
Need notification to apps of disconnection, may matter for some transports </dd></dl>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="g86c64a45e0834df26a8feae3079f6fbf"></a><!-- doxytag: member="dbus-server.h::DBusNewConnectionFunction" ref="g86c64a45e0834df26a8feae3079f6fbf" args="(DBusServer *server, DBusConnection *new_connection, void *data)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef void(* ) <a class="el" href="group__DBusServer.html#g86c64a45e0834df26a8feae3079f6fbf">DBusNewConnectionFunction</a>(<a class="el" href="structDBusServer.html">DBusServer</a> *server, <a class="el" href="structDBusConnection.html">DBusConnection</a> *new_connection, void *data) </td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Called when a new connection to the server is available.
<p>
Must reference and save the new connection, or close the new connection. Set with <a class="el" href="group__DBusServer.html#gcf6686c9b7d53124b7f2ef1349a30148">dbus_server_set_new_connection_function()</a>.
<p>
Definition at line <a class="el" href="dbus-server_8h-source.html#l00047">47</a> of file <a class="el" href="dbus-server_8h-source.html">dbus-server.h</a>.
</div>
</div><p>
<a class="anchor" name="g39dc10dc2cbe727cf312c51b25b4341e"></a><!-- doxytag: member="dbus-server.h::DBusServer" ref="g39dc10dc2cbe727cf312c51b25b4341e" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusServer.html">DBusServer</a> </td>
</tr>
</table>
</div>
<div class="memdoc">
<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#gcf6686c9b7d53124b7f2ef1349a30148">dbus_server_set_new_connection_function()</a>.
<p>
Definition at line <a class="el" href="dbus-server_8h-source.html#l00042">42</a> of file <a class="el" href="dbus-server_8h-source.html">dbus-server.h</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ge9d33d128e7563bff6a902ebd443ef5e"></a><!-- doxytag: member="dbus-server.c::dbus_server_allocate_data_slot" ref="ge9d33d128e7563bff6a902ebd443ef5e" args="(dbus_int32_t *slot_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_allocate_data_slot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> * </td>
<td class="paramname"> <em>slot_p</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">dbus_server_set_data()</a> and <a class="el" href="group__DBusServer.html#gd56f156ff7a60fb1306a82f80e1b0877">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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>slot_p</em> </td><td>address of global variable storing the slot ID </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> on no memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l01048">1048</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8c-source.html#l00067">_dbus_data_slot_allocator_alloc()</a>, and <a class="el" href="dbus-internals_8h-source.html#l00284">_DBUS_LOCK_NAME</a>.
</div>
</div><p>
<a class="anchor" name="g3833573bd7b5dd61e77610edbcb49297"></a><!-- doxytag: member="dbus-server.c::dbus_server_disconnect" ref="g3833573bd7b5dd61e77610edbcb49297" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_server_disconnect </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00739">739</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-server_8c-source.html#l00432">_dbus_server_ref_unlocked()</a>, <a class="el" href="dbus-server_8c-source.html#l00697">dbus_server_unref()</a>, <a class="el" href="structDBusServerVTable.html#148b105ac0a3a5ae8efbba29bf7fe676">DBusServerVTable::disconnect</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00086">disconnected</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00058">refcount</a>, <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="dbus-sysdeps_8h-source.html#l00198">DBusAtomic::value</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00059">vtable</a>.
</div>
</div><p>
<a class="anchor" name="g9065202df7477e5cbf1ae084c59a9ecc"></a><!-- doxytag: member="dbus-server.c::dbus_server_free_data_slot" ref="g9065202df7477e5cbf1ae084c59a9ecc" args="(dbus_int32_t *slot_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_server_free_data_slot </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> * </td>
<td class="paramname"> <em>slot_p</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Deallocates a global ID for server data slots.
<p>
<a class="el" href="group__DBusServer.html#gd56f156ff7a60fb1306a82f80e1b0877">dbus_server_get_data()</a> and <a class="el" href="group__DBusServer.html#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">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).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>slot_p</em> </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#l01067">1067</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8c-source.html#l00163">_dbus_data_slot_allocator_free()</a>.
</div>
</div><p>
<a class="anchor" name="g369647e80a931ea4bc53a859d43ac36a"></a><!-- doxytag: member="dbus-server.c::dbus_server_get_address" ref="g369647e80a931ea4bc53a859d43ac36a" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * dbus_server_get_address </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the address or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if no memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00788">788</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8c-source.html#l00396">_dbus_strdup()</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00069">address</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
</div>
</div><p>
<a class="anchor" name="gd56f156ff7a60fb1306a82f80e1b0877"></a><!-- doxytag: member="dbus-server.c::dbus_server_get_data" ref="gd56f156ff7a60fb1306a82f80e1b0877" args="(DBusServer *server, int slot)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * dbus_server_get_data </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>slot</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Retrieves data previously set with <a class="el" href="group__DBusServer.html#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">dbus_server_set_data()</a>.
<p>
The slot must still be allocated (must not have been freed).<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server </td></tr>
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>the slot to get data from </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the data, or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if not found </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l01128">1128</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8c-source.html#l00296">_dbus_data_slot_list_get()</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00073">slot_list</a>.
</div>
</div><p>
<a class="anchor" name="g895b1c025268911584f4d15dd7c96512"></a><!-- doxytag: member="dbus-server.c::dbus_server_get_id" ref="g895b1c025268911584f4d15dd7c96512" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char * dbus_server_get_id </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns the unique ID of the server, as a newly-allocated string which must be freed by the caller.
<p>
This ID is normally used by clients to tell when two <a class="el" href="structDBusConnection.html">DBusConnection</a> would be equivalent (because the server address passed to <a class="el" href="group__DBusConnection.html#gc6bc8680215ed6e3b526903736f4edde">dbus_connection_open()</a> will have the same guid in the two cases). <a class="el" href="group__DBusConnection.html#gc6bc8680215ed6e3b526903736f4edde">dbus_connection_open()</a> can re-use an existing connection with the same ID instead of opening a new connection.<p>
This is an ID unique to each <a class="el" href="structDBusServer.html">DBusServer</a>. Remember that a <a class="el" href="structDBusServer.html">DBusServer</a> represents only one mode of connecting, so e.g. a bus daemon can listen on multiple addresses which will mean it has multiple <a class="el" href="structDBusServer.html">DBusServer</a> each with their own ID.<p>
The ID is not a UUID in the sense of RFC4122; the details are explained in the D-Bus specification.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the id of the server or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if no memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00824">824</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-string_8c-source.html#l00697">_dbus_string_copy_data()</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00064">guid_hex</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
</div>
</div><p>
<a class="anchor" name="g07c657d8e980c3ffc38c4293fa34ab09"></a><!-- doxytag: member="dbus-server.c::dbus_server_get_is_connected" ref="g07c657d8e980c3ffc38c4293fa34ab09" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_get_is_connected </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> if the server is still listening for new connections.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
</table>
</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#l00086">disconnected</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
</div>
</div><p>
<a class="anchor" name="geb56ec61286bff89fa482fd6138cd13b"></a><!-- doxytag: member="dbus-server.c::dbus_server_listen" ref="geb56ec61286bff89fa482fd6138cd13b" args="(const char *address, DBusError *error)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusServer.html">DBusServer</a> * dbus_server_listen </td>
<td>(</td>
<td class="paramtype">const char * </td>
<td class="paramname"> <em>address</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusError.html">DBusError</a> * </td>
<td class="paramname"> <em>error</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Listens for new connections on the given address.
<p>
If there are multiple semicolon-separated address entries in the address, tries each one and listens on the first one that works.<p>
Returns <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> and sets error if listening fails for any reason. Otherwise returns a new <a class="el" href="structDBusServer.html">DBusServer</a>. <a class="el" href="group__DBusServer.html#gcf6686c9b7d53124b7f2ef1349a30148">dbus_server_set_new_connection_function()</a>, <a class="el" href="group__DBusServer.html#g60ed22313c5fbe06c06924acd62959a2">dbus_server_set_watch_functions()</a>, and <a class="el" href="group__DBusServer.html#gb5767a964cd2049c985434ad64ae1169">dbus_server_set_timeout_functions()</a> should be called immediately to render the server fully functional.<p>
To free the server, applications must call first <a class="el" href="group__DBusServer.html#g3833573bd7b5dd61e77610edbcb49297">dbus_server_disconnect()</a> and then <a class="el" href="group__DBusServer.html#g8cd88699638aafda3512802b551fe87b">dbus_server_unref()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>address</em> </td><td>the address of this server. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>error</em> </td><td>location to store reason for failure. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>a new <a class="el" href="structDBusServer.html">DBusServer</a>, or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> on failure. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00540">540</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-internals_8h-source.html#l00154">_DBUS_N_ELEMENTS</a>, <a class="el" href="dbus-address_8c-source.html#l00189">dbus_address_entries_free()</a>, <a class="el" href="dbus-address_8c-source.html#l00227">dbus_address_entry_get_method()</a>, <a class="el" href="dbus-protocol_8h-source.html#l00342">DBUS_ERROR_BAD_ADDRESS</a>, <a class="el" href="dbus-errors_8c-source.html#l00183">dbus_error_free()</a>, <a class="el" href="dbus-errors_8c-source.html#l00160">dbus_error_init()</a>, <a class="el" href="dbus-errors_8c-source.html#l00301">dbus_error_is_set()</a>, <a class="el" href="dbus-errors_8c-source.html#l00251">dbus_move_error()</a>, <a class="el" href="dbus-address_8c-source.html#l00363">dbus_parse_address()</a>, <a class="el" href="dbus-errors_8c-source.html#l00326">dbus_set_error()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
</div>
</div><p>
<a class="anchor" name="g5c4406913d2a92093ce50e0521b37b5b"></a><!-- doxytag: member="dbus-server.c::dbus_server_ref" ref="g5c4406913d2a92093ce50e0521b37b5b" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusServer.html">DBusServer</a> * dbus_server_ref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Increments the reference count of a <a class="el" href="structDBusServer.html">DBusServer</a>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the server </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00670">670</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-sysdeps-unix_8c-source.html#l01769">_dbus_atomic_inc()</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00058">refcount</a>, and <a class="el" href="dbus-sysdeps_8h-source.html#l00198">DBusAtomic::value</a>.
</div>
</div><p>
<a class="anchor" name="g516ec5f045cf0ddd05a52b2a8bf3f641"></a><!-- doxytag: member="dbus-server.c::dbus_server_set_auth_mechanisms" ref="g516ec5f045cf0ddd05a52b2a8bf3f641" args="(DBusServer *server, const char **mechanisms)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_set_auth_mechanisms </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char ** </td>
<td class="paramname"> <em>mechanisms</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the authentication mechanisms that this server offers to clients, as a <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>-terminated array of mechanism names.
<p>
This function only affects connections created <em>after</em> it is called. Pass <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> instead of an array to use all available mechanisms (this is the default behavior).<p>
The D-Bus specification describes some of the supported mechanisms.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server </td></tr>
<tr><td valign="top"></td><td valign="top"><em>mechanisms</em> </td><td><a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>-terminated array of mechanisms </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> if no memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l01003">1003</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8c-source.html#l00447">_dbus_dup_string_array()</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00084">auth_mechanisms</a>, <a class="el" href="dbus-memory_8c-source.html#l00655">dbus_free_string_array()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
</div>
</div><p>
<a class="anchor" name="g7309ea0b3e3b75dffb9ad8bb9d2fc2b7"></a><!-- doxytag: member="dbus-server.c::dbus_server_set_data" ref="g7309ea0b3e3b75dffb9ad8bb9d2fc2b7" args="(DBusServer *server, int slot, void *data, DBusFreeFunction free_data_func)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_set_data </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>slot</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> </td>
<td class="paramname"> <em>free_data_func</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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#ge9d33d128e7563bff6a902ebd443ef5e">dbus_server_allocate_data_slot()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server </td></tr>
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>the slot number </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>the data to store </td></tr>
<tr><td valign="top"></td><td valign="top"><em>free_data_func</em> </td><td>finalizer function for the data </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> if there was enough memory to store the data </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l01088">1088</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8c-source.html#l00235">_dbus_data_slot_list_set()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00073">slot_list</a>.
</div>
</div><p>
<a class="anchor" name="gcf6686c9b7d53124b7f2ef1349a30148"></a><!-- doxytag: member="dbus-server.c::dbus_server_set_new_connection_function" ref="gcf6686c9b7d53124b7f2ef1349a30148" args="(DBusServer *server, DBusNewConnectionFunction function, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_server_set_new_connection_function </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusServer.html#g86c64a45e0834df26a8feae3079f6fbf">DBusNewConnectionFunction</a> </td>
<td class="paramname"> <em>function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> </td>
<td class="paramname"> <em>free_data_function</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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. The new connection function may also close the connection itself, which is considered good form if the connection is not wanted.<p>
The connection here is private in the sense of <a class="el" href="group__DBusConnection.html#gce3add3e44f74a7f60ee2b102264c48d">dbus_connection_open_private()</a>, so if the new connection function keeps a reference it must arrange for the connection to be closed. i.e. libdbus does not own this connection once the new connection function takes a reference.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>function</em> </td><td>a function to handle new connections. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>data to pass to the new connection handler. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>free_data_function</em> </td><td>function to free the data. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00859">859</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#l00078">new_connection_data</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00080">new_connection_free_data_function</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00076">new_connection_function</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
<p>
Referenced by <a class="el" href="dbus-server_8c-source.html#l00168">_dbus_server_finalize_base()</a>.
</div>
</div><p>
<a class="anchor" name="gb5767a964cd2049c985434ad64ae1169"></a><!-- doxytag: member="dbus-server.c::dbus_server_set_timeout_functions" ref="gb5767a964cd2049c985434ad64ae1169" args="(DBusServer *server, DBusAddTimeoutFunction add_function, DBusRemoveTimeoutFunction remove_function, DBusTimeoutToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_set_timeout_functions </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#g0f4e9f850546dfbe3a27edea05e5e590">DBusAddTimeoutFunction</a> </td>
<td class="paramname"> <em>add_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#gb11e8c56bd8637deca1439be635f6ca7">DBusRemoveTimeoutFunction</a> </td>
<td class="paramname"> <em>remove_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#g1e98eb88ce848204d419495be5e1d228">DBusTimeoutToggledFunction</a> </td>
<td class="paramname"> <em>toggled_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> </td>
<td class="paramname"> <em>free_data_function</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the timeout functions for the server.
<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#g1e827990ea677cbe69ead0b3ccc4b91c">dbus_connection_set_timeout_functions()</a>; see the documentation for that routine.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>add_function</em> </td><td>function to add a timeout. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>remove_function</em> </td><td>function to remove a timeout. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>toggled_function</em> </td><td>function to notify when the timeout is enabled/disabled </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>data to pass to add_function and remove_function. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>free_data_function</em> </td><td>function to be called to free the data. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> on failure (no memory) </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00952">952</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00238">_dbus_timeout_list_set_functions()</a>, <a class="el" href="dbus-internals_8c-source.html#l00266">_dbus_warn_check_failed()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00067">timeouts</a>.
</div>
</div><p>
<a class="anchor" name="g60ed22313c5fbe06c06924acd62959a2"></a><!-- doxytag: member="dbus-server.c::dbus_server_set_watch_functions" ref="g60ed22313c5fbe06c06924acd62959a2" args="(DBusServer *server, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> dbus_server_set_watch_functions </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#g985b712fc165afa66e5901859b68b9de">DBusAddWatchFunction</a> </td>
<td class="paramname"> <em>add_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#g6a48c42c4bde24911cae7fda0d1f1589">DBusRemoveWatchFunction</a> </td>
<td class="paramname"> <em>remove_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#gfa7e0f7856f8ebbe66475979ef54ed9e">DBusWatchToggledFunction</a> </td>
<td class="paramname"> <em>toggled_function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> </td>
<td class="paramname"> <em>free_data_function</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets the watch functions for the server.
<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#g71e9a01114fcffe86b450d9b521a4540">dbus_connection_set_watch_functions()</a>; see the documentation for that routine.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>add_function</em> </td><td>function to begin monitoring a new descriptor. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>remove_function</em> </td><td>function to stop monitoring a descriptor. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>toggled_function</em> </td><td>function to notify when the watch is enabled/disabled </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>data to pass to add_function and remove_function. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>free_data_function</em> </td><td>function to be called to free the data. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> on failure (no memory) </dd></dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00899">899</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8c-source.html#l00266">_dbus_warn_check_failed()</a>, <a class="el" href="dbus-watch_8c-source.html#l00253">_dbus_watch_list_set_functions()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00066">watches</a>.
</div>
</div><p>
<a class="anchor" name="g8cd88699638aafda3512802b551fe87b"></a><!-- doxytag: member="dbus-server.c::dbus_server_unref" ref="g8cd88699638aafda3512802b551fe87b" args="(DBusServer *server)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_server_unref </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusServer.html">DBusServer</a> * </td>
<td class="paramname"> <em>server</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<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.<p>
The server must be disconnected before the refcount reaches zero.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>server</em> </td><td>the server. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-server_8c-source.html#l00697">697</a> of file <a class="el" href="dbus-server_8c-source.html">dbus-server.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-sysdeps-unix_8c-source.html#l01792">_dbus_atomic_dec()</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00086">disconnected</a>, <a class="el" href="structDBusServerVTable.html#cd97315e812352da38449f910775b08d">DBusServerVTable::finalize</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-server-protected_8h-source.html#l00058">refcount</a>, <a class="el" href="dbus-sysdeps_8h-source.html#l00198">DBusAtomic::value</a>, and <a class="el" href="dbus-server-protected_8h-source.html#l00059">vtable</a>.
<p>
Referenced by <a class="el" href="dbus-server_8c-source.html#l00739">dbus_server_disconnect()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:14 2009 for D-Bus by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>