mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-04 21:08:14 +02:00
2003-02-13 Anders Carlsson <andersca@codefactory.se>
* glib/dbus-gmain.c: (timeout_handler), (add_timeout), (remove_timeout): Implement support for timeouts in dbus-glib.
This commit is contained in:
parent
1bfced6e45
commit
fef27dc10d
2 changed files with 28 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2003-02-13 Anders Carlsson <andersca@codefactory.se>
|
||||
|
||||
* glib/dbus-gmain.c: (timeout_handler), (add_timeout),
|
||||
(remove_timeout):
|
||||
Implement support for timeouts in dbus-glib.
|
||||
|
||||
2003-02-13 Anders Carlsson <andersca@codefactory.se>
|
||||
|
||||
* dbus/dbus-message-builder.c: (_dbus_message_data_load):
|
||||
|
|
|
|||
|
|
@ -172,16 +172,38 @@ remove_watch (DBusWatch *watch,
|
|||
g_free (poll_fd);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
timeout_handler (gpointer data)
|
||||
{
|
||||
DBusTimeout *timeout = data;
|
||||
|
||||
dbus_timeout_handle (timeout);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
add_timeout (DBusTimeout *timeout,
|
||||
void *data)
|
||||
{
|
||||
guint timeout_tag;
|
||||
|
||||
timeout_tag = g_timeout_add (dbus_timeout_get_interval (timeout),
|
||||
timeout_handler, timeout);
|
||||
|
||||
dbus_timeout_set_data (timeout, GUINT_TO_POINTER (timeout_tag), NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
remove_timeout (DBusTimeout *timeout,
|
||||
void *data)
|
||||
{
|
||||
guint timeout_tag;
|
||||
|
||||
timeout_tag = GPOINTER_TO_UINT (dbus_timeout_get_data (timeout));
|
||||
|
||||
g_source_remove (timeout_tag);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue