MMModemCdma

MMModemCdma — The CDMA interface

Synopsis

struct              MMModemCdma;
#define             MM_MODEM_CDMA_NID_UNKNOWN
#define             MM_MODEM_CDMA_SID_UNKNOWN

const gchar *       mm_modem_cdma_get_path              (MMModemCdma *self);
gchar *             mm_modem_cdma_dup_path              (MMModemCdma *self);
const gchar *       mm_modem_cdma_get_esn               (MMModemCdma *self);
gchar *             mm_modem_cdma_dup_esn               (MMModemCdma *self);
const gchar *       mm_modem_cdma_get_meid              (MMModemCdma *self);
gchar *             mm_modem_cdma_dup_meid              (MMModemCdma *self);
guint               mm_modem_cdma_get_nid               (MMModemCdma *self);
guint               mm_modem_cdma_get_sid               (MMModemCdma *self);
MMModemCdmaRegistrationState mm_modem_cdma_get_cdma1x_registration_state
                                                        (MMModemCdma *self);
MMModemCdmaRegistrationState mm_modem_cdma_get_evdo_registration_state
                                                        (MMModemCdma *self);
MMModemCdmaActivationState mm_modem_cdma_get_activation_state
                                                        (MMModemCdma *self);

void                mm_modem_cdma_activate              (MMModemCdma *self,
                                                         const gchar *carrier,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_modem_cdma_activate_finish       (MMModemCdma *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_modem_cdma_activate_sync         (MMModemCdma *self,
                                                         const gchar *carrier,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GDBusProxy
         +----MmGdbusModemCdmaProxy
               +----MMModemCdma

Implemented Interfaces

MMModemCdma implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemCdma.

Description

The MMModemCdma is an object providing access to the methods, signals and properties of the CDMA interface.

The CDMA interface is exposed whenever a modem has CDMA capabilities (MM_MODEM_CAPABILITY_CDMA_EVDO).

Details

struct MMModemCdma

struct MMModemCdma;

The MMModemCdma structure contains private data and should only be accessed using the provided API.


MM_MODEM_CDMA_NID_UNKNOWN

#define MM_MODEM_CDMA_NID_UNKNOWN 99999

Identifier for an unknown NID.


MM_MODEM_CDMA_SID_UNKNOWN

#define MM_MODEM_CDMA_SID_UNKNOWN 99999

Identifier for an unknown SID.


mm_modem_cdma_get_path ()

const gchar *       mm_modem_cdma_get_path              (MMModemCdma *self);

Gets the DBus path of the MMObject which implements this interface.

self :

A MMModemCdma.

Returns :

The DBus path of the MMObject object. [transfer none]

mm_modem_cdma_dup_path ()

gchar *             mm_modem_cdma_dup_path              (MMModemCdma *self);

Gets a copy of the DBus path of the MMObject object which implements this interface.

self :

A MMModemCdma.

Returns :

The DBus path of the MMObject. The returned value should be freed with g_free(). [transfer full]

mm_modem_cdma_get_esn ()

const gchar *       mm_modem_cdma_get_esn               (MMModemCdma *self);

Gets the Electronic Serial Number, as reported by this MMModemCdma.

The ESN is superceded by MEID, but still used in older devices.

Warning

The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_modem_cdma_dup_esn() if on another thread.

self :

A MMModemCdma.

Returns :

The ESN, or NULL if none available. [transfer none]

mm_modem_cdma_dup_esn ()

gchar *             mm_modem_cdma_dup_esn               (MMModemCdma *self);

Gets a copy of the Electronic Serial Number, as reported by this MMModemCdma.

The ESN is superceded by MEID, but still used in older devices.

self :

A MMModemCdma.

Returns :

The ESN, or NULL if none available. The returned value should be freed with g_free(). [transfer full]

mm_modem_cdma_get_meid ()

const gchar *       mm_modem_cdma_get_meid              (MMModemCdma *self);

Gets the Mobile Equipment Identifier, as reported by this MMModemCdma.

Warning

The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_modem_cdma_dup_meid() if on another thread.

self :

A MMModemCdma.

Returns :

The MEID, or NULL if none available. [transfer none]

mm_modem_cdma_dup_meid ()

gchar *             mm_modem_cdma_dup_meid              (MMModemCdma *self);

Gets a copy of the Mobile Equipment Identifier, as reported by this MMModemCdma.

self :

A MMModemCdma.

Returns :

The MEID, or NULL if none available. The returned value should be freed with g_free(). [transfer full]

mm_modem_cdma_get_nid ()

guint               mm_modem_cdma_get_nid               (MMModemCdma *self);

Gets the Network Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network.

self :

A MMModemCdma.

Returns :

The NID, or MM_MODEM_CDMA_NID_UNKNOWN.

mm_modem_cdma_get_sid ()

guint               mm_modem_cdma_get_sid               (MMModemCdma *self);

Gets the System Identifier of the serving CDMA 1x network, if known, and if the modem is registered with a CDMA 1x network.

self :

A MMModemCdma.

Returns :

The SID, or MM_MODEM_CDMA_SID_UNKNOWN.

mm_modem_cdma_get_cdma1x_registration_state ()

MMModemCdmaRegistrationState mm_modem_cdma_get_cdma1x_registration_state
                                                        (MMModemCdma *self);

Gets the state of the registration in the CDMA 1x network.

self :

A MMModemCdma.

Returns :

a MMModemCdmaRegistrationState.

mm_modem_cdma_get_evdo_registration_state ()

MMModemCdmaRegistrationState mm_modem_cdma_get_evdo_registration_state
                                                        (MMModemCdma *self);

Gets the state of the registration in the EV-DO network.

self :

A MMModemCdma.

Returns :

a MMModemCdmaRegistrationState.

mm_modem_cdma_get_activation_state ()

MMModemCdmaActivationState mm_modem_cdma_get_activation_state
                                                        (MMModemCdma *self);

Gets the state of the activation in the 3GPP2 network.

self :

A MMModemCdma.

Returns :

a MMModemCdmaActivationState.

mm_modem_cdma_activate ()

void                mm_modem_cdma_activate              (MMModemCdma *self,
                                                         const gchar *carrier,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously requests to provision the modem for use with a given carrier using the modem's OTA activation functionality, if any.

When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from. You can then call mm_modem_cdma_activate_finish() to get the result of the operation.

See mm_modem_cdma_activate_sync() for the synchronous, blocking version of this method.

self :

A MMModemCdma.

carrier :

Name of the carrier.

cancellable :

A GCancellable or NULL. [allow-none]

callback :

A GAsyncReadyCallback to call when the request is satisfied or NULL.

user_data :

User data to pass to callback.

mm_modem_cdma_activate_finish ()

gboolean            mm_modem_cdma_activate_finish       (MMModemCdma *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_modem_cdma_activate().

self :

A MMModemCdma.

res :

The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_modem_cdma_activate().

error :

Return location for error or NULL.

Returns :

TRUE if the activation was successful, FALSE if error is set.

mm_modem_cdma_activate_sync ()

gboolean            mm_modem_cdma_activate_sync         (MMModemCdma *self,
                                                         const gchar *carrier,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously requests to provision the modem for use with a given carrier using the modem's OTA activation functionality, if any.

The calling thread is blocked until a reply is received. See mm_modem_cdma_activate() for the asynchronous version of this method.

self :

A MMModemCdma.

carrier :

Name of the carrier.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the activation was successful, FALSE if error is set.