|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/devhelp/books/dbus/api/ |
Upload File : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>D-Bus: DBusWatch</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
</ul></div>
<h1>DBusWatch<br>
<small>
[<a class="el" href="group__DBus.html">D-Bus low-level public API</a>]</small>
</h1>Object representing a file descriptor to be watched.
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga5aa1734b328af3a18116d4a8a157721"></a><!-- doxytag: member="DBusWatch::DBusWatch" ref="ga5aa1734b328af3a18116d4a8a157721" args="" -->
typedef <a class="el" href="structDBusWatch.html">DBusWatch</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#ga5aa1734b328af3a18116d4a8a157721">DBusWatch</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opaque object representing a file descriptor to be watched for changes in readability, writability, or hangup. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">DBUS_DEPRECATED int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#g62d7e86fe386ed48fb90d443b3a2ce7a">dbus_watch_get_fd</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deprecated former name of <a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd()</a>. <a href="#g62d7e86fe386ed48fb90d443b3a2ce7a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a UNIX file descriptor to be watched, which may be a pipe, socket, or other type of descriptor. <a href="#g15df7f6120ead3e09bec8a70d3c43c0d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#g91308f393d41b31babda17c83833517f">dbus_watch_get_socket</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a socket to be watched, on UNIX this will return -1 if our transport is not socket-based so <a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd()</a> is preferred. <a href="#g91308f393d41b31babda17c83833517f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#gf172a2b1d1f82333e67cec8d99c9204a">dbus_watch_get_flags</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets flags from DBusWatchFlags indicating what conditions should be monitored on the file descriptor. <a href="#gf172a2b1d1f82333e67cec8d99c9204a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#g8dcdbd07f15a56207af4a36cb005da77">dbus_watch_get_data</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets data previously set with <a class="el" href="group__DBusWatch.html#g5c75a65cf0680956cc0188d86a05cfae">dbus_watch_set_data()</a> or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if none. <a href="#g8dcdbd07f15a56207af4a36cb005da77"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#g5c75a65cf0680956cc0188d86a05cfae">dbus_watch_set_data</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_function)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets data which can be retrieved with <a class="el" href="group__DBusWatch.html#g8dcdbd07f15a56207af4a36cb005da77">dbus_watch_get_data()</a>. <a href="#g5c75a65cf0680956cc0188d86a05cfae"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#gc2acdb1794450ac01a43ec4c3e07ebf7">dbus_watch_handle</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch, unsigned int flags)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Called to notify the D-Bus library when a previously-added watch is ready for reading or writing, or has an exception such as a hangup. <a href="#gc2acdb1794450ac01a43ec4c3e07ebf7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusWatch.html#ge7a91e6d4d1bc187419c47c522e33a8f">dbus_watch_get_enabled</a> (<a class="el" href="structDBusWatch.html">DBusWatch</a> *watch)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether a watch is enabled or not. <a href="#ge7a91e6d4d1bc187419c47c522e33a8f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Object representing a file descriptor to be watched.
<p>
Types and functions related to <a class="el" href="structDBusWatch.html">DBusWatch</a>. A watch represents a file descriptor that the main loop needs to monitor, as in Qt's QSocketNotifier or GLib's g_io_add_watch().<p>
Use <a class="el" href="group__DBusConnection.html#g71e9a01114fcffe86b450d9b521a4540">dbus_connection_set_watch_functions()</a> or <a class="el" href="group__DBusServer.html#g60ed22313c5fbe06c06924acd62959a2">dbus_server_set_watch_functions()</a> to be notified when libdbus needs to add or remove watches. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g8dcdbd07f15a56207af4a36cb005da77"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_data" ref="g8dcdbd07f15a56207af4a36cb005da77" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * dbus_watch_get_data </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets data previously set with <a class="el" href="group__DBusWatch.html#g5c75a65cf0680956cc0188d86a05cfae">dbus_watch_set_data()</a> or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if none.
<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>previously-set data. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00570">570</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#l00049">data</a>.
</div>
</div><p>
<a class="anchor" name="ge7a91e6d4d1bc187419c47c522e33a8f"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_enabled" ref="ge7a91e6d4d1bc187419c47c522e33a8f" args="(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_get_enabled </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether a watch is enabled or not.
<p>
If not enabled, it should not be polled by the 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>watch</em> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> if the watch is enabled </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00610">610</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-watch_8c-source.html#l00051">enabled</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
</div>
</div><p>
<a class="anchor" name="g62d7e86fe386ed48fb90d443b3a2ce7a"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_fd" ref="g62d7e86fe386ed48fb90d443b3a2ce7a" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int dbus_watch_get_fd </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Deprecated former name of <a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd()</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</em> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the file descriptor to watch. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00490">490</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#l00509">dbus_watch_get_unix_fd()</a>.
</div>
</div><p>
<a class="anchor" name="gf172a2b1d1f82333e67cec8d99c9204a"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_flags" ref="gf172a2b1d1f82333e67cec8d99c9204a" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int dbus_watch_get_flags </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets flags from DBusWatchFlags indicating what conditions should be monitored on the file descriptor.
<p>
The flags returned will only contain DBUS_WATCH_READABLE and DBUS_WATCH_WRITABLE, never DBUS_WATCH_HANGUP or DBUS_WATCH_ERROR; all watches implicitly include a watch for hangups, errors, and other exceptional conditions.<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the conditions to watch. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00555">555</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>, and <a class="el" href="dbus-watch_8c-source.html#l00043">flags</a>.
<p>
Referenced by <a class="el" href="dbus-watch_8c-source.html#l00253">_dbus_watch_list_set_functions()</a>.
</div>
</div><p>
<a class="anchor" name="g91308f393d41b31babda17c83833517f"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_socket" ref="g91308f393d41b31babda17c83833517f" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int dbus_watch_get_socket </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns a socket to be watched, on UNIX this will return -1 if our transport is not socket-based so <a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd()</a> is preferred.
<p>
On Windows, <a class="el" href="group__DBusWatch.html#g15df7f6120ead3e09bec8a70d3c43c0d">dbus_watch_get_unix_fd()</a> returns -1 but this function returns a Winsock socket (assuming the transport is socket-based, as it always is for now).<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the socket to watch. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00536">536</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">fd</a>.
<p>
Referenced by <a class="el" href="dbus-transport_8c-source.html#l00830">_dbus_transport_handle_watch()</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#l00384">_dbus_watch_list_remove_watch()</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#l00411">_dbus_watch_list_toggle_watch()</a>, and <a class="el" href="dbus-watch_8c-source.html#l00587">dbus_watch_set_data()</a>.
</div>
</div><p>
<a class="anchor" name="g15df7f6120ead3e09bec8a70d3c43c0d"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_get_unix_fd" ref="g15df7f6120ead3e09bec8a70d3c43c0d" args="(DBusWatch *watch)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int dbus_watch_get_unix_fd </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 width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns a UNIX file descriptor to be watched, which may be a pipe, socket, or other type of descriptor.
<p>
On UNIX this is preferred to <a class="el" href="group__DBusWatch.html#g91308f393d41b31babda17c83833517f">dbus_watch_get_socket()</a> since it works with more kinds of <a class="el" href="structDBusWatch.html">DBusWatch</a>.<p>
Always returns -1 on Windows. On Windows you use <a class="el" href="group__DBusWatch.html#g91308f393d41b31babda17c83833517f">dbus_watch_get_socket()</a> to get a Winsock socket to watch.<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the file descriptor to watch. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00509">509</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">fd</a>.
<p>
Referenced by <a class="el" href="dbus-watch_8c-source.html#l00490">dbus_watch_get_fd()</a>.
</div>
</div><p>
<a class="anchor" name="gc2acdb1794450ac01a43ec4c3e07ebf7"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_handle" ref="gc2acdb1794450ac01a43ec4c3e07ebf7" args="(DBusWatch *watch, unsigned int flags)" -->
<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_handle </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>flags</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Called to notify the D-Bus library when a previously-added watch is ready for reading or writing, or has an exception such as a hangup.
<p>
If this function returns <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, then the file descriptor may still be ready for reading or writing, but more memory is needed in order to do the reading or writing. If you ignore the <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> return, your application may spin in a busy loop on the file descriptor until memory becomes available, but nothing more catastrophic should happen.<p>
<a class="el" href="group__DBusWatch.html#gc2acdb1794450ac01a43ec4c3e07ebf7">dbus_watch_handle()</a> cannot be called during the DBusAddWatchFunction, as the connection will not be ready to handle that watch yet.<p>
It is not allowed to reference a <a class="el" href="structDBusWatch.html">DBusWatch</a> after it has been passed to remove_function.<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>flags</em> </td><td>the poll condition using <a class="el" href="group__DBusConnection.html#g0556779e61aeb19eb9cf6b6466bd1b98">DBusWatchFlags</a> values </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a> if there wasn't enough memory </dd></dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00640">640</a> of file <a class="el" href="dbus-watch_8c-source.html">dbus-watch.c</a>.
<p>
References <a class="el" href="dbus-internals_8c-source.html#l00266">_dbus_warn_check_failed()</a>, <a class="el" href="dbus-watch_8c-source.html#l00161">_dbus_watch_sanitize_condition()</a>, <a class="el" href="dbus-watch_8c-source.html#l00042">fd</a>, <a class="el" href="dbus-watch_8c-source.html#l00043">flags</a>, <a class="el" href="dbus-watch_8c-source.html#l00045">handler</a>, <a class="el" href="dbus-watch_8c-source.html#l00046">handler_data</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
</div>
</div><p>
<a class="anchor" name="g5c75a65cf0680956cc0188d86a05cfae"></a><!-- doxytag: member="dbus-connection.h::dbus_watch_set_data" ref="g5c75a65cf0680956cc0188d86a05cfae" args="(DBusWatch *watch, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_watch_set_data </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">void * </td>
<td class="paramname"> <em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> </td>
<td class="paramname"> <em>free_data_function</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Sets data which can be retrieved with <a class="el" href="group__DBusWatch.html#g8dcdbd07f15a56207af4a36cb005da77">dbus_watch_get_data()</a>.
<p>
Intended for use by the DBusAddWatchFunction and DBusRemoveWatchFunction to store their own data. For example with Qt you might store the QSocketNotifier for this watch and with GLib you might store a GSource.<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> </td><td>the <a class="el" href="structDBusWatch.html">DBusWatch</a> object. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>data</em> </td><td>the data. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>free_data_function</em> </td><td>function to be called to free the data. </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="dbus-watch_8c-source.html#l00587">587</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>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
<p>
Referenced by <a class="el" href="dbus-watch_8c-source.html#l00117">_dbus_watch_unref()</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
<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>