Main Page | Modules | Data Structures | Directories | File List | Data Fields | Related Pages

dbus-watch.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-watch.h DBusWatch internal interfaces
00003  *
00004  * Copyright (C) 2002  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* Public methods on DBusWatch are in dbus-connection.h */
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 /* DBUS_WATCH_H */

Generated on Fri Sep 30 19:45:37 2005 for D-BUS by  doxygen 1.4.4