Sophie

Sophie

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

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>DBusWatch implementation details</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.15 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>DBusWatch implementation details<br>
<small>
[<a class="el" href="group__DBusInternals.html">D-BUS 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 colspan=2><br><h2>Data Structures</h2></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structDBusWatch.html">DBusWatch</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Implementation of DBusWatch.</em> <a href="structDBusWatch.html#_details">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>struct &nbsp;</td><td valign=bottom><a class="el" href="structDBusWatchList.html">DBusWatchList</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>DBusWatchList implementation details.</em> <a href="structDBusWatchList.html#_details">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Typedefs</h2></td></tr>
<tr><td nowrap align=right valign=top>typedef DBusWatchList&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a12">DBusWatchList</a></td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Opaque data type representing a list of watches and a set of DBusAddWatchFunction/DBusRemoveWatchFunction.</em> <a href="#a12">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a0">_dbus_watch_new</a> (int fd, unsigned int flags, <a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a> enabled, DBusWatchHandler handler, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new <a class="el" href="structDBusWatch.html">DBusWatch</a>.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a1">_dbus_watch_ref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Increments the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a2">_dbus_watch_unref</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decrements the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object and finalizes the object if the count reaches zero.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a3">_dbus_watch_invalidate</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Clears the file descriptor from a now-invalid watch object so that no one tries to use it.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a4">_dbus_watch_sanitize_condition</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int *condition)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sanitizes the given condition so that it only contains flags that the <a class="el" href="structDBusWatch.html">DBusWatch</a> requested.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a5">_dbus_watch_list_new</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Creates a new watch list.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a6">_dbus_watch_list_free</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Frees a <a class="el" href="structDBusWatchList.html">DBusWatchList</a>.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a7">_dbus_watch_list_set_functions</a> (<a class="el" href="structDBusWatchList.html">DBusWatchList</a> *watch_list, DBusAddWatchFunction add_function, DBusRemoveWatchFunction remove_function, DBusWatchToggledFunction toggled_function, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the watch functions.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a8">_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>&nbsp;</td><td><font size=-1><em>Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a9">_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>&nbsp;</td><td><font size=-1><em>Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate.</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a10">_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#a2">dbus_bool_t</a> enabled)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets a watch to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate.</em> <a href="#a10">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="group__DBusWatchInternals.html#a11">_dbus_watch_set_handler</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, DBusWatchHandler handler, void *data, <a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Sets the handler for the watch.</em> <a href="#a11">More...</a><em></em></font><br><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>

<p>
 <hr><h2>Typedef Documentation</h2>
<a name="a12" doxytag="dbus-watch.h::DBusWatchList"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> DBusWatchList
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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#l00033">33</a> of file <a class="el" href="dbus-watch_8h-source.html">dbus-watch.h</a>.    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a3" doxytag="dbus-watch.c::_dbus_watch_invalidate"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_invalidate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>watch</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
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).<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><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>.    </td>
  </tr>
</table>
<a name="a8" doxytag="dbus-watch.c::_dbus_watch_list_add_watch"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a> _dbus_watch_list_add_watch </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch_list</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Adds a new watch to the watch list, invoking the application DBusAddWatchFunction if appropriate.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch_list</em>&nbsp;</td><td>
the watch list. </td></tr>
<tr><td valign=top><em>watch</em>&nbsp;</td><td>
the watch to add. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
<a class="el" href="group__DBusMacros.html#a2">TRUE</a> on success, <a class="el" href="group__DBusMacros.html#a3">FALSE</a> if no memory. </dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00332">332</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#l00194">DBusWatchList::add_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>.    </td>
  </tr>
</table>
<a name="a6" doxytag="dbus-watch.c::_dbus_watch_list_free"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_list_free </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>watch_list</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Frees a <a class="el" href="structDBusWatchList.html">DBusWatchList</a>.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><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-watch_8c-source.html#l00192">DBusWatchList::watches</a>.    </td>
  </tr>
</table>
<a name="a5" doxytag="dbus-watch.c::_dbus_watch_list_new"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="structDBusWatchList.html">DBusWatchList</a>* _dbus_watch_list_new </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">void&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Creates a new watch list.
<p>
Returns <a class="el" href="group__DBusMacros.html#a4">NULL</a> if insufficient memory exists.
<p>
<dl compact><dt><b>
Returns: </b><dd>
the new watch list, or <a class="el" href="group__DBusMacros.html#a4">NULL</a> on failure. </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>.    </td>
  </tr>
</table>
<a name="a9" doxytag="dbus-watch.c::_dbus_watch_list_remove_watch"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_list_remove_watch </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch_list</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Removes a watch from the watch list, invoking the application's DBusRemoveWatchFunction if appropriate.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch_list</em>&nbsp;</td><td>
the watch list. </td></tr>
<tr><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#l00365">365</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#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>.    </td>
  </tr>
