Commit fef27dc1 authored by Anders Carlsson's avatar Anders Carlsson

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.
parent 1bfced6e
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment