diff options
author | Mike Ruprecht <cmaiku@gmail.com> | 2017-06-15 14:03:47 -0500 |
---|---|---|
committer | Mike Ruprecht <cmaiku@gmail.com> | 2017-06-15 14:03:47 -0500 |
commit | 327f6e789083a87585736c6aeb451cc466c5f0a3 (patch) | |
tree | 5affcdf30847d34341edc8e95372a4e1ab57ec03 | |
parent | 1e506c87754f947168a9e02c16de27151f72e613 (diff) | |
download | pidgin-327f6e789083a87585736c6aeb451cc466c5f0a3.tar.gz |
eventloop: Remove purple_timeout_* functions
Now that the purple_timeout_* functions are no longer used in-tree,
this patch removes them.
-rw-r--r-- | ChangeLog.API | 1 | ||||
-rw-r--r-- | libpurple/core.h | 4 | ||||
-rw-r--r-- | libpurple/eventloop.c | 18 | ||||
-rw-r--r-- | libpurple/eventloop.h | 48 |
4 files changed, 3 insertions, 68 deletions
diff --git a/ChangeLog.API b/ChangeLog.API index 4578364748..3a2e8df382 100644 --- a/ChangeLog.API +++ b/ChangeLog.API @@ -484,6 +484,7 @@ version 3.0.0 (??/??/????): * purple_status_type_set_primary_attr * purple_strlcat * purple_strlcpy + * purple_timeout_*. Use g_timeout_* or g_idle_* instead. * purple_txt_cancel * purple_txt_resolve_account * PurpleType, use GType instead. diff --git a/libpurple/core.h b/libpurple/core.h index 679dec0f0a..07ab82d7ce 100644 --- a/libpurple/core.h +++ b/libpurple/core.h @@ -109,13 +109,13 @@ void purple_core_quit(void); * purple_core_quit_cb: * * Calls purple_core_quit(). This can be used as the function - * passed to purple_timeout_add() when you want to shutdown Purple + * passed to g_timeout_add() when you want to shutdown Purple * in a specified amount of time. When shutting down Purple * from a plugin, you must use this instead of purple_core_quit(); * for an immediate exit, use a timeout value of 0: * * <programlisting> - * purple_timeout_add(0, purple_core_quitcb, NULL) + * g_timeout_add(0, purple_core_quitcb, NULL) * </programlisting> * * This is ensures that code from your plugin is not being diff --git a/libpurple/eventloop.c b/libpurple/eventloop.c index 799cabba88..f9e141ed47 100644 --- a/libpurple/eventloop.c +++ b/libpurple/eventloop.c @@ -30,24 +30,6 @@ typedef struct _PurpleIOClosure { gpointer data; } PurpleIOClosure; -guint -purple_timeout_add(guint interval, GSourceFunc function, gpointer data) -{ - return g_timeout_add(interval, function, data); -} - -guint -purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data) -{ - return g_timeout_add_seconds(interval, function, data); -} - -gboolean -purple_timeout_remove(guint tag) -{ - return g_source_remove(tag); -} - static gboolean purple_io_invoke(GIOChannel *source, GIOCondition condition, gpointer data) { diff --git a/libpurple/eventloop.h b/libpurple/eventloop.h index f2c48e0896..b952e0bb3a 100644 --- a/libpurple/eventloop.h +++ b/libpurple/eventloop.h @@ -62,54 +62,6 @@ G_BEGIN_DECLS /**************************************************************************/ /** - * purple_timeout_add: - * @interval: The time between calls of the function, in milliseconds. - * @function: (scope call): The function to call. - * @data: data to pass to @function. - * - * Creates a callback timer. - * - * The timer will repeat until the function returns %FALSE. The - * first call will be at the end of the first interval. - * - * If the timer is in a multiple of seconds, use purple_timeout_add_seconds() - * instead as it allows UIs to group timers for power efficiency. - * - * Returns: A handle to the timer which can be passed to - * purple_timeout_remove() to remove the timer. - */ -guint purple_timeout_add(guint interval, GSourceFunc function, gpointer data); - -/** - * purple_timeout_add_seconds: - * @interval: The time between calls of the function, in seconds. - * @function: (scope call): The function to call. - * @data: data to pass to @function. - * - * Creates a callback timer. - * - * The timer will repeat until the function returns %FALSE. The - * first call will be at the end of the first interval. - * - * This function allows UIs to group timers for better power efficiency. For - * this reason, @interval may be rounded by up to a second. - * - * Returns: A handle to the timer which can be passed to - * purple_timeout_remove() to remove the timer. - */ -guint purple_timeout_add_seconds(guint interval, GSourceFunc function, gpointer data); - -/** - * purple_timeout_remove: - * @handle: The handle, as returned by purple_timeout_add(). - * - * Removes a timeout handler. - * - * Returns: %TRUE if the handler was successfully removed. - */ -gboolean purple_timeout_remove(guint handle); - -/** * purple_input_add: * @fd: The input file descriptor. * @cond: The condition type. |