D-Bus
1.10.12
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-mainloop.h Main loop utility 00003 * 00004 * Copyright (C) 2003 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 00024 #ifndef DBUS_MAINLOOP_H 00025 #define DBUS_MAINLOOP_H 00026 00027 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00028 00029 #include <dbus/dbus.h> 00030 00031 typedef struct DBusLoop DBusLoop; 00032 00033 typedef dbus_bool_t (* DBusWatchFunction) (DBusWatch *watch, 00034 unsigned int condition, 00035 void *data); 00036 00037 DBusLoop* _dbus_loop_new (void); 00038 DBusLoop* _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 void _dbus_loop_remove_watch (DBusLoop *loop, 00043 DBusWatch *watch); 00044 void _dbus_loop_toggle_watch (DBusLoop *loop, 00045 DBusWatch *watch); 00046 dbus_bool_t _dbus_loop_add_timeout (DBusLoop *loop, 00047 DBusTimeout *timeout); 00048 void _dbus_loop_remove_timeout (DBusLoop *loop, 00049 DBusTimeout *timeout); 00050 00051 dbus_bool_t _dbus_loop_queue_dispatch (DBusLoop *loop, 00052 DBusConnection *connection); 00053 00054 void _dbus_loop_run (DBusLoop *loop); 00055 void _dbus_loop_quit (DBusLoop *loop); 00056 dbus_bool_t _dbus_loop_iterate (DBusLoop *loop, 00057 dbus_bool_t block); 00058 dbus_bool_t _dbus_loop_dispatch (DBusLoop *loop); 00059 00060 int _dbus_get_oom_wait (void); 00061 void _dbus_wait_for_memory (void); 00062 00063 #endif /* !DOXYGEN_SHOULD_SKIP_THIS */ 00064 00065 #endif /* DBUS_MAINLOOP_H */ 00066