| Current File : //usr/share/doc/dbus/api/group__DBusWatchInternals.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>D-Bus: DBusWatch implementation details</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">D-Bus
 <span id="projectnumber">1.8.20</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</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>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Data Structures</a> |
<a href="#define-members">Defines</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">DBusWatch implementation details</div> </div>
<div class="ingroups"><a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a></div></div><!--header-->
<div class="contents">
<p>implementation details for <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusWatch.html">DBusWatch</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Implementation of <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>. <a href="structDBusWatch.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusWatchList.html">DBusWatchList</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="structDBusWatchList.html" title="DBusWatchList implementation details.">DBusWatchList</a> implementation details. <a href="structDBusWatchList.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga524db7211d877eb100dbb48ab469f2af"></a><!-- doxytag: member="DBusWatchInternals::_DBUS_WATCH_NVAL" ref="ga524db7211d877eb100dbb48ab469f2af" args="" -->
#define </td><td class="memItemRight" valign="bottom"><b>_DBUS_WATCH_NVAL</b>   (1<<4)</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structDBusWatchList.html">DBusWatchList</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gafc9f312d7d92039a381a753b7e024391">DBusWatchList</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opaque data type representing a list of watches and a set of DBusAddWatchFunction/DBusRemoveWatchFunction. <a href="#gafc9f312d7d92039a381a753b7e024391"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae71d41a6a6c6a3b845ccc30b09004228"></a><!-- doxytag: member="DBusWatchInternals::DBusWatchHandler" ref="gae71d41a6a6c6a3b845ccc30b09004228" args=")(DBusWatch *watch, unsigned int flags, void *data)" -->
typedef <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gae71d41a6a6c6a3b845ccc30b09004228">DBusWatchHandler</a> )(<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int flags, void *data)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">function to run when the watch is handled <br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7dcad11a2e5588c0a36e43a599bc9f4d"></a><!-- doxytag: member="DBusWatchInternals::_dbus_watch_get_enabled" ref="ga7dcad11a2e5588c0a36e43a599bc9f4d" args="(DBusWatch *watch)" -->
<a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><b>_dbus_watch_get_enabled</b> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga17eb67d58b3d35d1a71dc4823f9e05e2"></a><!-- doxytag: member="DBusWatchInternals::_dbus_watch_get_oom_last_time" ref="ga17eb67d58b3d35d1a71dc4823f9e05e2" args="(DBusWatch *watch)" -->
<a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><b>_dbus_watch_get_oom_last_time</b> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga14a6b56f2b9b39ec51b8c5ff1662106f"></a><!-- doxytag: member="DBusWatchInternals::_dbus_watch_set_oom_last_time" ref="ga14a6b56f2b9b39ec51b8c5ff1662106f" args="(DBusWatch *watch, dbus_bool_t oom)" -->
void </td><td class="memItemRight" valign="bottom"><b>_dbus_watch_set_oom_last_time</b> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> oom)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga1f940e505b20e6429ae858a7b70b0541">_dbus_watch_new</a> (int fd, unsigned int flags, <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> enabled, <a class="el" href="group__DBusWatchInternals.html#gae71d41a6a6c6a3b845ccc30b09004228">DBusWatchHandler</a> handler, void *data, <a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>. <a href="#ga1f940e505b20e6429ae858a7b70b0541"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga0db8530cc53589589d67dfb35d03db61">_dbus_watch_ref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Increments the reference count of a <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> object. <a href="#ga0db8530cc53589589d67dfb35d03db61"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga7d27dfc13a3ccfbaa99ceab331bb46f0">_dbus_watch_unref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Decrements the reference count of a <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> object and finalizes the object if the count reaches zero. <a href="#ga7d27dfc13a3ccfbaa99ceab331bb46f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gad8521d64123c1d1ae9a094bac8addd31">_dbus_watch_invalidate</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Clears the file descriptor from a now-invalid watch object so that no one tries to use it. <a href="#gad8521d64123c1d1ae9a094bac8addd31"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gab8f49926fe9ee56cb4ae7c1c8071cca3">_dbus_watch_sanitize_condition</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int *condition)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sanitizes the given condition so that it only contains flags that the <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> requested. <a href="#gab8f49926fe9ee56cb4ae7c1c8071cca3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga5d9db5d0af5916a5ec890eb38d5741eb">_dbus_watch_list_new</a> (void)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new watch list. <a href="#ga5d9db5d0af5916a5ec890eb38d5741eb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gac3f75c0da2c8c51e8708f45dd27f9e2d">_dbus_watch_list_free</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Frees a <a class="el" href="structDBusWatchList.html" title="DBusWatchList implementation details.">DBusWatchList</a>. <a href="#gac3f75c0da2c8c51e8708f45dd27f9e2d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gae9ab8cf14f4191191e94183be9a031d9">_dbus_watch_list_set_functions</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <a class="el" href="group__DBusConnection.html#ga9188ca3fd89c957dc269dbe8601b270e">DBusAddWatchFunction</a> add_function, <a class="el" href="group__DBusConnection.html#gaaab846a872d938b27503129551ea0c62">DBusRemoveWatchFunction</a> remove_function, <a class="el" href="group__DBusConnection.html#gace13544ff3075b5fccbce896682ec6ff">DBusWatchToggledFunction</a> toggled_function, void *data, <a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the watch functions. <a href="#gae9ab8cf14f4191191e94183be9a031d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gaec61655a4bd6186a6a1ec104771d8af5">_dbus_watch_list_add_watch</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate. <a href="#gaec61655a4bd6186a6a1ec104771d8af5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga76894d297bc7d7d23cbacdc2b1778884">_dbus_watch_list_remove_watch</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate. <a href="#ga76894d297bc7d7d23cbacdc2b1778884"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga14bb50e8663a1d9d3960b4f73c09c097">_dbus_watch_list_toggle_watch</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> enabled)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a watch to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate. <a href="#ga14bb50e8663a1d9d3960b4f73c09c097"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga935ba95d94a14aee79d80abe970eae53">_dbus_watch_list_toggle_all_watches</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> enabled)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets all watches to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate. <a href="#ga935ba95d94a14aee79d80abe970eae53"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ga75620808f4d2245914012a41e3b82f3c">_dbus_watch_set_handler</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, <a class="el" href="group__DBusWatchInternals.html#gae71d41a6a6c6a3b845ccc30b09004228">DBusWatchHandler</a> handler, void *data, <a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the handler for the watch. <a href="#ga75620808f4d2245914012a41e3b82f3c"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>implementation details for <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> </p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gafc9f312d7d92039a381a753b7e024391"></a><!-- doxytag: member="dbus-watch.h::DBusWatchList" ref="gafc9f312d7d92039a381a753b7e024391" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusWatchList.html">DBusWatchList</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Opaque data type representing a list of watches and a set of DBusAddWatchFunction/DBusRemoveWatchFunction. </p>
<p>Automatically handles removing/re-adding watches when the DBusAddWatchFunction is updated or changed. Holds a reference count to each watch.</p>
<p>Used in the implementation of both <a class="el" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> and DBusClient. </p>
<p>Definition at line <a class="el" href="dbus-watch_8h_source.html#l00038">38</a> of file <a class="el" href="dbus-watch_8h_source.html">dbus-watch.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="gad8521d64123c1d1ae9a094bac8addd31"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_invalidate" ref="gad8521d64123c1d1ae9a094bac8addd31" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#gad8521d64123c1d1ae9a094bac8addd31">_dbus_watch_invalidate</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Clears the file descriptor from a now-invalid watch object so that no one tries to use it. </p>
<p>This is because a watch may stay alive due to reference counts after the file descriptor is closed. Invalidation makes it easier to catch bugs. It also keeps people from doing dorky things like assuming file descriptors are unique (never recycled).</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch</td><td>the watch object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00169">169</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-watch_8c_source.html#l00043">DBusWatch::fd</a>, and <a class="el" href="dbus-watch_8c_source.html#l00044">DBusWatch::flags</a>.</p>
<p>Referenced by <a class="el" href="dbus-spawn-win_8c_source.html#l00187">_dbus_babysitter_unref()</a>, <a class="el" href="dbus-spawn-win_8c_source.html#l00644">_dbus_spawn_async_with_babysitter()</a>, and <a class="el" href="dbus-transport-socket_8c_source.html#l01256">_dbus_transport_new_for_socket()</a>.</p>
</div>
</div>
<a class="anchor" id="gaec61655a4bd6186a6a1ec104771d8af5"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_add_watch" ref="gaec61655a4bd6186a6a1ec104771d8af5" args="(DBusWatchList *watch_list, DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusWatchInternals.html#gaec61655a4bd6186a6a1ec104771d8af5">_dbus_watch_list_add_watch</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
<tr><td class="paramname">watch</td><td>the watch to add. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> on success, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> if no memory. </dd></dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00376">376</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-list_8c_source.html#l00270">_dbus_list_append()</a>, <a class="el" href="dbus-list_8c_source.html#l00446">_dbus_list_remove_last()</a>, <a class="el" href="dbus-watch_8c_source.html#l00124">_dbus_watch_ref()</a>, <a class="el" href="dbus-watch_8c_source.html#l00138">_dbus_watch_unref()</a>, <a class="el" href="dbus-watch_8c_source.html#l00218">DBusWatchList::add_watch_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00586">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="dbus-watch_8c_source.html#l00221">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c_source.html#l00216">DBusWatchList::watches</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l00743">_dbus_connection_add_watch_unlocked()</a>, <a class="el" href="dbus-server_8c_source.html#l00288">_dbus_server_add_watch()</a>, and <a class="el" href="dbus-spawn-win_8c_source.html#l00644">_dbus_spawn_async_with_babysitter()</a>.</p>
</div>
</div>
<a class="anchor" id="gac3f75c0da2c8c51e8708f45dd27f9e2d"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_free" ref="gac3f75c0da2c8c51e8708f45dd27f9e2d" args="(DBusWatchList *watch_list)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#gac3f75c0da2c8c51e8708f45dd27f9e2d">_dbus_watch_list_free</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Frees a <a class="el" href="structDBusWatchList.html" title="DBusWatchList implementation details.">DBusWatchList</a>. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00249">249</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-list_8c_source.html#l00542">_dbus_list_clear()</a>, <a class="el" href="dbus-list_8c_source.html#l00759">_dbus_list_foreach()</a>, <a class="el" href="dbus-watch_8c_source.html#l00296">_dbus_watch_list_set_functions()</a>, <a class="el" href="dbus-watch_8c_source.html#l00138">_dbus_watch_unref()</a>, <a class="el" href="dbus-memory_8c_source.html#l00701">dbus_free()</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c_source.html#l00216">DBusWatchList::watches</a>.</p>
<p>Referenced by <a class="el" href="dbus-spawn-win_8c_source.html#l00187">_dbus_babysitter_unref()</a>, <a class="el" href="dbus-connection_8c_source.html#l01249">_dbus_connection_new_for_transport()</a>, <a class="el" href="dbus-server_8c_source.html#l00193">_dbus_server_finalize_base()</a>, and <a class="el" href="dbus-server_8c_source.html#l00111">_dbus_server_init_base()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5d9db5d0af5916a5ec890eb38d5741eb"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_new" ref="ga5d9db5d0af5916a5ec890eb38d5741eb" args="(void)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * <a class="el" href="group__DBusWatchInternals.html#ga5d9db5d0af5916a5ec890eb38d5741eb">_dbus_watch_list_new</a> </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new watch list. </p>
<p>Returns <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> if insufficient memory exists.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new watch list, or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> on failure. </dd></dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00232">232</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-memory_8h_source.html#l00059">dbus_new0</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l01249">_dbus_connection_new_for_transport()</a>, and <a class="el" href="dbus-server_8c_source.html#l00111">_dbus_server_init_base()</a>.</p>
</div>
</div>
<a class="anchor" id="ga76894d297bc7d7d23cbacdc2b1778884"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_remove_watch" ref="ga76894d297bc7d7d23cbacdc2b1778884" args="(DBusWatchList *watch_list, DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#ga76894d297bc7d7d23cbacdc2b1778884">_dbus_watch_list_remove_watch</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
<tr><td class="paramname">watch</td><td>the watch to remove. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00409">409</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-list_8c_source.html#l00415">_dbus_list_remove()</a>, <a class="el" href="dbus-watch_8c_source.html#l00138">_dbus_watch_unref()</a>, <a class="el" href="dbus-watch_8c_source.html#l00586">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c_source.html#l00219">DBusWatchList::remove_watch_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00221">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c_source.html#l00216">DBusWatchList::watches</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l00761">_dbus_connection_remove_watch_unlocked()</a>, and <a class="el" href="dbus-server_8c_source.html#l00304">_dbus_server_remove_watch()</a>.</p>
</div>
</div>
<a class="anchor" id="gae9ab8cf14f4191191e94183be9a031d9"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_set_functions" ref="gae9ab8cf14f4191191e94183be9a031d9" args="(DBusWatchList *watch_list, 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#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusWatchInternals.html#gae9ab8cf14f4191191e94183be9a031d9">_dbus_watch_list_set_functions</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#ga9188ca3fd89c957dc269dbe8601b270e">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#gaaab846a872d938b27503129551ea0c62">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#gace13544ff3075b5fccbce896682ec6ff">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#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> </td>
<td class="paramname"><em>free_data_function</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the watch functions. </p>
<p>This function is the "backend" for <a class="el" href="group__DBusConnection.html#gaebf031eb444b4f847606aa27daa3d8e6" title="Sets the watch functions for the connection.">dbus_connection_set_watch_functions()</a> and <a class="el" href="group__DBusServer.html#gaa5723810ea52e9f1815062fd91395892" title="Sets the watch functions for the server.">dbus_server_set_watch_functions()</a>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
<tr><td class="paramname">add_function</td><td>the add watch function. </td></tr>
<tr><td class="paramname">remove_function</td><td>the remove watch function. </td></tr>
<tr><td class="paramname">toggled_function</td><td>function on toggling enabled flag, or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> </td></tr>
<tr><td class="paramname">data</td><td>the data for those functions. </td></tr>
<tr><td class="paramname">free_data_function</td><td>the function to free the data. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> if not enough memory </dd></dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00296">296</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-list_8c_source.html#l00759">_dbus_list_foreach()</a>, <a class="el" href="dbus-list_8c_source.html#l00567">_dbus_list_get_first_link()</a>, <a class="el" href="dbus-list_8h_source.html#l00090">_dbus_list_get_next_link</a>, <a class="el" href="dbus-watch_8c_source.html#l00218">DBusWatchList::add_watch_function</a>, <a class="el" href="dbus-list_8h_source.html#l00038">DBusList::data</a>, <a class="el" href="dbus-watch_8c_source.html#l00607">dbus_watch_get_flags()</a>, <a class="el" href="dbus-watch_8c_source.html#l00586">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c_source.html#l00219">DBusWatchList::remove_watch_function</a>, <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="dbus-watch_8c_source.html#l00221">DBusWatchList::watch_data</a>, <a class="el" href="dbus-watch_8c_source.html#l00222">DBusWatchList::watch_free_data_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00220">DBusWatchList::watch_toggled_function</a>, and <a class="el" href="dbus-watch_8c_source.html#l00216">DBusWatchList::watches</a>.</p>
<p>Referenced by <a class="el" href="dbus-spawn-win_8c_source.html#l00361">_dbus_babysitter_set_watch_functions()</a>, <a class="el" href="dbus-watch_8c_source.html#l00249">_dbus_watch_list_free()</a>, <a class="el" href="dbus-connection_8c_source.html#l04926">dbus_connection_set_watch_functions()</a>, and <a class="el" href="dbus-server_8c_source.html#l00929">dbus_server_set_watch_functions()</a>.</p>
</div>
</div>
<a class="anchor" id="ga935ba95d94a14aee79d80abe970eae53"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_toggle_all_watches" ref="ga935ba95d94a14aee79d80abe970eae53" args="(DBusWatchList *watch_list, dbus_bool_t enabled)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#ga935ba95d94a14aee79d80abe970eae53">_dbus_watch_list_toggle_all_watches</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td>
<td class="paramname"><em>enabled</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets all watches to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
<tr><td class="paramname">enabled</td><td><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> to enable </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00465">465</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-list_8c_source.html#l00567">_dbus_list_get_first_link()</a>, <a class="el" href="dbus-list_8h_source.html#l00090">_dbus_list_get_next_link</a>, <a class="el" href="dbus-watch_8c_source.html#l00436">_dbus_watch_list_toggle_watch()</a>, <a class="el" href="dbus-list_8h_source.html#l00038">DBusList::data</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c_source.html#l00216">DBusWatchList::watches</a>.</p>
<p>Referenced by <a class="el" href="dbus-server_8c_source.html#l00322">_dbus_server_toggle_all_watches()</a>.</p>
</div>
</div>
<a class="anchor" id="ga14bb50e8663a1d9d3960b4f73c09c097"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_toggle_watch" ref="ga14bb50e8663a1d9d3960b4f73c09c097" args="(DBusWatchList *watch_list, DBusWatch *watch, dbus_bool_t enabled)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#ga14bb50e8663a1d9d3960b4f73c09c097">_dbus_watch_list_toggle_watch</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * </td>
<td class="paramname"><em>watch_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td>
<td class="paramname"><em>enabled</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a watch to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch_list</td><td>the watch list. </td></tr>
<tr><td class="paramname">watch</td><td>the watch to toggle. </td></tr>
<tr><td class="paramname">enabled</td><td><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> to enable </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00436">436</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-watch_8c_source.html#l00586">dbus_watch_get_socket()</a>, <a class="el" href="dbus-watch_8c_source.html#l00052">DBusWatch::enabled</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c_source.html#l00221">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c_source.html#l00220">DBusWatchList::watch_toggled_function</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l00781">_dbus_connection_toggle_watch_unlocked()</a>, and <a class="el" href="dbus-watch_8c_source.html#l00465">_dbus_watch_list_toggle_all_watches()</a>.</p>
</div>
</div>
<a class="anchor" id="ga1f940e505b20e6429ae858a7b70b0541"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_new" ref="ga1f940e505b20e6429ae858a7b70b0541" args="(int fd, unsigned int flags, dbus_bool_t enabled, DBusWatchHandler handler, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusWatch.html">DBusWatch</a> * <a class="el" href="group__DBusWatchInternals.html#ga1f940e505b20e6429ae858a7b70b0541">_dbus_watch_new</a> </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>fd</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int </td>
<td class="paramname"><em>flags</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td>
<td class="paramname"><em>enabled</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusWatchInternals.html#gae71d41a6a6c6a3b845ccc30b09004228">DBusWatchHandler</a> </td>
<td class="paramname"><em>handler</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#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> </td>
<td class="paramname"><em>free_data_function</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Creates a new <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>. </p>
<p>Used to add a file descriptor to be polled by a main loop.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">fd</td><td>the file descriptor to be watched. </td></tr>
<tr><td class="paramname">flags</td><td>the conditions to watch for on the descriptor. </td></tr>
<tr><td class="paramname">enabled</td><td>the initial enabled state </td></tr>
<tr><td class="paramname">handler</td><td>the handler function </td></tr>
<tr><td class="paramname">data</td><td>data for handler function </td></tr>
<tr><td class="paramname">free_data_function</td><td>function to free the data </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> object. </dd></dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00088">88</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-memory_8h_source.html#l00059">dbus_new0</a>, <a class="el" href="dbus-watch_8c_source.html#l00052">DBusWatch::enabled</a>, <a class="el" href="dbus-watch_8c_source.html#l00043">DBusWatch::fd</a>, <a class="el" href="dbus-watch_8c_source.html#l00044">DBusWatch::flags</a>, <a class="el" href="dbus-watch_8c_source.html#l00048">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00046">DBusWatch::handler</a>, <a class="el" href="dbus-watch_8c_source.html#l00047">DBusWatch::handler_data</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c_source.html#l00042">DBusWatch::refcount</a>.</p>
<p>Referenced by <a class="el" href="dbus-server-socket_8c_source.html#l00280">_dbus_server_new_for_socket()</a>, <a class="el" href="dbus-spawn-win_8c_source.html#l00644">_dbus_spawn_async_with_babysitter()</a>, and <a class="el" href="dbus-transport-socket_8c_source.html#l01256">_dbus_transport_new_for_socket()</a>.</p>
</div>
</div>
<a class="anchor" id="ga0db8530cc53589589d67dfb35d03db61"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_ref" ref="ga0db8530cc53589589d67dfb35d03db61" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusWatch.html">DBusWatch</a> * <a class="el" href="group__DBusWatchInternals.html#ga0db8530cc53589589d67dfb35d03db61">_dbus_watch_ref</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Increments the reference count of a <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> object. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch</td><td>the watch object. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the watch object. </dd></dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00124">124</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-watch_8c_source.html#l00042">DBusWatch::refcount</a>.</p>
<p>Referenced by <a class="el" href="dbus-transport_8c_source.html#l00889">_dbus_transport_handle_watch()</a>, and <a class="el" href="dbus-watch_8c_source.html#l00376">_dbus_watch_list_add_watch()</a>.</p>
</div>
</div>
<a class="anchor" id="gab8f49926fe9ee56cb4ae7c1c8071cca3"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_sanitize_condition" ref="gab8f49926fe9ee56cb4ae7c1c8071cca3" args="(DBusWatch *watch, unsigned int *condition)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#gab8f49926fe9ee56cb4ae7c1c8071cca3">_dbus_watch_sanitize_condition</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int * </td>
<td class="paramname"><em>condition</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sanitizes the given condition so that it only contains flags that the <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> requested. </p>
<p>e.g. if the watch is a DBUS_WATCH_READABLE watch then DBUS_WATCH_WRITABLE will be stripped from the condition.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch</td><td>the watch object. </td></tr>
<tr><td class="paramname">condition</td><td>address of the condition to sanitize. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00185">185</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-connection_8h_source.html#l00060">DBUS_WATCH_READABLE</a>, <a class="el" href="dbus-connection_8h_source.html#l00061">DBUS_WATCH_WRITABLE</a>, and <a class="el" href="dbus-watch_8c_source.html#l00044">DBusWatch::flags</a>.</p>
<p>Referenced by <a class="el" href="dbus-transport_8c_source.html#l00889">_dbus_transport_handle_watch()</a>, and <a class="el" href="dbus-watch_8c_source.html#l00698">dbus_watch_handle()</a>.</p>
</div>
</div>
<a class="anchor" id="ga75620808f4d2245914012a41e3b82f3c"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_set_handler" ref="ga75620808f4d2245914012a41e3b82f3c" args="(DBusWatch *watch, DBusWatchHandler handler, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#ga75620808f4d2245914012a41e3b82f3c">_dbus_watch_set_handler</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusWatchInternals.html#gae71d41a6a6c6a3b845ccc30b09004228">DBusWatchHandler</a> </td>
<td class="paramname"><em>handler</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#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> </td>
<td class="paramname"><em>free_data_function</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets the handler for the watch. </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000069">Todo:</a></b></dt><dd>this function only exists because of the weird way connection watches are done, see the note in docs for <a class="el" href="group__DBusConnectionInternals.html#ga12756797bd5c1918aa065f9c37ed7bba" title="A callback for use with dbus_watch_new() to create a DBusWatch.">_dbus_connection_handle_watch()</a>.</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch</td><td>the watch </td></tr>
<tr><td class="paramname">handler</td><td>the new handler </td></tr>
<tr><td class="paramname">data</td><td>the data </td></tr>
<tr><td class="paramname">free_data_function</td><td>free data with this </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00491">491</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-watch_8c_source.html#l00048">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00046">DBusWatch::handler</a>, and <a class="el" href="dbus-watch_8c_source.html#l00047">DBusWatch::handler_data</a>.</p>
</div>
</div>
<a class="anchor" id="ga7d27dfc13a3ccfbaa99ceab331bb46f0"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_unref" ref="ga7d27dfc13a3ccfbaa99ceab331bb46f0" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void <a class="el" href="group__DBusWatchInternals.html#ga7d27dfc13a3ccfbaa99ceab331bb46f0">_dbus_watch_unref</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> * </td>
<td class="paramname"><em>watch</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Decrements the reference count of a <a class="el" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a> object and finalizes the object if the count reaches zero. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">watch</td><td>the watch object. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-watch_8c_source.html#l00138">138</a> of file <a class="el" href="dbus-watch_8c_source.html">dbus-watch.c</a>.</p>
<p>References <a class="el" href="dbus-internals_8c_source.html#l00230">_dbus_warn()</a>, <a class="el" href="dbus-memory_8c_source.html#l00701">dbus_free()</a>, <a class="el" href="dbus-watch_8c_source.html#l00642">dbus_watch_set_data()</a>, <a class="el" href="dbus-watch_8c_source.html#l00043">DBusWatch::fd</a>, <a class="el" href="dbus-watch_8c_source.html#l00048">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c_source.html#l00047">DBusWatch::handler_data</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c_source.html#l00042">DBusWatch::refcount</a>.</p>
<p>Referenced by <a class="el" href="dbus-spawn-win_8c_source.html#l00187">_dbus_babysitter_unref()</a>, <a class="el" href="dbus-server-socket_8c_source.html#l00280">_dbus_server_new_for_socket()</a>, <a class="el" href="dbus-spawn-win_8c_source.html#l00644">_dbus_spawn_async_with_babysitter()</a>, <a class="el" href="dbus-transport_8c_source.html#l00889">_dbus_transport_handle_watch()</a>, <a class="el" href="dbus-transport-socket_8c_source.html#l01256">_dbus_transport_new_for_socket()</a>, <a class="el" href="dbus-watch_8c_source.html#l00376">_dbus_watch_list_add_watch()</a>, <a class="el" href="dbus-watch_8c_source.html#l00249">_dbus_watch_list_free()</a>, and <a class="el" href="dbus-watch_8c_source.html#l00409">_dbus_watch_list_remove_watch()</a>.</p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:34 for D-Bus by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>