MMSim

MMSim — The SIM interface

Synopsis

struct              MMSim;

const gchar *       mm_sim_get_path                     (MMSim *self);
gchar *             mm_sim_dup_path                     (MMSim *self);
const gchar *       mm_sim_get_identifier               (MMSim *self);
gchar *             mm_sim_dup_identifier               (MMSim *self);
const gchar *       mm_sim_get_imsi                     (MMSim *self);
gchar *             mm_sim_dup_imsi                     (MMSim *self);
const gchar *       mm_sim_get_operator_identifier      (MMSim *self);
gchar *             mm_sim_dup_operator_identifier      (MMSim *self);
const gchar *       mm_sim_get_operator_name            (MMSim *self);
gchar *             mm_sim_dup_operator_name            (MMSim *self);

void                mm_sim_send_pin                     (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_sim_send_pin_finish              (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_sim_send_pin_sync                (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_sim_send_puk                     (MMSim *self,
                                                         const gchar *puk,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_sim_send_puk_finish              (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_sim_send_puk_sync                (MMSim *self,
                                                         const gchar *puk,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_sim_enable_pin                   (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_sim_enable_pin_finish            (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_sim_enable_pin_sync              (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_sim_disable_pin                  (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_sim_disable_pin_finish           (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_sim_disable_pin_sync             (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_sim_change_pin                   (MMSim *self,
                                                         const gchar *old_pin,
                                                         const gchar *new_pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_sim_change_pin_finish            (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_sim_change_pin_sync              (MMSim *self,
                                                         const gchar *old_pin,
                                                         const gchar *new_pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GDBusProxy
         +----MmGdbusSimProxy
               +----MMSim

Implemented Interfaces

MMSim implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusSim.

Description

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

When the SIM is exposed and available in the bus, it is ensured that at least this interface is also available.

Details

struct MMSim

struct MMSim;

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


mm_sim_get_path ()

const gchar *       mm_sim_get_path                     (MMSim *self);

Gets the DBus path of the MMSim object.

self :

A MMSim.

Returns :

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

mm_sim_dup_path ()

gchar *             mm_sim_dup_path                     (MMSim *self);

Gets a copy of the DBus path of the MMSim object.

self :

A MMSim.

Returns :

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

mm_sim_get_identifier ()

const gchar *       mm_sim_get_identifier               (MMSim *self);

Gets the unique SIM identifier of the MMSim object.

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_sim_dup_identifier() if on another thread.

self :

A MMSim.

Returns :

The unique identifier of the MMSim object, or NULL if it couldn't be retrieved. [transfer none]

mm_sim_dup_identifier ()

gchar *             mm_sim_dup_identifier               (MMSim *self);

Gets a copy of the unique SIM identifier of the MMSim object.

self :

A MMSim.

Returns :

The unique identifier of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free(). [transfer full]

mm_sim_get_imsi ()

const gchar *       mm_sim_get_imsi                     (MMSim *self);

Gets the International Mobile Subscriber Identity (IMSI) of the MMSim object.

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_sim_dup_imsi() if on another thread.

self :

A MMSim.

Returns :

The IMSI of the MMSim object, or NULL if it couldn't be retrieved. [transfer none]

mm_sim_dup_imsi ()

gchar *             mm_sim_dup_imsi                     (MMSim *self);

Gets a copy of the International Mobile Subscriber Identity (IMSI) of the MMSim object.

self :

A MMSim.

Returns :

The IMSI of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free(). [transfer full]

mm_sim_get_operator_identifier ()

const gchar *       mm_sim_get_operator_identifier      (MMSim *self);

Gets the Operator Identifier of the MMSim object.

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_sim_dup_operator_identifier() if on another thread.

self :

A MMSim.

Returns :

The Operator Identifier of the MMSim object, or NULL if it couldn't be retrieved. [transfer none]

mm_sim_dup_operator_identifier ()

gchar *             mm_sim_dup_operator_identifier      (MMSim *self);

Gets a copy of the Operator Identifier of the MMSim object.

self :

A MMSim.

Returns :

The Operator Identifier of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free(). [transfer full]

mm_sim_get_operator_name ()

const gchar *       mm_sim_get_operator_name            (MMSim *self);

Gets the Operator Name of the MMSim object.

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_sim_dup_operator_name() if on another thread.

self :

A MMSim.

Returns :

The Operator Name of the MMSim object, or NULL if it couldn't be retrieved. [transfer none]

mm_sim_dup_operator_name ()

gchar *             mm_sim_dup_operator_name            (MMSim *self);

Gets a copy of the Operator Name of the MMSim object.

self :

A MMSim.

Returns :

The Operator Name of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free(). [transfer full]

mm_sim_send_pin ()

void                mm_sim_send_pin                     (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously sends the PIN code to the SIM card.

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_sim_send_pin_finish() to get the result of the operation.

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

self :

A MMSim.

pin :

The PIN code.

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_sim_send_pin_finish ()

gboolean            mm_sim_send_pin_finish              (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_sim_send_pin().

self :

A MMSim.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_send_pin_sync ()

gboolean            mm_sim_send_pin_sync                (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously sends the PIN to the SIM card.

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

self :

A MMSim.

pin :

The PIN code.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_send_puk ()

void                mm_sim_send_puk                     (MMSim *self,
                                                         const gchar *puk,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously sends the PUK code to the SIM card.

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_sim_send_puk_finish() to get the result of the operation.

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

self :

A MMSim.

puk :

The PUK code.

pin :

The PIN code.

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_sim_send_puk_finish ()

gboolean            mm_sim_send_puk_finish              (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_sim_send_puk().

self :

A MMSim.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_send_puk_sync ()

gboolean            mm_sim_send_puk_sync                (MMSim *self,
                                                         const gchar *puk,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously sends the PUK to the SIM card.

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

self :

A MMSim.

puk :

The PUK code.

pin :

The PIN code.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_enable_pin ()

void                mm_sim_enable_pin                   (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously enables requesting the PIN code in the SIM card.

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_sim_enable_pin_finish() to get the result of the operation.

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

self :

A MMSim.

pin :

The PIN code.

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_sim_enable_pin_finish ()

gboolean            mm_sim_enable_pin_finish            (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_sim_enable_pin().

self :

A MMSim.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_enable_pin_sync ()

gboolean            mm_sim_enable_pin_sync              (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously enables requesting the PIN code in the SIM card.

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

self :

A MMSim.

pin :

The PIN code.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_disable_pin ()

void                mm_sim_disable_pin                  (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously disables requesting the PIN code in the SIM card.

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_sim_disable_pin_finish() to get the result of the operation.

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

self :

A MMSim.

pin :

The PIN code.

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_sim_disable_pin_finish ()

gboolean            mm_sim_disable_pin_finish           (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_sim_disable_pin().

self :

A MMSim.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_disable_pin_sync ()

gboolean            mm_sim_disable_pin_sync             (MMSim *self,
                                                         const gchar *pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously disables requesting the PIN code in the SIM card.

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

self :

A MMSim.

pin :

The PIN code.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_change_pin ()

void                mm_sim_change_pin                   (MMSim *self,
                                                         const gchar *old_pin,
                                                         const gchar *new_pin,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously changes the PIN code in the SIM card.

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_sim_change_pin_finish() to get the result of the operation.

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

self :

A MMSim.

old_pin :

The current PIN code.

new_pin :

The new PIN code to be set.

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_sim_change_pin_finish ()

gboolean            mm_sim_change_pin_finish            (MMSim *self,
                                                         GAsyncResult *res,
                                                         GError **error);

Finishes an operation started with mm_sim_change_pin().

self :

A MMSim.

res :

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

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.

mm_sim_change_pin_sync ()

gboolean            mm_sim_change_pin_sync              (MMSim *self,
                                                         const gchar *old_pin,
                                                         const gchar *new_pin,
                                                         GCancellable *cancellable,
                                                         GError **error);

Synchronously changes the PIN code in the SIM card.

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

self :

A MMSim.

old_pin :

The current PIN code.

new_pin :

The new PIN code to be set.

cancellable :

A GCancellable or NULL. [allow-none]

error :

Return location for error or NULL.

Returns :

TRUE if the operation succeded, FALSE if error is set.