00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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