diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2011-12-26 21:31:07 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-15 14:14:37 +0100 |
commit | dcecb94631935584919c2cce6a814b78772ac0aa (patch) | |
tree | 20426d55f445a56f0a8a46a55509ad32d789f511 /libmm-glib/mm-modem-simple.h | |
parent | 034381250277751741f134123fc61c0c5405adea (diff) |
libmm-common,libmm-glib: new object to handle properties in simple Connect()
Instead of using type unsafe properties passed to the connect() call, we build
a new object which does the handling of the properties to be passed.
Diffstat (limited to 'libmm-glib/mm-modem-simple.h')
-rw-r--r-- | libmm-glib/mm-modem-simple.h | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/libmm-glib/mm-modem-simple.h b/libmm-glib/mm-modem-simple.h index 95306ab7..4eba5f0b 100644 --- a/libmm-glib/mm-modem-simple.h +++ b/libmm-glib/mm-modem-simple.h @@ -27,6 +27,7 @@ #include <mm-gdbus-modem.h> #include "mm-bearer.h" +#include "mm-modem-simple-connect-properties.h" G_BEGIN_DECLS @@ -38,30 +39,18 @@ typedef MmGdbusModemSimple MMModemSimple; const gchar *mm_modem_simple_get_path (MMModemSimple *self); gchar *mm_modem_simple_dup_path (MMModemSimple *self); -#define MM_SIMPLE_PROPERTY_PIN "pin" /* string */ -#define MM_SIMPLE_PROPERTY_OPERATOR_ID "operator-id" /* string */ -#define MM_SIMPLE_PROPERTY_ALLOWED_BANDS "allowed-bands" /* GArray of MMModemBand */ -#define MM_SIMPLE_PROPERTY_ALLOWED_MODES "allowed-modes" /* MMModemMode */ -#define MM_SIMPLE_PROPERTY_PREFERRED_MODE "preferred-mode" /* MMModemMode */ -#define MM_SIMPLE_PROPERTY_APN "apn" /* string */ -#define MM_SIMPLE_PROPERTY_IP_TYPE "ip-type" /* string */ -#define MM_SIMPLE_PROPERTY_NUMBER "number" /* string */ -#define MM_SIMPLE_PROPERTY_ALLOW_ROAMING "allow-roaming" /* boolean */ - void mm_modem_simple_connect (MMModemSimple *self, + MMModemSimpleConnectProperties *properties, GCancellable *cancellable, GAsyncReadyCallback callback, - gpointer user_data, - const gchar *first_property_name, - ...); + gpointer user_data); MMBearer *mm_modem_simple_connect_finish (MMModemSimple *self, GAsyncResult *res, GError **error); MMBearer *mm_modem_simple_connect_sync (MMModemSimple *self, + MMModemSimpleConnectProperties *properties, GCancellable *cancellable, - GError **error, - const gchar *first_property_name, - ...); + GError **error); /* void mm_modem_simple_disconnect (MMModemSimple *self, */ /* GCancellable *cancellable, */ |