ModemManager.Sim

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.DBusInterface Gio.DBusInterface GObject.GInterface->Gio.DBusInterface Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable ModemManager.GdbusSim ModemManager.GdbusSim GObject.GInterface->ModemManager.GdbusSim GObject.Object GObject.Object Gio.DBusProxy Gio.DBusProxy GObject.Object->Gio.DBusProxy Gio.AsyncInitable->Gio.DBusProxy Gio.DBusInterface->Gio.DBusProxy ModemManager.GdbusSimProxy ModemManager.GdbusSimProxy Gio.DBusProxy->ModemManager.GdbusSimProxy Gio.Initable->Gio.DBusProxy ModemManager.GdbusSim->ModemManager.GdbusSimProxy ModemManager.Sim ModemManager.Sim ModemManager.GdbusSimProxy->ModemManager.Sim

Subclasses:

None

Methods

Inherited:

ModemManager.GdbusSimProxy (6), Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2), ModemManager.GdbusSim (22)

Structs:

GObject.ObjectClass (5)

change_pin (old_pin, new_pin, cancellable, callback, *user_data)

change_pin_finish (res)

change_pin_sync (old_pin, new_pin, cancellable)

disable_pin (pin, cancellable, callback, *user_data)

disable_pin_finish (res)

disable_pin_sync (pin, cancellable)

dup_eid ()

dup_emergency_numbers ()

dup_gid1 ()

dup_gid2 ()

dup_identifier ()

dup_imsi ()

dup_operator_identifier ()

dup_operator_name ()

dup_path ()

enable_pin (pin, cancellable, callback, *user_data)

enable_pin_finish (res)

enable_pin_sync (pin, cancellable)

get_active ()

get_eid ()

get_emergency_numbers ()

get_esim_status ()

get_gid1 ()

get_gid2 ()

get_identifier ()

get_imsi ()

get_operator_identifier ()

get_operator_name ()

get_path ()

get_preferred_networks ()

get_removability ()

get_sim_type ()

send_pin (pin, cancellable, callback, *user_data)

send_pin_finish (res)

send_pin_sync (pin, cancellable)

send_puk (puk, pin, cancellable, callback, *user_data)

send_puk_finish (res)

send_puk_sync (puk, pin, cancellable)

set_preferred_networks (preferred_networks, cancellable, callback, *user_data)

set_preferred_networks_finish (res)

set_preferred_networks_sync (preferred_networks, cancellable)

Virtual Methods

Inherited:

Gio.DBusProxy (2), GObject.Object (7), Gio.AsyncInitable (2), Gio.DBusInterface (3), Gio.Initable (1), ModemManager.GdbusSim (5)

Properties

Inherited:

Gio.DBusProxy (9), ModemManager.GdbusSim (13)

Signals

Inherited:

Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusSim (5)

Fields

Inherited:

Gio.DBusProxy (2), GObject.Object (1), ModemManager.GdbusSim (5)

Name

Type

Access

Description

parent

ModemManager.GdbusSimProxy

r

unused

object

r

Class Details

class ModemManager.Sim(**kwargs)
Bases:

ModemManager.GdbusSimProxy

Abstract:

No

Structure:

ModemManager.SimClass

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

change_pin(old_pin, new_pin, cancellable, callback, *user_data)
Parameters:

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

See ModemManager.Sim.change_pin_sync() for the synchronous, blocking version of this method.

New in version 1.0.

change_pin_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.change_pin().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.change_pin().

New in version 1.0.

