• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List

dbus-watch.h

00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  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 
00036 /* Public methods on DBusWatch are in dbus-connection.h */
00037 
00038 typedef struct DBusWatchList DBusWatchList;
00039 
00040 #define _DBUS_WATCH_NVAL (1<<4)
00041 
00043 typedef dbus_bool_t (* DBusWatchHandler) (DBusWatch    *watch,
00044                                           unsigned int  flags,
00045                                           void         *data);
00046 
00047 DBusWatch* _dbus_watch_new                (int               fd,
00048                                            unsigned int      flags,
00049                                            dbus_bool_t       enabled,
00050                                            DBusWatchHandler  handler,
00051                                            void             *data,
00052                                            DBusFreeFunction  free_data_function);
00053 DBusWatch* _dbus_watch_ref                (DBusWatch        *watch);
00054 void       _dbus_watch_unref              (DBusWatch        *watch);
00055 void       _dbus_watch_invalidate         (DBusWatch        *watch);
00056 void       _dbus_watch_sanitize_condition (DBusWatch        *watch,
00057                                            unsigned int     *condition);
00058 void       _dbus_watch_set_handler        (DBusWatch        *watch,
00059                                            DBusWatchHandler  handler,
00060                                            void             *data,
00061                                            DBusFreeFunction  free_data_function);
00062 
00063 
00064 DBusWatchList* _dbus_watch_list_new           (void);
00065 void           _dbus_watch_list_free          (DBusWatchList           *watch_list);
00066 dbus_bool_t    _dbus_watch_list_set_functions (DBusWatchList           *watch_list,
00067                                                DBusAddWatchFunction     add_function,
00068                                                DBusRemoveWatchFunction  remove_function,
00069                                                DBusWatchToggledFunction toggled_function,
00070                                                void                    *data,
00071                                                DBusFreeFunction         free_data_function);
00072 dbus_bool_t    _dbus_watch_list_add_watch     (DBusWatchList           *watch_list,
00073                                                DBusWatch               *watch);
00074 void           _dbus_watch_list_remove_watch  (DBusWatchList           *watch_list,
00075                                                DBusWatch               *watch);
00076 void           _dbus_watch_list_toggle_watch  (DBusWatchList           *watch_list,
00077                                                DBusWatch               *watch,
00078                                                dbus_bool_t              enabled);
00079 dbus_bool_t    _dbus_watch_get_enabled        (DBusWatch              *watch);
00080 
00081 dbus_bool_t    _dbus_watch_get_oom_last_time  (DBusWatch               *watch);
00082 void           _dbus_watch_set_oom_last_time  (DBusWatch               *watch,
00083                                                dbus_bool_t              oom);
00084 
00087 DBUS_END_DECLS
00088 
00089 #endif /* DBUS_WATCH_H */

Generated on Fri Jul 11 2014 20:42:04 for D-Bus by  doxygen 1.7.1