sim: rename 'MMSim' to 'MMBaseSim'
Just so that we don't have same header names in src/ and /libmm-glib.
This commit is contained in:
@@ -3158,7 +3158,7 @@ huawei_modem_power_down (MMIfaceModem *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
huawei_modem_create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
|
||||
#include "mm-sim-huawei.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimHuawei, mm_sim_huawei, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimHuawei, mm_sim_huawei, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* SIM identifier loading */
|
||||
|
||||
static gchar *
|
||||
load_sim_identifier_finish (MMSim *self,
|
||||
load_sim_identifier_finish (MMBaseSim *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ parent_load_sim_identifier_ready (MMSimHuawei *self,
|
||||
GError *error = NULL;
|
||||
gchar *simid;
|
||||
|
||||
simid = MM_SIM_CLASS (mm_sim_huawei_parent_class)->load_sim_identifier_finish (MM_SIM (self), res, &error);
|
||||
simid = MM_BASE_SIM_CLASS (mm_sim_huawei_parent_class)->load_sim_identifier_finish (MM_BASE_SIM (self), res, &error);
|
||||
if (simid)
|
||||
g_simple_async_result_set_op_res_gpointer (simple, simid, g_free);
|
||||
else
|
||||
@@ -74,7 +74,7 @@ iccid_read_ready (MMBaseModem *modem,
|
||||
GAsyncResult *res,
|
||||
GSimpleAsyncResult *simple)
|
||||
{
|
||||
MMSim *self;
|
||||
MMBaseSim *self;
|
||||
const gchar *response;
|
||||
const gchar *p;
|
||||
char *parsed;
|
||||
@@ -97,22 +97,22 @@ iccid_read_ready (MMBaseModem *modem,
|
||||
|
||||
error:
|
||||
/* Chain up to parent method; older devices don't support ^ICCID */
|
||||
self = MM_SIM (g_async_result_get_source_object (G_ASYNC_RESULT (simple)));
|
||||
MM_SIM_CLASS (mm_sim_huawei_parent_class)->load_sim_identifier (self,
|
||||
(GAsyncReadyCallback) parent_load_sim_identifier_ready,
|
||||
simple);
|
||||
self = MM_BASE_SIM (g_async_result_get_source_object (G_ASYNC_RESULT (simple)));
|
||||
MM_BASE_SIM_CLASS (mm_sim_huawei_parent_class)->load_sim_identifier (self,
|
||||
(GAsyncReadyCallback) parent_load_sim_identifier_ready,
|
||||
simple);
|
||||
g_object_unref (self);
|
||||
}
|
||||
|
||||
static void
|
||||
load_sim_identifier (MMSim *self,
|
||||
load_sim_identifier (MMBaseSim *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MMBaseModem *modem = NULL;
|
||||
|
||||
g_object_get (self,
|
||||
MM_SIM_MODEM, &modem,
|
||||
MM_BASE_SIM_MODEM, &modem,
|
||||
NULL);
|
||||
|
||||
mm_dbg ("loading (Huawei) SIM identifier...");
|
||||
@@ -131,7 +131,7 @@ load_sim_identifier (MMSim *self,
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_huawei_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -146,9 +146,9 @@ mm_sim_huawei_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -162,7 +162,7 @@ mm_sim_huawei_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -174,8 +174,8 @@ mm_sim_huawei_init (MMSimHuawei *self)
|
||||
static void
|
||||
mm_sim_huawei_class_init (MMSimHuaweiClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
sim_class->load_sim_identifier = load_sim_identifier;
|
||||
sim_class->load_sim_identifier_finish = load_sim_identifier_finish;
|
||||
base_sim_class->load_sim_identifier = load_sim_identifier;
|
||||
base_sim_class->load_sim_identifier_finish = load_sim_identifier_finish;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_HUAWEI (mm_sim_huawei_get_type ())
|
||||
#define MM_SIM_HUAWEI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_HUAWEI, MMSimHuawei))
|
||||
@@ -34,20 +34,20 @@ typedef struct _MMSimHuawei MMSimHuawei;
|
||||
typedef struct _MMSimHuaweiClass MMSimHuaweiClass;
|
||||
|
||||
struct _MMSimHuawei {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimHuaweiClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_huawei_get_type (void);
|
||||
|
||||
void mm_sim_huawei_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_huawei_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_huawei_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_huawei_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_HUAWEI_H */
|
||||
|
||||
@@ -257,7 +257,7 @@ load_supported_modes (MMIfaceModem *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem inteface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
#include "mm-sim-iridium.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimIridium, mm_sim_iridium, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimIridium, mm_sim_iridium, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_iridium_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -46,9 +46,9 @@ mm_sim_iridium_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -62,7 +62,7 @@ mm_sim_iridium_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -74,15 +74,15 @@ mm_sim_iridium_init (MMSimIridium *self)
|
||||
static void
|
||||
mm_sim_iridium_class_init (MMSimIridiumClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
/* Skip querying the SIM card info, not supported by Iridium modems */
|
||||
sim_class->load_sim_identifier = NULL;
|
||||
sim_class->load_sim_identifier_finish = NULL;
|
||||
sim_class->load_imsi = NULL;
|
||||
sim_class->load_imsi_finish = NULL;
|
||||
sim_class->load_operator_identifier = NULL;
|
||||
sim_class->load_operator_identifier_finish = NULL;
|
||||
sim_class->load_operator_name = NULL;
|
||||
sim_class->load_operator_name_finish = NULL;
|
||||
base_sim_class->load_sim_identifier = NULL;
|
||||
base_sim_class->load_sim_identifier_finish = NULL;
|
||||
base_sim_class->load_imsi = NULL;
|
||||
base_sim_class->load_imsi_finish = NULL;
|
||||
base_sim_class->load_operator_identifier = NULL;
|
||||
base_sim_class->load_operator_identifier_finish = NULL;
|
||||
base_sim_class->load_operator_name = NULL;
|
||||
base_sim_class->load_operator_name_finish = NULL;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_IRIDIUM (mm_sim_iridium_get_type ())
|
||||
#define MM_SIM_IRIDIUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_IRIDIUM, MMSimIridium))
|
||||
@@ -33,20 +33,20 @@ typedef struct _MMSimIridium MMSimIridium;
|
||||
typedef struct _MMSimIridiumClass MMSimIridiumClass;
|
||||
|
||||
struct _MMSimIridium {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimIridiumClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_iridium_get_type (void);
|
||||
|
||||
void mm_sim_iridium_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_iridium_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_iridium_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_iridium_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_IRIDIUM_H */
|
||||
|
||||
@@ -136,7 +136,7 @@ modem_create_bearer (MMIfaceModem *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
+15
-15
@@ -28,7 +28,7 @@
|
||||
#include "mm-base-modem-at.h"
|
||||
#include "mm-sim-mbm.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimMbm, mm_sim_mbm, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimMbm, mm_sim_mbm, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* SEND PIN/PUK (Generic implementation) */
|
||||
@@ -52,7 +52,7 @@ send_pin_puk_context_complete_and_free (SendPinPukContext *ctx)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
common_send_pin_puk_finish (MMSim *self,
|
||||
common_send_pin_puk_finish (MMBaseSim *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ send_pin_puk_ready (MMBaseModem *modem,
|
||||
}
|
||||
|
||||
static void
|
||||
common_send_pin_puk (MMSim *self,
|
||||
common_send_pin_puk (MMBaseSim *self,
|
||||
const gchar *pin,
|
||||
const gchar *puk,
|
||||
GAsyncReadyCallback callback,
|
||||
@@ -149,7 +149,7 @@ common_send_pin_puk (MMSim *self,
|
||||
user_data,
|
||||
common_send_pin_puk);
|
||||
g_object_get (ctx->self,
|
||||
MM_SIM_MODEM, &ctx->modem,
|
||||
MM_BASE_SIM_MODEM, &ctx->modem,
|
||||
NULL);
|
||||
|
||||
command = (puk ?
|
||||
@@ -165,7 +165,7 @@ common_send_pin_puk (MMSim *self,
|
||||
}
|
||||
|
||||
static void
|
||||
send_puk (MMSim *self,
|
||||
send_puk (MMBaseSim *self,
|
||||
const gchar *puk,
|
||||
const gchar *new_pin,
|
||||
GAsyncReadyCallback callback,
|
||||
@@ -175,7 +175,7 @@ send_puk (MMSim *self,
|
||||
}
|
||||
|
||||
static void
|
||||
send_pin (MMSim *self,
|
||||
send_pin (MMBaseSim *self,
|
||||
const gchar *pin,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
@@ -185,7 +185,7 @@ send_pin (MMSim *self,
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_mbm_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -200,9 +200,9 @@ mm_sim_mbm_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -216,7 +216,7 @@ mm_sim_mbm_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -228,10 +228,10 @@ mm_sim_mbm_init (MMSimMbm *self)
|
||||
static void
|
||||
mm_sim_mbm_class_init (MMSimMbmClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
sim_class->send_pin = send_pin;
|
||||
sim_class->send_pin_finish = common_send_pin_puk_finish;
|
||||
sim_class->send_puk = send_puk;
|
||||
sim_class->send_puk_finish = common_send_pin_puk_finish;
|
||||
base_sim_class->send_pin = send_pin;
|
||||
base_sim_class->send_pin_finish = common_send_pin_puk_finish;
|
||||
base_sim_class->send_puk = send_puk;
|
||||
base_sim_class->send_puk_finish = common_send_pin_puk_finish;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_MBM (mm_sim_mbm_get_type ())
|
||||
#define MM_SIM_MBM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_MBM, MMSimMbm))
|
||||
@@ -32,20 +32,20 @@ typedef struct _MMSimMbm MMSimMbm;
|
||||
typedef struct _MMSimMbmClass MMSimMbmClass;
|
||||
|
||||
struct _MMSimMbm {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimMbmClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_mbm_get_type (void);
|
||||
|
||||
void mm_sim_mbm_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_mbm_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_mbm_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_mbm_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_MBM_H */
|
||||
|
||||
@@ -47,7 +47,7 @@ G_DEFINE_TYPE_EXTENDED (MMBroadbandModemNokia, mm_broadband_modem_nokia, MM_TYPE
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
#include "mm-sim-nokia.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimNokia, mm_sim_nokia, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimNokia, mm_sim_nokia, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_nokia_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -45,9 +45,9 @@ mm_sim_nokia_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -61,7 +61,7 @@ mm_sim_nokia_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -73,13 +73,13 @@ mm_sim_nokia_init (MMSimNokia *self)
|
||||
static void
|
||||
mm_sim_nokia_class_init (MMSimNokiaClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
/* Skip querying most SIM card info, +CRSM not supported by Nokia modems */
|
||||
sim_class->load_sim_identifier = NULL;
|
||||
sim_class->load_sim_identifier_finish = NULL;
|
||||
sim_class->load_operator_identifier = NULL;
|
||||
sim_class->load_operator_identifier_finish = NULL;
|
||||
sim_class->load_operator_name = NULL;
|
||||
sim_class->load_operator_name_finish = NULL;
|
||||
base_sim_class->load_sim_identifier = NULL;
|
||||
base_sim_class->load_sim_identifier_finish = NULL;
|
||||
base_sim_class->load_operator_identifier = NULL;
|
||||
base_sim_class->load_operator_identifier_finish = NULL;
|
||||
base_sim_class->load_operator_name = NULL;
|
||||
base_sim_class->load_operator_name_finish = NULL;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_NOKIA (mm_sim_nokia_get_type ())
|
||||
#define MM_SIM_NOKIA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_NOKIA, MMSimNokia))
|
||||
@@ -32,20 +32,20 @@ typedef struct _MMSimNokia MMSimNokia;
|
||||
typedef struct _MMSimNokiaClass MMSimNokiaClass;
|
||||
|
||||
struct _MMSimNokia {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimNokiaClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_nokia_get_type (void);
|
||||
|
||||
void mm_sim_nokia_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_nokia_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_nokia_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_nokia_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_NOKIA_H */
|
||||
|
||||
@@ -128,7 +128,7 @@ modem_create_bearer (MMIfaceModem *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
modem_create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
|
||||
#include "mm-sim-novatel-lte.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimNovatelLte, mm_sim_novatel_lte, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimNovatelLte, mm_sim_novatel_lte, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* IMSI loading */
|
||||
|
||||
static gchar *
|
||||
load_imsi_finish (MMSim *self,
|
||||
load_imsi_finish (MMBaseSim *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -176,14 +176,14 @@ imsi_read_ready (MMBaseModem *modem,
|
||||
}
|
||||
|
||||
static void
|
||||
load_imsi (MMSim *self,
|
||||
load_imsi (MMBaseSim *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MMBaseModem *modem = NULL;
|
||||
|
||||
g_object_get (self,
|
||||
MM_SIM_MODEM, &modem,
|
||||
MM_BASE_SIM_MODEM, &modem,
|
||||
NULL);
|
||||
|
||||
mm_dbg ("loading (Novatel LTE) IMSI...");
|
||||
@@ -202,7 +202,7 @@ load_imsi (MMSim *self,
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_novatel_lte_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -217,9 +217,9 @@ mm_sim_novatel_lte_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -233,7 +233,7 @@ mm_sim_novatel_lte_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -245,8 +245,8 @@ mm_sim_novatel_lte_init (MMSimNovatelLte *self)
|
||||
static void
|
||||
mm_sim_novatel_lte_class_init (MMSimNovatelLteClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
sim_class->load_imsi = load_imsi;
|
||||
sim_class->load_imsi_finish = load_imsi_finish;
|
||||
base_sim_class->load_imsi = load_imsi;
|
||||
base_sim_class->load_imsi_finish = load_imsi_finish;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_NOVATEL_LTE (mm_sim_novatel_lte_get_type ())
|
||||
#define MM_SIM_NOVATEL_LTE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_NOVATEL_LTE, MMSimNovatelLte))
|
||||
@@ -32,20 +32,20 @@ typedef struct _MMSimNovatelLte MMSimNovatelLte;
|
||||
typedef struct _MMSimNovatelLteClass MMSimNovatelLteClass;
|
||||
|
||||
struct _MMSimNovatelLte {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimNovatelLteClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_novatel_lte_get_type (void);
|
||||
|
||||
void mm_sim_novatel_lte_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_novatel_lte_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_novatel_lte_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_novatel_lte_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_NOVATEL_LTE_H */
|
||||
|
||||
@@ -86,7 +86,7 @@ load_supported_storages (MMIfaceModemMessaging *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
static MMSim *
|
||||
static MMBaseSim *
|
||||
create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -26,11 +26,11 @@
|
||||
|
||||
#include "mm-sim-pantech.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimPantech, mm_sim_pantech, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimPantech, mm_sim_pantech, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_pantech_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -45,23 +45,23 @@ mm_sim_pantech_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
mm_sim_pantech_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
g_async_initable_new_async (MM_TYPE_SIM_PANTECH,
|
||||
G_PRIORITY_DEFAULT,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -73,14 +73,14 @@ mm_sim_pantech_init (MMSimPantech *self)
|
||||
static void
|
||||
mm_sim_pantech_class_init (MMSimPantechClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
/* Skip querying most SIM card info, +CRSM just shoots the Pantech modems
|
||||
* (at least the UMW190) in the head */
|
||||
sim_class->load_sim_identifier = NULL;
|
||||
sim_class->load_sim_identifier_finish = NULL;
|
||||
sim_class->load_operator_identifier = NULL;
|
||||
sim_class->load_operator_identifier_finish = NULL;
|
||||
sim_class->load_operator_name = NULL;
|
||||
sim_class->load_operator_name_finish = NULL;
|
||||
base_sim_class->load_sim_identifier = NULL;
|
||||
base_sim_class->load_sim_identifier_finish = NULL;
|
||||
base_sim_class->load_operator_identifier = NULL;
|
||||
base_sim_class->load_operator_identifier_finish = NULL;
|
||||
base_sim_class->load_operator_name = NULL;
|
||||
base_sim_class->load_operator_name_finish = NULL;
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_PANTECH (mm_sim_pantech_get_type ())
|
||||
#define MM_SIM_PANTECH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_PANTECH, MMSimPantech))
|
||||
@@ -32,20 +32,20 @@ typedef struct _MMSimPantech MMSimPantech;
|
||||
typedef struct _MMSimPantechClass MMSimPantechClass;
|
||||
|
||||
struct _MMSimPantech {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimPantechClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_pantech_get_type (void);
|
||||
|
||||
void mm_sim_pantech_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_pantech_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_pantech_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_pantech_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_PANTECH_H */
|
||||
|
||||
@@ -242,7 +242,7 @@ mm_common_sierra_load_power_state (MMIfaceModem *self,
|
||||
/*****************************************************************************/
|
||||
/* Create SIM (Modem interface) */
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_common_sierra_create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "mm-broadband-modem.h"
|
||||
#include "mm-iface-modem.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
void mm_common_sierra_load_power_state (MMIfaceModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
@@ -35,12 +36,12 @@ gboolean mm_common_sierra_modem_power_up_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
void mm_common_sierra_create_sim (MMIfaceModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_common_sierra_create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_common_sierra_create_sim (MMIfaceModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_common_sierra_create_sim_finish (MMIfaceModem *self,
|
||||
GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
void mm_common_sierra_setup_ports (MMBroadbandModem *self);
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@
|
||||
|
||||
#include "mm-sim-sierra.h"
|
||||
|
||||
G_DEFINE_TYPE (MMSimSierra, mm_sim_sierra, MM_TYPE_SIM);
|
||||
G_DEFINE_TYPE (MMSimSierra, mm_sim_sierra, MM_TYPE_BASE_SIM)
|
||||
|
||||
/*****************************************************************************/
|
||||
/* SIM identifier loading */
|
||||
|
||||
static gchar *
|
||||
load_sim_identifier_finish (MMSim *self,
|
||||
load_sim_identifier_finish (MMBaseSim *self,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -93,14 +93,14 @@ iccid_read_ready (MMBaseModem *modem,
|
||||
}
|
||||
|
||||
static void
|
||||
load_sim_identifier (MMSim *self,
|
||||
load_sim_identifier (MMBaseSim *self,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
MMBaseModem *modem = NULL;
|
||||
|
||||
g_object_get (self,
|
||||
MM_SIM_MODEM, &modem,
|
||||
MM_BASE_SIM_MODEM, &modem,
|
||||
NULL);
|
||||
|
||||
mm_dbg ("loading (Sierra) SIM identifier...");
|
||||
@@ -119,7 +119,7 @@ load_sim_identifier (MMSim *self,
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
MMSim *
|
||||
MMBaseSim *
|
||||
mm_sim_sierra_new_finish (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
@@ -134,9 +134,9 @@ mm_sim_sierra_new_finish (GAsyncResult *res,
|
||||
return NULL;
|
||||
|
||||
/* Only export valid SIMs */
|
||||
mm_sim_export (MM_SIM (sim));
|
||||
mm_base_sim_export (MM_BASE_SIM (sim));
|
||||
|
||||
return MM_SIM (sim);
|
||||
return MM_BASE_SIM (sim);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -150,7 +150,7 @@ mm_sim_sierra_new (MMBaseModem *modem,
|
||||
cancellable,
|
||||
callback,
|
||||
user_data,
|
||||
MM_SIM_MODEM, modem,
|
||||
MM_BASE_SIM_MODEM, modem,
|
||||
NULL);
|
||||
}
|
||||
|
||||
@@ -162,8 +162,8 @@ mm_sim_sierra_init (MMSimSierra *self)
|
||||
static void
|
||||
mm_sim_sierra_class_init (MMSimSierraClass *klass)
|
||||
{
|
||||
MMSimClass *sim_class = MM_SIM_CLASS (klass);
|
||||
MMBaseSimClass *base_sim_class = MM_BASE_SIM_CLASS (klass);
|
||||
|
||||
sim_class->load_sim_identifier = load_sim_identifier;
|
||||
sim_class->load_sim_identifier_finish = load_sim_identifier_finish;
|
||||
base_sim_class->load_sim_identifier = load_sim_identifier;
|
||||
base_sim_class->load_sim_identifier_finish = load_sim_identifier_finish;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include "mm-sim.h"
|
||||
#include "mm-base-sim.h"
|
||||
|
||||
#define MM_TYPE_SIM_SIERRA (mm_sim_sierra_get_type ())
|
||||
#define MM_SIM_SIERRA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_SIM_SIERRA, MMSimSierra))
|
||||
@@ -34,20 +34,20 @@ typedef struct _MMSimSierra MMSimSierra;
|
||||
typedef struct _MMSimSierraClass MMSimSierraClass;
|
||||
|
||||
struct _MMSimSierra {
|
||||
MMSim parent;
|
||||
MMBaseSim parent;
|
||||
};
|
||||
|
||||
struct _MMSimSierraClass {
|
||||
MMSimClass parent;
|
||||
MMBaseSimClass parent;
|
||||
};
|
||||
|
||||
GType mm_sim_sierra_get_type (void);
|
||||
|
||||
void mm_sim_sierra_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMSim *mm_sim_sierra_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
void mm_sim_sierra_new (MMBaseModem *modem,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MMBaseSim *mm_sim_sierra_new_finish (GAsyncResult *res,
|
||||
GError **error);
|
||||
|
||||
#endif /* MM_SIM_SIERRA_H */
|
||||
|
||||
Reference in New Issue
Block a user