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:
 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
Properties¶
- Inherited:
 
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  | 
r  | 
||
unused  | 
r  | 
Class Details¶
- class ModemManager.Sim(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
The
ModemManager.Simstructure contains private data and should only be accessed using the provided API.- change_pin(old_pin, new_pin, cancellable, callback, *user_data)¶
 - Parameters:
 old_pin (
str) – The current PIN code.new_pin (
str) – The new PIN code to be set.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously changes the PIN code in the SIM card.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.change_pin().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
ModemManager.Sim.change_pin().New in version 1.0.
- change_pin_sync(old_pin, new_pin, cancellable)¶
 - Parameters:
 old_pin (
str) – The current PIN code.new_pin (
str) – The new PIN code to be set.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
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:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously disables requesting the PIN code in the SIM card.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.disable_pin().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
ModemManager.Sim.disable_pin().New in version 1.0.
- disable_pin_sync(pin, cancellable)¶
 - Parameters:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
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.Simobject, orNoneif it couldn’t be retrieved. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the Embedded UICC ID (EID) of the
ModemManager.Simobject.New in version 1.16.
- dup_emergency_numbers()¶
 - Returns:
 The emergency numbers, or
Noneif none available. The returned value should be freed withGLib.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()¶
 - 
Gets the Group Identifier Level 1 of the
ModemManager.Simobject.New in version 1.20.
 
- dup_gid2()¶
 - 
Gets the Group Identifier Level 2 of the
ModemManager.Simobject.New in version 1.20.
 
- dup_identifier()¶
 - Returns:
 The unique identifier of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the unique SIM identifier of the
ModemManager.Simobject.New in version 1.0.
- dup_imsi()¶
 - Returns:
 The IMSI of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the International Mobile Subscriber Identity (IMSI) of the
ModemManager.Simobject.New in version 1.0.
- dup_operator_identifier()¶
 - Returns:
 The Operator Identifier of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the Operator Identifier of the
ModemManager.Simobject.New in version 1.0.
- dup_operator_name()¶
 - Returns:
 The Operator Name of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the Operator Name of the
ModemManager.Simobject.New in version 1.0.
- dup_path()¶
 - Returns:
 The DBus path of the
ModemManager.Simobject. The returned value should be freed withGLib.free().- Return type:
 
Gets a copy of the DBus path of the
ModemManager.Simobject.New in version 1.0.
- enable_pin(pin, cancellable, callback, *user_data)¶
 - Parameters:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously enables requesting the PIN code in the SIM card.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.enable_pin().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
ModemManager.Sim.enable_pin().New in version 1.0.
- enable_pin_sync(pin, cancellable)¶
 - Parameters:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
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()¶
 - 
Checks whether the
ModemManager.Simis currently active.New in version 1.16.
 
- get_eid()¶
 - Returns:
 The EID of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved.- Return type:
 
Gets the Embedded UICC ID (or EID) of the
ModemManager.Simobject.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
Noneif 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:
 - Return type:
 
Gets the eSIM status.
Only applicable if the SIM type is
ModemManager.SimType.ESIM.New in version 1.20.
- get_gid1()¶
 - 
Gets the Group Identifier Level 1 of the
ModemManager.Simobject.New in version 1.20.
 
- get_gid2()¶
 - 
Gets the Group Identifier Level 2 of the
ModemManager.Simobject.New in version 1.20.
 
- get_identifier()¶
 - Returns:
 The unique identifier of the
ModemManager.Simobject, orNoneif it couldn’t be retrieved.- Return type:
 
Gets the unique SIM identifier of the
ModemManager.Simobject.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.Simobject, orNoneif it couldn’t be retrieved.- Return type:
 
Gets the International Mobile Subscriber Identity (IMSI) of the
ModemManager.Simobject.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.Simobject, orNoneif it couldn’t be retrieved.- Return type:
 
Gets the Operator Identifier of the
ModemManager.Simobject.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.Simobject, orNoneif it couldn’t be retrieved.- Return type:
 
Gets the Operator Name of the
ModemManager.Simobject.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.Simobject.- Return type:
 
Gets the DBus path of the
ModemManager.Simobject.New in version 1.0.
- get_preferred_networks()¶
 - Returns:
 a list of
ModemManager.SimPreferredNetworkobjects, orNone. The returned value should be freed with g_list_free_full() usingModemManager.SimPreferredNetwork.free() asGLib.DestroyNotifyfunction.- Return type:
 
Gets the list of
ModemManager.SimPreferredNetworkobjects exposed by thisModemManager.Sim.New in version 1.18.
- get_removability()¶
 - Returns:
 - Return type:
 
Gets whether the SIM is removable or not.
New in version 1.20.
- get_sim_type()¶
 - Returns:
 - Return type:
 
Gets the SIM type.
New in version 1.20.
- send_pin(pin, cancellable, callback, *user_data)¶
 - Parameters:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously sends the PIN code to the SIM card.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.send_pin().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
ModemManager.Sim.send_pin().New in version 1.0.
- send_pin_sync(pin, cancellable)¶
 - Parameters:
 pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
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:
 puk (
str) – The PUK code.pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously sends the PUK code to the SIM card.
When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.send_puk().- Raises:
 - Returns:
 - Return type:
 
Finishes an operation started with
ModemManager.Sim.send_puk().New in version 1.0.
- send_puk_sync(puk, pin, cancellable)¶
 - Parameters:
 puk (
str) – The PUK code.pin (
str) – The PIN code.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Returns:
 - Return type:
 
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:
 preferred_networks ([
ModemManager.SimPreferredNetwork]) – A list ofModemManager.SimPreferredNetworkobjectscancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously sets the preferred network list of this
ModemManager.Sim.When the operation is finished, callback will be invoked in the
thread-default main loopof the thread you are calling this method from. You can then callModemManager.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) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toModemManager.Sim.set_preferred_networks().- Raises:
 - Returns:
 Trueif the operation was successful,Falseif error is set.- Return type:
 
Finishes an operation started with
ModemManager.Sim.set_preferred_networks().New in version 1.18.
- set_preferred_networks_sync(preferred_networks, cancellable)¶
 - Parameters:
 preferred_networks ([
ModemManager.SimPreferredNetwork]) – A list ofModemManager.SimPreferredNetworkobjectscancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
 - Return type:
 
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 loopof the thread you are calling this method from. You can then callModemManager.Sim.set_preferred_networks_finish() to get the result of the operation.New in version 1.18.