File indexing completed on 2025-01-18 09:55:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
0024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
0025 #endif
0026
0027 #ifndef DBUS_SERVER_H
0028 #define DBUS_SERVER_H
0029
0030 #include <dbus/dbus-errors.h>
0031 #include <dbus/dbus-macros.h>
0032 #include <dbus/dbus-message.h>
0033 #include <dbus/dbus-connection.h>
0034 #include <dbus/dbus-protocol.h>
0035
0036 DBUS_BEGIN_DECLS
0037
0038
0039
0040
0041
0042
0043 typedef struct DBusServer DBusServer;
0044
0045
0046
0047
0048 typedef void (* DBusNewConnectionFunction) (DBusServer *server,
0049 DBusConnection *new_connection,
0050 void *data);
0051
0052 DBUS_EXPORT
0053 DBusServer* dbus_server_listen (const char *address,
0054 DBusError *error);
0055 DBUS_EXPORT
0056 DBusServer* dbus_server_ref (DBusServer *server);
0057 DBUS_EXPORT
0058 void dbus_server_unref (DBusServer *server);
0059 DBUS_EXPORT
0060 void dbus_server_disconnect (DBusServer *server);
0061 DBUS_EXPORT
0062 dbus_bool_t dbus_server_get_is_connected (DBusServer *server);
0063 DBUS_EXPORT
0064 char* dbus_server_get_address (DBusServer *server);
0065 DBUS_EXPORT
0066 char* dbus_server_get_id (DBusServer *server);
0067 DBUS_EXPORT
0068 void dbus_server_set_new_connection_function (DBusServer *server,
0069 DBusNewConnectionFunction function,
0070 void *data,
0071 DBusFreeFunction free_data_function);
0072 DBUS_EXPORT
0073 dbus_bool_t dbus_server_set_watch_functions (DBusServer *server,
0074 DBusAddWatchFunction add_function,
0075 DBusRemoveWatchFunction remove_function,
0076 DBusWatchToggledFunction toggled_function,
0077 void *data,
0078 DBusFreeFunction free_data_function);
0079 DBUS_EXPORT
0080 dbus_bool_t dbus_server_set_timeout_functions (DBusServer *server,
0081 DBusAddTimeoutFunction add_function,
0082 DBusRemoveTimeoutFunction remove_function,
0083 DBusTimeoutToggledFunction toggled_function,
0084 void *data,
0085 DBusFreeFunction free_data_function);
0086 DBUS_EXPORT
0087 dbus_bool_t dbus_server_set_auth_mechanisms (DBusServer *server,
0088 const char **mechanisms);
0089
0090 DBUS_EXPORT
0091 dbus_bool_t dbus_server_allocate_data_slot (dbus_int32_t *slot_p);
0092 DBUS_EXPORT
0093 void dbus_server_free_data_slot (dbus_int32_t *slot_p);
0094 DBUS_EXPORT
0095 dbus_bool_t dbus_server_set_data (DBusServer *server,
0096 int slot,
0097 void *data,
0098 DBusFreeFunction free_data_func);
0099 DBUS_EXPORT
0100 void* dbus_server_get_data (DBusServer *server,
0101 int slot);
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115 static inline void
0116 dbus_clear_server (DBusServer **pointer_to_server)
0117 {
0118 _dbus_clear_pointer_impl (DBusServer, pointer_to_server, dbus_server_unref);
0119 }
0120
0121
0122
0123 DBUS_END_DECLS
0124
0125 #endif