KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/devhelp/books/dbus/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/devhelp/books/dbus/api/group__DBusDataSlot.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>D-Bus: Data slots</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>Data slots<br>
<small>
[<a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a>]</small>
</h1>Storing data by ID.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g5edceab2f5849ff8a6f6cee5d1afc906">_dbus_data_slot_allocator_init</a> (<a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *allocator)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a data slot allocator object, used to assign integer IDs for data slots.  <a href="#g5edceab2f5849ff8a6f6cee5d1afc906"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g941a12182e69c185bd27f6efbfbd0f86">_dbus_data_slot_allocator_alloc</a> (<a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *allocator, <a class="el" href="group__DBusThreads.html#g4eb021cd6cd0830423eac2738e0ddc40">DBusMutex</a> **mutex_loc, <a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_id_p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Allocates an integer ID to be used for storing data in a <a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a>.  <a href="#g941a12182e69c185bd27f6efbfbd0f86"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g059c50a24cd9fc984e918e6159841633">_dbus_data_slot_allocator_free</a> (<a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *allocator, <a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *slot_id_p)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deallocates an ID previously allocated with <a class="el" href="group__DBusDataSlot.html#g941a12182e69c185bd27f6efbfbd0f86">_dbus_data_slot_allocator_alloc()</a>.  <a href="#g059c50a24cd9fc984e918e6159841633"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g6de49b3a1210202215d40a5a19806992">_dbus_data_slot_list_init</a> (<a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *list)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes a slot list.  <a href="#g6de49b3a1210202215d40a5a19806992"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#gd2952f9f686d96e7114fc49ab7452e1a">_dbus_data_slot_list_set</a> (<a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *allocator, <a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *list, int slot, void *data, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> free_data_func, <a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> *old_free_func, void **old_data)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stores a pointer in the data slot list, along with an optional function to be used for freeing the data when the data is set again, or when the slot list is finalized.  <a href="#gd2952f9f686d96e7114fc49ab7452e1a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g43f741229f0c38788442601e2750ec66">_dbus_data_slot_list_get</a> (<a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *allocator, <a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *list, int slot)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves data previously set with _dbus_data_slot_list_set_data().  <a href="#g43f741229f0c38788442601e2750ec66"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#g3c96d2ca263ba397b4da2956a49ae282">_dbus_data_slot_list_clear</a> (<a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *list)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees all data slots contained in the list, calling application-provided free functions if they exist.  <a href="#g3c96d2ca263ba397b4da2956a49ae282"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusDataSlot.html#gbc399733376c462c3010271a2d431e73">_dbus_data_slot_list_free</a> (<a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *list)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Frees the data slot list and all data slots contained in it, calling application-provided free functions if they exist.  <a href="#gbc399733376c462c3010271a2d431e73"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Storing data by ID. 
<p>
Types and functions related to storing data by an allocated ID. This is used for <a class="el" href="group__DBusConnection.html#g83ded444f945d66c2579891d176934be">dbus_connection_set_data()</a>, <a class="el" href="group__DBusServer.html#g7309ea0b3e3b75dffb9ad8bb9d2fc2b7">dbus_server_set_data()</a>, etc. <hr><h2>Function Documentation</h2>
<a class="anchor" name="g941a12182e69c185bd27f6efbfbd0f86"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_allocator_alloc" ref="g941a12182e69c185bd27f6efbfbd0f86" args="(DBusDataSlotAllocator *allocator, DBusMutex **mutex_loc, dbus_int32_t *slot_id_p)" -->
<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_data_slot_allocator_alloc           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__DBusThreads.html#g4eb021cd6cd0830423eac2738e0ddc40">DBusMutex</a> **&nbsp;</td>
          <td class="paramname"> <em>mutex_loc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>slot_id_p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Allocates an integer ID to be used for storing data in a <a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a>. 
