D-Bus
1.6.8
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-transport.h DBusTransport object (internal to D-BUS implementation) 00003 * 00004 * Copyright (C) 2002, 2004 Red Hat Inc. 00005 * 00006 * Licensed under the Academic Free License version 2.1 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 */ 00023 #ifndef DBUS_TRANSPORT_H 00024 #define DBUS_TRANSPORT_H 00025 00026 #include <dbus/dbus-internals.h> 00027 #include <dbus/dbus-connection.h> 00028 #include <dbus/dbus-protocol.h> 00029 #include <dbus/dbus-address.h> 00030 00031 DBUS_BEGIN_DECLS 00032 00033 typedef struct DBusTransport DBusTransport; 00034 00035 DBusTransport* _dbus_transport_open (DBusAddressEntry *entry, 00036 DBusError *error); 00037 DBusTransport* _dbus_transport_ref (DBusTransport *transport); 00038 void _dbus_transport_unref (DBusTransport *transport); 00039 void _dbus_transport_disconnect (DBusTransport *transport); 00040 dbus_bool_t _dbus_transport_get_is_connected (DBusTransport *transport); 00041 dbus_bool_t _dbus_transport_get_is_authenticated (DBusTransport *transport); 00042 dbus_bool_t _dbus_transport_get_is_anonymous (DBusTransport *transport); 00043 dbus_bool_t _dbus_transport_can_pass_unix_fd (DBusTransport *transport); 00044 00045 const char* _dbus_transport_get_address (DBusTransport *transport); 00046 const char* _dbus_transport_get_server_id (DBusTransport *transport); 00047 dbus_bool_t _dbus_transport_handle_watch (DBusTransport *transport, 00048 DBusWatch *watch, 00049 unsigned int condition); 00050 dbus_bool_t _dbus_transport_set_connection (DBusTransport *transport, 00051 DBusConnection *connection); 00052 void _dbus_transport_do_iteration (DBusTransport *transport, 00053 unsigned int flags, 00054 int timeout_milliseconds); 00055 DBusDispatchStatus _dbus_transport_get_dispatch_status (DBusTransport *transport); 00056 dbus_bool_t _dbus_transport_queue_messages (DBusTransport *transport); 00057 00058 void _dbus_transport_set_max_message_size (DBusTransport *transport, 00059 long size); 00060 long _dbus_transport_get_max_message_size (DBusTransport *transport); 00061 void _dbus_transport_set_max_received_size (DBusTransport *transport, 00062 long size); 00063 long _dbus_transport_get_max_received_size (DBusTransport *transport); 00064 00065 void _dbus_transport_set_max_message_unix_fds (DBusTransport *transport, 00066 long n); 00067 long _dbus_transport_get_max_message_unix_fds (DBusTransport *transport); 00068 void _dbus_transport_set_max_received_unix_fds(DBusTransport *transport, 00069 long n); 00070 long _dbus_transport_get_max_received_unix_fds(DBusTransport *transport); 00071 00072 dbus_bool_t _dbus_transport_get_socket_fd (DBusTransport *transport, 00073 int *fd_p); 00074 dbus_bool_t _dbus_transport_get_unix_user (DBusTransport *transport, 00075 unsigned long *uid); 00076 dbus_bool_t _dbus_transport_get_unix_process_id (DBusTransport *transport, 00077 unsigned long *pid); 00078 dbus_bool_t _dbus_transport_get_adt_audit_session_data (DBusTransport *transport, 00079 void **data, 00080 int *data_size); 00081 void _dbus_transport_set_unix_user_function (DBusTransport *transport, 00082 DBusAllowUnixUserFunction function, 00083 void *data, 00084 DBusFreeFunction free_data_function, 00085 void **old_data, 00086 DBusFreeFunction *old_free_data_function); 00087 dbus_bool_t _dbus_transport_get_windows_user (DBusTransport *transport, 00088 char **windows_sid_p); 00089 void _dbus_transport_set_windows_user_function (DBusTransport *transport, 00090 DBusAllowWindowsUserFunction function, 00091 void *data, 00092 DBusFreeFunction free_data_function, 00093 void **old_data, 00094 DBusFreeFunction *old_free_data_function); 00095 dbus_bool_t _dbus_transport_set_auth_mechanisms (DBusTransport *transport, 00096 const char **mechanisms); 00097 void _dbus_transport_set_allow_anonymous (DBusTransport *transport, 00098 dbus_bool_t value); 00099 00100 /* if DBUS_ENABLE_STATS */ 00101 void _dbus_transport_get_stats (DBusTransport *transport, 00102 dbus_uint32_t *queue_bytes, 00103 dbus_uint32_t *queue_fds, 00104 dbus_uint32_t *peak_queue_bytes, 00105 dbus_uint32_t *peak_queue_fds); 00106 00107 DBUS_END_DECLS 00108 00109 #endif /* DBUS_TRANSPORT_H */