summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2020-11-13 12:55:33 -0600
committerPatrick Griffis <pgriffis@igalia.com>2020-11-13 12:55:59 -0600
commit5a61da0b51c019296525f06038c5ccc039dfe210 (patch)
tree7b58fa0ad84f60ab66efff0680772b17c3133b37
parent9552697194fc21f4e37d92474cc84d9ee23dd5d0 (diff)
downloadlibsoup-5a61da0b51c019296525f06038c5ccc039dfe210.tar.gz
misc: Remove unused functions
-rw-r--r--libsoup/soup-client-input-stream.c7
-rw-r--r--libsoup/soup-misc.c55
-rw-r--r--libsoup/soup-misc.h8
3 files changed, 5 insertions, 65 deletions
diff --git a/libsoup/soup-client-input-stream.c b/libsoup/soup-client-input-stream.c
index 1d698fa6..d3a75467 100644
--- a/libsoup/soup-client-input-stream.c
+++ b/libsoup/soup-client-input-stream.c
@@ -181,8 +181,11 @@ close_async_ready (SoupMessage *msg, gpointer user_data)
* waiting one extra cycle after run_until_finish() returns.
* Ugh. FIXME later when it's easier to do.
*/
- soup_add_idle (g_main_context_get_thread_default (),
- idle_finish_close, task);
+ GSource *source = g_idle_source_new ();
+ g_source_set_callback (source, idle_finish_close, task, NULL);
+ g_source_attach (source, g_main_context_get_thread_default ());
+ g_source_unref (source);
+
return FALSE;
}
diff --git a/libsoup/soup-misc.c b/libsoup/soup-misc.c
index 34bbf241..fb58ad30 100644
--- a/libsoup/soup-misc.c
+++ b/libsoup/soup-misc.c
@@ -53,61 +53,6 @@ soup_str_case_equal (gconstpointer v1,
return g_ascii_strcasecmp (string1, string2) == 0;
}
-/**
- * soup_add_io_watch: (skip)
- * @async_context: (allow-none): the #GMainContext to dispatch the I/O
- * watch in, or %NULL for the default context
- * @chan: the #GIOChannel to watch
- * @condition: the condition to watch for
- * @function: the callback to invoke when @condition occurs
- * @data: user data to pass to @function
- *
- * Adds an I/O watch as with g_io_add_watch(), but using the given
- * @async_context.
- *
- * Return value: a #GSource, which can be removed from @async_context
- * with g_source_destroy().
- **/
-GSource *
-soup_add_io_watch (GMainContext *async_context,
- GIOChannel *chan, GIOCondition condition,
- GIOFunc function, gpointer data)
-{
- GSource *watch = g_io_create_watch (chan, condition);
- g_source_set_callback (watch, (GSourceFunc) function, data, NULL);
- g_source_attach (watch, async_context);
- g_source_unref (watch);
- return watch;
-}
-
-/**
- * soup_add_idle: (skip)
- * @async_context: (allow-none): the #GMainContext to dispatch the I/O
- * watch in, or %NULL for the default context
- * @function: the callback to invoke at idle time
- * @data: user data to pass to @function
- *
- * Adds an idle event as with g_idle_add(), but using the given
- * @async_context.
- *
- * If you want @function to run "right away", use
- * soup_add_completion(), since that sets a higher priority on the
- * #GSource than soup_add_idle() does.
- *
- * Return value: a #GSource, which can be removed from @async_context
- * with g_source_destroy().
- **/
-GSource *
-soup_add_idle (GMainContext *async_context,
- GSourceFunc function, gpointer data)
-{
- GSource *source = g_idle_source_new ();
- g_source_set_callback (source, function, data, NULL);
- g_source_attach (source, async_context);
- g_source_unref (source);
- return source;
-}
-
GSource *
soup_add_completion_reffed (GMainContext *async_context,
GSourceFunc function,
diff --git a/libsoup/soup-misc.h b/libsoup/soup-misc.h
index 770ecf54..1efdd6d0 100644
--- a/libsoup/soup-misc.h
+++ b/libsoup/soup-misc.h
@@ -13,14 +13,6 @@
G_BEGIN_DECLS
/* Non-default-GMainContext operations */
-GSource *soup_add_io_watch (GMainContext *async_context,
- GIOChannel *chan,
- GIOCondition condition,
- GIOFunc function,
- gpointer data);
-GSource *soup_add_idle (GMainContext *async_context,
- GSourceFunc function,
- gpointer data);
GSource *soup_add_completion (GMainContext *async_context,
GSourceFunc function,
gpointer data);