<p>
If the value at *slot_id_p is not -1, this function just increments the refcount for the existing slot ID. If the value is -1, a new slot ID is allocated and stored at *slot_id_p.<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>allocator</em>&nbsp;</td><td>the allocator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mutex_loc</em>&nbsp;</td><td>the location lock for this allocator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>slot_id_p</em>&nbsp;</td><td>address to fill with the slot ID </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> on success </dd></dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00067">67</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-internals_8h-source.html#l00121">_dbus_assert_not_reached</a>, <a class="el" href="dbus-threads_8c-source.html#l00143">_dbus_mutex_lock()</a>, <a class="el" href="dbus-threads_8c-source.html#l00160">_dbus_mutex_unlock()</a>, <a class="el" href="dbus-internals_8c-source.html#l00266">_dbus_warn_check_failed()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00057">DBusDataSlotAllocator::allocated_slots</a>, <a class="el" href="dbus-memory_8c-source.html#l00544">dbus_realloc()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00060">DBusDataSlotAllocator::lock_loc</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00058">DBusDataSlotAllocator::n_allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00059">DBusDataSlotAllocator::n_used_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00049">DBusAllocatedSlot::refcount</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00048">DBusAllocatedSlot::slot_id</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l05470">dbus_connection_allocate_data_slot()</a>, <a class="el" href="dbus-message_8c-source.html#l03770">dbus_message_allocate_data_slot()</a>, <a class="el" href="dbus-pending-call_8c-source.html#l00725">dbus_pending_call_allocate_data_slot()</a>, and <a class="el" href="dbus-server_8c-source.html#l01048">dbus_server_allocate_data_slot()</a>.
</div>
</div><p>
<a class="anchor" name="g059c50a24cd9fc984e918e6159841633"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_allocator_free" ref="g059c50a24cd9fc984e918e6159841633" args="(DBusDataSlotAllocator *allocator, dbus_int32_t *slot_id_p)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_data_slot_allocator_free           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__DBusTypes.html#gb18afa60e9b17b6e322735bda3d863d8">dbus_int32_t</a> *&nbsp;</td>
          <td class="paramname"> <em>slot_id_p</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Deallocates an ID previously allocated with <a class="el" href="group__DBusDataSlot.html#g941a12182e69c185bd27f6efbfbd0f86">_dbus_data_slot_allocator_alloc()</a>. 
