aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-02-13 23:13:39 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:15:05 +0100
commit21a722b6169d27ea960ad24ff432f174163ed53a (patch)
treeec2f189315bbc8a360ee20468dd44ff0dcaa4394
parent3de4a2996340844b6808a4ca6e2d31b9b4b791f7 (diff)
core: don't pass primary port to interface initializations
They will all get it themselves.
-rw-r--r--src/mm-base-modem.c2
-rw-r--r--src/mm-base-modem.h3
-rw-r--r--src/mm-broadband-modem.c9
-rw-r--r--src/mm-broadband-modem.h1
-rw-r--r--src/mm-iface-modem-3gpp-ussd.c6
-rw-r--r--src/mm-iface-modem-3gpp-ussd.h1
-rw-r--r--src/mm-iface-modem-3gpp.c6
-rw-r--r--src/mm-iface-modem-3gpp.h1
-rw-r--r--src/mm-iface-modem-cdma.c6
-rw-r--r--src/mm-iface-modem-cdma.h1
-rw-r--r--src/mm-iface-modem-location.c6
-rw-r--r--src/mm-iface-modem-location.h1
-rw-r--r--src/mm-iface-modem-messaging.c14
-rw-r--r--src/mm-iface-modem-messaging.h1
-rw-r--r--src/mm-iface-modem.c11
-rw-r--r--src/mm-iface-modem.h1
16 files changed, 6 insertions, 64 deletions
diff --git a/src/mm-base-modem.c b/src/mm-base-modem.c
index a9e0f78c..1c023c32 100644
--- a/src/mm-base-modem.c
+++ b/src/mm-base-modem.c
@@ -538,8 +538,6 @@ mm_base_modem_organize_ports (MMBaseModem *self,
/* As soon as we get the ports organized, we initialize the modem */
MM_BASE_MODEM_GET_CLASS (self)->initialize (self,
- /* FIXME: don't bother passing the port */
- MM_AT_SERIAL_PORT (self->priv->primary),
NULL, /* TODO: cancellable */
(GAsyncReadyCallback)initialize_ready,
NULL);
diff --git a/src/mm-base-modem.h b/src/mm-base-modem.h
index 10211547..cf4f038e 100644
--- a/src/mm-base-modem.h
+++ b/src/mm-base-modem.h
@@ -63,9 +63,8 @@ struct _MMBaseModemClass {
MMPort *port);
/* Modem initialization.
- * Whenever the primary AT port is grabbed, this method gets called */
+ * As soon as the ports are organized, this method gets called */
void (* initialize) (MMBaseModem *self,
- MMAtSerialPort *port,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 6f6dfa8f..00fb4c33 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -6195,7 +6195,7 @@ initialize_step (InitializeContext *ctx)
* We do keep the primary port open during the whole initialization
* sequence. Note that this port is not really passed to the interfaces,
* they will get the primary port themselves. */
- ctx->port = mm_base_modem_get_port_primary (MM_BASE_MODEM (ctx->self));
+ ctx->port = g_object_ref (mm_base_modem_get_port_primary (MM_BASE_MODEM (ctx->self)));
if (!mm_serial_port_open (MM_SERIAL_PORT (ctx->port), &error)) {
g_simple_async_result_take_error (ctx->result, error);
initialize_context_complete_and_free (ctx);
@@ -6230,7 +6230,6 @@ initialize_step (InitializeContext *ctx)
case INITIALIZE_STEP_IFACE_MODEM:
/* Initialize the Modem interface */
mm_iface_modem_initialize (MM_IFACE_MODEM (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_initialize_ready,
ctx);
return;
@@ -6255,7 +6254,6 @@ initialize_step (InitializeContext *ctx)
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) {
/* Initialize the 3GPP interface */
mm_iface_modem_3gpp_initialize (MM_IFACE_MODEM_3GPP (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_3gpp_initialize_ready,
ctx);
return;
@@ -6268,7 +6266,6 @@ initialize_step (InitializeContext *ctx)
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) {
/* Initialize the 3GPP/USSD interface */
mm_iface_modem_3gpp_ussd_initialize (MM_IFACE_MODEM_3GPP_USSD (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_3gpp_ussd_initialize_ready,
ctx);
return;
@@ -6280,7 +6277,6 @@ initialize_step (InitializeContext *ctx)
if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->self))) {
/* Initialize the CDMA interface */
mm_iface_modem_cdma_initialize (MM_IFACE_MODEM_CDMA (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_cdma_initialize_ready,
ctx);
return;
@@ -6299,7 +6295,6 @@ initialize_step (InitializeContext *ctx)
case INITIALIZE_STEP_IFACE_LOCATION:
/* Initialize the Location interface */
mm_iface_modem_location_initialize (MM_IFACE_MODEM_LOCATION (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_location_initialize_ready,
ctx);
return;
@@ -6307,7 +6302,6 @@ initialize_step (InitializeContext *ctx)
case INITIALIZE_STEP_IFACE_MESSAGING:
/* Initialize the Messaging interface */
mm_iface_modem_messaging_initialize (MM_IFACE_MODEM_MESSAGING (ctx->self),
- ctx->port,
(GAsyncReadyCallback)iface_modem_messaging_initialize_ready,
ctx);
return;
@@ -6329,7 +6323,6 @@ initialize_step (InitializeContext *ctx)
static void
initialize (MMBaseModem *self,
- MMAtSerialPort *port,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
diff --git a/src/mm-broadband-modem.h b/src/mm-broadband-modem.h
index d645b2fa..6bc712b5 100644
--- a/src/mm-broadband-modem.h
+++ b/src/mm-broadband-modem.h
@@ -57,4 +57,3 @@ MMBroadbandModem *mm_broadband_modem_new (const gchar *device,
guint16 product_id);
#endif /* MM_BROADBAND_MODEM_H */
-
diff --git a/src/mm-iface-modem-3gpp-ussd.c b/src/mm-iface-modem-3gpp-ussd.c
index 9cdc2da9..e0ee4669 100644
--- a/src/mm-iface-modem-3gpp-ussd.c
+++ b/src/mm-iface-modem-3gpp-ussd.c
@@ -607,7 +607,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModem3gppUssd *self;
- MMAtSerialPort *port;
MmGdbusModem3gppUssd *skeleton;
GSimpleAsyncResult *result;
InitializationStep step;
@@ -615,7 +614,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModem3gppUssd *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -623,7 +621,6 @@ initialization_context_new (MMIfaceModem3gppUssd *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -641,7 +638,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -774,7 +770,6 @@ mm_iface_modem_3gpp_ussd_initialize_finish (MMIfaceModem3gppUssd *self,
void
mm_iface_modem_3gpp_ussd_initialize (MMIfaceModem3gppUssd *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -801,7 +796,6 @@ mm_iface_modem_3gpp_ussd_initialize (MMIfaceModem3gppUssd *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem-3gpp-ussd.h b/src/mm-iface-modem-3gpp-ussd.h
index 6ba789d6..47658b67 100644
--- a/src/mm-iface-modem-3gpp-ussd.h
+++ b/src/mm-iface-modem-3gpp-ussd.h
@@ -110,7 +110,6 @@ GType mm_iface_modem_3gpp_ussd_get_type (void);
/* Initialize USSD interface (async) */
void mm_iface_modem_3gpp_ussd_initialize (MMIfaceModem3gppUssd *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_3gpp_ussd_initialize_finish (MMIfaceModem3gppUssd *self,
diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c
index dcb2bbee..073e6084 100644
--- a/src/mm-iface-modem-3gpp.c
+++ b/src/mm-iface-modem-3gpp.c
@@ -1507,7 +1507,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModem3gpp *self;
- MMAtSerialPort *port;
MmGdbusModem3gpp *skeleton;
GSimpleAsyncResult *result;
InitializationStep step;
@@ -1515,7 +1514,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModem3gpp *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1523,7 +1521,6 @@ initialization_context_new (MMIfaceModem3gpp *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -1541,7 +1538,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -1632,7 +1628,6 @@ mm_iface_modem_3gpp_initialize_finish (MMIfaceModem3gpp *self,
void
mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1674,7 +1669,6 @@ mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h
index d22bc775..9c1a0b9f 100644
--- a/src/mm-iface-modem-3gpp.h
+++ b/src/mm-iface-modem-3gpp.h
@@ -193,7 +193,6 @@ GType mm_iface_modem_3gpp_get_type (void);
/* Initialize Modem 3GPP interface (async) */
void mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_3gpp_initialize_finish (MMIfaceModem3gpp *self,
diff --git a/src/mm-iface-modem-cdma.c b/src/mm-iface-modem-cdma.c
index 70d6ebd5..0e99f2ed 100644
--- a/src/mm-iface-modem-cdma.c
+++ b/src/mm-iface-modem-cdma.c
@@ -1349,7 +1349,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModemCdma *self;
- MMAtSerialPort *port;
MmGdbusModemCdma *skeleton;
GSimpleAsyncResult *result;
InitializationStep step;
@@ -1357,7 +1356,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModemCdma *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1365,7 +1363,6 @@ initialization_context_new (MMIfaceModemCdma *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -1383,7 +1380,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -1494,7 +1490,6 @@ mm_iface_modem_cdma_initialize_finish (MMIfaceModemCdma *self,
void
mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -1530,7 +1525,6 @@ mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem-cdma.h b/src/mm-iface-modem-cdma.h
index 90a50d98..ed587c4d 100644
--- a/src/mm-iface-modem-cdma.h
+++ b/src/mm-iface-modem-cdma.h
@@ -154,7 +154,6 @@ GType mm_iface_modem_cdma_get_type (void);
/* Initialize CDMA interface (async) */
void mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_cdma_initialize_finish (MMIfaceModemCdma *self,
diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c
index 7f6155a7..9ada8597 100644
--- a/src/mm-iface-modem-location.c
+++ b/src/mm-iface-modem-location.c
@@ -639,7 +639,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModemLocation *self;
- MMAtSerialPort *port;
MmGdbusModemLocation *skeleton;
GSimpleAsyncResult *result;
InitializationStep step;
@@ -648,7 +647,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModemLocation *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -656,7 +654,6 @@ initialization_context_new (MMIfaceModemLocation *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->capabilities = MM_MODEM_LOCATION_SOURCE_NONE;
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
@@ -675,7 +672,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -777,7 +773,6 @@ mm_iface_modem_location_initialize_finish (MMIfaceModemLocation *self,
void
mm_iface_modem_location_initialize (MMIfaceModemLocation *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -807,7 +802,6 @@ mm_iface_modem_location_initialize (MMIfaceModemLocation *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem-location.h b/src/mm-iface-modem-location.h
index f901175b..4634fd1b 100644
--- a/src/mm-iface-modem-location.h
+++ b/src/mm-iface-modem-location.h
@@ -62,7 +62,6 @@ GType mm_iface_modem_location_get_type (void);
/* Initialize Location interface (async) */
void mm_iface_modem_location_initialize (MMIfaceModemLocation *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_location_initialize_finish (MMIfaceModemLocation *self,
diff --git a/src/mm-iface-modem-messaging.c b/src/mm-iface-modem-messaging.c
index c035aa84..08795cff 100644
--- a/src/mm-iface-modem-messaging.c
+++ b/src/mm-iface-modem-messaging.c
@@ -817,7 +817,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModemMessaging *self;
- MMAtSerialPort *port;
MmGdbusModemMessaging *skeleton;
GSimpleAsyncResult *result;
InitializationStep step;
@@ -825,7 +824,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModemMessaging *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -833,7 +831,6 @@ initialization_context_new (MMIfaceModemMessaging *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -851,7 +848,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -1027,8 +1023,8 @@ interface_initialization_step (InitializationContext *ctx)
gboolean
mm_iface_modem_messaging_initialize_finish (MMIfaceModemMessaging *self,
- GAsyncResult *res,
- GError **error)
+ GAsyncResult *res,
+ GError **error)
{
g_return_val_if_fail (MM_IS_IFACE_MODEM_MESSAGING (self), FALSE);
g_return_val_if_fail (G_IS_ASYNC_RESULT (res), FALSE);
@@ -1038,9 +1034,8 @@ mm_iface_modem_messaging_initialize_finish (MMIfaceModemMessaging *self,
void
mm_iface_modem_messaging_initialize (MMIfaceModemMessaging *self,
- MMAtSerialPort *port,
- GAsyncReadyCallback callback,
- gpointer user_data)
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
MmGdbusModemMessaging *skeleton = NULL;
@@ -1061,7 +1056,6 @@ mm_iface_modem_messaging_initialize (MMIfaceModemMessaging *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem-messaging.h b/src/mm-iface-modem-messaging.h
index 573f3859..8fe5ddf3 100644
--- a/src/mm-iface-modem-messaging.h
+++ b/src/mm-iface-modem-messaging.h
@@ -116,7 +116,6 @@ GType mm_iface_modem_messaging_get_type (void);
/* Initialize Messaging interface (async) */
void mm_iface_modem_messaging_initialize (MMIfaceModemMessaging *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_messaging_initialize_finish (MMIfaceModemMessaging *self,
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index b6c898e9..17bf93a8 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -1599,7 +1599,6 @@ handle_set_allowed_modes (MmGdbusModem *skeleton,
typedef struct _UnlockCheckContext UnlockCheckContext;
struct _UnlockCheckContext {
MMIfaceModem *self;
- MMAtSerialPort *port;
guint pin_check_tries;
guint pin_check_timeout_id;
GSimpleAsyncResult *result;
@@ -1615,7 +1614,6 @@ unlock_check_context_new (MMIfaceModem *self,
ctx = g_new0 (UnlockCheckContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (mm_base_modem_get_port_primary (MM_BASE_MODEM (self)));
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -1631,7 +1629,6 @@ static void
unlock_check_context_free (UnlockCheckContext *ctx)
{
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -1642,7 +1639,6 @@ restart_initialize_idle (MMIfaceModem *self)
{
MM_BASE_MODEM_GET_CLASS (self)->initialize (
MM_BASE_MODEM (self),
- mm_base_modem_get_port_primary (MM_BASE_MODEM (self)),
NULL,
NULL,
NULL);
@@ -2335,7 +2331,6 @@ interface_enabling_step (EnablingContext *ctx)
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);
ctx->enabled = TRUE;
enabling_context_complete_and_free (ctx);
- /* mm_serial_port_close (MM_SERIAL_PORT (ctx->port)); */
return;
}
@@ -2378,7 +2373,6 @@ typedef enum {
struct _InitializationContext {
MMIfaceModem *self;
- MMAtSerialPort *port;
InitializationStep step;
GSimpleAsyncResult *result;
MmGdbusModem *skeleton;
@@ -2386,7 +2380,6 @@ struct _InitializationContext {
static InitializationContext *
initialization_context_new (MMIfaceModem *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -2394,7 +2387,6 @@ initialization_context_new (MMIfaceModem *self,
ctx = g_new0 (InitializationContext, 1);
ctx->self = g_object_ref (self);
- ctx->port = g_object_ref (port);
ctx->result = g_simple_async_result_new (G_OBJECT (self),
callback,
user_data,
@@ -2412,7 +2404,6 @@ initialization_context_complete_and_free (InitializationContext *ctx)
{
g_simple_async_result_complete_in_idle (ctx->result);
g_object_unref (ctx->self);
- g_object_unref (ctx->port);
g_object_unref (ctx->result);
g_object_unref (ctx->skeleton);
g_free (ctx);
@@ -2983,7 +2974,6 @@ mm_iface_modem_initialize_finish (MMIfaceModem *self,
void
mm_iface_modem_initialize (MMIfaceModem *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -3037,7 +3027,6 @@ mm_iface_modem_initialize (MMIfaceModem *self,
/* Perform async initialization here */
interface_initialization_step (initialization_context_new (self,
- port,
callback,
user_data));
g_object_unref (skeleton);
diff --git a/src/mm-iface-modem.h b/src/mm-iface-modem.h
index 010a3476..de2564ec 100644
--- a/src/mm-iface-modem.h
+++ b/src/mm-iface-modem.h
@@ -272,7 +272,6 @@ gboolean mm_iface_modem_is_cdma_only (MMIfaceModem *self);
/* Initialize Modem interface (async) */
void mm_iface_modem_initialize (MMIfaceModem *self,
- MMAtSerialPort *port,
GAsyncReadyCallback callback,
gpointer user_data);
gboolean mm_iface_modem_initialize_finish (MMIfaceModem *self,