00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
00024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
00025 #endif
00026
00027 #ifndef DBUS_SERVER_H
00028 #define DBUS_SERVER_H
00029
00030 #include <dbus/dbus-errors.h>
00031 #include <dbus/dbus-message.h>
00032 #include <dbus/dbus-connection.h>
00033 #include <dbus/dbus-protocol.h>
00034
00035 DBUS_BEGIN_DECLS
00036
00042 typedef struct DBusServer DBusServer;
00043
00047 typedef void (* DBusNewConnectionFunction) (DBusServer *server,
00048 DBusConnection *new_connection,
00049 void *data);
00050
00051 DBusServer* dbus_server_listen (const char *address,
00052 DBusError *error);
00053 DBusServer* dbus_server_ref (DBusServer *server);
00054 void dbus_server_unref (DBusServer *server);
00055 void dbus_server_disconnect (DBusServer *server);
00056 dbus_bool_t dbus_server_get_is_connected (DBusServer *server);
00057 char* dbus_server_get_address (DBusServer *server);
00058 char* dbus_server_get_id (DBusServer *server);
00059 void dbus_server_set_new_connection_function (DBusServer *server,
00060 DBusNewConnectionFunction function,
00061 void *data,
00062 DBusFreeFunction free_data_function);
00063 dbus_bool_t dbus_server_set_watch_functions (DBusServer *server,
00064 DBusAddWatchFunction add_function,
00065 DBusRemoveWatchFunction remove_function,
00066 DBusWatchToggledFunction toggled_function,
00067 void *data,
00068 DBusFreeFunction free_data_function);
00069 dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server,
00070 DBusAddTimeoutFunction add_function,
00071 DBusRemoveTimeoutFunction remove_function,
00072 DBusTimeoutToggledFunction toggled_function,
00073 void *data,
00074 DBusFreeFunction free_data_function);
00075 dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server,
00076 const char **mechanisms);
00077
00078 dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p);
00079 void dbus_server_free_data_slot (dbus_int32_t *slot_p);
00080 dbus_bool_t dbus_server_set_data (DBusServer *server,
00081 int slot,
00082 void *data,
00083 DBusFreeFunction free_data_func);
00084 void* dbus_server_get_data (DBusServer *server,
00085 int slot);
00086
00089 DBUS_END_DECLS
00090
00091 #endif