Current File : //usr/share/doc/dbus/api/dbus-server-protected_8h_source.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: dbus-server-protected.h Source File</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
   &#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">dbus-server-protected.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C; c-file-style: &quot;gnu&quot;; indent-tabs-mode: nil; -*- */</span>
<a name="l00002"></a>00002 <span class="comment">/* dbus-server-protected.h Used by subclasses of DBusServer object (internal to D-Bus implementation)</span>
<a name="l00003"></a>00003 <span class="comment"> *</span>
<a name="l00004"></a>00004 <span class="comment"> * Copyright (C) 2002  Red Hat Inc.</span>
<a name="l00005"></a>00005 <span class="comment"> *</span>
<a name="l00006"></a>00006 <span class="comment"> * Licensed under the Academic Free License version 2.1</span>
<a name="l00007"></a>00007 <span class="comment"> * </span>
<a name="l00008"></a>00008 <span class="comment"> * This program is free software; you can redistribute it and/or modify</span>
<a name="l00009"></a>00009 <span class="comment"> * it under the terms of the GNU General Public License as published by</span>
<a name="l00010"></a>00010 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or</span>
<a name="l00011"></a>00011 <span class="comment"> * (at your option) any later version.</span>
<a name="l00012"></a>00012 <span class="comment"> *</span>
<a name="l00013"></a>00013 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<a name="l00016"></a>00016 <span class="comment"> * GNU General Public License for more details.</span>
<a name="l00017"></a>00017 <span class="comment"> * </span>
<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00019"></a>00019 <span class="comment"> * along with this program; if not, write to the Free Software</span>
<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef DBUS_SERVER_PROTECTED_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define DBUS_SERVER_PROTECTED_H</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;dbus/dbus-internals.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;dbus/dbus-threads-internal.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;dbus/dbus-server.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;dbus/dbus-address.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;dbus/dbus-timeout.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;dbus/dbus-watch.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;dbus/dbus-resources.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;dbus/dbus-dataslot.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;dbus/dbus-string.h&gt;</span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <a class="code" href="group__DBusMacros.html#ga875146b01015e9ced22b25d76d549ab2" title="Macro used prior to declaring functions in the D-Bus header files.">DBUS_BEGIN_DECLS</a>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structDBusServerVTable.html" title="Virtual table to be implemented by all server &quot;subclasses&quot;.">DBusServerVTable</a> <a class="code" href="structDBusServerVTable.html" title="Virtual table to be implemented by all server &quot;subclasses&quot;.">DBusServerVTable</a>;
<a name="l00039"></a>00039 
<a name="l00043"></a><a class="code" href="structDBusServerVTable.html">00043</a> <span class="keyword">struct </span><a class="code" href="structDBusServerVTable.html" title="Virtual table to be implemented by all server &quot;subclasses&quot;.">DBusServerVTable</a>
<a name="l00044"></a>00044 {
<a name="l00045"></a><a class="code" href="structDBusServerVTable.html#acd97315e812352da38449f910775b08d">00045</a>   void        (* <a class="code" href="structDBusServerVTable.html#acd97315e812352da38449f910775b08d" title="The finalize method must free the server.">finalize</a>)      (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> *server);
<a name="l00048"></a><a class="code" href="structDBusServerVTable.html#a148b105ac0a3a5ae8efbba29bf7fe676">00048</a>   void        (* <a class="code" href="structDBusServerVTable.html#a148b105ac0a3a5ae8efbba29bf7fe676" title="Disconnect this server.">disconnect</a>)    (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> *server);
<a name="l00050"></a>00050 };
<a name="l00051"></a>00051 
<a name="l00056"></a><a class="code" href="structDBusServer.html">00056</a> <span class="keyword">struct </span><a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>
<a name="l00057"></a>00057 {
<a name="l00058"></a><a class="code" href="structDBusServer.html#a7578bd99fc8aee641cbb5198cb2e7004">00058</a>   <a class="code" href="structDBusAtomic.html" title="An atomic integer safe to increment or decrement from multiple threads.">DBusAtomic</a> <a class="code" href="structDBusServer.html#a7578bd99fc8aee641cbb5198cb2e7004" title="Reference count.">refcount</a>;                        
<a name="l00059"></a><a class="code" href="structDBusServer.html#aa5068890fea8c7e7261b600e7256e009">00059</a>   <span class="keyword">const</span> <a class="code" href="structDBusServerVTable.html" title="Virtual table to be implemented by all server &quot;subclasses&quot;.">DBusServerVTable</a> *<a class="code" href="structDBusServer.html#aa5068890fea8c7e7261b600e7256e009" title="Virtual methods for this instance.">vtable</a>;             
<a name="l00060"></a><a class="code" href="structDBusServer.html#a89c4751e61ed16591254b00cb9db1661">00060</a>   <a class="code" href="structDBusRMutex.html">DBusRMutex</a> *<a class="code" href="structDBusServer.html#a89c4751e61ed16591254b00cb9db1661" title="Lock on the server object.">mutex</a>;                          
<a name="l00062"></a><a class="code" href="structDBusServer.html#a799a94be0e3078f2e636f322f57d66f9">00062</a>   <a class="code" href="group__DBusSysdeps.html#ga24015a2f75b94c1307360755ce97f869" title="Type representing a universally unique ID.">DBusGUID</a> <a class="code" href="structDBusServer.html#a799a94be0e3078f2e636f322f57d66f9" title="Globally unique ID of server.">guid</a>;                              
<a name="l00064"></a><a class="code" href="structDBusServer.html#a79cd5d1b25412d56b7fd41902d575794">00064</a>   <a class="code" href="structDBusString.html">DBusString</a> <a class="code" href="structDBusServer.html#a79cd5d1b25412d56b7fd41902d575794" title="Hex-encoded version of GUID.">guid_hex</a>;                        
<a name="l00066"></a><a class="code" href="structDBusServer.html#a7955050967aeaf09679f8ba1f2941880">00066</a>   <a class="code" href="structDBusWatchList.html" title="DBusWatchList implementation details.">DBusWatchList</a> *<a class="code" href="structDBusServer.html#a7955050967aeaf09679f8ba1f2941880" title="Our watches.">watches</a>;                     
<a name="l00067"></a><a class="code" href="structDBusServer.html#afcaccd00f2392a390616c47e425bae85">00067</a>   <a class="code" href="structDBusTimeoutList.html" title="DBusTimeoutList implementation details.">DBusTimeoutList</a> *<a class="code" href="structDBusServer.html#afcaccd00f2392a390616c47e425bae85" title="Our timeouts.">timeouts</a>;                  
<a name="l00069"></a><a class="code" href="structDBusServer.html#a359852bf33b3051180a9477da4d89acd">00069</a>   <span class="keywordtype">char</span> *<a class="code" href="structDBusServer.html#a359852bf33b3051180a9477da4d89acd" title="Address this server is listening on.">address</a>;                              
<a name="l00070"></a><a class="code" href="structDBusServer.html#a01a6dbb2573ce35f639873cd4dd85b4d">00070</a>   <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a> <a class="code" href="structDBusServer.html#a01a6dbb2573ce35f639873cd4dd85b4d" title="flag which indicates that server has published its bus address.">published_address</a>;              
<a name="l00072"></a><a class="code" href="structDBusServer.html#a8f0fac02d4c6f9e5ff353cf696b6d991">00072</a>   <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#a8f0fac02d4c6f9e5ff353cf696b6d991" title="Max number of connections allowed at once.">max_connections</a>;                        
<a name="l00074"></a><a class="code" href="structDBusServer.html#a0601cca8307ba17d4a8bcebe48b08362">00074</a>   <a class="code" href="structDBusDataSlotList.html" title="Data structure that stores the actual user data set at a given slot.">DBusDataSlotList</a> <a class="code" href="structDBusServer.html#a0601cca8307ba17d4a8bcebe48b08362" title="Data stored by allocated integer ID.">slot_list</a>;   
<a name="l00076"></a>00076   <a class="code" href="group__DBusServer.html#ga8478cd198973f6a6cb224ec23175faa7" title="Called when a new connection to the server is available.">DBusNewConnectionFunction</a>  <a class="code" href="structDBusServer.html#a964ff125a29a7dac02f81e1a26233ff6" title="Callback to invoke when a new connection is created.">new_connection_function</a>;
<a name="l00078"></a>00078   <span class="keywordtype">void</span> *<a class="code" href="structDBusServer.html#acfba406ae6f288887feaccc3d621d094" title="Data for new connection callback.">new_connection_data</a>;
<a name="l00080"></a>00080   <a class="code" href="group__DBusMemory.html#ga061bcded226d76c7d7de35beaa165cb5" title="The type of a function which frees a block of memory.">DBusFreeFunction</a> <a class="code" href="structDBusServer.html#a5d5b68a92cf47a3eb50e5e6ec7d2ca3a" title="Callback to invoke to free new_connection_data when server is finalized or data is replaced...">new_connection_free_data_function</a>;
<a name="l00085"></a><a class="code" href="structDBusServer.html#adc1032bbed41413e5d0e01578f2bfffc">00085</a>   <span class="keywordtype">char</span> **<a class="code" href="structDBusServer.html#adc1032bbed41413e5d0e01578f2bfffc" title="Array of allowed authentication mechanisms.">auth_mechanisms</a>; 
<a name="l00087"></a><a class="code" href="structDBusServer.html#a7dabb30cdc09d6102810029fb56b8dfe">00087</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#a7dabb30cdc09d6102810029fb56b8dfe" title="TRUE if we are disconnected.">disconnected</a> : 1;              
<a name="l00089"></a>00089 <span class="preprocessor">#ifndef DBUS_DISABLE_CHECKS</span>
<a name="l00090"></a><a class="code" href="structDBusServer.html#adba8dd016471a800525a42926f9ee061">00090</a> <span class="preprocessor"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#adba8dd016471a800525a42926f9ee061" title="Does someone have the server mutex locked.">have_server_lock</a> : 1; 
<a name="l00091"></a>00091 <span class="preprocessor">#endif</span>
<a name="l00092"></a>00092 <span class="preprocessor"></span>};
<a name="l00093"></a>00093 
<a name="l00094"></a>00094 <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#gaacfb3d29553f205b362c850cfda02fd9" title="Initializes the members of the DBusServer base class.">_dbus_server_init_base</a>      (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00095"></a>00095                                          <span class="keyword">const</span> <a class="code" href="structDBusServerVTable.html" title="Virtual table to be implemented by all server &quot;subclasses&quot;.">DBusServerVTable</a> *vtable,
<a name="l00096"></a>00096                                          <span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a>       *address);
<a name="l00097"></a>00097 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga93b5bca90e69122d5acbbeef2b4ca03e" title="Finalizes the members of the DBusServer base class.">_dbus_server_finalize_base</a>  (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server);
<a name="l00098"></a>00098 <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#ga0866e5b205b8a570c77c8ad787b665fd" title="Adds a watch for this server, chaining out to application-provided watch handlers.">_dbus_server_add_watch</a>      (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00099"></a>00099                                          <a class="code" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>              *watch);
<a name="l00100"></a>00100 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga61cfdbfcc9316d4bae55f83b069f248c" title="Removes a watch previously added with _dbus_server_remove_watch().">_dbus_server_remove_watch</a>   (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00101"></a>00101                                          <a class="code" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>              *watch);
<a name="l00102"></a>00102 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#gabdc55833c157737f5cb8b3662f8fc0ed" title="Toggles all watch and notifies app via server&#39;s DBusWatchToggledFunction if available.">_dbus_server_toggle_all_watches</a> (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>         *server,
<a name="l00103"></a>00103                                              <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a>         enabled);
<a name="l00104"></a>00104 <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#ga7e10a662386fb7f693e0d168161e395b" title="Adds a timeout for this server, chaining out to application-provided timeout handlers.">_dbus_server_add_timeout</a>    (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00105"></a>00105                                          <a class="code" href="structDBusTimeout.html" title="Internals of DBusTimeout.">DBusTimeout</a>            *timeout);
<a name="l00106"></a>00106 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga69509697f091e354442cedb63886c20e" title="Removes a timeout previously added with _dbus_server_add_timeout().">_dbus_server_remove_timeout</a> (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00107"></a>00107                                          <a class="code" href="structDBusTimeout.html" title="Internals of DBusTimeout.">DBusTimeout</a>            *timeout);
<a name="l00108"></a>00108 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga74d2714ce80a089d2607a6fc5763d819" title="Toggles a timeout and notifies app via server&#39;s DBusTimeoutToggledFunction if available.">_dbus_server_toggle_timeout</a> (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server,
<a name="l00109"></a>00109                                          <a class="code" href="structDBusTimeout.html" title="Internals of DBusTimeout.">DBusTimeout</a>            *timeout,
<a name="l00110"></a>00110                                          <a class="code" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349" title="A boolean, valid values are TRUE and FALSE.">dbus_bool_t</a>             enabled);
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga987e9bf42ab4e4cededa8e8f65c54e2e" title="Like dbus_server_ref() but does not acquire the lock (must already be held)">_dbus_server_ref_unlocked</a>   (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server);
<a name="l00113"></a>00113 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#ga6e1d0b379c98b0d59ebd19dc9b8a2dbe" title="Like dbus_server_unref() but does not acquire the lock (must already be held)">_dbus_server_unref_unlocked</a> (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>             *server);
<a name="l00114"></a>00114 
<a name="l00115"></a>00115 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00116"></a>00116 {
<a name="l00117"></a>00117   DBUS_SERVER_LISTEN_NOT_HANDLED, 
<a name="l00118"></a>00118   DBUS_SERVER_LISTEN_OK,          
<a name="l00119"></a>00119   DBUS_SERVER_LISTEN_BAD_ADDRESS, 
<a name="l00120"></a>00120   DBUS_SERVER_LISTEN_DID_NOT_CONNECT, 
<a name="l00121"></a>00121   DBUS_SERVER_LISTEN_ADDRESS_ALREADY_USED 
<a name="l00122"></a>00122 } DBusServerListenResult;
<a name="l00123"></a>00123 
<a name="l00124"></a>00124 DBusServerListenResult <a class="code" href="group__DBusServerUnix.html#gaec00cdf4977b9bd33621df684406a779" title="Tries to interpret the address entry in a platform-specific way, creating a platform-specific server ...">_dbus_server_listen_platform_specific</a> (<a class="code" href="structDBusAddressEntry.html" title="Internals of DBusAddressEntry.">DBusAddressEntry</a>  *entry,
<a name="l00125"></a>00125                                                               <a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a>       **server_p,
<a name="l00126"></a>00126                                                               <a class="code" href="structDBusError.html" title="Object representing an exception.">DBusError</a>         *error);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="preprocessor">#ifdef DBUS_ENABLE_VERBOSE_MODE</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="keywordtype">void</span> _dbus_server_trace_ref (<a class="code" href="structDBusServer.html" title="Internals of DBusServer object.">DBusServer</a> *server,
<a name="l00130"></a>00130     <span class="keywordtype">int</span> old_refcount,
<a name="l00131"></a>00131     <span class="keywordtype">int</span> new_refcount,
<a name="l00132"></a>00132     <span class="keyword">const</span> <span class="keywordtype">char</span> *why);
<a name="l00133"></a>00133 <span class="preprocessor">#else</span>
<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#define _dbus_server_trace_ref(s,o,n,w) \</span>
<a name="l00135"></a>00135 <span class="preprocessor">  do \</span>
<a name="l00136"></a>00136 <span class="preprocessor">  {\</span>
<a name="l00137"></a>00137 <span class="preprocessor">    (void) (o); \</span>
<a name="l00138"></a>00138 <span class="preprocessor">    (void) (n); \</span>
<a name="l00139"></a>00139 <span class="preprocessor">  } while (0)</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span>
<a name="l00142"></a>00142 <span class="preprocessor">#ifdef DBUS_DISABLE_CHECKS</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define TOOK_LOCK_CHECK(server)</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#define RELEASING_LOCK_CHECK(server)</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define HAVE_LOCK_CHECK(server)</span>
<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define TOOK_LOCK_CHECK(server) do {                \</span>
<a name="l00148"></a>00148 <span class="preprocessor">    _dbus_assert (!(server)-&gt;have_server_lock); \</span>
<a name="l00149"></a>00149 <span class="preprocessor">    (server)-&gt;have_server_lock = TRUE;          \</span>
<a name="l00150"></a>00150 <span class="preprocessor">  } while (0)</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define RELEASING_LOCK_CHECK(server) do {            \</span>
<a name="l00152"></a>00152 <span class="preprocessor">    _dbus_assert ((server)-&gt;have_server_lock);   \</span>
<a name="l00153"></a>00153 <span class="preprocessor">    (server)-&gt;have_server_lock = FALSE;          \</span>
<a name="l00154"></a>00154 <span class="preprocessor">  } while (0)</span>
<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define HAVE_LOCK_CHECK(server)        _dbus_assert ((server)-&gt;have_server_lock)</span>
<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="comment">/* A &quot;DO_NOT_HAVE_LOCK_CHECK&quot; is impossible since we need the lock to check the flag */</span>
<a name="l00157"></a>00157 <span class="preprocessor">#endif</span>
<a name="l00158"></a>00158 <span class="preprocessor"></span>
<a name="l00159"></a>00159 <span class="preprocessor">#define TRACE_LOCKS 0</span>
<a name="l00160"></a>00160 <span class="preprocessor"></span>
<a name="l00161"></a>00161 <span class="preprocessor">#define SERVER_LOCK(server)   do {                                              \</span>
<a name="l00162"></a>00162 <span class="preprocessor">    if (TRACE_LOCKS) { _dbus_verbose (&quot;LOCK\n&quot;); }   \</span>
<a name="l00163"></a>00163 <span class="preprocessor">    _dbus_rmutex_lock ((server)-&gt;mutex);                                        \</span>
<a name="l00164"></a>00164 <span class="preprocessor">    TOOK_LOCK_CHECK (server);                                                   \</span>
<a name="l00165"></a>00165 <span class="preprocessor">  } while (0)</span>
<a name="l00166"></a>00166 <span class="preprocessor"></span>
<a name="l00167"></a>00167 <span class="preprocessor">#define SERVER_UNLOCK(server) do {                                                      \</span>
<a name="l00168"></a>00168 <span class="preprocessor">    if (TRACE_LOCKS) { _dbus_verbose (&quot;UNLOCK\n&quot;);  }        \</span>
<a name="l00169"></a>00169 <span class="preprocessor">    RELEASING_LOCK_CHECK (server);                                                      \</span>
<a name="l00170"></a>00170 <span class="preprocessor">    _dbus_rmutex_unlock ((server)-&gt;mutex);                                              \</span>
<a name="l00171"></a>00171 <span class="preprocessor">  } while (0)</span>
<a name="l00172"></a>00172 <span class="preprocessor"></span>
<a name="l00173"></a>00173 <a class="code" href="group__DBusMacros.html#gae4a9263a43f8220f6e1c0fd07cf6e59a" title="Macro used after declaring functions in the D-Bus header files.">DBUS_END_DECLS</a>
<a name="l00174"></a>00174 
<a name="l00175"></a>00175 <span class="preprocessor">#endif </span><span class="comment">/* DBUS_SERVER_PROTECTED_H */</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:31 for D-Bus by &#160;<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>