MMModem

MMModem — The Modem interface

Functions

const gchar * mm_modem_get_path ()
gchar * mm_modem_dup_path ()
MMModemState mm_modem_get_state ()
MMModemStateFailedReason mm_modem_get_state_failed_reason ()
MMModemPowerState mm_modem_get_power_state ()
gboolean mm_modem_peek_supported_capabilities ()
gboolean mm_modem_get_supported_capabilities ()
MMModemCapability mm_modem_get_current_capabilities ()
const gchar * mm_modem_get_manufacturer ()
gchar * mm_modem_dup_manufacturer ()
const gchar * mm_modem_get_model ()
gchar * mm_modem_dup_model ()
const gchar * mm_modem_get_revision ()
gchar * mm_modem_dup_revision ()
const gchar * mm_modem_get_carrier_configuration ()
gchar * mm_modem_dup_carrier_configuration ()
const gchar * mm_modem_get_carrier_configuration_revision ()
gchar * mm_modem_dup_carrier_configuration_revision ()
const gchar * mm_modem_get_hardware_revision ()
gchar * mm_modem_dup_hardware_revision ()
const gchar * const * mm_modem_get_drivers ()
gchar ** mm_modem_dup_drivers ()
const gchar * mm_modem_get_plugin ()
gchar * mm_modem_dup_plugin ()
const gchar * mm_modem_get_primary_port ()
gchar * mm_modem_dup_primary_port ()
gboolean mm_modem_peek_ports ()
gboolean mm_modem_get_ports ()
const gchar * mm_modem_get_device ()
gchar * mm_modem_dup_device ()
const gchar * mm_modem_get_equipment_identifier ()
gchar * mm_modem_dup_equipment_identifier ()
const gchar * mm_modem_get_device_identifier ()
gchar * mm_modem_dup_device_identifier ()
MMModemLock mm_modem_get_unlock_required ()
MMUnlockRetries * mm_modem_peek_unlock_retries ()
MMUnlockRetries * mm_modem_get_unlock_retries ()
guint mm_modem_get_max_bearers ()
guint mm_modem_get_max_active_bearers ()
guint mm_modem_get_max_active_multiplexed_bearers ()
const gchar * const * mm_modem_get_bearer_paths ()
gchar ** mm_modem_dup_bearer_paths ()
const gchar *const * mm_modem_get_own_numbers ()
gchar ** mm_modem_dup_own_numbers ()
gboolean mm_modem_peek_supported_modes ()
gboolean mm_modem_get_supported_modes ()
gboolean mm_modem_get_current_modes ()
gboolean mm_modem_peek_supported_bands ()
gboolean mm_modem_get_supported_bands ()
gboolean mm_modem_peek_current_bands ()
gboolean mm_modem_get_current_bands ()
MMBearerIpFamily mm_modem_get_supported_ip_families ()
guint mm_modem_get_signal_quality ()
MMModemAccessTechnology mm_modem_get_access_technologies ()
const gchar * mm_modem_get_sim_path ()
gchar * mm_modem_dup_sim_path ()
void mm_modem_get_sim ()
MMSim * mm_modem_get_sim_finish ()
MMSim * mm_modem_get_sim_sync ()
const gchar * const * mm_modem_get_sim_slot_paths ()
gchar ** mm_modem_dup_sim_slot_paths ()
guint mm_modem_get_primary_sim_slot ()
void mm_modem_list_sim_slots ()
GPtrArray * mm_modem_list_sim_slots_finish ()
GPtrArray * mm_modem_list_sim_slots_sync ()
void mm_modem_set_primary_sim_slot ()
gboolean mm_modem_set_primary_sim_slot_finish ()
gboolean mm_modem_set_primary_sim_slot_sync ()
void mm_modem_enable ()
gboolean mm_modem_enable_finish ()
gboolean mm_modem_enable_sync ()
void mm_modem_disable ()
gboolean mm_modem_disable_finish ()
gboolean mm_modem_disable_sync ()
void mm_modem_set_power_state ()
gboolean mm_modem_set_power_state_finish ()
gboolean mm_modem_set_power_state_sync ()
void mm_modem_set_current_modes ()
gboolean mm_modem_set_current_modes_finish ()
gboolean mm_modem_set_current_modes_sync ()
void mm_modem_set_current_bands ()
gboolean mm_modem_set_current_bands_finish ()
gboolean mm_modem_set_current_bands_sync ()
void mm_modem_set_current_capabilities ()
gboolean mm_modem_set_current_capabilities_finish ()
gboolean mm_modem_set_current_capabilities_sync ()
void mm_modem_reset ()
gboolean mm_modem_reset_finish ()
gboolean mm_modem_reset_sync ()
void mm_modem_factory_reset ()
gboolean mm_modem_factory_reset_finish ()
gboolean mm_modem_factory_reset_sync ()
void mm_modem_list_bearers ()
GList * mm_modem_list_bearers_finish ()
GList * mm_modem_list_bearers_sync ()
void mm_modem_create_bearer ()
MMBearer * mm_modem_create_bearer_finish ()
MMBearer * mm_modem_create_bearer_sync ()
void mm_modem_delete_bearer ()
gboolean mm_modem_delete_bearer_finish ()
gboolean mm_modem_delete_bearer_sync ()
void mm_modem_command ()
gchar * mm_modem_command_finish ()
gchar * mm_modem_command_sync ()
void mm_modem_port_info_array_free ()

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemProxy
            ╰── MMModem

Implemented Interfaces

MMModem implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModem.

Description

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

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

Functions

mm_modem_get_path ()

const gchar *
mm_modem_get_path (MMModem *self);

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

[skip]

Parameters

self

A MMModem.

 

Returns

The DBus path of the MMObject object. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_path ()

gchar *
mm_modem_dup_path (MMModem *self);

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

Parameters

self

A MMModem.

 

Returns

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

[transfer full]

Since: 1.0


mm_modem_get_state ()

MMModemState
mm_modem_get_state (MMModem *self);

Gets the overall state of the MMModem.

Parameters

self

A MMModem.

 

Returns

A MMModemState value.

Since: 1.0


mm_modem_get_state_failed_reason ()

MMModemStateFailedReason
mm_modem_get_state_failed_reason (MMModem *self);

Gets the reason specifying why the modem is in MM_MODEM_STATE_FAILED state.

Parameters

self

A MMModem.

 

Returns

A MMModemStateFailedReason value.

Since: 1.0


mm_modem_get_power_state ()

MMModemPowerState
mm_modem_get_power_state (MMModem *self);

Gets the power state of the MMModem.

Parameters

self

A MMModem.

 

Returns

A MMModemPowerState value.

Since: 1.0


mm_modem_peek_supported_capabilities ()

gboolean
mm_modem_peek_supported_capabilities (MMModem *self,
                                      const MMModemCapability **capabilities,
                                      guint *n_capabilities);

Gets the list of combinations of generic families of access technologies supported by this MMModem.

Parameters

self

A MMModem.

 

capabilities

Return location for the array of MMModemCapability values. Do not free the returned array, it is owned by self .

[out][array length=n_capabilities]

n_capabilities

Return location for the number of values in capabilities .

[out]

Returns

TRUE if capabilities and n_capabilities are set, FALSE otherwise.

Since: 1.0


mm_modem_get_supported_capabilities ()

gboolean
mm_modem_get_supported_capabilities (MMModem *self,
                                     MMModemCapability **capabilities,
                                     guint *n_capabilities);

Gets the list of combinations of generic families of access technologies supported by this MMModem.

Parameters

self

A MMModem.

 

capabilities

Return location for the array of MMModemCapability values. The returned array should be freed with g_free() when no longer needed.

[out][array length=n_capabilities]

n_capabilities

Return location for the number of values in capabilities .

[out]

Returns

TRUE if capabilities and n_capabilities are set, FALSE otherwise.

Since: 1.0


mm_modem_get_current_capabilities ()

MMModemCapability
mm_modem_get_current_capabilities (MMModem *self);

Gets the list of generic families of access technologies supported by this MMModem without a firmware reload or reinitialization.

Parameters

self

A MMModem.

 

Returns

A bitmask of MMModemCapability flags.

Since: 1.0


mm_modem_get_manufacturer ()

const gchar *
mm_modem_get_manufacturer (MMModem *self);

Gets the equipment manufacturer, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The equipment manufacturer, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_manufacturer ()

gchar *
mm_modem_dup_manufacturer (MMModem *self);

Gets a copy of the equipment manufacturer, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The equipment manufacturer, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_model ()

const gchar *
mm_modem_get_model (MMModem *self);

Gets the equipment model, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The equipment model, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_model ()

gchar *
mm_modem_dup_model (MMModem *self);

Gets a copy of the equipment model, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The equipment model, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_revision ()

const gchar *
mm_modem_get_revision (MMModem *self);

Gets the equipment revision, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The equipment revision, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_revision ()

gchar *
mm_modem_dup_revision (MMModem *self);

Gets a copy of the equipment revision, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The equipment revision, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_carrier_configuration ()

const gchar *
mm_modem_get_carrier_configuration (MMModem *self);

Gets the carrier-specific configuration (MCFG) in use, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The carrier configuration, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.12


mm_modem_dup_carrier_configuration ()

gchar *
mm_modem_dup_carrier_configuration (MMModem *self);

Gets a copy of the carrier-specific configuration (MCFG) in use, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The carrier configuration, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.12


mm_modem_get_carrier_configuration_revision ()

const gchar *
mm_modem_get_carrier_configuration_revision
                               (MMModem *self);

Gets the carrier-specific configuration revision in use, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The carrier configuration revision, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.12


mm_modem_dup_carrier_configuration_revision ()

gchar *
mm_modem_dup_carrier_configuration_revision
                               (MMModem *self);

Gets a copy of the carrier-specific configuration revision in use, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The carrier configuration revision, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.12


mm_modem_get_hardware_revision ()

const gchar *
mm_modem_get_hardware_revision (MMModem *self);

Gets the equipment hardware revision, as reported by this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The equipment hardware revision, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.8


mm_modem_dup_hardware_revision ()

gchar *
mm_modem_dup_hardware_revision (MMModem *self);

Gets a copy of the equipment hardware revision, as reported by this MMModem.

Parameters

self

A MMModem.

 

Returns

The equipment hardware revision, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.8


mm_modem_get_drivers ()

const gchar * const  *
mm_modem_get_drivers (MMModem *self);

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

Parameters

self

A MMModem.

 

Returns

The drivers, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_drivers ()

gchar **
mm_modem_dup_drivers (MMModem *self);

Gets a copy of the Operating System device driver handling communication with the modem hardware.

Parameters

self

A MMModem.

 

Returns

The drivers, or NULL if none available. The returned value should be freed with g_strfreev().

[transfer full]

Since: 1.0


mm_modem_get_plugin ()

const gchar *
mm_modem_get_plugin (MMModem *self);

Gets the name of the plugin handling this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The name of the plugin, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_plugin ()

gchar *
mm_modem_dup_plugin (MMModem *self);

Gets a copy of the name of the plugin handling this MMModem.

Parameters

self

A MMModem.

 

Returns

The name of the plugin, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_primary_port ()

const gchar *
mm_modem_get_primary_port (MMModem *self);

Gets the name of the primary port controlling this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The name of the primary port. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_primary_port ()

gchar *
mm_modem_dup_primary_port (MMModem *self);

Gets a copy of the name of the primary port controlling this MMModem.

Parameters

self

A MMModem.

 

Returns

The name of the primary port. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_peek_ports ()

gboolean
mm_modem_peek_ports (MMModem *self,
                     const MMModemPortInfo **ports,
                     guint *n_ports);

Gets the list of ports in the modem.

Parameters

self

A MMModem.

 

ports

Return location for the array of MMModemPortInfo values. Do not free the returned value, it is owned by self .

[out][array length=n_ports][transfer none]

n_ports

Return location for the number of values in ports .

[out]

Returns

TRUE if ports and n_ports are set, FALSE otherwise.

Since: 1.0


mm_modem_get_ports ()

gboolean
mm_modem_get_ports (MMModem *self,
                    MMModemPortInfo **ports,
                    guint *n_ports);

Gets the list of ports in the modem.

Parameters

self

A MMModem.

 

ports

Return location for the array of MMModemPortInfo values. The returned array should be freed with mm_modem_port_info_array_free() when no longer needed.

[out][array length=n_ports]

n_ports

Return location for the number of values in ports .

[out]

Returns

TRUE if ports and n_ports are set, FALSE otherwise.

Since: 1.0


mm_modem_get_device ()

const gchar *
mm_modem_get_device (MMModem *self);

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

Parameters

self

A MMModem.

 

Returns

The device, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_device ()

gchar *
mm_modem_dup_device (MMModem *self);

Gets a copy of the physical modem device reference (ie, USB, PCI, PCMCIA device), which may be dependent upon the operating system.

Parameters

self

A MMModem.

 

Returns

The device, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_equipment_identifier ()

const gchar *
mm_modem_get_equipment_identifier (MMModem *self);

Gets the identity of the MMModem.

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

Parameters

self

A MMModem.

 

Returns

The equipment identifier, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_equipment_identifier ()

gchar *
mm_modem_dup_equipment_identifier (MMModem *self);

Gets a copy of the identity of the MMModem.

This will be the IMEI number for GSM devices and the hex-format ESN/MEID for CDMA devices.

Parameters

self

A MMModem.

 

Returns

The equipment identifier, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_device_identifier ()

const gchar *
mm_modem_get_device_identifier (MMModem *self);

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

Parameters

self

A MMModem.

 

Returns

The device identifier, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_device_identifier ()

gchar *
mm_modem_dup_device_identifier (MMModem *self);

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.

Parameters

self

A MMModem.

 

Returns

The device identifier, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_unlock_required ()

MMModemLock
mm_modem_get_unlock_required (MMModem *self);

Gets current lock state of the MMModem.

Parameters

self

A MMModem.

 

Returns

A MMModemLock value, specifying the current lock state.

Since: 1.0


mm_modem_peek_unlock_retries ()

MMUnlockRetries *
mm_modem_peek_unlock_retries (MMModem *self);

Gets a MMUnlockRetries object, which provides, for each

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

Parameters

self

A MMModem.

 

Returns

A MMUnlockRetries. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_get_unlock_retries ()

MMUnlockRetries *
mm_modem_get_unlock_retries (MMModem *self);

Gets a MMUnlockRetries object, which provides, for each

MMModemLock 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 mm_modem_get_unlock_retries() again to get a new MMUnlockRetries with the new values.

Parameters

self

A MMModem.

 

Returns

A MMUnlockRetries that must be freed with g_object_unref() or NULL if unknown.

[transfer full]

Since: 1.0