<p>
Existing data stored on existing <a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> objects with this ID will be freed when the data list is finalized, but may not be retrieved (and may only be replaced if someone else reallocates the slot). The slot value is reset to -1 if this is the last unref.<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>allocator</em>&nbsp;</td><td>the allocator </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>slot_id_p</em>&nbsp;</td><td>address where we store the slot </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00163">163</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-threads_8c-source.html#l00143">_dbus_mutex_lock()</a>, <a class="el" href="dbus-threads_8c-source.html#l00160">_dbus_mutex_unlock()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00057">DBusDataSlotAllocator::allocated_slots</a>, <a class="el" href="dbus-memory_8c-source.html#l00617">dbus_free()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00060">DBusDataSlotAllocator::lock_loc</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00058">DBusDataSlotAllocator::n_allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00059">DBusDataSlotAllocator::n_used_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00049">DBusAllocatedSlot::refcount</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00048">DBusAllocatedSlot::slot_id</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l05489">dbus_connection_free_data_slot()</a>, <a class="el" href="dbus-message_8c-source.html#l03789">dbus_message_free_data_slot()</a>, <a class="el" href="dbus-pending-call_8c-source.html#l00746">dbus_pending_call_free_data_slot()</a>, and <a class="el" href="dbus-server_8c-source.html#l01067">dbus_server_free_data_slot()</a>.
</div>
</div><p>
<a class="anchor" name="g5edceab2f5849ff8a6f6cee5d1afc906"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_allocator_init" ref="g5edceab2f5849ff8a6f6cee5d1afc906" args="(DBusDataSlotAllocator *allocator)" -->
<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_data_slot_allocator_init           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initializes a data slot allocator object, used to assign integer IDs for data slots. 
<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>allocator</em>&nbsp;</td><td>the allocator to initialize </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00044">44</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8h-source.html#l00057">DBusDataSlotAllocator::allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00060">DBusDataSlotAllocator::lock_loc</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00058">DBusDataSlotAllocator::n_allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00059">DBusDataSlotAllocator::n_used_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
</div>
</div><p>
<a class="anchor" name="g3c96d2ca263ba397b4da2956a49ae282"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_list_clear" ref="g3c96d2ca263ba397b4da2956a49ae282" args="(DBusDataSlotList *list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_data_slot_list_clear           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *&nbsp;</td>
          <td class="paramname"> <em>list</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Frees all data slots contained in the list, calling application-provided free functions if they exist. 
<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>list</em>&nbsp;</td><td>the list to clear </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00325">325</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8h-source.html#l00038">data</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00039">free_data_func</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00069">DBusDataSlotList::slots</a>.
<p>
Referenced by <a class="el" href="dbus-dataslot_8c-source.html#l00348">_dbus_data_slot_list_free()</a>.
</div>
</div><p>
<a class="anchor" name="gbc399733376c462c3010271a2d431e73"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_list_free" ref="gbc399733376c462c3010271a2d431e73" args="(DBusDataSlotList *list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_data_slot_list_free           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *&nbsp;</td>
          <td class="paramname"> <em>list</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Frees the data slot list and all data slots contained in it, calling application-provided free functions if they exist. 
<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>list</em>&nbsp;</td><td>the list to free </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00348">348</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8c-source.html#l00325">_dbus_data_slot_list_clear()</a>, <a class="el" href="dbus-memory_8c-source.html#l00617">dbus_free()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00070">DBusDataSlotList::n_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00069">DBusDataSlotList::slots</a>.
<p>
Referenced by <a class="el" href="dbus-server_8c-source.html#l00168">_dbus_server_finalize_base()</a>.
</div>
</div><p>
<a class="anchor" name="g43f741229f0c38788442601e2750ec66"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_list_get" ref="g43f741229f0c38788442601e2750ec66" args="(DBusDataSlotAllocator *allocator, DBusDataSlotList *list, int slot)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* _dbus_data_slot_list_get           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *&nbsp;</td>
          <td class="paramname"> <em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>slot</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves data previously set with _dbus_data_slot_list_set_data(). 
<p>
The slot must still be allocated (must not have been freed).<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>allocator</em>&nbsp;</td><td>the allocator slot was allocated from </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>list</em>&nbsp;</td><td>the data slot list </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>slot</em>&nbsp;</td><td>the slot to get data from </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the data, or <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a> if not found </dd></dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00296">296</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-threads_8c-source.html#l00143">_dbus_mutex_lock()</a>, <a class="el" href="dbus-threads_8c-source.html#l00160">_dbus_mutex_unlock()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00057">DBusDataSlotAllocator::allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00038">data</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00060">DBusDataSlotAllocator::lock_loc</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00070">DBusDataSlotList::n_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00048">DBusAllocatedSlot::slot_id</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00069">DBusDataSlotList::slots</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l05550">dbus_connection_get_data()</a>, <a class="el" href="dbus-message_8c-source.html#l03846">dbus_message_get_data()</a>, <a class="el" href="dbus-pending-call_8c-source.html#l00794">dbus_pending_call_get_data()</a>, and <a class="el" href="dbus-server_8c-source.html#l01128">dbus_server_get_data()</a>.
</div>
</div><p>
<a class="anchor" name="g6de49b3a1210202215d40a5a19806992"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_list_init" ref="g6de49b3a1210202215d40a5a19806992" args="(DBusDataSlotList *list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _dbus_data_slot_list_init           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *&nbsp;</td>
          <td class="paramname"> <em>list</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Initializes a slot list. 
<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>list</em>&nbsp;</td><td>the list to initialize. </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00211">211</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-dataslot_8h-source.html#l00070">DBusDataSlotList::n_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, and <a class="el" href="dbus-dataslot_8h-source.html#l00069">DBusDataSlotList::slots</a>.
<p>
Referenced by <a class="el" href="dbus-connection_8c-source.html#l01163">_dbus_connection_new_for_transport()</a>, <a class="el" href="dbus-pending-call_8c-source.html#l00091">_dbus_pending_call_new_unlocked()</a>, and <a class="el" href="dbus-server_8c-source.html#l00096">_dbus_server_init_base()</a>.
</div>
</div><p>
<a class="anchor" name="gd2952f9f686d96e7114fc49ab7452e1a"></a><!-- doxytag: member="dbus-dataslot.c::_dbus_data_slot_list_set" ref="gd2952f9f686d96e7114fc49ab7452e1a" args="(DBusDataSlotAllocator *allocator, DBusDataSlotList *list, int slot, void *data, DBusFreeFunction free_data_func, DBusFreeFunction *old_free_func, void **old_data)" -->
<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_data_slot_list_set           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotAllocator.html">DBusDataSlotAllocator</a> *&nbsp;</td>
          <td class="paramname"> <em>allocator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structDBusDataSlotList.html">DBusDataSlotList</a> *&nbsp;</td>
          <td class="paramname"> <em>list</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>slot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a>&nbsp;</td>
          <td class="paramname"> <em>free_data_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> *&nbsp;</td>
          <td class="paramname"> <em>old_free_func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void **&nbsp;</td>
          <td class="paramname"> <em>old_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Stores a pointer in the data slot list, along with an optional function to be used for freeing the data when the data is set again, or when the slot list is finalized. 
<p>
The slot number must have been allocated with <a class="el" href="group__DBusDataSlot.html#g941a12182e69c185bd27f6efbfbd0f86">_dbus_data_slot_allocator_alloc()</a> for the same allocator passed in here. The same allocator has to be used with the slot list every time.<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>allocator</em>&nbsp;</td><td>the allocator to use </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>list</em>&nbsp;</td><td>the data slot list </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>slot</em>&nbsp;</td><td>the slot number </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>the data to store </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>free_data_func</em>&nbsp;</td><td>finalizer function for the data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>old_free_func</em>&nbsp;</td><td>free function for any previously-existing data </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>old_data</em>&nbsp;</td><td>previously-existing data, should be freed with old_free_func </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a> if there was enough memory to store the data </dd></dl>

<p>
Definition at line <a class="el" href="dbus-dataslot_8c-source.html#l00235">235</a> of file <a class="el" href="dbus-dataslot_8c-source.html">dbus-dataslot.c</a>.
<p>
References <a class="el" href="dbus-internals_8h-source.html#l00109">_dbus_assert</a>, <a class="el" href="dbus-threads_8c-source.html#l00143">_dbus_mutex_lock()</a>, <a class="el" href="dbus-threads_8c-source.html#l00160">_dbus_mutex_unlock()</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00057">DBusDataSlotAllocator::allocated_slots</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00038">data</a>, <a class="el" href="dbus-memory_8c-source.html#l00544">dbus_realloc()</a>, <a class="el" href="group__DBusMacros.html#ga93f0eb578d23995850d61f7d61c55c1">FALSE</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00039">free_data_func</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00060">DBusDataSlotAllocator::lock_loc</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00070">DBusDataSlotList::n_slots</a>, <a class="el" href="group__DBusMacros.html#g070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00048">DBusAllocatedSlot::slot_id</a>, <a class="el" href="dbus-dataslot_8h-source.html#l00069">DBusDataSlotList::slots</a>, and <a class="el" href="group__DBusMacros.html#ga8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.
<p>
Referenced by <a class="el" href="dbus-pending-call_8c-source.html#l00477">_dbus_pending_call_set_data_unlocked()</a>, <a class="el" href="dbus-connection_8c-source.html#l05510">dbus_connection_set_data()</a>, <a class="el" href="dbus-message_8c-source.html#l03810">dbus_message_set_data()</a>, and <a class="el" href="dbus-server_8c-source.html#l01088">dbus_server_set_data()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:13 2009 for D-Bus by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>

Anon7 - 2021