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
00031
00032
00033 typedef struct DBusWatchList DBusWatchList;
00034
00035
typedef dbus_bool_t (* DBusWatchHandler) (
DBusWatch *watch,
00036
unsigned int flags,
00037
void *data);
00038
00039
DBusWatch*
_dbus_watch_new (
int fd,
00040
unsigned int flags,
00041
dbus_bool_t enabled,
00042 DBusWatchHandler handler,
00043
void *data,
00044
DBusFreeFunction free_data_function);
00045
DBusWatch*
_dbus_watch_ref (
DBusWatch *watch);
00046
void _dbus_watch_unref (
DBusWatch *watch);
00047
void _dbus_watch_invalidate (
DBusWatch *watch);
00048
void _dbus_watch_sanitize_condition (
DBusWatch *watch,
00049
unsigned int *condition);
00050
void _dbus_watch_set_handler (
DBusWatch *watch,
00051 DBusWatchHandler handler,
00052
void *data,
00053
DBusFreeFunction free_data_function);
00054
00055
00056
DBusWatchList*
_dbus_watch_list_new (
void);
00057
void _dbus_watch_list_free (DBusWatchList *watch_list);
00058
dbus_bool_t _dbus_watch_list_set_functions (DBusWatchList *watch_list,
00059 DBusAddWatchFunction add_function,
00060 DBusRemoveWatchFunction remove_function,
00061 DBusWatchToggledFunction toggled_function,
00062
void *data,
00063
DBusFreeFunction free_data_function);
00064
dbus_bool_t _dbus_watch_list_add_watch (DBusWatchList *watch_list,
00065
DBusWatch *watch);
00066
void _dbus_watch_list_remove_watch (DBusWatchList *watch_list,
00067
DBusWatch *watch);
00068
void _dbus_watch_list_toggle_watch (DBusWatchList *watch_list,
00069
DBusWatch *watch,
00070
dbus_bool_t enabled);
00071
00072
00073
DBUS_END_DECLS;
00074
00075
#endif