Current File : //usr/share/doc/dbus/api/dbus-transport-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-transport-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-transport-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-transport-protected.h Used by subclasses of DBusTransport 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, 2004  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_TRANSPORT_PROTECTED_H</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define DBUS_TRANSPORT_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-errors.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;dbus/dbus-transport.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;dbus/dbus-message-internal.h&gt;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &lt;dbus/dbus-auth.h&gt;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;dbus/dbus-resources.h&gt;</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <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="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structDBusTransportVTable.html" title="The virtual table that must be implemented to create a new kind of transport.">DBusTransportVTable</a> <a class="code" href="structDBusTransportVTable.html" title="The virtual table that must be implemented to create a new kind of transport.">DBusTransportVTable</a>;
<a name="l00036"></a>00036 
<a name="l00041"></a><a class="code" href="structDBusTransportVTable.html">00041</a> <span class="keyword">struct </span><a class="code" href="structDBusTransportVTable.html" title="The virtual table that must be implemented to create a new kind of transport.">DBusTransportVTable</a>
<a name="l00042"></a>00042 {
<a name="l00043"></a><a class="code" href="structDBusTransportVTable.html#a85adba17e1ea7e9a687146908c735dfc">00043</a>   void        (* <a class="code" href="structDBusTransportVTable.html#a85adba17e1ea7e9a687146908c735dfc" title="The finalize method must free the transport.">finalize</a>)              (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport);
<a name="l00046"></a><a class="code" href="structDBusTransportVTable.html#ad7e364d129b6921b0c7b554e29d395f5">00046</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="structDBusTransportVTable.html#ad7e364d129b6921b0c7b554e29d395f5" title="The handle_watch method handles reading/writing data as indicated by the flags.">handle_watch</a>)          (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport,
<a name="l00047"></a>00047                                          <a class="code" href="structDBusWatch.html" title="Implementation of DBusWatch.">DBusWatch</a>     *watch,
<a name="l00048"></a>00048                                          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>   flags);
<a name="l00053"></a><a class="code" href="structDBusTransportVTable.html#addf39f9f35702bc66dd33c0fd1dcb62c">00053</a>   void        (* <a class="code" href="structDBusTransportVTable.html#addf39f9f35702bc66dd33c0fd1dcb62c" title="Disconnect this transport.">disconnect</a>)            (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport);
<a name="l00056"></a><a class="code" href="structDBusTransportVTable.html#a039019c6859c75e7b9c3b05a38043f64">00056</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="structDBusTransportVTable.html#a039019c6859c75e7b9c3b05a38043f64" title="Called when transport-&gt;connection has been filled in.">connection_set</a>)        (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport);
<a name="l00059"></a><a class="code" href="structDBusTransportVTable.html#addbd055aef5a4d243b3e7e89513d2c38">00059</a>   void        (* <a class="code" href="structDBusTransportVTable.html#addbd055aef5a4d243b3e7e89513d2c38" title="Called to do a single &quot;iteration&quot; (block on select/poll followed by reading or writing data)...">do_iteration</a>)          (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport,
<a name="l00060"></a>00060                                          <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>   flags,
<a name="l00061"></a>00061                                          <span class="keywordtype">int</span>            timeout_milliseconds);
<a name="l00066"></a><a class="code" href="structDBusTransportVTable.html#af28ab32fb4f7332a245f48a7d2823dfc">00066</a>   void        (* <a class="code" href="structDBusTransportVTable.html#af28ab32fb4f7332a245f48a7d2823dfc" title="Outstanding messages counter changed.">live_messages_changed</a>) (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport);
<a name="l00069"></a><a class="code" href="structDBusTransportVTable.html#ab11f6388cdbd7f5e44e52c884670bee5">00069</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="structDBusTransportVTable.html#ab11f6388cdbd7f5e44e52c884670bee5" title="Get socket file descriptor.">get_socket_fd</a>) (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a> *transport,
<a name="l00070"></a>00070                                  <span class="keywordtype">int</span>           *fd_p);
<a name="l00072"></a>00072 };
<a name="l00073"></a>00073 
<a name="l00080"></a><a class="code" href="structDBusTransport.html">00080</a> <span class="keyword">struct </span><a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a>
<a name="l00081"></a>00081 {
<a name="l00082"></a><a class="code" href="structDBusTransport.html#a1a6554a692a353f8402c1419cd94e904">00082</a>   <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a1a6554a692a353f8402c1419cd94e904" title="Reference count.">refcount</a>;                               
<a name="l00084"></a><a class="code" href="structDBusTransport.html#a7350850a4e02a7eaa4036eb47d4778e5">00084</a>   <span class="keyword">const</span> <a class="code" href="structDBusTransportVTable.html" title="The virtual table that must be implemented to create a new kind of transport.">DBusTransportVTable</a> *<a class="code" href="structDBusTransport.html#a7350850a4e02a7eaa4036eb47d4778e5" title="Virtual methods for this instance.">vtable</a>;          
<a name="l00086"></a><a class="code" href="structDBusTransport.html#a8abdfc9327aa30550982c83b45354651">00086</a>   <a class="code" href="structDBusConnection.html" title="Implementation details of DBusConnection.">DBusConnection</a> *<a class="code" href="structDBusTransport.html#a8abdfc9327aa30550982c83b45354651" title="Connection owning this transport.">connection</a>;                 
<a name="l00088"></a><a class="code" href="structDBusTransport.html#aaaba590c281236d176600016b7edab48">00088</a>   <a class="code" href="structDBusMessageLoader.html" title="Implementation details of DBusMessageLoader.">DBusMessageLoader</a> *<a class="code" href="structDBusTransport.html#aaaba590c281236d176600016b7edab48" title="Message-loading buffer.">loader</a>;                  
<a name="l00090"></a><a class="code" href="structDBusTransport.html#acf71c91312f325be13ce6c09298b1eb8">00090</a>   <a class="code" href="structDBusAuth.html" title="Internal members of DBusAuth.">DBusAuth</a> *<a class="code" href="structDBusTransport.html#acf71c91312f325be13ce6c09298b1eb8" title="Authentication conversation.">auth</a>;                             
<a name="l00092"></a><a class="code" href="structDBusTransport.html#acb3d5fe913d4c281f3495e95cd450c57">00092</a>   <a class="code" href="structDBusCredentials.html">DBusCredentials</a> *<a class="code" href="structDBusTransport.html#acb3d5fe913d4c281f3495e95cd450c57" title="Credentials of other end read from the socket.">credentials</a>;               
<a name="l00094"></a><a class="code" href="structDBusTransport.html#a23e0925741fc1c4ba3a369bac4bca4b6">00094</a>   <span class="keywordtype">long</span> <a class="code" href="structDBusTransport.html#a23e0925741fc1c4ba3a369bac4bca4b6" title="Max total size of received messages.">max_live_messages_size</a>;                
<a name="l00095"></a><a class="code" href="structDBusTransport.html#a2d96972bbc56b78360cb0cfaa3f30266">00095</a>   <span class="keywordtype">long</span> <a class="code" href="structDBusTransport.html#a2d96972bbc56b78360cb0cfaa3f30266" title="Max total unix fds of received messages.">max_live_messages_unix_fds</a>;            
<a name="l00097"></a><a class="code" href="structDBusTransport.html#afb19bae6f7cfe595f3f1ae0ce53ccab0">00097</a>   <a class="code" href="structDBusCounter.html" title="Internals of DBusCounter.">DBusCounter</a> *<a class="code" href="structDBusTransport.html#afb19bae6f7cfe595f3f1ae0ce53ccab0" title="Counter for size/unix fds of all live messages.">live_messages</a>;                 
<a name="l00099"></a><a class="code" href="structDBusTransport.html#a586180e57d80c428fc81e579d9159cb2">00099</a>   <span class="keywordtype">char</span> *<a class="code" href="structDBusTransport.html#a586180e57d80c428fc81e579d9159cb2" title="Address of the server we are connecting to (NULL for the server side of a transport)">address</a>;                              
<a name="l00101"></a><a class="code" href="structDBusTransport.html#aaad7cb51a3e4ff2dd900ac971cc52b36">00101</a>   <span class="keywordtype">char</span> *<a class="code" href="structDBusTransport.html#aaad7cb51a3e4ff2dd900ac971cc52b36" title="GUID we expect the server to have, NULL on server side or if we don&#39;t have an expectation.">expected_guid</a>;                        
<a name="l00103"></a><a class="code" href="structDBusTransport.html#ac83be11f3497da6a21aed51782cd68d0">00103</a>   <a class="code" href="group__DBusConnection.html#ga36419a145848f3b234b3ba5640b0a3d0" title="Called during authentication to check whether the given UNIX user ID is allowed to connect...">DBusAllowUnixUserFunction</a> <a class="code" href="structDBusTransport.html#ac83be11f3497da6a21aed51782cd68d0" title="Function for checking whether a user is authorized.">unix_user_function</a>; 
<a name="l00104"></a><a class="code" href="structDBusTransport.html#a7df35abee6aeef69eff659d65dd430f4">00104</a>   <span class="keywordtype">void</span> *<a class="code" href="structDBusTransport.html#a7df35abee6aeef69eff659d65dd430f4" title="Data for unix_user_function.">unix_user_data</a>;                         
<a name="l00106"></a><a class="code" href="structDBusTransport.html#a754f10d16c06f373464fe6bf88a15cdd">00106</a>   <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="structDBusTransport.html#a754f10d16c06f373464fe6bf88a15cdd" title="Function to free unix_user_data.">free_unix_user_data</a>;         
<a name="l00108"></a><a class="code" href="structDBusTransport.html#a17403591c2a1d936be5ed13a36e6416a">00108</a>   <a class="code" href="group__DBusConnection.html#ga47436366726762688036c600d651bab6" title="Called during authentication to check whether the given Windows user ID is allowed to connect...">DBusAllowWindowsUserFunction</a> <a class="code" href="structDBusTransport.html#a17403591c2a1d936be5ed13a36e6416a" title="Function for checking whether a user is authorized.">windows_user_function</a>; 
<a name="l00109"></a><a class="code" href="structDBusTransport.html#a333c4300fe345d25e9dcb828d20baff7">00109</a>   <span class="keywordtype">void</span> *<a class="code" href="structDBusTransport.html#a333c4300fe345d25e9dcb828d20baff7" title="Data for windows_user_function.">windows_user_data</a>;                            
<a name="l00111"></a><a class="code" href="structDBusTransport.html#aab0e5248bd01f31ac4dcdab3c3b7b570">00111</a>   <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="structDBusTransport.html#aab0e5248bd01f31ac4dcdab3c3b7b570" title="Function to free windows_user_data.">free_windows_user_data</a>;            
<a name="l00113"></a><a class="code" href="structDBusTransport.html#a487a7375e94efba850f8344a252cfa63">00113</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a487a7375e94efba850f8344a252cfa63" title="TRUE if we are disconnected.">disconnected</a> : 1;              
<a name="l00114"></a><a class="code" href="structDBusTransport.html#a12d3052e51b2f0bf398d48e31e5f9da8">00114</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a12d3052e51b2f0bf398d48e31e5f9da8" title="Cache of auth state; use _dbus_transport_peek_is_authenticated() to query value.">authenticated</a> : 1;             
<a name="l00115"></a><a class="code" href="structDBusTransport.html#a7d91848b94203022be1090d93dd2cd04">00115</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a7d91848b94203022be1090d93dd2cd04" title="TRUE if we need to send credentials">send_credentials_pending</a> : 1;  
<a name="l00116"></a><a class="code" href="structDBusTransport.html#aaa29089fbb1fbdb5b412b3ed18c84b2d">00116</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#aaa29089fbb1fbdb5b412b3ed18c84b2d" title="TRUE if we need to receive credentials">receive_credentials_pending</a> : 1; 
<a name="l00117"></a><a class="code" href="structDBusTransport.html#a38fa70b1473eb08a6c871c7791b46d6e">00117</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a38fa70b1473eb08a6c871c7791b46d6e" title="TRUE if on the server side">is_server</a> : 1;                 
<a name="l00118"></a><a class="code" href="structDBusTransport.html#a6a546ecc2f6467a51973681d0b816809">00118</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a6a546ecc2f6467a51973681d0b816809" title="TRUE if we&#39;ve recovered unused bytes from auth">unused_bytes_recovered</a> : 1;    
<a name="l00119"></a><a class="code" href="structDBusTransport.html#a30a82ca7826ef4735a5caa4c921ec014">00119</a>   <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structDBusTransport.html#a30a82ca7826ef4735a5caa4c921ec014" title="TRUE if an anonymous client can connect">allow_anonymous</a> : 1;           
<a name="l00120"></a>00120 };
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <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__DBusTransport.html#gaa5ece78ea671fe9d9ed17fc6920c9d09" title="Initializes the base class members of DBusTransport.">_dbus_transport_init_base</a>     (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a>             *transport,
<a name="l00123"></a>00123                                            <span class="keyword">const</span> <a class="code" href="structDBusTransportVTable.html" title="The virtual table that must be implemented to create a new kind of transport.">DBusTransportVTable</a> *vtable,
<a name="l00124"></a>00124                                            <span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a>          *server_guid,
<a name="l00125"></a>00125                                            <span class="keyword">const</span> <a class="code" href="structDBusString.html">DBusString</a>          *address);
<a name="l00126"></a>00126 <span class="keywordtype">void</span>        <a class="code" href="group__DBusTransport.html#gaf27a2aceb062921f3915acb1491a646a" title="Finalizes base class members of DBusTransport.">_dbus_transport_finalize_base</a> (<a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a>             *transport);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00130"></a>00130 {
<a name="l00131"></a>00131   DBUS_TRANSPORT_OPEN_NOT_HANDLED,    
<a name="l00132"></a>00132   DBUS_TRANSPORT_OPEN_OK,             
<a name="l00133"></a>00133   DBUS_TRANSPORT_OPEN_BAD_ADDRESS,    
<a name="l00134"></a>00134   DBUS_TRANSPORT_OPEN_DID_NOT_CONNECT 
<a name="l00135"></a>00135 } DBusTransportOpenResult;
<a name="l00136"></a>00136 
<a name="l00137"></a>00137 DBusTransportOpenResult <a class="code" href="group__DBusTransportUnix.html#gafd694944860033155276df9162bdf72e" title="Opens platform specific transport types.">_dbus_transport_open_platform_specific</a> (<a class="code" href="structDBusAddressEntry.html" title="Internals of DBusAddressEntry.">DBusAddressEntry</a>  *entry,
<a name="l00138"></a>00138                                                                 <a class="code" href="structDBusTransport.html" title="Object representing a transport such as a socket.">DBusTransport</a>    **transport_p,
<a name="l00139"></a>00139                                                                 <a class="code" href="structDBusError.html" title="Object representing an exception.">DBusError</a>         *error);
<a name="l00140"></a>00140 
<a name="l00141"></a>00141 <span class="preprocessor">#define DBUS_TRANSPORT_CAN_SEND_UNIX_FD(x)      \</span>
<a name="l00142"></a>00142 <span class="preprocessor">  _dbus_auth_get_unix_fd_negotiated((x)-&gt;auth)</span>
<a name="l00143"></a>00143 <span class="preprocessor"></span>
<a name="l00144"></a>00144 <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="l00145"></a>00145 
<a name="l00146"></a>00146 <span class="preprocessor">#endif </span><span class="comment">/* DBUS_TRANSPORT_PROTECTED_H */</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:32 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>