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 :  /proc/21573/root/usr/share/devhelp/books/dbus/api/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/share/devhelp/books/dbus/api/dbus-server-protected_8h-source.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: dbus-server-protected.h Source File</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 id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul></div>
<h1>dbus-server-protected.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -*- mode: C; c-file-style: "gnu"; 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  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;config.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;dbus/dbus-internals.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;dbus/dbus-threads-internal.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;dbus/dbus-server.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;dbus/dbus-address.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;dbus/dbus-timeout.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;dbus/dbus-watch.h&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;dbus/dbus-resources.h&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;dbus/dbus-dataslot.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;dbus/dbus-string.h&gt;</span>
<a name="l00036"></a>00036 
<a name="l00037"></a>00037 <a class="code" href="group__DBusMacros.html#g875146b01015e9ced22b25d76d549ab2">DBUS_BEGIN_DECLS</a>
<a name="l00038"></a>00038 
<a name="l00039"></a>00039 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structDBusServerVTable.html">DBusServerVTable</a> DBusServerVTable;
<a name="l00040"></a>00040 
<a name="l00044"></a><a class="code" href="structDBusServerVTable.html">00044</a> <span class="keyword">struct </span>DBusServerVTable
<a name="l00045"></a>00045 {
<a name="l00046"></a>00046   void        (* <a class="code" href="structDBusServerVTable.html#cd97315e812352da38449f910775b08d">finalize</a>)      (<a class="code" href="structDBusServer.html">DBusServer</a> *server);
<a name="l00049"></a>00049   void        (* <a class="code" href="structDBusServerVTable.html#148b105ac0a3a5ae8efbba29bf7fe676">disconnect</a>)    (<a class="code" href="structDBusServer.html">DBusServer</a> *server);
<a name="l00051"></a>00051 };
<a name="l00052"></a>00052 
<a name="l00056"></a><a class="code" href="structDBusServer.html">00056</a> <span class="keyword">struct </span><a class="code" href="structDBusServer.html">DBusServer</a>
<a name="l00057"></a>00057 {
<a name="l00058"></a><a class="code" href="structDBusServer.html#7578bd99fc8aee641cbb5198cb2e7004">00058</a>   <a class="code" href="structDBusAtomic.html">DBusAtomic</a> <a class="code" href="structDBusServer.html#7578bd99fc8aee641cbb5198cb2e7004">refcount</a>;                        
<a name="l00059"></a><a class="code" href="structDBusServer.html#a5068890fea8c7e7261b600e7256e009">00059</a>   <span class="keyword">const</span> DBusServerVTable *<a class="code" href="structDBusServer.html#a5068890fea8c7e7261b600e7256e009">vtable</a>;             
<a name="l00060"></a><a class="code" href="structDBusServer.html#62732ec74cf0293382f588fb1f417470">00060</a>   <a class="code" href="group__DBusThreads.html#g4eb021cd6cd0830423eac2738e0ddc40">DBusMutex</a> *<a class="code" href="structDBusServer.html#62732ec74cf0293382f588fb1f417470">mutex</a>;                           
<a name="l00062"></a><a class="code" href="structDBusServer.html#799a94be0e3078f2e636f322f57d66f9">00062</a>   <a class="code" href="unionDBusGUID.html">DBusGUID</a> <a class="code" href="structDBusServer.html#799a94be0e3078f2e636f322f57d66f9">guid</a>;                              
<a name="l00064"></a><a class="code" href="structDBusServer.html#79cd5d1b25412d56b7fd41902d575794">00064</a>   <a class="code" href="structDBusString.html">DBusString</a> <a class="code" href="structDBusServer.html#79cd5d1b25412d56b7fd41902d575794">guid_hex</a>;                        
<a name="l00066"></a><a class="code" href="structDBusServer.html#7955050967aeaf09679f8ba1f2941880">00066</a>   <a class="code" href="structDBusWatchList.html">DBusWatchList</a> *<a class="code" href="structDBusServer.html#7955050967aeaf09679f8ba1f2941880">watches</a>;                     
<a name="l00067"></a><a class="code" href="structDBusServer.html#fcaccd00f2392a390616c47e425bae85">00067</a>   <a class="code" href="structDBusTimeoutList.html">DBusTimeoutList</a> *<a class="code" href="structDBusServer.html#fcaccd00f2392a390616c47e425bae85">timeouts</a>;                  
<a name="l00069"></a><a class="code" href="structDBusServer.html#359852bf33b3051180a9477da4d89acd">00069</a>   <span class="keywordtype">char</span> *<a class="code" href="structDBusServer.html#359852bf33b3051180a9477da4d89acd">address</a>;                              
<a name="l00071"></a><a class="code" href="structDBusServer.html#8f0fac02d4c6f9e5ff353cf696b6d991">00071</a>   <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#8f0fac02d4c6f9e5ff353cf696b6d991">max_connections</a>;                        
<a name="l00073"></a><a class="code" href="structDBusServer.html#0601cca8307ba17d4a8bcebe48b08362">00073</a>   <a class="code" href="structDBusDataSlotList.html">DBusDataSlotList</a> <a class="code" href="structDBusServer.html#0601cca8307ba17d4a8bcebe48b08362">slot_list</a>;   
<a name="l00075"></a>00075   <a class="code" href="group__DBusServer.html#g86c64a45e0834df26a8feae3079f6fbf">DBusNewConnectionFunction</a>  <a class="code" href="structDBusServer.html#964ff125a29a7dac02f81e1a26233ff6">new_connection_function</a>;
<a name="l00077"></a>00077   <span class="keywordtype">void</span> *<a class="code" href="structDBusServer.html#cfba406ae6f288887feaccc3d621d094">new_connection_data</a>;
<a name="l00079"></a>00079   <a class="code" href="group__DBusMemory.html#g8792ec2b2b8626ca28022faf51ec415a">DBusFreeFunction</a> <a class="code" href="structDBusServer.html#5d5b68a92cf47a3eb50e5e6ec7d2ca3a">new_connection_free_data_function</a>;
<a name="l00084"></a><a class="code" href="structDBusServer.html#dc1032bbed41413e5d0e01578f2bfffc">00084</a>   <span class="keywordtype">char</span> **<a class="code" href="structDBusServer.html#dc1032bbed41413e5d0e01578f2bfffc">auth_mechanisms</a>; 
<a name="l00086"></a><a class="code" href="structDBusServer.html#7dabb30cdc09d6102810029fb56b8dfe">00086</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#7dabb30cdc09d6102810029fb56b8dfe">disconnected</a> : 1;              
<a name="l00088"></a>00088 <span class="preprocessor">#ifndef DBUS_DISABLE_CHECKS</span>
<a name="l00089"></a><a class="code" href="structDBusServer.html#dba8dd016471a800525a42926f9ee061">00089</a> <span class="preprocessor"></span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusServer.html#dba8dd016471a800525a42926f9ee061">have_server_lock</a> : 1; 
<a name="l00090"></a>00090 <span class="preprocessor">#endif</span>
<a name="l00091"></a>00091 <span class="preprocessor"></span>};
<a name="l00092"></a>00092 
<a name="l00093"></a>00093 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#gacfb3d29553f205b362c850cfda02fd9">_dbus_server_init_base</a>      (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00094"></a>00094                                          <span class="keyword">const</span> DBusServerVTable *vtable,
<a name="l00095"></a>00095                                          <span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a>       *address);
<a name="l00096"></a>00096 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g93b5bca90e69122d5acbbeef2b4ca03e">_dbus_server_finalize_base</a>  (<a class="code" href="structDBusServer.html">DBusServer</a>             *server);
<a name="l00097"></a>00097 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#g0866e5b205b8a570c77c8ad787b665fd">_dbus_server_add_watch</a>      (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00098"></a>00098                                          <a class="code" href="structDBusWatch.html">DBusWatch</a>              *watch);
<a name="l00099"></a>00099 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g61cfdbfcc9316d4bae55f83b069f248c">_dbus_server_remove_watch</a>   (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00100"></a>00100                                          <a class="code" href="structDBusWatch.html">DBusWatch</a>              *watch);
<a name="l00101"></a>00101 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g7bef63b643f53ec984f5da35653689e7">_dbus_server_toggle_watch</a>   (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00102"></a>00102                                          <a class="code" href="structDBusWatch.html">DBusWatch</a>              *watch,
<a name="l00103"></a>00103                                          <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>             enabled);
<a name="l00104"></a>00104 <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="code" href="group__DBusServerInternals.html#g7e10a662386fb7f693e0d168161e395b">_dbus_server_add_timeout</a>    (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00105"></a>00105                                          <a class="code" href="structDBusTimeout.html">DBusTimeout</a>            *timeout);
<a name="l00106"></a>00106 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g69509697f091e354442cedb63886c20e">_dbus_server_remove_timeout</a> (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00107"></a>00107                                          <a class="code" href="structDBusTimeout.html">DBusTimeout</a>            *timeout);
<a name="l00108"></a>00108 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g74d2714ce80a089d2607a6fc5763d819">_dbus_server_toggle_timeout</a> (<a class="code" href="structDBusServer.html">DBusServer</a>             *server,
<a name="l00109"></a>00109                                          <a class="code" href="structDBusTimeout.html">DBusTimeout</a>            *timeout,
<a name="l00110"></a>00110                                          <a class="code" href="group__DBusTypes.html#g39c9cb0f3a2a8ad6f55cc4855d035349">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#g987e9bf42ab4e4cededa8e8f65c54e2e">_dbus_server_ref_unlocked</a>   (<a class="code" href="structDBusServer.html">DBusServer</a>             *server);
<a name="l00113"></a>00113 <span class="keywordtype">void</span>        <a class="code" href="group__DBusServerInternals.html#g6e1d0b379c98b0d59ebd19dc9b8a2dbe">_dbus_server_unref_unlocked</a> (<a class="code" href="structDBusServer.html">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 } DBusServerListenResult;
<a name="l00122"></a>00122 
<a name="l00123"></a>00123 DBusServerListenResult <a class="code" href="group__DBusServerUnix.html#gec00cdf4977b9bd33621df684406a779">_dbus_server_listen_platform_specific</a> (<a class="code" href="structDBusAddressEntry.html">DBusAddressEntry</a>  *entry,
<a name="l00124"></a>00124                                                               <a class="code" href="structDBusServer.html">DBusServer</a>       **server_p,
<a name="l00125"></a>00125                                                               <a class="code" href="structDBusError.html">DBusError</a>         *error);
<a name="l00126"></a>00126 
<a name="l00127"></a>00127 <span class="preprocessor">#ifdef DBUS_DISABLE_CHECKS</span>
<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define TOOK_LOCK_CHECK(server)</span>
<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#define RELEASING_LOCK_CHECK(server)</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define HAVE_LOCK_CHECK(server)</span>
<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define TOOK_LOCK_CHECK(server) do {                \</span>
<a name="l00133"></a>00133 <span class="preprocessor">    _dbus_assert (!(server)-&gt;have_server_lock); \</span>
<a name="l00134"></a>00134 <span class="preprocessor">    (server)-&gt;have_server_lock = TRUE;          \</span>
<a name="l00135"></a>00135 <span class="preprocessor">  } while (0)</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define RELEASING_LOCK_CHECK(server) do {            \</span>
<a name="l00137"></a>00137 <span class="preprocessor">    _dbus_assert ((server)-&gt;have_server_lock);   \</span>
<a name="l00138"></a>00138 <span class="preprocessor">    (server)-&gt;have_server_lock = FALSE;          \</span>
<a name="l00139"></a>00139 <span class="preprocessor">  } while (0)</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span><span class="preprocessor">#define HAVE_LOCK_CHECK(server)        _dbus_assert ((server)-&gt;have_server_lock)</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="comment">/* A "DO_NOT_HAVE_LOCK_CHECK" is impossible since we need the lock to check the flag */</span>
<a name="l00142"></a>00142 <span class="preprocessor">#endif</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span>
<a name="l00144"></a>00144 <span class="preprocessor">#define TRACE_LOCKS 0</span>
<a name="l00145"></a>00145 <span class="preprocessor"></span>
<a name="l00146"></a>00146 <span class="preprocessor">#define SERVER_LOCK(server)   do {                                              \</span>
<a name="l00147"></a>00147 <span class="preprocessor">    if (TRACE_LOCKS) { _dbus_verbose ("  LOCK: %s\n", _DBUS_FUNCTION_NAME); }   \</span>
<a name="l00148"></a>00148 <span class="preprocessor">    _dbus_mutex_lock ((server)-&gt;mutex);                                          \</span>
<a name="l00149"></a>00149 <span class="preprocessor">    TOOK_LOCK_CHECK (server);                                                   \</span>
<a name="l00150"></a>00150 <span class="preprocessor">  } while (0)</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span>
<a name="l00152"></a>00152 <span class="preprocessor">#define SERVER_UNLOCK(server) do {                                                      \</span>
<a name="l00153"></a>00153 <span class="preprocessor">    if (TRACE_LOCKS) { _dbus_verbose ("  UNLOCK: %s\n", _DBUS_FUNCTION_NAME);  }        \</span>
<a name="l00154"></a>00154 <span class="preprocessor">    RELEASING_LOCK_CHECK (server);                                                      \</span>
<a name="l00155"></a>00155 <span class="preprocessor">    _dbus_mutex_unlock ((server)-&gt;mutex);                                                \</span>
<a name="l00156"></a>00156 <span class="preprocessor">  } while (0)</span>
<a name="l00157"></a>00157 <span class="preprocessor"></span>
<a name="l00158"></a>00158 <a class="code" href="group__DBusMacros.html#ge4a9263a43f8220f6e1c0fd07cf6e59a">DBUS_END_DECLS</a>
<a name="l00159"></a>00159 
<a name="l00160"></a>00160 <span class="preprocessor">#endif </span><span class="comment">/* DBUS_SERVER_PROTECTED_H */</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Dec 14 22:26:12 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