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_WATCH_H
00024 #define DBUS_WATCH_H
00025
00026 #include <dbus/dbus-internals.h>
00027 #include <dbus/dbus-connection.h>
00028
00029 DBUS_BEGIN_DECLS
00030
00036
00037
00038 typedef struct DBusWatchList DBusWatchList;
00039
00041 typedef dbus_bool_t (* DBusWatchHandler) (DBusWatch *watch,
00042 unsigned int flags,
00043 void *data);
00044
00045 DBusWatch* _dbus_watch_new (int fd,
00046 unsigned int flags,
00047 dbus_bool_t enabled,
00048 DBusWatchHandler handler,
00049 void *data,
00050 DBusFreeFunction free_data_function);
00051 DBusWatch* _dbus_watch_ref (DBusWatch *watch);
00052 void _dbus_watch_unref (DBusWatch *watch);
00053 void _dbus_watch_invalidate (DBusWatch *watch);
00054 void _dbus_watch_sanitize_condition (DBusWatch *watch,
00055 unsigned int *condition);
00056 void _dbus_watch_set_handler (DBusWatch *watch,
00057 DBusWatchHandler handler,
00058 void *data,
00059 DBusFreeFunction free_data_function);
00060
00061
00062 DBusWatchList* _dbus_watch_list_new (void);
00063 void _dbus_watch_list_free (DBusWatchList *watch_list);
00064 dbus_bool_t _dbus_watch_list_set_functions (DBusWatchList *watch_list,
00065 DBusAddWatchFunction add_function,
00066 DBusRemoveWatchFunction remove_function,
00067 DBusWatchToggledFunction toggled_function,
00068 void *data,
00069 DBusFreeFunction free_data_function);
00070 dbus_bool_t _dbus_watch_list_add_watch (DBusWatchList *watch_list,
00071 DBusWatch *watch);
00072 void _dbus_watch_list_remove_watch (DBusWatchList *watch_list,
00073 DBusWatch *watch);
00074 void _dbus_watch_list_toggle_watch (DBusWatchList *watch_list,
00075 DBusWatch *watch,
00076 dbus_bool_t enabled);
00077
00080 DBUS_END_DECLS
00081
00082 #endif