From dcecb94631935584919c2cce6a814b78772ac0aa Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 26 Dec 2011 21:31:07 +0100 Subject: 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. --- libmm-glib/mm-modem-simple.h | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'libmm-glib/mm-modem-simple.h') 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 #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, */ -- cgit v1.2.3-70-g09d2