| Current File : //usr/share/doc/dbus/api/group__DBusPendingCall.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>D-Bus: DBusPendingCall</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">D-Bus
 <span id="projectnumber">1.8.20</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#define-members">Defines</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">DBusPendingCall</div> </div>
<div class="ingroups"><a class="el" href="group__DBus.html">D-Bus low-level public API</a></div></div><!--header-->
<div class="contents">
<p>Pending reply to a method call message.
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga21384c9c5b0da54f7d0a92012522f213">DBUS_TIMEOUT_INFINITE</a>   ((int) 0x7fffffff)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An integer constant representing an infinite timeout. <a href="#ga21384c9c5b0da54f7d0a92012522f213"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#gabdc138a303699e88756d6c5988a16b05">DBUS_TIMEOUT_USE_DEFAULT</a>   (-1)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">An integer constant representing a request to use the default timeout. <a href="#gabdc138a303699e88756d6c5988a16b05"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#gad7fe26d49b2979777dd8d64bf2be0a71">DBusPendingCall</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Opaque type representing a method call that has not yet received a reply. <a href="#gad7fe26d49b2979777dd8d64bf2be0a71"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga334f6c6621583e15fdaf1a3f93dd2221">dbus_pending_call_ref</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Increments the reference count on a pending call. <a href="#ga334f6c6621583e15fdaf1a3f93dd2221"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#gadaba15a74ba4925cdef52d4791cd3147">dbus_pending_call_unref</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Decrements the reference count on a pending call, freeing it if the count reaches 0. <a href="#gadaba15a74ba4925cdef52d4791cd3147"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga16b67b418b1dc27cfdda6b20f7447670">dbus_pending_call_set_notify</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending, <a class="el" href="group__DBusConnection.html#ga90b8d85edb44420f7a8ea6baafb3bf88">DBusPendingCallNotifyFunction</a> function, void *user_data, <a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> free_user_data)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets a notification function to be called when the reply is received or the pending call times out. <a href="#ga16b67b418b1dc27cfdda6b20f7447670"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga6530d18f891d3ca5f5df87ea7c2b155c">dbus_pending_call_cancel</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Cancels the pending call, such that any reply or error received will just be ignored. <a href="#ga6530d18f891d3ca5f5df87ea7c2b155c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#gacbf33ae8a1cc125628f9ea44d175c159">dbus_pending_call_get_completed</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Checks whether the pending call has received a reply yet, or not. <a href="#gacbf33ae8a1cc125628f9ea44d175c159"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDBusMessage.html">DBusMessage</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga5a738928c2369fef093ce00658903d06">dbus_pending_call_steal_reply</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the reply, or returns <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> if none has been received yet. <a href="#ga5a738928c2369fef093ce00658903d06"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga67b99f749a7f477c7b5d70f2acee5452">dbus_pending_call_block</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Block until the pending call is completed. <a href="#ga67b99f749a7f477c7b5d70f2acee5452"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga95614dad0ada70e3a20d9878339e3109">dbus_pending_call_allocate_data_slot</a> (<a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates an integer ID to be used for storing application-specific data on any <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a>. <a href="#ga95614dad0ada70e3a20d9878339e3109"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga1eb6f342bba71b01266629f80be84617">dbus_pending_call_free_data_slot</a> (<a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_p)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Deallocates a global ID for <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> data slots. <a href="#ga1eb6f342bba71b01266629f80be84617"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b">dbus_pending_call_set_data</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending, <a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> slot, void *data, <a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> free_data_func)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Stores a pointer on a <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a>, along with an optional function to be used for freeing the data when the data is set again, or when the pending call is finalized. <a href="#ga9295e7e602c41c6501b69bc995907e1b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusPendingCall.html#ga5749f73b7ec7a8fe4f2e6a839e292806">dbus_pending_call_get_data</a> (<a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> *pending, <a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> slot)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieves data previously set with <a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b" title="Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the dat...">dbus_pending_call_set_data()</a>. <a href="#ga5749f73b7ec7a8fe4f2e6a839e292806"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Pending reply to a method call message. </p>
<p>A <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> is an object representing an expected reply. A <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> can be created when you send a message that should have a reply. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga21384c9c5b0da54f7d0a92012522f213"></a><!-- doxytag: member="dbus-pending-call.h::DBUS_TIMEOUT_INFINITE" ref="ga21384c9c5b0da54f7d0a92012522f213" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="group__DBusPendingCall.html#ga21384c9c5b0da54f7d0a92012522f213">DBUS_TIMEOUT_INFINITE</a>   ((int) 0x7fffffff)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An integer constant representing an infinite timeout. </p>
<p>This has the numeric value 0x7fffffff (the largest 32-bit signed integer).</p>
<p>For source compatibility with D-Bus versions earlier than 1.4.12, use 0x7fffffff, or INT32_MAX (assuming your platform has it). </p>
<p>Definition at line <a class="el" href="dbus-pending-call_8h_source.html#l00041">41</a> of file <a class="el" href="dbus-pending-call_8h_source.html">dbus-pending-call.h</a>.</p>
<p>Referenced by <a class="el" href="dbus-pending-call_8c_source.html#l00109">_dbus_pending_call_new_unlocked()</a>.</p>
</div>
</div>
<a class="anchor" id="gabdc138a303699e88756d6c5988a16b05"></a><!-- doxytag: member="dbus-pending-call.h::DBUS_TIMEOUT_USE_DEFAULT" ref="gabdc138a303699e88756d6c5988a16b05" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define <a class="el" href="group__DBusPendingCall.html#gabdc138a303699e88756d6c5988a16b05">DBUS_TIMEOUT_USE_DEFAULT</a>   (-1)</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>An integer constant representing a request to use the default timeout. </p>
<p>This has numeric value -1.</p>
<p>For source compatibility with D-Bus versions earlier than 1.4.12, use a literal -1. </p>
<p>Definition at line <a class="el" href="dbus-pending-call_8h_source.html#l00042">42</a> of file <a class="el" href="dbus-pending-call_8h_source.html">dbus-pending-call.h</a>.</p>
</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gad7fe26d49b2979777dd8d64bf2be0a71"></a><!-- doxytag: member="dbus-connection.h::DBusPendingCall" ref="gad7fe26d49b2979777dd8d64bf2be0a71" args="" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Opaque type representing a method call that has not yet received a reply. </p>
<p>Opaque data type representing a message pending.</p>
<p>Definition at line <a class="el" href="dbus-connection_8h_source.html#l00049">49</a> of file <a class="el" href="dbus-connection_8h_source.html">dbus-connection.h</a>.</p>
</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga95614dad0ada70e3a20d9878339e3109"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_allocate_data_slot" ref="ga95614dad0ada70e3a20d9878339e3109" args="(dbus_int32_t *slot_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusPendingCall.html#ga95614dad0ada70e3a20d9878339e3109">dbus_pending_call_allocate_data_slot</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> * </td>
<td class="paramname"><em>slot_p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocates an integer ID to be used for storing application-specific data on any <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a>. </p>
<p>The allocated ID may then be used with <a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b" title="Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the dat...">dbus_pending_call_set_data()</a> and <a class="el" href="group__DBusPendingCall.html#ga5749f73b7ec7a8fe4f2e6a839e292806" title="Retrieves data previously set with dbus_pending_call_set_data().">dbus_pending_call_get_data()</a>. The passed-in slot must be initialized to -1, and is filled in with the slot ID. If the passed-in slot is not -1, it's assumed to be already allocated, and its refcount is incremented.</p>
<p>The allocated slot is global, i.e. all <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> objects will have a slot with the given integer ID reserved.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">slot_p</td><td>address of a global variable storing the slot </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> on failure (no memory) </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00759">759</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-dataslot_8c_source.html#l00069">_dbus_data_slot_allocator_alloc()</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-pending-call_8c_source.html#l00109">_dbus_pending_call_new_unlocked()</a>.</p>
</div>
</div>
<a class="anchor" id="ga67b99f749a7f477c7b5d70f2acee5452"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_block" ref="ga67b99f749a7f477c7b5d70f2acee5452" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT void <a class="el" href="group__DBusPendingCall.html#ga67b99f749a7f477c7b5d70f2acee5452">dbus_pending_call_block</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Block until the pending call is completed. </p>
<p>The blocking is as with <a class="el" href="group__DBusConnection.html#ga8d6431f17a9e53c9446d87c2ba8409f0" title="Sends a message and blocks a certain time period while waiting for a reply.">dbus_connection_send_with_reply_and_block()</a>; it does not enter the main loop or process other messages, it simply waits for the reply in question.</p>
<p>If the pending call is already completed, this function returns immediately.</p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000045">Todo:</a></b></dt><dd>when you start blocking, the timeout is reset, but it should really only use time remaining since the pending call was created. This requires storing timestamps instead of intervals in the timeout</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00737">737</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-connection_8c_source.html#l02379">_dbus_connection_block_pending_call()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l03535">dbus_connection_send_with_reply_and_block()</a>.</p>
</div>
</div>
<a class="anchor" id="ga6530d18f891d3ca5f5df87ea7c2b155c"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_cancel" ref="ga6530d18f891d3ca5f5df87ea7c2b155c" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT void <a class="el" href="group__DBusPendingCall.html#ga6530d18f891d3ca5f5df87ea7c2b155c">dbus_pending_call_cancel</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Cancels the pending call, such that any reply or error received will just be ignored. </p>
<p>Drops the dbus library's internal reference to the <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> so will free the call if nobody else is holding a reference. However you usually get a reference from <a class="el" href="group__DBusConnection.html#gaa215df7ab7ca6dce7be153c6b9cc80ba" title="Queues a message to send, as with dbus_connection_send(), but also returns a DBusPendingCall used to ...">dbus_connection_send_with_reply()</a> so probably your app owns a ref also.</p>
<p>Note that canceling a pending call will <em>not</em> simulate a timed-out call; if a call times out, then a timeout error reply is received. If you cancel the call, no reply is received unless the the reply was already received before you canceled.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00663">663</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-connection_8c_source.html#l01044">_dbus_connection_remove_pending_call()</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="ga1eb6f342bba71b01266629f80be84617"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_free_data_slot" ref="ga1eb6f342bba71b01266629f80be84617" args="(dbus_int32_t *slot_p)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT void <a class="el" href="group__DBusPendingCall.html#ga1eb6f342bba71b01266629f80be84617">dbus_pending_call_free_data_slot</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> * </td>
<td class="paramname"><em>slot_p</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Deallocates a global ID for <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> data slots. </p>
<p><a class="el" href="group__DBusPendingCall.html#ga5749f73b7ec7a8fe4f2e6a839e292806" title="Retrieves data previously set with dbus_pending_call_set_data().">dbus_pending_call_get_data()</a> and <a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b" title="Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the dat...">dbus_pending_call_set_data()</a> may no longer be used with this slot. Existing data stored on existing <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> objects will be freed when the <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a> is finalized, but may not be retrieved (and may only be replaced if someone else reallocates the slot). When the refcount on the passed-in slot reaches 0, it is set to -1.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">slot_p</td><td>address storing the slot to deallocate </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00779">779</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-dataslot_8c_source.html#l00154">_dbus_data_slot_allocator_free()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-pending-call_8c_source.html#l00109">_dbus_pending_call_new_unlocked()</a>.</p>
</div>
</div>
<a class="anchor" id="gacbf33ae8a1cc125628f9ea44d175c159"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_get_completed" ref="gacbf33ae8a1cc125628f9ea44d175c159" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusPendingCall.html#gacbf33ae8a1cc125628f9ea44d175c159">dbus_pending_call_get_completed</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Checks whether the pending call has received a reply yet, or not. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> if a reply has been received </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00679">679</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-pending-call_8c_source.html#l00078">completed</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00053">CONNECTION_LOCK</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00057">CONNECTION_UNLOCK</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l02379">_dbus_connection_block_pending_call()</a>.</p>
</div>
</div>
<a class="anchor" id="ga5749f73b7ec7a8fe4f2e6a839e292806"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_get_data" ref="ga5749f73b7ec7a8fe4f2e6a839e292806" args="(DBusPendingCall *pending, dbus_int32_t slot)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT void * <a class="el" href="group__DBusPendingCall.html#ga5749f73b7ec7a8fe4f2e6a839e292806">dbus_pending_call_get_data</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> </td>
<td class="paramname"><em>slot</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Retrieves data previously set with <a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b" title="Stores a pointer on a DBusPendingCall, along with an optional function to be used for freeing the dat...">dbus_pending_call_set_data()</a>. </p>
<p>The slot must still be allocated (must not have been freed).</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending_call </td></tr>
<tr><td class="paramname">slot</td><td>the slot to get data from </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the data, or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> if not found </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00827">827</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-dataslot_8c_source.html#l00285">_dbus_data_slot_list_get()</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00053">CONNECTION_LOCK</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00057">CONNECTION_UNLOCK</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-pending-call_8c_source.html#l00066">slot_list</a>.</p>
<p>Referenced by <a class="el" href="dbus-pending-call_8c_source.html#l00204">_dbus_pending_call_complete()</a>.</p>
</div>
</div>
<a class="anchor" id="ga334f6c6621583e15fdaf1a3f93dd2221"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_ref" ref="ga334f6c6621583e15fdaf1a3f93dd2221" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * <a class="el" href="group__DBusPendingCall.html#ga334f6c6621583e15fdaf1a3f93dd2221">dbus_pending_call_ref</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Increments the reference count on a pending call. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call object </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the pending call object </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00577">577</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-sysdeps-unix_8c_source.html#l02501">_dbus_atomic_inc()</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-pending-call_8c_source.html#l00064">refcount</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l02379">_dbus_connection_block_pending_call()</a>.</p>
</div>
</div>
<a class="anchor" id="ga9295e7e602c41c6501b69bc995907e1b"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_set_data" ref="ga9295e7e602c41c6501b69bc995907e1b" args="(DBusPendingCall *pending, dbus_int32_t slot, void *data, DBusFreeFunction free_data_func)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusPendingCall.html#ga9295e7e602c41c6501b69bc995907e1b">dbus_pending_call_set_data</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusTypes.html#gab18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> </td>
<td class="paramname"><em>slot</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> </td>
<td class="paramname"><em>free_data_func</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Stores a pointer on a <a class="el" href="structDBusPendingCall.html" title="Implementation details of DBusPendingCall - all fields are private.">DBusPendingCall</a>, along with an optional function to be used for freeing the data when the data is set again, or when the pending call is finalized. </p>
<p>The slot number must have been allocated with <a class="el" href="group__DBusPendingCall.html#ga95614dad0ada70e3a20d9878339e3109" title="Allocates an integer ID to be used for storing application-specific data on any DBusPendingCall.">dbus_pending_call_allocate_data_slot()</a>.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending_call </td></tr>
<tr><td class="paramname">slot</td><td>the slot number </td></tr>
<tr><td class="paramname">data</td><td>the data to store </td></tr>
<tr><td class="paramname">free_data_func</td><td>finalizer function for the data </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to "1".">TRUE</a> if there was enough memory to store the data </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00801">801</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-pending-call_8c_source.html#l00502">_dbus_pending_call_set_data_unlocked()</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00053">CONNECTION_LOCK</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00057">CONNECTION_UNLOCK</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>
</div>
</div>
<a class="anchor" id="ga16b67b418b1dc27cfdda6b20f7447670"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_set_notify" ref="ga16b67b418b1dc27cfdda6b20f7447670" args="(DBusPendingCall *pending, DBusPendingCallNotifyFunction function, void *user_data, DBusFreeFunction free_user_data)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusPendingCall.html#ga16b67b418b1dc27cfdda6b20f7447670">dbus_pending_call_set_notify</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusConnection.html#ga90b8d85edb44420f7a8ea6baafb3bf88">DBusPendingCallNotifyFunction</a> </td>
<td class="paramname"><em>function</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>user_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5">DBusFreeFunction</a> </td>
<td class="paramname"><em>free_user_data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Sets a notification function to be called when the reply is received or the pending call times out. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call </td></tr>
<tr><td class="paramname">function</td><td>notifier function </td></tr>
<tr><td class="paramname">user_data</td><td>data to pass to notifier function </td></tr>
<tr><td class="paramname">free_user_data</td><td>function to free the user data </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to "0".">FALSE</a> if not enough memory </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00622">622</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-pending-call_8c_source.html#l00502">_dbus_pending_call_set_data_unlocked()</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00053">CONNECTION_LOCK</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00057">CONNECTION_UNLOCK</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00068">function</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.</p>
</div>
</div>
<a class="anchor" id="ga5a738928c2369fef093ce00658903d06"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_steal_reply" ref="ga5a738928c2369fef093ce00658903d06" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT <a class="el" href="structDBusMessage.html">DBusMessage</a> * <a class="el" href="group__DBusPendingCall.html#ga5a738928c2369fef093ce00658903d06">dbus_pending_call_steal_reply</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the reply, or returns <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> if none has been received yet. </p>
<p>Ownership of the reply message passes to the caller. This function can only be called once per pending call, since the reply message is tranferred to the caller.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the reply message or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a>. </dd></dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00702">702</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-pending-call_8c_source.html#l00078">completed</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00070">connection</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00053">CONNECTION_LOCK</a>, <a class="el" href="dbus-pending-call_8c_source.html#l00057">CONNECTION_UNLOCK</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-pending-call_8c_source.html#l00071">reply</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l03535">dbus_connection_send_with_reply_and_block()</a>.</p>
</div>
</div>
<a class="anchor" id="gadaba15a74ba4925cdef52d4791cd3147"></a><!-- doxytag: member="dbus-pending-call.c::dbus_pending_call_unref" ref="gadaba15a74ba4925cdef52d4791cd3147" args="(DBusPendingCall *pending)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DBUS_EXPORT void <a class="el" href="group__DBusPendingCall.html#gadaba15a74ba4925cdef52d4791cd3147">dbus_pending_call_unref</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structDBusPendingCall.html">DBusPendingCall</a> * </td>
<td class="paramname"><em>pending</em></td><td>)</td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Decrements the reference count on a pending call, freeing it if the count reaches 0. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
<table class="params">
<tr><td class="paramname">pending</td><td>the pending call object </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="dbus-pending-call_8c_source.html#l00597">597</a> of file <a class="el" href="dbus-pending-call_8c_source.html">dbus-pending-call.c</a>.</p>
<p>References <a class="el" href="dbus-sysdeps-unix_8c_source.html#l02524">_dbus_atomic_dec()</a>, <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-pending-call_8c_source.html#l00064">refcount</a>.</p>
<p>Referenced by <a class="el" href="dbus-connection_8c_source.html#l02379">_dbus_connection_block_pending_call()</a>, <a class="el" href="dbus-connection_8c_source.html#l03399">dbus_connection_send_with_reply()</a>, and <a class="el" href="dbus-connection_8c_source.html#l03535">dbus_connection_send_with_reply_and_block()</a>.</p>
</div>
</div>
</div><!-- contents -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:33 for D-Bus by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>