|
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: DBusTimeout</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>DBusTimeout<br>
<small>
[<a class="el" href="group__DBus.html">D-Bus low-level public API</a>]</small>
</h1>Object representing a timeout.
<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="g6f0a4887747250a5fc9daeeb32b2d6af"></a><!-- doxytag: member="DBusTimeout::DBusTimeout" ref="g6f0a4887747250a5fc9daeeb32b2d6af" args="" -->
typedef <a class="el" href="structDBusTimeout.html">DBusTimeout</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusTimeout.html#g6f0a4887747250a5fc9daeeb32b2d6af">DBusTimeout</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opaque object representing a timeout. <br></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusTimeout.html#g67ba21b6189438875c6007ee79da5e37">dbus_timeout_get_interval</a> (<a class="el" href="structDBusTimeout.html">DBusTimeout</a> *timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the timeout interval. <a href="#g67ba21b6189438875c6007ee79da5e37"></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__DBusTimeout.html#g7c561ec66daa2f53a274485f10c827c7">dbus_timeout_get_data</a> (<a class="el" href="structDBusTimeout.html">DBusTimeout</a> *timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets data previously set with <a class="el" href="group__DBusTimeout.html#g88712006f7772174504a0fba0a0ddd60">dbus_timeout_set_data()</a> or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if none. <a href="#g7c561ec66daa2f53a274485f10c827c7"></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__DBusTimeout.html#g88712006f7772174504a0fba0a0ddd60">dbus_timeout_set_data</a> (<a class="el" href="structDBusTimeout.html">DBusTimeout</a> *timeout, 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__DBusTimeout.html#g7c561ec66daa2f53a274485f10c827c7">dbus_timeout_get_data()</a>. <a href="#g88712006f7772174504a0fba0a0ddd60"></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__DBusTimeout.html#g038b67c8d3db2624a1e4a8bc45f25d12">dbus_timeout_handle</a> (<a class="el" href="structDBusTimeout.html">DBusTimeout</a> *timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Calls the timeout handler for this timeout. <a href="#g038b67c8d3db2624a1e4a8bc45f25d12"></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__DBusTimeout.html#g58954b2edb45ec1632529d35525ea45c">dbus_timeout_get_enabled</a> (<a class="el" href="structDBusTimeout.html">DBusTimeout</a> *timeout)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns whether a timeout is enabled or not. <a href="#g58954b2edb45ec1632529d35525ea45c"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Object representing a timeout.
<p>
Types and functions related to <a class="el" href="structDBusTimeout.html">DBusTimeout</a>. A timeout represents a timeout that the main loop needs to monitor, as in Qt's QTimer or GLib's g_timeout_add().<p>
Use <a class="el" href="group__DBusConnection.html#g1e827990ea677cbe69ead0b3ccc4b91c">dbus_connection_set_timeout_functions()</a> or <a class="el" href="group__DBusServer.html#gb5767a964cd2049c985434ad64ae1169">dbus_server_set_timeout_functions()</a> to be notified when libdbus needs to add or remove timeouts. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g7c561ec66daa2f53a274485f10c827c7"></a><!-- doxytag: member="dbus-connection.h::dbus_timeout_get_data" ref="g7c561ec66daa2f53a274485f10c827c7" args="(DBusTimeout *timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void * dbus_timeout_get_data </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusTimeout.html">DBusTimeout</a> * </td>
<td class="paramname"> <em>timeout</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__DBusTimeout.html#g88712006f7772174504a0fba0a0ddd60">dbus_timeout_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>timeout</em> </td><td>the <a class="el" href="structDBusTimeout.html">DBusTimeout</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-timeout_8c-source.html#l00428">428</a> of file <a class="el" href="dbus-timeout_8c-source.html">dbus-timeout.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00048">data</a>.
</div>
</div><p>
<a class="anchor" name="g58954b2edb45ec1632529d35525ea45c"></a><!-- doxytag: member="dbus-connection.h::dbus_timeout_get_enabled" ref="g58954b2edb45ec1632529d35525ea45c" args="(DBusTimeout *timeout)" -->
<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_timeout_get_enabled </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusTimeout.html">DBusTimeout</a> * </td>
<td class="paramname"> <em>timeout</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Returns whether a timeout 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>timeout</em> </td><td>the <a class="el" href="structDBusTimeout.html">DBusTimeout</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 timeout is enabled </dd></dl>
<p>
Definition at line <a class="el" href="dbus-timeout_8c-source.html#l00485">485</a> of file <a class="el" href="dbus-timeout_8c-source.html">dbus-timeout.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00050">enabled</a>.
</div>
</div><p>
<a class="anchor" name="g67ba21b6189438875c6007ee79da5e37"></a><!-- doxytag: member="dbus-connection.h::dbus_timeout_get_interval" ref="g67ba21b6189438875c6007ee79da5e37" args="(DBusTimeout *timeout)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int dbus_timeout_get_interval </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusTimeout.html">DBusTimeout</a> * </td>
<td class="paramname"> <em>timeout</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Gets the timeout interval.
<p>
The <a class="el" href="group__DBusTimeout.html#g038b67c8d3db2624a1e4a8bc45f25d12">dbus_timeout_handle()</a> should be called each time this interval elapses, starting after it elapses once.<p>
The interval may change during the life of the timeout; if so, the timeout will be disabled and re-enabled (calling the "timeout toggled function") to notify you of the change.<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>timeout</em> </td><td>the <a class="el" href="structDBusTimeout.html">DBusTimeout</a> object. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the interval in milliseconds. </dd></dl>
<p>
Definition at line <a class="el" href="dbus-timeout_8c-source.html#l00415">415</a> of file <a class="el" href="dbus-timeout_8c-source.html">dbus-timeout.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00042">interval</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l02218">_dbus_connection_block_pending_call()</a>.
</div>
</div><p>
<a class="anchor" name="g038b67c8d3db2624a1e4a8bc45f25d12"></a><!-- doxytag: member="dbus-connection.h::dbus_timeout_handle" ref="g038b67c8d3db2624a1e4a8bc45f25d12" args="(DBusTimeout *timeout)" -->
<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_timeout_handle </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusTimeout.html">DBusTimeout</a> * </td>
<td class="paramname"> <em>timeout</em> </td>
<td> ) </td>
<td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Calls the timeout handler for this timeout.
<p>
This function should be called when the timeout occurs.<p>
If this function returns <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, then there wasn't enough memory to handle the timeout. Typically just letting the timeout fire again next time it naturally times out is an adequate response to that problem, but you could try to do more if you wanted.<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>timeout</em> </td><td>the <a class="el" href="structDBusTimeout.html">DBusTimeout</a> object. </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-timeout_8c-source.html#l00471">471</a> of file <a class="el" href="dbus-timeout_8c-source.html">dbus-timeout.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00044">handler</a>, and <a class="el" href="dbus-timeout_8c-source.html#l00045">handler_data</a>.
</div>
</div><p>
<a class="anchor" name="g88712006f7772174504a0fba0a0ddd60"></a><!-- doxytag: member="dbus-connection.h::dbus_timeout_set_data" ref="g88712006f7772174504a0fba0a0ddd60" args="(DBusTimeout *timeout, void *data, DBusFreeFunction free_data_function)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void dbus_timeout_set_data </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusTimeout.html">DBusTimeout</a> * </td>
<td class="paramname"> <em>timeout</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__DBusTimeout.html#g7c561ec66daa2f53a274485f10c827c7">dbus_timeout_get_data()</a>.
<p>
Intended for use by the DBusAddTimeoutFunction and DBusRemoveTimeoutFunction to store their own data. For example with Qt you might store the QTimer for this timeout and with GLib you might store a g_timeout_add result id.<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>timeout</em> </td><td>the <a class="el" href="structDBusTimeout.html">DBusTimeout</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-timeout_8c-source.html#l00445">445</a> of file <a class="el" href="dbus-timeout_8c-source.html">dbus-timeout.c</a>.
<p>
References <a class="el" href="dbus-timeout_8c-source.html#l00048">data</a>, <a class="el" href="dbus-timeout_8c-source.html#l00049">free_data_function</a>, and <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.
<p>
Referenced by <a class="el" href="dbus-timeout_8c-source.html#l00106">_dbus_timeout_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>