MMModemFirmware

MMModemFirmware — The Firmware interface

Synopsis

struct              MMModemFirmware;

const gchar *       mm_modem_firmware_get_path          (MMModemFirmware *self);
gchar *             mm_modem_firmware_dup_path          (MMModemFirmware *self);

void                mm_modem_firmware_list              (MMModemFirmware *self,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_modem_firmware_list_finish       (MMModemFirmware *self,
                                                         GAsyncResult *res,
                                                         MMFirmwareProperties **selected,
                                                         GList **installed,
                                                         GError **error);
gboolean            mm_modem_firmware_list_sync         (MMModemFirmware *self,
                                                         MMFirmwareProperties **selected,
                                                         GList **installed,
                                                         GCancellable *cancellable,
                                                         GError **error);
void                mm_modem_firmware_select            (MMModemFirmware *self,
                                                         const gchar *unique_id,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gboolean            mm_modem_firmware_select_finish     (MMModemFirmware *self,
                                                         GAsyncResult *res,
                                                         GError **error);
gboolean            mm_modem_firmware_select_sync       (MMModemFirmware *self,
                                                         const gchar *unique_id,
                                                         GCancellable *cancellable,
                                                         GError **error);

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.

Details

struct MMModemFirmware

struct MMModemFirmware;

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


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.

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.

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.

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().

self :

A MMModemFirmware.

res :

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

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]

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.

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.

Warning

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.

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().

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.

Warning

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.

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.