mm_modem_get_max_bearers ()

guint
mm_modem_get_max_bearers (MMModem *self);

mm_modem_get_max_bearers has been deprecated since version 1.18. and should not be used in newly-written code.

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 mm_modem_get_max_active_bearers(), so there is no point in using this method.

Gets the maximum number of defined packet data bearers this MMModem 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.

Parameters

self

a MMModem.

 

Returns

the maximum number of defined packet data bearers.

Since: 1.0


mm_modem_get_max_active_bearers ()

guint
mm_modem_get_max_active_bearers (MMModem *self);

Gets the maximum number of active packet data bearers this MMModem 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.

Parameters

self

a MMModem.

 

Returns

the maximum number of active packet data bearers.

Since: 1.0


mm_modem_get_max_active_multiplexed_bearers ()

guint
mm_modem_get_max_active_multiplexed_bearers
                               (MMModem *self);

Gets the maximum number of active packet data bearers this MMModem supports after enabling multiplexing support on one single network interface.

Parameters

self

a MMModem.

 

Returns

the maximum number of active packet data bearers, or 0 if multiplexing is not supported.

Since: 1.18


mm_modem_get_bearer_paths ()

const gchar * const *
mm_modem_get_bearer_paths (MMModem *self);

Gets the DBus paths of the MMBearer handled in this MMModem.

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

Parameters

self

A MMModem.

 

Returns

The DBus paths of the MMBearer handled in this MMModem, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_bearer_paths ()

gchar **
mm_modem_dup_bearer_paths (MMModem *self);

Gets a copy of the DBus paths of the MMBearer handled in this MMModem.

Parameters

self

A MMModem.

 

Returns

The DBus paths of the MMBearer handled in this MMModem, or NULL if none available. The returned value should be freed with g_strfreev().

[transfer full]

Since: 1.0


mm_modem_get_own_numbers ()

const gchar *const  *
mm_modem_get_own_numbers (MMModem *self);

Gets the list of numbers (e.g. MSISDN in 3GPP) being currently handled by this 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 mm_modem_dup_own_numbers() if on another thread.

[skip]

Parameters

self

A MMModem.

 

Returns

The list of own numbers or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_own_numbers ()

gchar **
mm_modem_dup_own_numbers (MMModem *self);

Gets a copy of the list of numbers (e.g. MSISDN in 3GPP) being currently handled by this modem.

Parameters

self

A MMModem.

 

Returns

The list of own numbers or NULL if none is available. The returned value should be freed with g_strfreev().

[transfer full]

Since: 1.0


mm_modem_peek_supported_modes ()

gboolean
mm_modem_peek_supported_modes (MMModem *self,
                               const MMModemModeCombination **modes,
                               guint *n_modes);

Gets the list of supported mode combinations.

Parameters

self

A MMModem.

 

modes

Return location for the array of MMModemModeCombination values. Do not free the returned array, it is owned by self .

[out][array length=n_modes]

n_modes

Return location for the number of values in modes .

[out]

Returns

TRUE if modes and n_modes are set, FALSE otherwise.

Since: 1.0


mm_modem_get_supported_modes ()

gboolean
mm_modem_get_supported_modes (MMModem *self,
                              MMModemModeCombination **modes,
                              guint *n_modes);

Gets the list of supported mode combinations.

Parameters

self

A MMModem.

 

modes

Return location for the array of MMModemModeCombination structs. The returned array should be freed with g_free() when no longer needed.

[out][array length=n_modes]

n_modes

Return location for the number of values in modes .

[out]

Returns

TRUE if modes and n_modes are set, FALSE otherwise.

Since: 1.0


mm_modem_get_current_modes ()

gboolean
mm_modem_get_current_modes (MMModem *self,
                            MMModemMode *allowed,
                            MMModemMode *preferred);

Gets the list of modes specifying the access technologies (eg 2G/3G/4G) the MMModem is currently allowed to use when connecting to a network, as well as the preferred one, if any.

Parameters

self

A MMModem.

 

allowed

Return location for a bitmask of MMModemMode values.

[out]

preferred

Return location for a MMModemMode value.

[out]

Returns

TRUE if allowed and preferred are set, FALSE otherwise.

Since: 1.0


mm_modem_peek_supported_bands ()

gboolean
mm_modem_peek_supported_bands (MMModem *self,
                               const MMModemBand **bands,
                               guint *n_bands);

Gets the list of radio frequency and technology bands supported by the MMModem.

For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands .

Parameters

self

A MMModem.

 

bands

Return location for the array of MMModemBand values. Do not free the returned array, it is owned by self .

[out][array length=n_bands]

n_bands

Return location for the number of values in bands .

[out]

Returns

TRUE if bands and n_bands are set, FALSE otherwise.

Since: 1.0


mm_modem_get_supported_bands ()

gboolean
mm_modem_get_supported_bands (MMModem *self,
                              MMModemBand **bands,
                              guint *n_bands);

Gets the list of radio frequency and technology bands supported by the MMModem.

For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands .

