MMModemFirmware

MMModemFirmware — The Firmware interface

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GDBusProxy
        ╰── MmGdbusModemFirmwareProxy
            ╰── MMModemFirmware

Implemented Interfaces

MMModemFirmware implements GDBusInterface, GInitable, GAsyncInitable and MmGdbusModemFirmware.

Description

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

The Firmware interface is exposed whenever a modem has firmware capabilities.

Functions

mm_modem_firmware_get_path ()

const gchar *
mm_modem_firmware_get_path (MMModemFirmware *self);

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

Parameters

self

A MMModemFirmware.

 

Returns

The DBus path of the MMObject object.

[transfer none]


mm_modem_firmware_dup_path ()

gchar *
mm_modem_firmware_dup_path (MMModemFirmware *self);

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

Parameters

self

A MMModemFirmware.

 

Returns

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

[transfer full]


mm_modem_firmware_list ()

void
mm_modem_firmware_list (MMModemFirmware *self,
                        GCancellable *cancellable,
                        GAsyncReadyCallback callback,
                        gpointer user_data);

Asynchronously gets the list of available firmware images.

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

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

Parameters

self

A MMModemFirmware.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

mm_modem_firmware_list_finish ()

gboolean
mm_modem_firmware_list_finish (MMModemFirmware *self,
                               GAsyncResult *res,
                               MMFirmwareProperties **selected,
                               GList **installed,
                               GError **error);

Finishes an operation started with mm_modem_firmware_list().

Parameters

self

A MMModemFirmware.

 

selected

The selected firmware slot, or NULL if no slot is selected (such as if all slots are empty, or no slots exist). The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

installed

A list of MMFirmwareProperties objects specifying the installed images. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify.

[out][allow-none][transfer full][element-type ModemManager.FirmwareProperties]

res

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

 

error

Return location for error or NULL.

 

Returns

TRUE if the list was correctly retrieved, FALSE if error is set.


mm_modem_firmware_list_sync ()

gboolean
mm_modem_firmware_list_sync (MMModemFirmware *self,
                             MMFirmwareProperties **selected,
                             GList **installed,
                             GCancellable *cancellable,
                             GError **error);

Synchronously gets the list of available firmware images.

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

Parameters

self

A MMModemFirmware.

 

selected

The selected firmware slot, or NULL if no slot is selected (such as if all slots are empty, or no slots exist). The returned value should be freed with g_object_unref().

[out][allow-none][transfer full]

installed

A list of MMFirmwareProperties objects specifying the installed images. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify.

[out][allow-none][transfer full][element-type ModemManager.FirmwareProperties]

cancellable

A GCancellable or NULL.

[allow-none]

error

Return firmware for error or NULL.

 

Returns

TRUE if the list was correctly retrieved, FALSE if error is set.


mm_modem_firmware_select ()

void
mm_modem_firmware_select (MMModemFirmware *self,
                          const gchar *unique_id,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          gpointer user_data);

Asynchronously selects a firmware image to boot.

The modem will possibly disappear once this action is run, as it needs to reboot in order to select the new image.

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

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

Parameters

self

A MMModemFirmware.

 

unique_id

Unique ID of the firmware image to select.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

mm_modem_firmware_select_finish ()

gboolean
mm_modem_firmware_select_finish (MMModemFirmware *self,
                                 GAsyncResult *res,
                                 GError **error);

Finishes an operation started with mm_modem_firmware_select().

Parameters

self

A MMModemFirmware.

 

res

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

 

error

Return location for error or NULL.

 

Returns

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


mm_modem_firmware_select_sync ()

gboolean
mm_modem_firmware_select_sync (MMModemFirmware *self,
                               const gchar *unique_id,
                               GCancellable *cancellable,
                               GError **error);

Synchronously selects a firmware image to boot.

The modem will possibly disappear once this action is run, as it needs to reboot in order to select the new image.

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

Parameters

self

A MMModemFirmware.

 

unique_id

Unique ID of the firmware image to select.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

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


mm_modem_firmware_get_update_settings ()

MMFirmwareUpdateSettings *
mm_modem_firmware_get_update_settings (MMModemFirmware *self);

Gets a MMFirmwareUpdateSettings object specifying the expected update settings.

The values reported by self are not updated when the values in the interface change. Instead, the client is expected to call mm_modem_firmware_get_update_settings() again to get a new MMFirmwareUpdateSettings with the new values.

Parameters

self

A MMModemFirmware.

 

Returns

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

[transfer full]


mm_modem_firmware_peek_update_settings ()

MMFirmwareUpdateSettings *
mm_modem_firmware_peek_update_settings
                               (MMModemFirmware *self);

Gets a MMFirmwareUpdateSettings object specifying the expected update settings.

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

Parameters

self

A MMModemFirmware.

 

Returns

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

[transfer none]

Types and Values

struct MMModemFirmware

struct MMModemFirmware;

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