KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
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 :  /proc/21573/root/usr/share/devhelp/books/dbus/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/share/devhelp/books/dbus/api/group__DBusWatchInternals.html
<!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: DBusWatch implementation details</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&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>DBusWatch implementation details<br>
<small>
[<a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a>]</small>
</h1>implementation details for <a class="el" href="structDBusWatch.html">DBusWatch</a>  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusWatch.html">DBusWatch</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Implementation of <a class="el" href="structDBusWatch.html">DBusWatch</a>.  <a href="structDBusWatch.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusWatchList.html">DBusWatchList</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> implementation details.  <a href="structDBusWatchList.html#_details">More...</a><br></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="structDBusWatchList.html">DBusWatchList</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gfc9f312d7d92039a381a753b7e024391">DBusWatchList</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opaque data type representing a list of watches and a set of DBusAddWatchFunction/DBusRemoveWatchFunction.  <a href="#gfc9f312d7d92039a381a753b7e024391"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gcc4276cd0b01ed7c011658f164ce575a"></a><!-- doxytag: member="DBusWatchInternals::DBusWatchHandler" ref="gcc4276cd0b01ed7c011658f164ce575a" args="(DBusWatch *watch, unsigned int flags, void *data)" -->
typedef <a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>(*)&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gcc4276cd0b01ed7c011658f164ce575a">DBusWatchHandler</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int flags, void *data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">function to run when the watch is handled <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="structDBusWatch.html">DBusWatch</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g1f940e505b20e6429ae858a7b70b0541">_dbus_watch_new</a> (int fd, unsigned int flags, <a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> enabled, <a class="el" href="group__DBusWatchInternals.html#gcc4276cd0b01ed7c011658f164ce575a">DBusWatchHandler</a> handler, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <a class="el" href="structDBusWatch.html">DBusWatch</a>.  <a href="#g1f940e505b20e6429ae858a7b70b0541"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g0db8530cc53589589d67dfb35d03db61">_dbus_watch_ref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Increments the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object.  <a href="#g0db8530cc53589589d67dfb35d03db61"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g7d27dfc13a3ccfbaa99ceab331bb46f0">_dbus_watch_unref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decrements the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object and finalizes the object if the count reaches zero.  <a href="#g7d27dfc13a3ccfbaa99ceab331bb46f0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gd8521d64123c1d1ae9a094bac8addd31">_dbus_watch_invalidate</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clears the file descriptor from a now-invalid watch object so that no one tries to use it.  <a href="#gd8521d64123c1d1ae9a094bac8addd31"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gb8f49926fe9ee56cb4ae7c1c8071cca3">_dbus_watch_sanitize_condition</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int *condition)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sanitizes the given condition so that it only contains flags that the <a class="el" href="structDBusWatch.html">DBusWatch</a> requested.  <a href="#gb8f49926fe9ee56cb4ae7c1c8071cca3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g5d9db5d0af5916a5ec890eb38d5741eb">_dbus_watch_list_new</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new watch list.  <a href="#g5d9db5d0af5916a5ec890eb38d5741eb"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gc3f75c0da2c8c51e8708f45dd27f9e2d">_dbus_watch_list_free</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees a <a class="el" href="structDBusWatchList.html">DBusWatchList</a>.  <a href="#gc3f75c0da2c8c51e8708f45dd27f9e2d"></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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#ge9ab8cf14f4191191e94183be9a031d9">_dbus_watch_list_set_functions</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, <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">&nbsp;</td><td class="mdescRight">Sets the watch functions.  <a href="#ge9ab8cf14f4191191e94183be9a031d9"></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>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#gec61655a4bd6186a6a1ec104771d8af5">_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">&nbsp;</td><td class="mdescRight">Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate.  <a href="#gec61655a4bd6186a6a1ec104771d8af5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g76894d297bc7d7d23cbacdc2b1778884">_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">&nbsp;</td><td class="mdescRight">Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate.  <a href="#g76894d297bc7d7d23cbacdc2b1778884"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g14bb50e8663a1d9d3960b4f73c09c097">_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#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> enabled)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets a watch to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate.  <a href="#g14bb50e8663a1d9d3960b4f73c09c097"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatchInternals.html#g75620808f4d2245914012a41e3b82f3c">_dbus_watch_set_handler</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, <a class="el" href="group__DBusWatchInternals.html#gcc4276cd0b01ed7c011658f164ce575a">DBusWatchHandler</a> handler, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the handler for the watch.  <a href="#g75620808f4d2245914012a41e3b82f3c"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
implementation details for <a class="el" href="structDBusWatch.html">DBusWatch</a> 
<p>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="gfc9f312d7d92039a381a753b7e024391"></a><!-- doxytag: member="dbus-watch.h::DBusWatchList" ref="gfc9f312d7d92039a381a753b7e024391" 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>
Automatically handles removing/re-adding watches when the DBusAddWatchFunction is updated or changed. Holds a reference count to each watch.<p>
Used in the implementation of both <a class="el" href="structDBusServer.html">DBusServer</a> and DBusClient. 
<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>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="gd8521d64123c1d1ae9a094bac8addd31"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_invalidate" ref="gd8521d64123c1d1ae9a094bac8addd31" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_invalidate           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="paramname"> <em>watch</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></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>
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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>watch</em>&nbsp;</td><td>the watch object. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00145">145</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-watch_8c-source.html#l00042">DBusWatch::fd</a>, and <a class="el" href="dbus-watch_8c-source.html#l00043">DBusWatch::flags</a>.
<p>
Referenced by <a class="el" href="dbus-spawn_8c-source.html#l00264">_dbus_babysitter_unref()</a>.
</div>
</div><p>
<a class="anchor" name="gec61655a4bd6186a6a1ec104771d8af5"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_add_watch" ref="gec61655a4bd6186a6a1ec104771d8af5" 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#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> _dbus_watch_list_add_watch           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>watch</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate. 
<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>watch_list</em>&nbsp;</td><td>the watch list. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>watch</em>&nbsp;</td><td>the watch to add. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> on success, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> if no memory. </dd></dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00351">351</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-list_8c-source.html#l00246">_dbus_list_append()</a>, <a class="el" href="dbus-list_8c-source.html#l00453">_dbus_list_remove_last()</a>, <a class="el" href="dbus-watch_8c-source.html#l00103">_dbus_watch_ref()</a>, <a class="el" href="dbus-watch_8c-source.html#l00117">_dbus_watch_unref()</a>, <a class="el" href="dbus-watch_8c-source.html#l00194">DBusWatchList::add_watch_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00536">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="dbus-watch_8c-source.html#l00197">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c-source.html#l00192">DBusWatchList::watches</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l00702">_dbus_connection_add_watch_unlocked()</a>, <a class="el" href="dbus-server_8c-source.html#l00263">_dbus_server_add_watch()</a>, and <a class="el" href="dbus-spawn_8c-source.html#l01061">_dbus_spawn_async_with_babysitter()</a>.
</div>
</div><p>
<a class="anchor" name="gc3f75c0da2c8c51e8708f45dd27f9e2d"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_free" ref="gc3f75c0da2c8c51e8708f45dd27f9e2d" args="(DBusWatchList *watch_list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_list_free           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="paramname"> <em>watch_list</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Frees a <a class="el" href="structDBusWatchList.html">DBusWatchList</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>watch_list</em>&nbsp;</td><td>the watch list. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00225">225</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-list_8c-source.html#l00549">_dbus_list_clear()</a>, <a class="el" href="dbus-list_8c-source.html#l00789">_dbus_list_foreach()</a>, <a class="el" href="dbus-watch_8c-source.html#l00253">_dbus_watch_list_set_functions()</a>, <a class="el" href="dbus-watch_8c-source.html#l00117">_dbus_watch_unref()</a>, <a class="el" href="dbus-memory_8c-source.html#l00617">dbus_free()</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c-source.html#l00192">DBusWatchList::watches</a>.
<p>
Referenced by <a class="el" href="dbus-spawn_8c-source.html#l00264">_dbus_babysitter_unref()</a>, <a class="el" href="dbus-connection_8c-source.html#l01163">_dbus_connection_new_for_transport()</a>, <a class="el" href="dbus-server_8c-source.html#l00168">_dbus_server_finalize_base()</a>, and <a class="el" href="dbus-server_8c-source.html#l00096">_dbus_server_init_base()</a>.
</div>
</div><p>
<a class="anchor" name="g5d9db5d0af5916a5ec890eb38d5741eb"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_new" ref="g5d9db5d0af5916a5ec890eb38d5741eb" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> * _dbus_watch_list_new           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a new watch list. 
<p>
Returns <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if insufficient memory exists.<p>
<dl compact><dt><b>Returns:</b></dt><dd>the new watch list, or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> on failure. </dd></dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00208">208</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-memory_8h-source.html#l00047">dbus_new0</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l01163">_dbus_connection_new_for_transport()</a>, and <a class="el" href="dbus-server_8c-source.html#l00096">_dbus_server_init_base()</a>.
</div>
</div><p>
<a class="anchor" name="g76894d297bc7d7d23cbacdc2b1778884"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_remove_watch" ref="g76894d297bc7d7d23cbacdc2b1778884" args="(DBusWatchList *watch_list, DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_list_remove_watch           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</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> *&nbsp;</td>
          <td class="paramname"> <em>watch</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate. 
<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>watch_list</em>&nbsp;</td><td>the watch list. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>watch</em>&nbsp;</td><td>the watch to remove. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00384">384</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00121">_dbus_assert_not_reached</a>, <a class="el" href="dbus-list_8c-source.html#l00422">_dbus_list_remove()</a>, <a class="el" href="dbus-watch_8c-source.html#l00117">_dbus_watch_unref()</a>, <a class="el" href="dbus-watch_8c-source.html#l00536">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c-source.html#l00195">DBusWatchList::remove_watch_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00197">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c-source.html#l00192">DBusWatchList::watches</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l00720">_dbus_connection_remove_watch_unlocked()</a>, and <a class="el" href="dbus-server_8c-source.html#l00279">_dbus_server_remove_watch()</a>.
</div>
</div><p>
<a class="anchor" name="ge9ab8cf14f4191191e94183be9a031d9"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_set_functions" ref="ge9ab8cf14f4191191e94183be9a031d9" 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#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> _dbus_watch_list_set_functions           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</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#g985b712fc165afa66e5901859b68b9de">DBusAddWatchFunction</a>&nbsp;</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>&nbsp;</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>&nbsp;</td>
          <td class="paramname"> <em>toggled_function</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</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>&nbsp;</td>
          <td class="paramname"> <em>free_data_function</em></td><td>&nbsp;</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. 
<p>
This function is the "backend" for <a class="el" href="group__DBusConnection.html#g71e9a01114fcffe86b450d9b521a4540">dbus_connection_set_watch_functions()</a> and <a class="el" href="group__DBusServer.html#g60ed22313c5fbe06c06924acd62959a2">dbus_server_set_watch_functions()</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>watch_list</em>&nbsp;</td><td>the watch list. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>add_function</em>&nbsp;</td><td>the add watch function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>remove_function</em>&nbsp;</td><td>the remove watch function. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>toggled_function</em>&nbsp;</td><td>function on toggling enabled flag, or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>the data for those functions. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>free_data_function</em>&nbsp;</td><td>the function 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> if not enough memory </dd></dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00253">253</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-list_8c-source.html#l00789">_dbus_list_foreach()</a>, <a class="el" href="dbus-list_8c-source.html#l00574">_dbus_list_get_first_link()</a>, <a class="el" href="dbus-list_8h-source.html#l00093">_dbus_list_get_next_link</a>, <a class="el" href="dbus-watch_8c-source.html#l00194">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#l00555">dbus_watch_get_flags()</a>, <a class="el" href="dbus-watch_8c-source.html#l00536">dbus_watch_get_socket()</a>, <a class="el" href="group__DBusConnection.html#gg0556779e61aeb19eb9cf6b6466bd1b98178bd7a88e9bfbb8505db76eb7e0ccc4">DBUS_WATCH_READABLE</a>, <a class="el" href="group__DBusConnection.html#gg0556779e61aeb19eb9cf6b6466bd1b9862ddca29b06bfbbc08bb7f3dfd3d307f">DBUS_WATCH_WRITABLE</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c-source.html#l00195">DBusWatchList::remove_watch_function</a>, <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>, <a class="el" href="dbus-watch_8c-source.html#l00197">DBusWatchList::watch_data</a>, <a class="el" href="dbus-watch_8c-source.html#l00198">DBusWatchList::watch_free_data_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00196">DBusWatchList::watch_toggled_function</a>, and <a class="el" href="dbus-watch_8c-source.html#l00192">DBusWatchList::watches</a>.
<p>
Referenced by <a class="el" href="dbus-spawn_8c-source.html#l00721">_dbus_babysitter_set_watch_functions()</a>, <a class="el" href="dbus-watch_8c-source.html#l00225">_dbus_watch_list_free()</a>, <a class="el" href="dbus-connection_8c-source.html#l04567">dbus_connection_set_watch_functions()</a>, and <a class="el" href="dbus-server_8c-source.html#l00899">dbus_server_set_watch_functions()</a>.
</div>
</div><p>
<a class="anchor" name="g14bb50e8663a1d9d3960b4f73c09c097"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_list_toggle_watch" ref="g14bb50e8663a1d9d3960b4f73c09c097" args="(DBusWatchList *watch_list, DBusWatch *watch, dbus_bool_t enabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_list_toggle_watch           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</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> *&nbsp;</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#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&nbsp;</td>
          <td class="paramname"> <em>enabled</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>watch_list</em>&nbsp;</td><td>the watch list. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>watch</em>&nbsp;</td><td>the watch to toggle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>enabled</em>&nbsp;</td><td><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> to enable </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00411">411</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-watch_8c-source.html#l00536">dbus_watch_get_socket()</a>, <a class="el" href="dbus-watch_8c-source.html#l00051">DBusWatch::enabled</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-watch_8c-source.html#l00197">DBusWatchList::watch_data</a>, and <a class="el" href="dbus-watch_8c-source.html#l00196">DBusWatchList::watch_toggled_function</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l00740">_dbus_connection_toggle_watch_unlocked()</a>, and <a class="el" href="dbus-server_8c-source.html#l00299">_dbus_server_toggle_watch()</a>.
</div>
</div><p>
<a class="anchor" name="g1f940e505b20e6429ae858a7b70b0541"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_new" ref="g1f940e505b20e6429ae858a7b70b0541" 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> * _dbus_watch_new           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&nbsp;</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#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&nbsp;</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#gcc4276cd0b01ed7c011658f164ce575a">DBusWatchHandler</a>&nbsp;</td>
          <td class="paramname"> <em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</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>&nbsp;</td>
          <td class="paramname"> <em>free_data_function</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a new <a class="el" href="structDBusWatch.html">DBusWatch</a>. 
<p>
Used to add a file descriptor to be polled by a main loop.<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>fd</em>&nbsp;</td><td>the file descriptor to be watched. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flags</em>&nbsp;</td><td>the conditions to watch for on the descriptor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>enabled</em>&nbsp;</td><td>the initial enabled state </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handler</em>&nbsp;</td><td>the handler function </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>data for handler function </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>free_data_function</em>&nbsp;</td><td>function to free the data </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the new <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </dd></dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00067">67</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-memory_8h-source.html#l00047">dbus_new0</a>, <a class="el" href="dbus-watch_8c-source.html#l00051">DBusWatch::enabled</a>, <a class="el" href="dbus-watch_8c-source.html#l00042">DBusWatch::fd</a>, <a class="el" href="dbus-watch_8c-source.html#l00043">DBusWatch::flags</a>, <a class="el" href="dbus-watch_8c-source.html#l00047">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00045">DBusWatch::handler</a>, <a class="el" href="dbus-watch_8c-source.html#l00046">DBusWatch::handler_data</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c-source.html#l00041">DBusWatch::refcount</a>.
<p>
Referenced by <a class="el" href="dbus-server-socket_8c-source.html#l00266">_dbus_server_new_for_socket()</a>, <a class="el" href="dbus-spawn_8c-source.html#l01061">_dbus_spawn_async_with_babysitter()</a>, and <a class="el" href="dbus-transport-socket_8c-source.html#l01148">_dbus_transport_new_for_socket()</a>.
</div>
</div><p>
<a class="anchor" name="g0db8530cc53589589d67dfb35d03db61"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_ref" ref="g0db8530cc53589589d67dfb35d03db61" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structDBusWatch.html">DBusWatch</a> * _dbus_watch_ref           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="paramname"> <em>watch</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Increments the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object. 
<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>watch</em>&nbsp;</td><td>the watch object. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the watch object. </dd></dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00103">103</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-watch_8c-source.html#l00041">DBusWatch::refcount</a>.
<p>
Referenced by <a class="el" href="dbus-transport_8c-source.html#l00830">_dbus_transport_handle_watch()</a>, and <a class="el" href="dbus-watch_8c-source.html#l00351">_dbus_watch_list_add_watch()</a>.
</div>
</div><p>
<a class="anchor" name="gb8f49926fe9ee56cb4ae7c1c8071cca3"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_sanitize_condition" ref="gb8f49926fe9ee56cb4ae7c1c8071cca3" args="(DBusWatch *watch, unsigned int *condition)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_sanitize_condition           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="paramname"> <em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&nbsp;</td>
          <td class="paramname"> <em>condition</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></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">DBusWatch</a> requested. 
<p>
e.g. if the watch is a DBUS_WATCH_READABLE watch then DBUS_WATCH_WRITABLE will be stripped from the condition.<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>watch</em>&nbsp;</td><td>the watch object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>condition</em>&nbsp;</td><td>address of the condition to sanitize. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00161">161</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="group__DBusConnection.html#gg0556779e61aeb19eb9cf6b6466bd1b98178bd7a88e9bfbb8505db76eb7e0ccc4">DBUS_WATCH_READABLE</a>, <a class="el" href="group__DBusConnection.html#gg0556779e61aeb19eb9cf6b6466bd1b9862ddca29b06bfbbc08bb7f3dfd3d307f">DBUS_WATCH_WRITABLE</a>, and <a class="el" href="dbus-watch_8c-source.html#l00043">DBusWatch::flags</a>.
<p>
Referenced by <a class="el" href="dbus-transport_8c-source.html#l00830">_dbus_transport_handle_watch()</a>, and <a class="el" href="dbus-watch_8c-source.html#l00640">dbus_watch_handle()</a>.
</div>
</div><p>
<a class="anchor" name="g75620808f4d2245914012a41e3b82f3c"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_set_handler" ref="g75620808f4d2245914012a41e3b82f3c" 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 _dbus_watch_set_handler           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</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#gcc4276cd0b01ed7c011658f164ce575a">DBusWatchHandler</a>&nbsp;</td>
          <td class="paramname"> <em>handler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</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>&nbsp;</td>
          <td class="paramname"> <em>free_data_function</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the handler for the watch. 
<p>
<dl compact><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#g12756797bd5c1918aa065f9c37ed7bba">_dbus_connection_handle_watch()</a>.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>watch</em>&nbsp;</td><td>the watch </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>handler</em>&nbsp;</td><td>the new handler </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>the data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>free_data_function</em>&nbsp;</td><td>free data with this </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00445">445</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-watch_8c-source.html#l00047">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00045">DBusWatch::handler</a>, and <a class="el" href="dbus-watch_8c-source.html#l00046">DBusWatch::handler_data</a>.
</div>
</div><p>
<a class="anchor" name="g7d27dfc13a3ccfbaa99ceab331bb46f0"></a><!-- doxytag: member="dbus-watch.c::_dbus_watch_unref" ref="g7d27dfc13a3ccfbaa99ceab331bb46f0" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_watch_unref           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="paramname"> <em>watch</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Decrements the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object and finalizes the object if the count 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>watch</em>&nbsp;</td><td>the watch object. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00117">117</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-memory_8c-source.html#l00617">dbus_free()</a>, <a class="el" href="dbus-watch_8c-source.html#l00587">dbus_watch_set_data()</a>, <a class="el" href="dbus-watch_8c-source.html#l00047">DBusWatch::free_handler_data_function</a>, <a class="el" href="dbus-watch_8c-source.html#l00046">DBusWatch::handler_data</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-watch_8c-source.html#l00041">DBusWatch::refcount</a>.
<p>
Referenced by <a class="el" href="dbus-spawn_8c-source.html#l00264">_dbus_babysitter_unref()</a>, <a class="el" href="dbus-transport_8c-source.html#l00830">_dbus_transport_handle_watch()</a>, <a class="el" href="dbus-transport-socket_8c-source.html#l01148">_dbus_transport_new_for_socket()</a>, <a class="el" href="dbus-watch_8c-source.html#l00351">_dbus_watch_list_add_watch()</a>, <a class="el" href="dbus-watch_8c-source.html#l00225">_dbus_watch_list_free()</a>, and <a class="el" href="dbus-watch_8c-source.html#l00384">_dbus_watch_list_remove_watch()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:15 2009 for D-Bus by&nbsp;
<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>

Anon7 - 2021