Parameters

self

A MMModem.

 

bands

Return location for the array of MMModemBand values. The returned array should be freed with g_free() when no longer needed.

[out][array length=n_bands]

n_bands

Return location for the number of values in bands .

[out]

Returns

TRUE if bands and n_bands are set, FALSE otherwise.

Since: 1.0


mm_modem_peek_current_bands ()

gboolean
mm_modem_peek_current_bands (MMModem *self,
                             const MMModemBand **bands,
                             guint *n_bands);

Gets the list of radio frequency and technology bands the MMModem is currently using when connecting to a network.

For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

Parameters

self

A MMModem.

 

bands

Return location for the array of MMModemBand values. Do not free the returned value, it is owned by self .

[out][array length=n_bands]

n_bands

Return location for the number of values in bands .

[out]

Returns

TRUE if bands and n_bands are set, FALSE otherwise.

Since: 1.0


mm_modem_get_current_bands ()

gboolean
mm_modem_get_current_bands (MMModem *self,
                            MMModemBand **bands,
                            guint *n_bands);

Gets the list of radio frequency and technology bands the MMModem is currently using when connecting to a network.

For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

Parameters

self

A MMModem.

 

bands

Return location for the array of MMModemBand values. The returned array should be freed with g_free() when no longer needed.

[out][array length=n_bands]

n_bands

Return location for the number of values in bands .

[out]

Returns

TRUE if bands and n_bands are set, FALSE otherwise.

Since: 1.0


mm_modem_get_supported_ip_families ()

MMBearerIpFamily
mm_modem_get_supported_ip_families (MMModem *self);

Gets the list of supported IP families.

Parameters

self

A MMModem.

 

Returns

A bitmask of MMBearerIpFamily values.

Since: 1.0


mm_modem_get_signal_quality ()

guint
mm_modem_get_signal_quality (MMModem *self,
                             gboolean *recent);

Gets the signal quality value in percent (0 - 100) of the dominant access technology the MMModem is using to communicate with the network.

Always 0 for POTS devices.

Parameters

self

A MMModem.

 

recent

Return location for the flag specifying if the signal quality value was recent or not.

[out]

Returns

The signal quality.

Since: 1.0


mm_modem_get_access_technologies ()

MMModemAccessTechnology
mm_modem_get_access_technologies (MMModem *self);

Gets the current network access technology used by the MMModem to communicate with the network.

Parameters

self

A MMModem.

 

Returns

A #MMModemAccessTechnology value.

Since: 1.0


mm_modem_get_sim_path ()

const gchar *
mm_modem_get_sim_path (MMModem *self);

Gets the DBus path of the MMSim handled in this MMModem.

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

[skip]

Parameters

self

A MMModem.

 

Returns

The DBus path of the MMSim handled in this MMModem, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.0


mm_modem_dup_sim_path ()

gchar *
mm_modem_dup_sim_path (MMModem *self);

Gets a copy of the DBus path of the MMSim handled in this MMModem.

Parameters

self

A MMModem.

 

Returns

The DBus path of the MMSim handled in this MMModem, or NULL if none available. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_get_sim ()

void
mm_modem_get_sim (MMModem *self,
                  GCancellable *cancellable,
                  GAsyncReadyCallback callback,
                  gpointer user_data);

Asynchronously gets the MMSim object managed by this MMModem.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_get_sim_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.0


mm_modem_get_sim_finish ()

MMSim *
mm_modem_get_sim_finish (MMModem *self,
                         GAsyncResult *res,
                         GError **error);

Finishes an operation started with mm_modem_get_sim().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

a MMSim or NULL if error is set. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_get_sim_sync ()

MMSim *
mm_modem_get_sim_sync (MMModem *self,
                       GCancellable *cancellable,
                       GError **error);

Synchronously gets the MMSim object managed by this MMModem.

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

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

a MMSim or NULL if error is set. The returned value should be freed with g_object_unref().

[transfer full]

Since: 1.0


mm_modem_get_sim_slot_paths ()

const gchar * const *
mm_modem_get_sim_slot_paths (MMModem *self);

Gets the DBus paths of the MMSim objects available in the different SIM slots handled in this MMModem. 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 mm_modem_dup_sim_slot_paths() if on another thread.

Parameters

self

A MMModem.

 

Returns

The DBus paths of the MMSim objects handled in this MMModem, or NULL if none available. Do not free the returned value, it belongs to self .

[transfer none]

Since: 1.16


mm_modem_dup_sim_slot_paths ()

gchar **
mm_modem_dup_sim_slot_paths (MMModem *self);

Gets a copy of the DBus paths of the MMSim objects available in the different SIM slots handled in this MMModem. 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.

Parameters

self

A MMModem.

 

Returns

The DBus paths of the MMSim objects handled in this MMModem, or NULL if none available. The returned value should be freed with g_strfreev().

[transfer full]

Since: 1.16


mm_modem_get_primary_sim_slot ()

guint
mm_modem_get_primary_sim_slot (MMModem *self);

