[gnome-settings-daemon] rfkill: Drop cc_rfkill_glib_send_event() due to being unused
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] rfkill: Drop cc_rfkill_glib_send_event() due to being unused
- Date: Tue, 14 Feb 2017 18:04:48 +0000 (UTC)
commit 449b22df48f44c233998ef26476f581cecbd9b88
Author: Philip Withnall <withnall endlessm com>
Date: Thu Feb 9 13:05:12 2017 +0000
rfkill: Drop cc_rfkill_glib_send_event() due to being unused
No need to complicate the code with it.
https://bugzilla.gnome.org/show_bug.cgi?id=778383
plugins/rfkill/rfkill-glib.c | 51 ------------------------------------------
plugins/rfkill/rfkill-glib.h | 10 --------
2 files changed, 0 insertions(+), 61 deletions(-)
---
diff --git a/plugins/rfkill/rfkill-glib.c b/plugins/rfkill/rfkill-glib.c
index 9686cdf..d6a79c3 100644
--- a/plugins/rfkill/rfkill-glib.c
+++ b/plugins/rfkill/rfkill-glib.c
@@ -68,57 +68,6 @@ static const char *type_to_string (unsigned int type);
/* Note that this can return %FALSE without setting @error. */
gboolean
-cc_rfkill_glib_send_event_finish (CcRfkillGlib *rfkill,
- GAsyncResult *res,
- GError **error)
-{
- g_return_val_if_fail (RFKILL_IS_GLIB (rfkill), FALSE);
- g_return_val_if_fail (g_task_is_valid (res, rfkill), FALSE);
- g_return_val_if_fail (g_async_result_is_tagged (res, cc_rfkill_glib_send_event), FALSE);
-
- return (g_task_propagate_int (G_TASK (res), error) >= 0);
-}
-
-static void
-write_done_cb (GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
-{
- g_autoptr(GTask) task = G_TASK (user_data);
- g_autoptr(GError) error = NULL;
- gssize ret;
-
- ret = g_output_stream_write_finish (G_OUTPUT_STREAM (source_object), res, &error);
- if (ret < 0)
- g_task_return_error (task, g_steal_pointer (&error));
- else
- g_task_return_int (task, ret);
-}
-
-void
-cc_rfkill_glib_send_event (CcRfkillGlib *rfkill,
- struct rfkill_event *event,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- g_autoptr(GTask) task = NULL;
-
- g_return_if_fail (RFKILL_IS_GLIB (rfkill));
- g_return_if_fail (rfkill->priv->stream);
-
- task = g_task_new (rfkill, cancellable, callback, user_data);
- g_task_set_source_tag (task, cc_rfkill_glib_send_event);
-
- g_output_stream_write_async (rfkill->priv->stream,
- event, sizeof(struct rfkill_event),
- G_PRIORITY_DEFAULT,
- cancellable, write_done_cb,
- g_object_ref (task));
-}
-
-/* Note that this can return %FALSE without setting @error. */
-gboolean
cc_rfkill_glib_send_change_all_event_finish (CcRfkillGlib *rfkill,
GAsyncResult *res,
GError **error)
diff --git a/plugins/rfkill/rfkill-glib.h b/plugins/rfkill/rfkill-glib.h
index 4734154..f9b51c1 100644
--- a/plugins/rfkill/rfkill-glib.h
+++ b/plugins/rfkill/rfkill-glib.h
@@ -59,16 +59,6 @@ GType cc_rfkill_glib_get_type (void);
CcRfkillGlib *cc_rfkill_glib_new (void);
int cc_rfkill_glib_open (CcRfkillGlib *rfkill);
-void cc_rfkill_glib_send_event (CcRfkillGlib *rfkill,
- struct rfkill_event *event,
- GCancellable *cancellable,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-gboolean cc_rfkill_glib_send_event_finish (CcRfkillGlib *rfkill,
- GAsyncResult *res,
- GError **error);
-
void cc_rfkill_glib_send_change_all_event (CcRfkillGlib *rfkill,
guint rfkill_type,
gboolean enable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]