D-Bus
1.10.12
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-timeout.h DBusTimeout internal interfaces 00003 * 00004 * Copyright (C) 2003 CodeFactory AB 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_TIMEOUT_H 00024 #define DBUS_TIMEOUT_H 00025 00026 #include <dbus/dbus-connection.h> 00027 #include <dbus/dbus-internals.h> 00028 00029 DBUS_BEGIN_DECLS 00030 00036 /* Public methods on DBusTimeout are in dbus-connection.h */ 00037 00038 typedef struct DBusTimeoutList DBusTimeoutList; 00039 00041 typedef dbus_bool_t (* DBusTimeoutHandler) (void *data); 00042 00043 DBUS_PRIVATE_EXPORT 00044 DBusTimeout* _dbus_timeout_new (int interval, 00045 DBusTimeoutHandler handler, 00046 void *data, 00047 DBusFreeFunction free_data_function); 00048 DBusTimeout* _dbus_timeout_ref (DBusTimeout *timeout); 00049 DBUS_PRIVATE_EXPORT 00050 void _dbus_timeout_unref (DBusTimeout *timeout); 00051 DBUS_PRIVATE_EXPORT 00052 void _dbus_timeout_set_interval (DBusTimeout *timeout, 00053 int interval); 00054 DBUS_PRIVATE_EXPORT 00055 void _dbus_timeout_set_enabled (DBusTimeout *timeout, 00056 dbus_bool_t enabled); 00057 00058 DBusTimeoutList *_dbus_timeout_list_new (void); 00059 void _dbus_timeout_list_free (DBusTimeoutList *timeout_list); 00060 dbus_bool_t _dbus_timeout_list_set_functions (DBusTimeoutList *timeout_list, 00061 DBusAddTimeoutFunction add_function, 00062 DBusRemoveTimeoutFunction remove_function, 00063 DBusTimeoutToggledFunction toggled_function, 00064 void *data, 00065 DBusFreeFunction free_data_function); 00066 dbus_bool_t _dbus_timeout_list_add_timeout (DBusTimeoutList *timeout_list, 00067 DBusTimeout *timeout); 00068 void _dbus_timeout_list_remove_timeout (DBusTimeoutList *timeout_list, 00069 DBusTimeout *timeout); 00070 void _dbus_timeout_list_toggle_timeout (DBusTimeoutList *timeout_list, 00071 DBusTimeout *timeout, 00072 dbus_bool_t enabled); 00073 00074 00077 DBUS_END_DECLS 00078 00079 #endif /* DBUS_TIMEOUT_H */