change_pin_sync(old_pin, new_pin, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously changes the PIN code in the SIM card.

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

New in version 1.0.

disable_pin(pin, cancellable, callback, *user_data)
Parameters:

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

See ModemManager.Sim.disable_pin_sync() for the synchronous, blocking version of this method.

New in version 1.0.

disable_pin_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.disable_pin().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.disable_pin().

New in version 1.0.

disable_pin_sync(pin, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously disables requesting the PIN code in the SIM card.

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

New in version 1.0.

dup_eid()
Returns:

The EID of the ModemManager.Sim object, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the Embedded UICC ID (EID) of the ModemManager.Sim object.

New in version 1.16.

dup_emergency_numbers()
Returns:

The emergency numbers, or None if none available. The returned value should be freed with GLib.strfreev().

Return type:

[str]

Gets a copy of the list of emergency call numbers programmed in the SIM card.

New in version 1.12.

dup_gid1()
Returns:

The GID1 data, or None if unknown.

Return type:

bytes

Gets the Group Identifier Level 1 of the ModemManager.Sim object.

New in version 1.20.

dup_gid2()
Returns:

The GID2 data, or None if unknown.

Return type:

bytes

Gets the Group Identifier Level 2 of the ModemManager.Sim object.

New in version 1.20.

dup_identifier()
Returns:

The unique identifier of the ModemManager.Sim object, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the unique SIM identifier of the ModemManager.Sim object.

New in version 1.0.

dup_imsi()
Returns:

The IMSI of the ModemManager.Sim object, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

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

New in version 1.0.

dup_operator_identifier()
Returns:

The Operator Identifier of the ModemManager.Sim object, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the Operator Identifier of the ModemManager.Sim object.

New in version 1.0.

dup_operator_name()
Returns:

The Operator Name of the ModemManager.Sim object, or None if it couldn’t be retrieved. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the Operator Name of the ModemManager.Sim object.

New in version 1.0.

dup_path()
Returns:

The DBus path of the ModemManager.Sim object. The returned value should be freed with GLib.free().

Return type:

str

Gets a copy of the DBus path of the ModemManager.Sim object.

New in version 1.0.

enable_pin(pin, cancellable, callback, *user_data)
Parameters:

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

See ModemManager.Sim.enable_pin_sync() for the synchronous, blocking version of this method.

New in version 1.0.

enable_pin_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.enable_pin().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.enable_pin().

New in version 1.0.

enable_pin_sync(pin, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously enables requesting the PIN code in the SIM card.

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

New in version 1.0.

get_active()
Returns:

True if the SIM is active, False otherwise.

Return type:

bool

Checks whether the ModemManager.Sim is currently active.

New in version 1.16.

get_eid()
Returns:

The EID of the ModemManager.Sim object, or None if it couldn’t be retrieved.

Return type:

str

Gets the Embedded UICC ID (or EID) of the ModemManager.Sim object.

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 ModemManager.Sim.dup_eid() if on another thread.

New in version 1.16.

get_emergency_numbers()
Returns:

The emergency numbers, or None if none available. Do not free the returned value, it belongs to self.

Return type:

[str]

Gets the list of emergency call numbers programmed in the SIM card.

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 ModemManager.Sim.dup_emergency_numbers() if on another thread.

New in version 1.12.

get_esim_status()
Returns:

a ModemManager.SimEsimStatus.

Return type:

ModemManager.SimEsimStatus

Gets the eSIM status.

Only applicable if the SIM type is ModemManager.SimType.ESIM.

New in version 1.20.

get_gid1()
Returns:

The GID1 data, or None if unknown.

Return type:

bytes

Gets the Group Identifier Level 1 of the ModemManager.Sim object.

New in version 1.20.

get_gid2()
Returns:

The GID2 data, or None if unknown.

Return type:

bytes

Gets the Group Identifier Level 2 of the ModemManager.Sim object.

New in version 1.20.

get_identifier()
Returns:

The unique identifier of the ModemManager.Sim object, or None if it couldn’t be retrieved.

Return type:

str

Gets the unique SIM identifier of the ModemManager.Sim object.

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 ModemManager.Sim.dup_identifier() if on another thread.

New in version 1.0.

get_imsi()
Returns:

The IMSI of the ModemManager.Sim object, or None if it couldn’t be retrieved.

Return type:

str

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

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 ModemManager.Sim.dup_imsi() if on another thread.

New in version 1.0.

get_operator_identifier()
Returns:

The Operator Identifier of the ModemManager.Sim object, or None if it couldn’t be retrieved.

Return type:

str

Gets the Operator Identifier of the ModemManager.Sim object.

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 ModemManager.Sim.dup_operator_identifier() if on another thread.

New in version 1.0.

get_operator_name()
Returns:

The Operator Name of the ModemManager.Sim object, or None if it couldn’t be retrieved.

Return type:

str

Gets the Operator Name of the ModemManager.Sim object.

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 ModemManager.Sim.dup_operator_name() if on another thread.

New in version 1.0.

get_path()
Returns:

The DBus path of the ModemManager.Sim object.

Return type:

str

Gets the DBus path of the ModemManager.Sim object.

New in version 1.0.

get_preferred_networks()
Returns:

a list of ModemManager.SimPreferredNetwork objects, or None. The returned value should be freed with g_list_free_full() using ModemManager.SimPreferredNetwork.free() as GLib.DestroyNotify function.

Return type:

[ModemManager.SimPreferredNetwork]

Gets the list of ModemManager.SimPreferredNetwork objects exposed by this ModemManager.Sim.

New in version 1.18.

get_removability()
Returns:

a ModemManager.SimRemovability.

Return type:

ModemManager.SimRemovability

Gets whether the SIM is removable or not.

New in version 1.20.

get_sim_type()
Returns:

a ModemManager.SimType.

Return type:

ModemManager.SimType

Gets the SIM type.

New in version 1.20.

send_pin(pin, cancellable, callback, *user_data)
Parameters:

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

See ModemManager.Sim.send_pin_sync() for the synchronous, blocking version of this method.

New in version 1.0.

send_pin_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.send_pin().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.send_pin().

New in version 1.0.

send_pin_sync(pin, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously sends the PIN to the SIM card.

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

New in version 1.0.

send_puk(puk, pin, cancellable, callback, *user_data)
Parameters:

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

See ModemManager.Sim.send_puk_sync() for the synchronous, blocking version of this method.

New in version 1.0.

send_puk_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.send_puk().

Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.send_puk().

New in version 1.0.

send_puk_sync(puk, pin, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the operation succeeded, False if error is set.

Return type:

bool

Synchronously sends the PUK to the SIM card.

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

New in version 1.0.

set_preferred_networks(preferred_networks, cancellable, callback, *user_data)
Parameters:

Asynchronously sets the preferred network list of this ModemManager.Sim.

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

New in version 1.18.

set_preferred_networks_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.Sim.set_preferred_networks().

Raises:

GLib.Error

Returns:

True if the operation was successful, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.Sim.set_preferred_networks().

New in version 1.18.

set_preferred_networks_sync(preferred_networks, cancellable)
Parameters:
Raises:

GLib.Error

Return type:

bool

Synchronously sets the preferred network list of this ModemManager.Sim.

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

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

New in version 1.18.