From 8069c751a04144478ce243ecaa9fdfd2b9794d02 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 23 Nov 2011 10:03:34 +0100 Subject: [PATCH] base-modem: new `enable()' and `disable()' async methods Users will be able to enable or disable modems using the DBus interface. We will chain up the `Enable(boolean)' call from the DBus interface to these new methods in the base modem class. --- src/mm-base-modem.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/mm-base-modem.h b/src/mm-base-modem.h index 0945b630..cd2999ad 100644 --- a/src/mm-base-modem.h +++ b/src/mm-base-modem.h @@ -65,6 +65,26 @@ struct _MMBaseModemClass { gboolean (*initialize_finish) (MMBaseModem *self, GAsyncResult *res, GError **error); + + /* Modem enabling. + * User action requested from DBus, usually */ + void (* enable) (MMBaseModem *self, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*enable_finish) (MMBaseModem *self, + GAsyncResult *res, + GError **error); + + /* Modem disabling. + * User action requested from DBus, usually */ + void (* disable) (MMBaseModem *self, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*disable_finish) (MMBaseModem *self, + GAsyncResult *res, + GError **error); }; GType mm_base_modem_get_type (void);