Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

dbus-mainloop.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-mainloop.h  Main loop utility
00003  *
00004  * Copyright (C) 2003  Red Hat, Inc.
00005  *
00006  * Licensed under the Academic Free License version 1.2
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 
00024 #ifndef DBUS_MAINLOOP_H
00025 #define DBUS_MAINLOOP_H
00026 
00027 #include <dbus/dbus.h>
00028 
00029 typedef struct DBusLoop DBusLoop;
00030 
00031 typedef dbus_bool_t (* DBusWatchFunction)   (DBusWatch     *watch,
00032                                              unsigned int   condition,
00033                                              void          *data);
00034 typedef void        (* DBusTimeoutFunction) (DBusTimeout   *timeout,
00035                                              void          *data);
00036 
00037 DBusLoop*   _dbus_loop_new            (void);
00038 void        _dbus_loop_ref            (DBusLoop            *loop);
00039 void        _dbus_loop_unref          (DBusLoop            *loop);
00040 dbus_bool_t _dbus_loop_add_watch      (DBusLoop            *loop,
00041                                        DBusWatch           *watch,
00042                                        DBusWatchFunction    function,
00043                                        void                *data,
00044                                        DBusFreeFunction     free_data_func);
00045 void        _dbus_loop_remove_watch   (DBusLoop            *loop,
00046                                        DBusWatch           *watch,
00047                                        DBusWatchFunction    function,
00048                                        void                *data);
00049 dbus_bool_t _dbus_loop_add_timeout    (DBusLoop            *loop,
00050                                        DBusTimeout         *timeout,
00051                                        DBusTimeoutFunction  function,
00052                                        void                *data,
00053                                        DBusFreeFunction     free_data_func);
00054 void        _dbus_loop_remove_timeout (DBusLoop            *loop,
00055                                        DBusTimeout         *timeout,
00056                                        DBusTimeoutFunction  function,
00057                                        void                *data);
00058 
00059 dbus_bool_t _dbus_loop_queue_dispatch (DBusLoop            *loop,
00060                                        DBusConnection      *connection);
00061 
00062 void        _dbus_loop_run            (DBusLoop            *loop);
00063 void        _dbus_loop_quit           (DBusLoop            *loop);
00064 dbus_bool_t _dbus_loop_iterate        (DBusLoop            *loop,
00065                                        dbus_bool_t          block);
00066 dbus_bool_t _dbus_loop_dispatch       (DBusLoop            *loop);
00067 
00068 int  _dbus_get_oom_wait    (void);
00069 void _dbus_wait_for_memory (void);
00070 
00071 #endif /* DBUS_MAINLOOP_H */

Generated on Wed Oct 22 14:05:02 2003 for D-BUS by doxygen1.3-rc3