Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

dbus-transport-protected.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-transport-protected.h Used by subclasses of DBusTransport object (internal to D-BUS implementation)
00003  *
00004  * Copyright (C) 2002  Red Hat Inc.
00005  *
00006  * Licensed under the Academic Free License version 1.2
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 #ifndef DBUS_TRANSPORT_PROTECTED_H
00024 #define DBUS_TRANSPORT_PROTECTED_H
00025 
00026 #include <dbus/dbus-internals.h>
00027 #include <dbus/dbus-errors.h>
00028 #include <dbus/dbus-transport.h>
00029 #include <dbus/dbus-message-internal.h>
00030 #include <dbus/dbus-auth.h>
00031 #include <dbus/dbus-resources.h>
00032 
00033 DBUS_BEGIN_DECLS;
00034 
00035 typedef struct DBusTransportVTable DBusTransportVTable;
00036 
00037 struct DBusTransportVTable
00038 {
00039   void        (* finalize)              (DBusTransport *transport);
00042   dbus_bool_t (* handle_watch)          (DBusTransport *transport,
00043                                          DBusWatch     *watch,
00044                                          unsigned int   flags);
00049   void        (* disconnect)            (DBusTransport *transport);
00052   dbus_bool_t (* connection_set)        (DBusTransport *transport);
00055   void        (* messages_pending)      (DBusTransport *transport,
00056                                          int            queue_length);
00061   void        (* do_iteration)          (DBusTransport *transport,
00062                                          unsigned int   flags,
00063                                          int            timeout_milliseconds);
00068   void        (* live_messages_changed) (DBusTransport *transport);
00070 };
00071 
00072 struct DBusTransport
00073 {
00074   int refcount;                               
00076   const DBusTransportVTable *vtable;          
00078   DBusConnection *connection;                 
00080   DBusMessageLoader *loader;                  
00082   DBusAuth *auth;                             
00084   DBusCredentials credentials;                
00086   long max_live_messages_size;                
00088   DBusCounter *live_messages_size;            
00091   char *address;                              
00093   DBusAllowUnixUserFunction unix_user_function; 
00094   void *unix_user_data;                         
00095   DBusFreeFunction free_unix_user_data;         
00097   unsigned int disconnected : 1;              
00098   unsigned int authenticated : 1;             
00099   unsigned int messages_need_sending : 1;     
00100   unsigned int send_credentials_pending : 1;  
00101   unsigned int receive_credentials_pending : 1; 
00102   unsigned int is_server : 1;                 
00103   unsigned int unused_bytes_recovered : 1;    
00104 };
00105 
00106 dbus_bool_t _dbus_transport_init_base     (DBusTransport             *transport,
00107                                            const DBusTransportVTable *vtable,
00108                                            dbus_bool_t                server,
00109                                            const DBusString          *address);
00110 void        _dbus_transport_finalize_base (DBusTransport             *transport);
00111 
00112 
00113 
00114 DBUS_END_DECLS;
00115 
00116 #endif /* DBUS_TRANSPORT_PROTECTED_H */

Generated on Wed Oct 22 14:05:05 2003 for D-BUS by doxygen1.3-rc3