Gets the SIM slot number of the primary active SIM.

Parameters

self

A MMModem.

 

Returns

slot number, in the [1,N] range.

Since: 1.16


mm_modem_list_sim_slots ()

void
mm_modem_list_sim_slots (MMModem *self,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);

Asynchronously lists the SIM slots available in the MMModem.

The returned array contains one element per slot available in the system; a MMSim in each of the slots that contains a valid SIM card or NULL 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 call mm_modem_list_sim_slots_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.16


mm_modem_list_sim_slots_finish ()

GPtrArray *
mm_modem_list_sim_slots_finish (MMModem *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_list_sim_slots().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

The array of MMSim objects, or NULL if error is set.

[transfer full][element-type ModemManager.Sim]

Since: 1.16


mm_modem_list_sim_slots_sync ()

GPtrArray *
mm_modem_list_sim_slots_sync (MMModem *self,
                              GCancellable *cancellable,
                              GError **error);

Synchronously lists the SIM slots available in the MMModem.

The returned array contains one element per slot available in the system; a MMSim in each of the slots that contains a valid SIM card or NULL if no SIM card is found.

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

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

The array of MMSim objects, or NULL if error is set.

[transfer full][element-type ModemManager.Sim]

Since: 1.16


mm_modem_set_primary_sim_slot ()

void
mm_modem_set_primary_sim_slot (MMModem *self,
                               guint sim_slot,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

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

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

Parameters

self

A MMModem.

 

sim_slot

SIM slot number.

 

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 .

 

Since: 1.16


mm_modem_set_primary_sim_slot_finish ()

gboolean
mm_modem_set_primary_sim_slot_finish (MMModem *self,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an operation started with mm_modem_set_primary_sim_slot().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the SIM slot switch has been successfully requested, FALSE if error is set.

Since: 1.16


mm_modem_set_primary_sim_slot_sync ()

gboolean
mm_modem_set_primary_sim_slot_sync (MMModem *self,
                                    guint sim_slot,
                                    GCancellable *cancellable,
                                    GError **error);

Synchronously requests to select which SIM slot to be considered as primary.

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

Parameters

self

A MMModem.

 

sim_slot

SIM slot number.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the SIM slot switch has been successfully requested, FALSE if error is set.

Since: 1.16


mm_modem_enable ()

void
mm_modem_enable (MMModem *self,
                 GCancellable *cancellable,
                 GAsyncReadyCallback callback,
                 gpointer user_data);

Asynchronously tries to enable the MMModem. 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 call mm_modem_enable_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.0


mm_modem_enable_finish ()

gboolean
mm_modem_enable_finish (MMModem *self,
                        GAsyncResult *res,
                        GError **error);

Finishes an operation started with mm_modem_enable().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the modem was properly enabled, FALSE if error is set.

Since: 1.0


mm_modem_enable_sync ()

gboolean
mm_modem_enable_sync (MMModem *self,
                      GCancellable *cancellable,
                      GError **error);

Synchronously tries to enable the MMModem. 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 mm_modem_enable() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the modem was properly enabled, FALSE if error is set.

Since: 1.0


mm_modem_disable ()

void
mm_modem_disable (MMModem *self,
                  GCancellable *cancellable,
                  GAsyncReadyCallback callback,
                  gpointer user_data);

Asynchronously tries to disable the MMModem. 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 call mm_modem_disable_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.0


mm_modem_disable_finish ()

gboolean
mm_modem_disable_finish (MMModem *self,
                         GAsyncResult *res,
                         GError **error);

Finishes an operation started with mm_modem_disable().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the modem was properly disabled, FALSE if error is set.

Since: 1.0


mm_modem_disable_sync ()

gboolean
mm_modem_disable_sync (MMModem *self,
                       GCancellable *cancellable,
                       GError **error);

Synchronously tries to disable the MMModem. 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 mm_modem_disable() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the modem was properly disabled, FALSE if error is set.

Since: 1.0


mm_modem_set_power_state ()

void
mm_modem_set_power_state (MMModem *self,
                          MMModemPowerState state,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          gpointer user_data);

Asynchronously sets the power state of the device. This method can only be used while the modem is in MM_MODEM_STATE_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 call mm_modem_set_power_state_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

state

Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every other MMModemPowerState value is not allowed.

 

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 .

 

Since: 1.0


mm_modem_set_power_state_finish ()

gboolean
mm_modem_set_power_state_finish (MMModem *self,
                                 GAsyncResult *res,
                                 GError **error);

Finishes an operation started with mm_modem_set_power_state().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the power state was successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_power_state_sync ()

gboolean
mm_modem_set_power_state_sync (MMModem *self,
                               MMModemPowerState state,
                               GCancellable *cancellable,
                               GError **error);

Synchronously sets the power state of the device. This method can only be used while the modem is in MM_MODEM_STATE_DISABLED state.

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

Parameters

self

A MMModem.

 

state

Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every other MMModemPowerState value is not allowed.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the power state was successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_modes ()

void
mm_modem_set_current_modes (MMModem *self,
                            MMModemMode modes,
                            MMModemMode preferred,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

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

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

Parameters

self

A MMModem.

 

modes

Mask of MMModemMode values specifying which modes are allowed.

 

preferred

A MMModemMode value specifying which of the modes given in modes is the preferred one, or MM_MODEM_MODE_NONE if none.

 

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 .

 

Since: 1.0


mm_modem_set_current_modes_finish ()

gboolean
mm_modem_set_current_modes_finish (MMModem *self,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an operation started with mm_modem_set_current_modes().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the allowed modes were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_modes_sync ()

gboolean
mm_modem_set_current_modes_sync (MMModem *self,
                                 MMModemMode modes,
                                 MMModemMode preferred,
                                 GCancellable *cancellable,
                                 GError **error);

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 mm_modem_set_current_modes() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

modes

Mask of MMModemMode values specifying which modes are allowed.

 

preferred

A MMModemMode value specifying which of the modes given in modes is the preferred one, or MM_MODEM_MODE_NONE if none.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the allowed modes were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_bands ()

void
mm_modem_set_current_bands (MMModem *self,
                            const MMModemBand *bands,
                            guint n_bands,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

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

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

Parameters

self

A MMModem.

 

bands

An array of MMModemBand values specifying which bands are allowed.

 

n_bands

Number of elements in bands .

 

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 .

 

Since: 1.0


mm_modem_set_current_bands_finish ()

gboolean
mm_modem_set_current_bands_finish (MMModem *self,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an operation started with mm_modem_set_current_bands().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the bands were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_bands_sync ()

gboolean
mm_modem_set_current_bands_sync (MMModem *self,
                                 const MMModemBand *bands,
                                 guint n_bands,
                                 GCancellable *cancellable,
                                 GError **error);

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 mm_modem_set_current_bands() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

bands

An array of MMModemBand values specifying which bands are allowed.

 

n_bands

Number of elements in bands .

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the bands were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_capabilities ()

void
mm_modem_set_current_capabilities (MMModem *self,
                                   MMModemCapability capabilities,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

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

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

Parameters

self

A MMModem.

 

capabilities

A MMModemCapability mask.

 

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 .

 

Since: 1.0


mm_modem_set_current_capabilities_finish ()

gboolean
mm_modem_set_current_capabilities_finish
                               (MMModem *self,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with mm_modem_set_current_capabilities().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the capabilities were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_set_current_capabilities_sync ()

gboolean
mm_modem_set_current_capabilities_sync
                               (MMModem *self,
                                MMModemCapability capabilities,
                                GCancellable *cancellable,
                                GError **error);

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 mm_modem_set_current_capabilities() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

capabilities

A MMModemCapability mask.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the capabilities were successfully set, FALSE if error is set.

Since: 1.0


mm_modem_reset ()

void
mm_modem_reset (MMModem *self,
                GCancellable *cancellable,
                GAsyncReadyCallback callback,
                gpointer user_data);

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

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.0


mm_modem_reset_finish ()

gboolean
mm_modem_reset_finish (MMModem *self,
                       GAsyncResult *res,
                       GError **error);

Finishes an operation started with mm_modem_reset().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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

Since: 1.0


mm_modem_reset_sync ()

gboolean
mm_modem_reset_sync (MMModem *self,
                     GCancellable *cancellable,
                     GError **error);

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 mm_modem_reset() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

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

Since: 1.0


mm_modem_factory_reset ()

void
mm_modem_factory_reset (MMModem *self,
                        const gchar *code,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

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

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

Parameters

self

A MMModem.

 

code

Carrier-supplied code required to reset the modem.

 

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 .

 

Since: 1.0


mm_modem_factory_reset_finish ()

gboolean
mm_modem_factory_reset_finish (MMModem *self,
                               GAsyncResult *res,
                               GError **error);

Finishes an operation started with mm_modem_factory_reset().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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

Since: 1.0


mm_modem_factory_reset_sync ()

gboolean
mm_modem_factory_reset_sync (MMModem *self,
                             const gchar *code,
                             GCancellable *cancellable,
                             GError **error);

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 mm_modem_factory_reset() for the asynchronous version of this method.

Parameters

self

A MMModem.

 

code

Carrier-supplied code required to reset the modem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the factory reset was successful, FALSE if error is set.

Since: 1.0


mm_modem_list_bearers ()

void
mm_modem_list_bearers (MMModem *self,
                       GCancellable *cancellable,
                       GAsyncReadyCallback callback,
                       gpointer user_data);

Asynchronously lists the packet data bearers in the MMModem.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_list_bearers_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

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 .

 

Since: 1.0


mm_modem_list_bearers_finish ()

GList *
mm_modem_list_bearers_finish (MMModem *self,
                              GAsyncResult *res,
                              GError **error);

Finishes an operation started with mm_modem_list_bearers().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

The list of MMBearer objects, or NULL if either none found or if error is set.

[transfer full][element-type ModemManager.Bearer]

Since: 1.0


mm_modem_list_bearers_sync ()

GList *
mm_modem_list_bearers_sync (MMModem *self,
                            GCancellable *cancellable,
                            GError **error);

Synchronously lists the packet data bearers in the MMModem.

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

Parameters

self

A MMModem.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

The list of MMBearer objects, or NULL if either none found or if error is set.

[transfer full][element-type ModemManager.Bearer]

Since: 1.0


mm_modem_create_bearer ()

void
mm_modem_create_bearer (MMModem *self,
                        MMBearerProperties *properties,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Asynchronously creates a new packet data bearer in the MMModem.

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

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

Parameters

self

A MMModem.

 

properties

A MMBearerProperties object with the properties to use.

 

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 .

 

Since: 1.0


mm_modem_create_bearer_finish ()

MMBearer *
mm_modem_create_bearer_finish (MMModem *self,
                               GAsyncResult *res,
                               GError **error);

Finishes an operation started with mm_modem_create_bearer().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

A newly created MMBearer, or NULL if error is set.

[transfer full]

Since: 1.0


mm_modem_create_bearer_sync ()

MMBearer *
mm_modem_create_bearer_sync (MMModem *self,
                             MMBearerProperties *properties,
                             GCancellable *cancellable,
                             GError **error);

Synchronously creates a new packet data bearer in the MMModem.

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 to check which properties may be passed.

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

Parameters

self

A MMModem.

 

properties

A MMBearerProperties object with the properties to use.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A newly created MMBearer, or NULL if error is set.

[transfer full]

Since: 1.0


mm_modem_delete_bearer ()

void
mm_modem_delete_bearer (MMModem *self,
                        const gchar *bearer,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Asynchronously deletes a given bearer from the MMModem.

When the operation is finished, callback will be invoked in the

thread-default main loop

of the thread you are calling this method from. You can then call mm_modem_delete_bearer_finish() to get the result of the operation.

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

Parameters

self

A MMModem.

 

bearer

Path of the bearer to delete.

 

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 .

 

Since: 1.0


mm_modem_delete_bearer_finish ()

gboolean
mm_modem_delete_bearer_finish (MMModem *self,
                               GAsyncResult *res,
                               GError **error);

Finishes an operation started with mm_modem_delete_bearer().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the bearer was deleted, FALSE if error is set.

Since: 1.0


mm_modem_delete_bearer_sync ()

gboolean
mm_modem_delete_bearer_sync (MMModem *self,
                             const gchar *bearer,
                             GCancellable *cancellable,
                             GError **error);

Synchronously deletes a given bearer from the MMModem.

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

Parameters

self

A MMModem.

 

bearer

Path of the bearer to delete.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

TRUE if the bearer was deleted, FALSE if error is set.

Since: 1.0


mm_modem_command ()

void
mm_modem_command (MMModem *self,
                  const gchar *cmd,
                  guint timeout,
                  GCancellable *cancellable,
                  GAsyncReadyCallback callback,
                  gpointer user_data);

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

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

Parameters

self

A MMModem.

 

cmd

AT command to run.

 

timeout

Maximum time to wait for the response, in seconds.

 

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 .

 

Since: 1.0


mm_modem_command_finish ()

gchar *
mm_modem_command_finish (MMModem *self,
                         GAsyncResult *res,
                         GError **error);

Finishes an operation started with mm_modem_command().

Parameters

self

A MMModem.

 

res

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

 

error

Return location for error or NULL.

 

Returns

A newly allocated string with the reply to the command, or NULL if error is set. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_command_sync ()

gchar *
mm_modem_command_sync (MMModem *self,
                       const gchar *cmd,
                       guint timeout,
                       GCancellable *cancellable,
                       GError **error);

Synchronously runs an AT command in the modem.

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

Parameters

self

A MMModem.

 

cmd

AT command to run.

 

timeout

Maximum time to wait for the response, in seconds.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

A newly allocated string with the reply to the command, or NULL if error is set. The returned value should be freed with g_free().

[transfer full]

Since: 1.0


mm_modem_port_info_array_free ()

void
mm_modem_port_info_array_free (MMModemPortInfo *array,
                               guint array_size);

Frees an array of MMModemPortInfo values.

Parameters

array

an array of MMModemPortInfo values.

 

array_size

length of array .

 

Since: 1.0

Types and Values

struct MMModem

struct MMModem;

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


struct MMModemModeCombination

struct MMModemModeCombination {
    MMModemMode allowed;
    MMModemMode preferred;
};

MMModemModeCombination is a simple struct holding a pair of MMModemMode values.

Members

MMModemMode allowed;

Mask of MMModemMode values specifying allowed modes.

 

MMModemMode preferred;

A single MMModemMode value specifying the preferred mode.

 

Since: 1.0


struct MMModemPortInfo

struct MMModemPortInfo {
    gchar *name;
    MMModemPortType type;
};

Information of a given port.

Members

gchar *name;

Name of the port.

 

MMModemPortType type;

A MMModemPortType value.

 

Since: 1.0