ModemManager.Modem¶
- Subclasses:
None
Methods¶
- Inherited:
ModemManager.GdbusModemProxy (6), Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2), ModemManager.GdbusModem (55)
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Signals¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class ModemManager.Modem(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
ModemManager.Modem
structure contains private data and should only be accessed using the provided API.- classmethod get_pending_network_initiated_sessions(self)¶
- Parameters:
self (
ModemManager.ModemOma
) – AModemManager.Modem
.- Returns:
True
if sessions and n_sessions are set,False
otherwise.- sessions:
Return location for the array of
ModemManager.OmaPendingNetworkInitiatedSession
structs. The returned array should be freed withGLib.free
() when no longer needed.
- Return type:
(
bool
, sessions: [ModemManager.OmaPendingNetworkInitiatedSession
])
Gets the list of pending network-initiated OMA sessions.
New in version 1.2.
Deprecated since version 1.18: Use
ModemManager.ModemOma.get_pending_network_initiated_sessions
() instead.
- classmethod peek_pending_network_initiated_sessions(self)¶
- Parameters:
self (
ModemManager.ModemOma
) – AModemManager.Modem
.- Returns:
True
if sessions and n_sessions are set,False
otherwise.- sessions:
Return location for the array of
ModemManager.OmaPendingNetworkInitiatedSession
values. Do not free the returned array, it is owned by self.
- Return type:
(
bool
, sessions: [ModemManager.OmaPendingNetworkInitiatedSession
])
Gets the list of pending network-initiated OMA sessions.
New in version 1.2.
Deprecated since version 1.18: Use
ModemManager.ModemOma.peek_pending_network_initiated_sessions
() instead.
- command(cmd, timeout, cancellable, callback, *user_data)¶
- Parameters:
cmd (
str
) – AT command to run.timeout (
int
) – Maximum time to wait for the response, in seconds.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously runs an AT command in the modem.
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 callModemManager.Modem.command_finish
() to get the result of the operation.See
ModemManager.Modem.command_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- command_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.command
().- Raises:
- Returns:
A newly allocated string with the reply to the command, or
None
if error is set. The returned value should be freed withGLib.free
().- Return type:
Finishes an operation started with
ModemManager.Modem.command
().New in version 1.0.
- command_sync(cmd, timeout, cancellable)¶
- Parameters:
cmd (
str
) – AT command to run.timeout (
int
) – Maximum time to wait for the response, in seconds.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
A newly allocated string with the reply to the command, or
None
if error is set. The returned value should be freed withGLib.free
().- Return type:
Synchronously runs an AT command in the modem.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.command
() for the asynchronous version of this method.New in version 1.0.
- create_bearer(properties, cancellable, callback, *user_data)¶
- Parameters:
properties (
ModemManager.BearerProperties
) – AModemManager.BearerProperties
object with the properties to use.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously creates a new packet data bearer in the
ModemManager.Modem
.This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid.
See ‘CreateBearer [gdbus-method-org-freedesktop-ModemManager1-Modem.CreateBearer]’ to check which properties may be passed.
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 callModemManager.Modem.create_bearer_finish
() to get the result of the operation.See
ModemManager.Modem.create_bearer_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- create_bearer_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.create_bearer
().- Raises:
- Returns:
A newly created
ModemManager.Bearer
, orNone
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.create_bearer
().New in version 1.0.
- create_bearer_sync(properties, cancellable)¶
- Parameters:
properties (
ModemManager.BearerProperties
) – AModemManager.BearerProperties
object with the properties to use.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
A newly created
ModemManager.Bearer
, orNone
if error is set.- Return type:
Synchronously creates a new packet data bearer in the
ModemManager.Modem
.This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid.
See ‘CreateBearer [gdbus-method-org-freedesktop-ModemManager1-Modem.CreateBearer]’ to check which properties may be passed.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.create_bearer
() for the asynchronous version of this method.New in version 1.0.
- delete_bearer(bearer, cancellable, callback, *user_data)¶
- Parameters:
bearer (
str
) – Path of the bearer to delete.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously deletes a given bearer from the
ModemManager.Modem
.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 callModemManager.Modem.delete_bearer_finish
() to get the result of the operation.See
ModemManager.Modem.delete_bearer_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- delete_bearer_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.delete_bearer
().- Raises:
- Returns:
- Return type:
Finishes an operation started with
ModemManager.Modem.delete_bearer
().New in version 1.0.
- delete_bearer_sync(bearer, cancellable)¶
- Parameters:
bearer (
str
) – Path of the bearer to delete.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
- Return type:
Synchronously deletes a given bearer from the
ModemManager.Modem
.The calling thread is blocked until a reply is received. See
ModemManager.Modem.delete_bearer
() for the asynchronous version of this method.New in version 1.0.
- disable(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously tries to disable the
ModemManager.Modem
. When disabled, the modem enters low-power state and no network-related operations are available.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 callModemManager.Modem.disable_finish
() to get the result of the operation.See
ModemManager.Modem.disable_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- disable_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.disable
().- Raises:
- Returns:
True
if the modem was properly disabled,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.disable
().New in version 1.0.
- disable_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
True
if the modem was properly disabled,False
if error is set.- Return type:
Synchronously tries to disable the
ModemManager.Modem
. When disabled, the modem enters low-power state and no network-related operations are available.The calling thread is blocked until a reply is received. See
ModemManager.Modem.disable
() for the asynchronous version of this method.New in version 1.0.
- dup_bearer_paths()¶
- Returns:
The DBus paths of the
ModemManager.Bearer
handled in thisModemManager.Modem
, orNone
if none available. The returned value should be freed withGLib.strfreev
().- Return type:
[
str
]
Gets a copy of the DBus paths of the
ModemManager.Bearer
handled in thisModemManager.Modem
.New in version 1.0.
- dup_carrier_configuration()¶
- Returns:
The carrier configuration, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the carrier-specific configuration (MCFG) in use, as reported by this
ModemManager.Modem
.New in version 1.12.
- dup_carrier_configuration_revision()¶
- Returns:
The carrier configuration revision, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the carrier-specific configuration revision in use, as reported by this
ModemManager.Modem
.New in version 1.12.
- dup_device()¶
- Returns:
The device, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
New in version 1.0.
- dup_device_identifier()¶
- Returns:
The device identifier, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of a best-effort device identifier based on various device information like model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties.
This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, but is intended to be “unique enough” for use as a casual device identifier for various user experience operations.
This is not the device’s IMEI or ESN since those may not be available before unlocking the device via a PIN.
New in version 1.0.
- dup_drivers()¶
- Returns:
The drivers, or
None
if none available. The returned value should be freed withGLib.strfreev
().- Return type:
[
str
]
Gets a copy of the Operating System device driver handling communication with the modem hardware.
New in version 1.0.
- dup_equipment_identifier()¶
- Returns:
The equipment identifier, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the identity of the
ModemManager.Modem
.This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices.
New in version 1.0.
- dup_hardware_revision()¶
- Returns:
The equipment hardware revision, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the equipment hardware revision, as reported by this
ModemManager.Modem
.New in version 1.8.
- dup_manufacturer()¶
- Returns:
The equipment manufacturer, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the equipment manufacturer, as reported by this
ModemManager.Modem
.New in version 1.0.
- dup_model()¶
- Returns:
The equipment model, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the equipment model, as reported by this
ModemManager.Modem
.New in version 1.0.
- dup_own_numbers()¶
- Returns:
The list of own numbers or
None
if none is available. The returned value should be freed withGLib.strfreev
().- Return type:
[
str
]
Gets a copy of the list of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem.
New in version 1.0.
- dup_path()¶
- Returns:
The DBus path of the
ModemManager.Object
. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the DBus path of the
ModemManager.Object
object which implements this interface.New in version 1.0.
- dup_physdev()¶
- Returns:
The physdev path, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the physical modem device path (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
New in version 1.22.
- dup_plugin()¶
- Returns:
The name of the plugin, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the name of the plugin handling this
ModemManager.Modem
.New in version 1.0.
- dup_primary_port()¶
- Returns:
The name of the primary port. The returned value should be freed with
GLib.free
().- Return type:
Gets a copy of the name of the primary port controlling this
ModemManager.Modem
.New in version 1.0.
- dup_revision()¶
- Returns:
The equipment revision, or
None
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the equipment revision, as reported by this
ModemManager.Modem
.New in version 1.0.
- dup_sim_path()¶
- Returns:
The DBus path of the
ModemManager.Sim
handled in thisModemManager.Modem
, orNone
if none available. The returned value should be freed withGLib.free
().- Return type:
Gets a copy of the DBus path of the
ModemManager.Sim
handled in thisModemManager.Modem
.New in version 1.0.
- dup_sim_slot_paths()¶
- Returns:
The DBus paths of the
ModemManager.Sim
objects handled in thisModemManager.Modem
, orNone
if none available. The returned value should be freed withGLib.strfreev
().- Return type:
[
str
]
Gets a copy of the DBus paths of the
ModemManager.Sim
objects available in the different SIM slots handled in thisModemManager.Modem
. If a given SIM slot at a given index doesn’t have a SIM card available, an empty object path will be given. This list includes the currently active SIM object path.New in version 1.16.
- enable(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously tries to enable the
ModemManager.Modem
. When enabled, the modem’s radio is powered on and data sessions, voice calls, location services, and Short Message Service may be available.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 callModemManager.Modem.enable_finish
() to get the result of the operation.See
ModemManager.Modem.enable_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- enable_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.enable
().- Raises:
- Returns:
True
if the modem was properly enabled,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.enable
().New in version 1.0.
- enable_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
True
if the modem was properly enabled,False
if error is set.- Return type:
Synchronously tries to enable the
ModemManager.Modem
. When enabled, the modem’s radio is powered on and data sessions, voice calls, location services, and Short Message Service may be available.The calling thread is blocked until a reply is received. See
ModemManager.Modem.enable
() for the asynchronous version of this method.New in version 1.0.
- factory_reset(code, cancellable, callback, *user_data)¶
- Parameters:
code (
str
) – Carrier-supplied code required to reset the modem.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously clears the modem’s configuration (including persistent configuration and state), and returns the device to a factory-default state.
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 callModemManager.Modem.factory_reset_finish
() to get the result of the operation.See
ModemManager.Modem.factory_reset_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- factory_reset_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.factory_reset
().- Raises:
- Returns:
True
if the factory_reset was successful,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.factory_reset
().New in version 1.0.
- factory_reset_sync(code, cancellable)¶
- Parameters:
code (
str
) – Carrier-supplied code required to reset the modem.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the factory reset was successful,False
if error is set.- Return type:
Synchronously clears the modem’s configuration (including persistent configuration and state), and returns the device to a factory-default state.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.factory_reset
() for the asynchronous version of this method.New in version 1.0.
- get_access_technologies()¶
- Returns:
A #:obj:ModemManager.ModemAccessTechnology value.
- Return type:
Gets the current network access technology used by the
ModemManager.Modem
to communicate with the network.New in version 1.0.
- get_bearer_paths()¶
- Returns:
The DBus paths of the
ModemManager.Bearer
handled in thisModemManager.Modem
, orNone
if none available. Do not free the returned value, it belongs to self.- Return type:
[
str
]
Gets the DBus paths of the
ModemManager.Bearer
handled in thisModemManager.Modem
.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.Modem.dup_bearer_paths
() if on another thread.New in version 1.0.
- get_carrier_configuration()¶
- Returns:
The carrier configuration, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the carrier-specific configuration (MCFG) in use, as reported by this
ModemManager.Modem
.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.Modem.dup_carrier_configuration
() if on another thread.New in version 1.12.
- get_carrier_configuration_revision()¶
- Returns:
The carrier configuration revision, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the carrier-specific configuration revision in use, as reported by this
ModemManager.Modem
.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.Modem.dup_carrier_configuration
() if on another thread.New in version 1.12.
- get_cell_info(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously requests to get info about serving and neighboring cells.
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 callModemManager.Modem.get_cell_info_finish
() to get the result of the operation.See
ModemManager.Modem.get_cell_info_sync
() for the synchronous, blocking version of this method.New in version 1.20.
- get_cell_info_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.get_cell_info
().- Raises:
- Returns:
a list of
ModemManager.CellInfo
objects, orNone
if error is set. The returned value should be freed with g_list_free_full() usingGObject.Object.unref
() asGLib.DestroyNotify
function.- Return type:
Finishes an operation started with
ModemManager.Modem.get_cell_info
().New in version 1.20.
- get_cell_info_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
a list of
ModemManager.CellInfo
objects, orNone
if error is set. The returned value should be freed with g_list_free_full() usingGObject.Object.unref
() asGLib.DestroyNotify
function.- Return type:
Synchronously requests to get info about serving and neighboring cells.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.get_cell_info
() for the asynchronous version of this method.New in version 1.20.
- get_current_bands()¶
- Returns:
True
if bands and n_bands are set,False
otherwise.- bands:
Return location for the array of
ModemManager.ModemBand
values. The returned array should be freed withGLib.free
() when no longer needed.
- Return type:
(
bool
, bands: [ModemManager.ModemBand
])
Gets the list of radio frequency and technology bands the
ModemManager.Modem
is currently using when connecting to a network.For POTS devices, only the
ModemManager.ModemBand.ANY
band is supported.New in version 1.0.
- get_current_capabilities()¶
- Returns:
A bitmask of
ModemManager.ModemCapability
flags.- Return type:
Gets the list of generic families of access technologies supported by this
ModemManager.Modem
without a firmware reload or reinitialization.New in version 1.0.
- get_current_modes()¶
- Returns:
True
if allowed and preferred are set,False
otherwise.- allowed:
Return location for a bitmask of
ModemManager.ModemMode
values.- preferred:
Return location for a
ModemManager.ModemMode
value.
- Return type:
(
bool
, allowed:ModemManager.ModemMode
, preferred:ModemManager.ModemMode
)
Gets the list of modes specifying the access technologies (eg 2G/3G/4G) the
ModemManager.Modem
is currently allowed to use when connecting to a network, as well as the preferred one, if any.New in version 1.0.
- get_device()¶
- Returns:
The device, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
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.Modem.dup_device
() if on another thread.New in version 1.0.
- get_device_identifier()¶
- Returns:
The device identifier, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets a best-effort device identifier based on various device information like model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties.
This ID is not guaranteed to be unique and may be shared between identical devices with the same firmware, but is intended to be “unique enough” for use as a casual device identifier for various user experience operations.
This is not the device’s IMEI or ESN since those may not be available before unlocking the device via a PIN.
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.Modem.dup_device_identifier
() if on another thread.New in version 1.0.
- get_drivers()¶
- Returns:
The drivers, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
[
str
]
Gets the Operating System device drivers handling communication with the modem hardware.
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.Modem.dup_drivers
() if on another thread.New in version 1.0.
- get_equipment_identifier()¶
- Returns:
The equipment identifier, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the identity of the
ModemManager.Modem
.This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices.
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.Modem.dup_equipment_identifier
() if on another thread.New in version 1.0.
- get_hardware_revision()¶
- Returns:
The equipment hardware revision, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the equipment hardware revision, as reported by this
ModemManager.Modem
.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.Modem.dup_hardware_revision
() if on another thread.New in version 1.8.
- get_manufacturer()¶
- Returns:
The equipment manufacturer, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the equipment manufacturer, as reported by this
ModemManager.Modem
.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.Modem.dup_manufacturer
() if on another thread.New in version 1.0.
- get_max_active_bearers()¶
- Returns:
the maximum number of active packet data bearers.
- Return type:
Gets the maximum number of active packet data bearers this
ModemManager.Modem
supports without enabling multiplexing support.POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS and LTE/5GNR capable devices (including 3GPP+3GPP3 multimode devices) may support one or more active bearers, depending on the amount of physical ports exposed by the device.
New in version 1.0.
- get_max_active_multiplexed_bearers()¶
- Returns:
the maximum number of active packet data bearers, or 0 if multiplexing is not supported.
- Return type:
Gets the maximum number of active packet data bearers this
ModemManager.Modem
supports after enabling multiplexing support on one single network interface.New in version 1.18.
- get_max_bearers()¶
- Returns:
the maximum number of defined packet data bearers.
- Return type:
Gets the maximum number of defined packet data bearers this
ModemManager.Modem
supports.This is not the number of active/connected bearers the modem supports, but simply the number of bearers that may be defined at any given time. For example, POTS and CDMA2000-only devices support only one bearer, while GSM/UMTS devices typically support three or more, and any LTE-capable device (whether LTE-only, GSM/UMTS-capable, and/or CDMA2000-capable) also typically support three or more.
New in version 1.0.
Deprecated since version 1.18.: There is no way to query the modem how many bearers it supports, so the value exposed in this property in all the different implementations is always equal to the one retrieved with
ModemManager.Modem.get_max_active_bearers
(), so there is no point in using this method.
- get_model()¶
- Returns:
The equipment model, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the equipment model, as reported by this
ModemManager.Modem
.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.Modem.dup_model
() if on another thread.New in version 1.0.
- get_physdev()¶
- Returns:
The physdev path, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the physical modem device path (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.
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.Modem.dup_physdev
() if on another thread.New in version 1.22.
- get_plugin()¶
- Returns:
The name of the plugin, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the name of the plugin handling this
ModemManager.Modem
.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.Modem.dup_plugin
() if on another thread.New in version 1.0.
- get_ports()¶
- Returns:
True
if ports and n_ports are set,False
otherwise.- ports:
Return location for the array of
ModemManager.ModemPortInfo
values. The returned array should be freed withModemManager.ModemPortInfo.array_free
() when no longer needed.
- Return type:
(
bool
, ports: [ModemManager.ModemPortInfo
])
Gets the list of ports in the modem.
New in version 1.0.
- get_power_state()¶
- Returns:
A
ModemManager.ModemPowerState
value.- Return type:
Gets the power state of the
ModemManager.Modem
.New in version 1.0.
- get_primary_port()¶
- Returns:
The name of the primary port. Do not free the returned value, it belongs to self.
- Return type:
Gets the name of the primary port controlling this
ModemManager.Modem
.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.Modem.dup_primary_port
() if on another thread.New in version 1.0.
- get_primary_sim_slot()¶
- Returns:
slot number, in the [1,N] range.
- Return type:
Gets the SIM slot number of the primary active SIM.
New in version 1.16.
- get_revision()¶
- Returns:
The equipment revision, or
None
if none available. Do not free the returned value, it belongs to self.- Return type:
Gets the equipment revision, as reported by this
ModemManager.Modem
.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.Modem.dup_revision
() if on another thread.New in version 1.0.
- get_signal_quality()¶
- Returns:
The signal quality.
- recent:
Return location for the flag specifying if the signal quality value was recent or not.
- Return type:
Gets the signal quality value in percent (0 - 100) of the dominant access technology the
ModemManager.Modem
is using to communicate with the network.Always 0 for POTS devices.
New in version 1.0.
- get_sim(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously gets the
ModemManager.Sim
object managed by thisModemManager.Modem
.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 callModemManager.Modem.get_sim_finish
() to get the result of the operation.See
ModemManager.Modem.get_sim_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- get_sim_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.get_sim
().- Raises:
- Returns:
a
ModemManager.Sim
orNone
if error is set. The returned value should be freed withGObject.Object.unref
().- Return type:
Finishes an operation started with
ModemManager.Modem.get_sim
().New in version 1.0.
- get_sim_slot_paths()¶
- Returns:
The DBus paths of the
ModemManager.Sim
objects handled in thisModemManager.Modem
, orNone
if none available. Do not free the returned value, it belongs to self.- Return type:
[
str
]
Gets the DBus paths of the
ModemManager.Sim
objects available in the different SIM slots handled in thisModemManager.Modem
. If a given SIM slot at a given index doesn’t have a SIM card available, an empty object path will be given. This list includes the currently active SIM object path.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.Modem.dup_sim_slot_paths
() if on another thread.New in version 1.16.
- get_sim_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
a
ModemManager.Sim
orNone
if error is set. The returned value should be freed withGObject.Object.unref
().- Return type:
Synchronously gets the
ModemManager.Sim
object managed by thisModemManager.Modem
.The calling thread is blocked until a reply is received. See
ModemManager.Modem.get_sim
() for the asynchronous version of this method.New in version 1.0.
- get_state()¶
- Returns:
A
ModemManager.ModemState
value.- Return type:
Gets the overall state of the
ModemManager.Modem
.New in version 1.0.
- get_state_failed_reason()¶
- Returns:
A
ModemManager.ModemStateFailedReason
value.- Return type:
Gets the reason specifying why the modem is in
ModemManager.ModemState.FAILED
state.New in version 1.0.
- get_supported_bands()¶
- Returns:
True
if bands and n_bands are set,False
otherwise.- bands:
Return location for the array of
ModemManager.ModemBand
values. The returned array should be freed withGLib.free
() when no longer needed.
- Return type:
(
bool
, bands: [ModemManager.ModemBand
])
Gets the list of radio frequency and technology bands supported by the
ModemManager.Modem
.For POTS devices, only
ModemManager.ModemBand.ANY
will be returned in bands.New in version 1.0.
- get_supported_capabilities()¶
- Returns:
True
if capabilities and n_capabilities are set,False
otherwise.- capabilities:
Return location for the array of
ModemManager.ModemCapability
values. The returned array should be freed withGLib.free
() when no longer needed.
- Return type:
(
bool
, capabilities: [ModemManager.ModemCapability
])
Gets the list of combinations of generic families of access technologies supported by this
ModemManager.Modem
.New in version 1.0.
- get_supported_ip_families()¶
- Returns:
A bitmask of
ModemManager.BearerIpFamily
values.- Return type:
Gets the list of supported IP families.
New in version 1.0.
- get_supported_modes()¶
- Returns:
True
if modes and n_modes are set,False
otherwise.- modes:
Return location for the array of
ModemManager.ModemModeCombination
structs. The returned array should be freed withGLib.free
() when no longer needed.
- Return type:
(
bool
, modes: [ModemManager.ModemModeCombination
])
Gets the list of supported mode combinations.
New in version 1.0.
- get_unlock_required()¶
- Returns:
A
ModemManager.ModemLock
value, specifying the current lock state.- Return type:
Gets current lock state of the
ModemManager.Modem
.New in version 1.0.
- get_unlock_retries()¶
- Returns:
A
ModemManager.UnlockRetries
that must be freed withGObject.Object.unref
() orNone
if unknown.- Return type:
Gets a
ModemManager.UnlockRetries
object, which provides, for eachModemManager.ModemLock
handled by the modem, the number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call
ModemManager.Modem.get_unlock_retries
() again to get a newModemManager.UnlockRetries
with the new values.New in version 1.0.
- list_bearers(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously lists the packet data bearers in the
ModemManager.Modem
.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 callModemManager.Modem.list_bearers_finish
() to get the result of the operation.See
ModemManager.Modem.list_bearers_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- list_bearers_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.list_bearers
().- Raises:
- Returns:
The list of
ModemManager.Bearer
objects, orNone
if either none found or if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.list_bearers
().New in version 1.0.
- list_bearers_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
The list of
ModemManager.Bearer
objects, orNone
if either none found or if error is set.- Return type:
Synchronously lists the packet data bearers in the
ModemManager.Modem
.The calling thread is blocked until a reply is received. See
ModemManager.Modem.list_bearers
() for the asynchronous version of this method.New in version 1.0.
- list_sim_slots(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously lists the SIM slots available in the
ModemManager.Modem
.The returned array contains one element per slot available in the system; a
ModemManager.Sim
in each of the slots that contains a valid SIM card orNone
if no SIM card is found.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 callModemManager.Modem.list_sim_slots_finish
() to get the result of the operation.See
ModemManager.Modem.list_sim_slots_sync
() for the synchronous, blocking version of this method.New in version 1.16.
- list_sim_slots_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.list_sim_slots
().- Raises:
- Returns:
The array of
ModemManager.Sim
objects, orNone
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.list_sim_slots
().New in version 1.16.
- list_sim_slots_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
The array of
ModemManager.Sim
objects, orNone
if error is set.- Return type:
Synchronously lists the SIM slots available in the
ModemManager.Modem
.The returned array contains one element per slot available in the system; a
ModemManager.Sim
in each of the slots that contains a valid SIM card orNone
if no SIM card is found.The calling thread is blocked until a reply is received. See
ModemManager.Modem.list_sim_slots
() for the asynchronous version of this method.New in version 1.16.
- peek_current_bands()¶
- Returns:
True
if bands and n_bands are set,False
otherwise.- bands:
Return location for the array of
ModemManager.ModemBand
values. Do not free the returned value, it is owned by self.
- Return type:
(
bool
, bands: [ModemManager.ModemBand
])
Gets the list of radio frequency and technology bands the
ModemManager.Modem
is currently using when connecting to a network.For POTS devices, only the
ModemManager.ModemBand.ANY
band is supported.New in version 1.0.
- peek_ports()¶
- Returns:
True
if ports and n_ports are set,False
otherwise.- ports:
Return location for the array of
ModemManager.ModemPortInfo
values. Do not free the returned value, it is owned by self.
- Return type:
(
bool
, ports: [ModemManager.ModemPortInfo
])
Gets the list of ports in the modem.
New in version 1.0.
- peek_supported_bands()¶
- Returns:
True
if bands and n_bands are set,False
otherwise.- bands:
Return location for the array of
ModemManager.ModemBand
values. Do not free the returned array, it is owned by self.
- Return type:
(
bool
, bands: [ModemManager.ModemBand
])
Gets the list of radio frequency and technology bands supported by the
ModemManager.Modem
.For POTS devices, only
ModemManager.ModemBand.ANY
will be returned in bands.New in version 1.0.
- peek_supported_capabilities()¶
- Returns:
True
if capabilities and n_capabilities are set,False
otherwise.- capabilities:
Return location for the array of
ModemManager.ModemCapability
values. Do not free the returned array, it is owned by self.
- Return type:
(
bool
, capabilities: [ModemManager.ModemCapability
])
Gets the list of combinations of generic families of access technologies supported by this
ModemManager.Modem
.New in version 1.0.
- peek_supported_modes()¶
- Returns:
True
if modes and n_modes are set,False
otherwise.- modes:
Return location for the array of
ModemManager.ModemModeCombination
values. Do not free the returned array, it is owned by self.
- Return type:
(
bool
, modes: [ModemManager.ModemModeCombination
])
Gets the list of supported mode combinations.
New in version 1.0.
- peek_unlock_retries()¶
- Returns:
A
ModemManager.UnlockRetries
. Do not free the returned value, it belongs to self.- Return type:
Gets a
ModemManager.UnlockRetries
object, which provides, for eachModemManager.ModemLock
handled by the modem, the number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.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.Modem.get_unlock_retries
() if on another thread.New in version 1.0.
- reset(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously clears non-persistent configuration and state, and returns the device to a newly-powered-on state.
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 callModemManager.Modem.reset_finish
() to get the result of the operation.See
ModemManager.Modem.reset_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- reset_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.reset
().- Raises:
- Returns:
- Return type:
Finishes an operation started with
ModemManager.Modem.reset
().New in version 1.0.
- reset_sync(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.- Raises:
- Returns:
- Return type:
Synchronously clears non-persistent configuration and state, and returns the device to a newly-powered-on state.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.reset
() for the asynchronous version of this method.New in version 1.0.
- set_current_bands(bands, n_bands, cancellable, callback, *user_data)¶
- Parameters:
bands (
ModemManager.ModemBand
) – An array ofModemManager.ModemBand
values specifying which bands are allowed.n_bands (
int
) – Number of elements in bands.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously sets the radio frequency and technology bands the device is currently allowed to use when connecting to a network.
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 callModemManager.Modem.set_current_bands_finish
() to get the result of the operation.See
ModemManager.Modem.set_current_bands_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- set_current_bands_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.set_current_bands
().- Raises:
- Returns:
True
if the bands were successfully set,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.set_current_bands
().New in version 1.0.
- set_current_bands_sync(bands, n_bands, cancellable)¶
- Parameters:
bands (
ModemManager.ModemBand
) – An array ofModemManager.ModemBand
values specifying which bands are allowed.n_bands (
int
) – Number of elements in bands.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the bands were successfully set,False
if error is set.- Return type:
Synchronously sets the radio frequency and technology bands the device is currently allowed to use when connecting to a network.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.set_current_bands
() for the asynchronous version of this method.New in version 1.0.
- set_current_capabilities(capabilities, cancellable, callback, *user_data)¶
- Parameters:
capabilities (
ModemManager.ModemCapability
) – AModemManager.ModemCapability
mask.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously sets the capabilities of the device. A restart of the modem may be required.
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 callModemManager.Modem.set_current_capabilities_finish
() to get the result of the operation.See
ModemManager.Modem.set_current_capabilities_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- set_current_capabilities_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.set_current_capabilities
().- Raises:
- Returns:
True
if the capabilities were successfully set,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.set_current_capabilities
().New in version 1.0.
- set_current_capabilities_sync(capabilities, cancellable)¶
- Parameters:
capabilities (
ModemManager.ModemCapability
) – AModemManager.ModemCapability
mask.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the capabilities were successfully set,False
if error is set.- Return type:
Synchronously sets the capabilities of the device. A restart of the modem may be required.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.set_current_capabilities
() for the asynchronous version of this method.New in version 1.0.
- set_current_modes(modes, preferred, cancellable, callback, *user_data)¶
- Parameters:
modes (
ModemManager.ModemMode
) – Mask ofModemManager.ModemMode
values specifying which modes are allowed.preferred (
ModemManager.ModemMode
) – AModemManager.ModemMode
value specifying which of the modes given in modes is the preferred one, orModemManager.ModemMode.NONE
if none.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously sets the access technologies (e.g. 2G/3G/4G preference) the device is currently allowed to use when connecting to a network.
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 callModemManager.Modem.set_current_modes_finish
() to get the result of the operation.See
ModemManager.Modem.set_current_modes_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- set_current_modes_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.set_current_modes
().- Raises:
- Returns:
True
if the allowed modes were successfully set,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.set_current_modes
().New in version 1.0.
- set_current_modes_sync(modes, preferred, cancellable)¶
- Parameters:
modes (
ModemManager.ModemMode
) – Mask ofModemManager.ModemMode
values specifying which modes are allowed.preferred (
ModemManager.ModemMode
) – AModemManager.ModemMode
value specifying which of the modes given in modes is the preferred one, orModemManager.ModemMode.NONE
if none.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the allowed modes were successfully set,False
if error is set.- Return type:
Synchronously sets the access technologies (e.g. 2G/3G/4G preference) the device is currently allowed to use when connecting to a network.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.set_current_modes
() for the asynchronous version of this method.New in version 1.0.
- set_power_state(state, cancellable, callback, *user_data)¶
- Parameters:
state (
ModemManager.ModemPowerState
) – EitherModemManager.ModemPowerState.LOW
orModemManager.ModemPowerState.ON
. Every otherModemManager.ModemPowerState
value is not allowed.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously sets the power state of the device. This method can only be used while the modem is in
ModemManager.ModemState.DISABLED
state.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 callModemManager.Modem.set_power_state_finish
() to get the result of the operation.See
ModemManager.Modem.set_power_state_sync
() for the synchronous, blocking version of this method.New in version 1.0.
- set_power_state_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.set_power_state
().- Raises:
- Returns:
True
if the power state was successfully set,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.set_power_state
().New in version 1.0.
- set_power_state_sync(state, cancellable)¶
- Parameters:
state (
ModemManager.ModemPowerState
) – EitherModemManager.ModemPowerState.LOW
orModemManager.ModemPowerState.ON
. Every otherModemManager.ModemPowerState
value is not allowed.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the power state was successfully set,False
if error is set.- Return type:
Synchronously sets the power state of the device. This method can only be used while the modem is in
ModemManager.ModemState.DISABLED
state.The calling thread is blocked until a reply is received. See
ModemManager.Modem.set_power_state
() for the asynchronous version of this method.New in version 1.0.
- set_primary_sim_slot(sim_slot, cancellable, callback, *user_data)¶
- Parameters:
sim_slot (
int
) – SIM slot number.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied orNone
.
Asynchronously requests to select which SIM slot to be considered as primary.
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 callModemManager.Modem.set_primary_sim_slot_finish
() to get the result of the operation.See
ModemManager.Modem.set_primary_sim_slot_sync
() for the synchronous, blocking version of this method.New in version 1.16.
- set_primary_sim_slot_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toModemManager.Modem.set_primary_sim_slot
().- Raises:
- Returns:
True
if the SIM slot switch has been successfully requested,False
if error is set.- Return type:
Finishes an operation started with
ModemManager.Modem.set_primary_sim_slot
().New in version 1.16.
- set_primary_sim_slot_sync(sim_slot, cancellable)¶
- Parameters:
sim_slot (
int
) – SIM slot number.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
True
if the SIM slot switch has been successfully requested,False
if error is set.- Return type:
Synchronously requests to select which SIM slot to be considered as primary.
The calling thread is blocked until a reply is received. See
ModemManager.Modem.set_primary_sim_slot
() for the asynchronous version of this method.New in version 1.16.