</table>
<a name="a7" doxytag="dbus-watch.c::_dbus_watch_list_set_functions"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a> _dbus_watch_list_set_functions </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch_list</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusAddWatchFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>add_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusRemoveWatchFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>remove_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusWatchToggledFunction&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>toggled_function</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>data</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>free_data_function</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the watch functions.
<p>
This function is the "backend" for <a class="el" href="group__DBusConnection.html#a36">dbus_connection_set_watch_functions</a>() and <a class="el" href="group__DBusServer.html#a8">dbus_server_set_watch_functions</a>().<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch_list</em>&nbsp;</td><td>
the watch list. </td></tr>
<tr><td valign=top><em>add_function</em>&nbsp;</td><td>
the add watch function. </td></tr>
<tr><td valign=top><em>remove_function</em>&nbsp;</td><td>
the remove watch function. </td></tr>
<tr><td valign=top><em>toggled_function</em>&nbsp;</td><td>
function on toggling enabled flag, or <a class="el" href="group__DBusMacros.html#a4">NULL</a> </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
the data for those functions. </td></tr>
<tr><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><dd>
<a class="el" href="group__DBusMacros.html#a3">FALSE</a> if not enough memory </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-watch_8c-source.html#l00194">DBusWatchList::add_watch_function</a>, <a class="el" href="dbus-list_8h-source.html#l00039">DBusList::data</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>, <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>.    </td>
  </tr>
</table>
<a name="a10" doxytag="dbus-watch.c::_dbus_watch_list_toggle_watch"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_list_toggle_watch </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatchList.html">DBusWatchList</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch_list</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>enabled</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets a watch to the given enabled state, invoking the application's DBusWatchToggledFunction if appropriate.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch_list</em>&nbsp;</td><td>
the watch list. </td></tr>
<tr><td valign=top><em>watch</em>&nbsp;</td><td>
the watch to toggle. </td></tr>
<tr><td valign=top><em>enabled</em>&nbsp;</td><td>
<a class="el" href="group__DBusMacros.html#a2">TRUE</a> to enable </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00392">392</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#l00051">DBusWatch::enabled</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>.    </td>
  </tr>
</table>
<a name="a0" doxytag="dbus-watch.c::_dbus_watch_new"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="structDBusWatch.html">DBusWatch</a>* _dbus_watch_new </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>fd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned int&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>flags</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__DBusTypes.html#a2">dbus_bool_t</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>enabled</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusWatchHandler&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>data</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>free_data_function</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
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.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>fd</em>&nbsp;</td><td>
the file descriptor to be watched. </td></tr>
<tr><td valign=top><em>flags</em>&nbsp;</td><td>
the conditions to watch for on the descriptor. </td></tr>
<tr><td valign=top><em>enabled</em>&nbsp;</td><td>
the initial enabled state </td></tr>
<tr><td valign=top><em>handler</em>&nbsp;</td><td>
the handler function </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
data for handler function </td></tr>
<tr><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><dd>
the new <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </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-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>, and <a class="el" href="dbus-watch_8c-source.html#l00041">DBusWatch::refcount</a>.    </td>
  </tr>
</table>
<a name="a1" doxytag="dbus-watch.c::_dbus_watch_ref"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="structDBusWatch.html">DBusWatch</a>* _dbus_watch_ref </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>watch</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Increments the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch</em>&nbsp;</td><td>
the watch object. </td></tr>
</table>
</dl><dl compact><dt><b>
Returns: </b><dd>
the watch object. </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>.    </td>
  </tr>
</table>
<a name="a4" doxytag="dbus-watch.c::_dbus_watch_sanitize_condition"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_sanitize_condition </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>unsigned int *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>condition</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
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.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch</em>&nbsp;</td><td>
the watch object. </td></tr>
<tr><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="dbus-watch_8c-source.html#l00043">DBusWatch::flags</a>.    </td>
  </tr>
</table>
<a name="a11" doxytag="dbus-watch.c::_dbus_watch_set_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_set_handler </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>watch</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>DBusWatchHandler&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>data</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__DBusMemory.html#a8">DBusFreeFunction</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>free_data_function</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sets the handler for the watch.
<p>

<p>
<dl compact><dt><b>
<a class="el" href="todo.html#_todo000073">Todo: </a></b><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#a35">_dbus_connection_handle_watch</a>().</dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>watch</em>&nbsp;</td><td>
the watch </td></tr>
<tr><td valign=top><em>handler</em>&nbsp;</td><td>
the new handler </td></tr>
<tr><td valign=top><em>data</em>&nbsp;</td><td>
the data </td></tr>
<tr><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#l00426">426</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>.    </td>
  </tr>
</table>
<a name="a2" doxytag="dbus-watch.c::_dbus_watch_unref"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void _dbus_watch_unref </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structDBusWatch.html">DBusWatch</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>watch</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Decrements the reference count of a <a class="el" href="structDBusWatch.html">DBusWatch</a> object and finalizes the object if the count reaches zero.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><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-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>, and <a class="el" href="dbus-watch_8c-source.html#l00041">DBusWatch::refcount</a>.    </td>
  </tr>
</table>
<hr><address align="right"><small>Generated on Wed Jun 9 05:01:28 2004 for D-BUS by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>