Gjsify LogoGjsify Logo

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

daemonVersion: string

The daemon version number.

gTypeInstance: TypeInstance
hostMachineId: string

The host machine-id string

hostProduct: string

The host product string

hostSecurityId: string

The host machine-id string

interactive: boolean

If the daemon is running in an interactive terminal

parentInstance: GObject.Object
percentage: number

The last-reported percentage of the daemon.

soupSession: GObject.Object

The libsoup session, now unused.

status: number

The last-reported status of the daemon.

tainted: boolean

If the daemon is tainted by 3rd party code.

$gtype: GType<Fwupd.Client>
name: string

Methods

  • Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.

    Parameters

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • deviceId: string

      a device

    Returns boolean

  • Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.

    Parameters

    Returns void

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transformTo: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transformFrom: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • Clears the results for a specific device.

    Parameters

    • deviceId: string

      the device ID

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • connect(sigName: "changed", callback: Fwupd.Client_ChangedSignalCallback): number
  • connect(sigName: "device-added", callback: Fwupd.Client_DeviceAddedSignalCallback): number
  • connect(sigName: "device-changed", callback: Fwupd.Client_DeviceChangedSignalCallback): number
  • connect(sigName: "device-removed", callback: Fwupd.Client_DeviceRemovedSignalCallback): number
  • connect(sigName: "status-changed", callback: Client_StatusChangedSignalCallback): number
  • connect(sigName: "notify::daemon-version", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::host-machine-id", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::host-product", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::host-security-id", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::interactive", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::percentage", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::soup-session", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::status", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::tainted", callback: ((...args: any[]) => void)): number
  • connect(sigName: string, callback: ((...args: any[]) => void)): number
  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    Returns number

  • Parameters

    • sigName: "notify::daemon-version"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::host-machine-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::host-product"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::host-security-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::interactive"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::percentage"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::soup-session"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::status"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::tainted"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Sets up the client ready for use. This is probably the first method you call when wanting to use libfwupd in an asynchronous manner.

    Other methods such as fwupd_client_get_devices_async() should only be called after fwupd_client_connect_finish() has been called without an error.

    Parameters

    Returns void

  • Downloads data from a remote server. The fwupd_client_set_user_agent() function should be called before this method is used.

    Parameters

    • url: string

      the remote URL

    • flags: ClientDownloadFlags

      #FwupdClientDownloadFlags, e.g. %FWUPD_CLIENT_DOWNLOAD_FLAG_NONE

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns any

  • Downloads data from a remote server. The fwupd_client_set_user_agent() function should be called before this method is used.

    You must have called fwupd_client_connect_async() on self before using this method.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    Returns void

  • Downloads data from a remote server. The fwupd_client_set_user_agent() function should be called before this method is used.

    Parameters

    • url: string

      the remote URL

    • file: Gio.File

      a #GFile

    • flags: ClientDownloadFlags

      #FwupdClientDownloadFlags, e.g. %FWUPD_CLIENT_DOWNLOAD_FLAG_NONE

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • emit(sigName: "changed", ...args: any[]): void
  • emit(sigName: "device-added", ...args: any[]): void
  • emit(sigName: "device-changed", ...args: any[]): void
  • emit(sigName: "device-removed", ...args: any[]): void
  • emit(sigName: "status-changed", ...args: any[]): void
  • emit(sigName: "notify::daemon-version", ...args: any[]): void
  • emit(sigName: "notify::host-machine-id", ...args: any[]): void
  • emit(sigName: "notify::host-product", ...args: any[]): void
  • emit(sigName: "notify::host-security-id", ...args: any[]): void
  • emit(sigName: "notify::interactive", ...args: any[]): void
  • emit(sigName: "notify::percentage", ...args: any[]): void
  • emit(sigName: "notify::soup-session", ...args: any[]): void
  • emit(sigName: "notify::status", ...args: any[]): void
  • emit(sigName: "notify::tainted", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • ensureNetworking(): boolean
  • Sets up the client networking support ready for use. Most other download and upload methods call this automatically, and do you only need to call this if the session is being used outside the #FwupdClient.

    Returns boolean

  • forceFloating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • freezeNotify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • Gets the list of approved firmware.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets the result of fwupd_client_get_approved_firmware_async().

    Parameters

    Returns string[]

  • Gets the list of blocked firmware.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets the result of fwupd_client_get_blocked_firmware_async().

    Parameters

    Returns string[]

  • getDaemonInteractive(): boolean
  • Gets if the daemon is running in an interactive terminal.

    Returns boolean

  • getDaemonVersion(): string
  • getData(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • Gets details about a specific firmware file.

    Parameters

    • filename: string

      the firmware filename, e.g. firmware.cab

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns Fwupd.Device[]

  • Gets details about a specific firmware file.

    Parameters

    • bytes: any

      the firmware blob, e.g. the contents of firmware.cab

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns Fwupd.Device[]

  • Gets details about a specific firmware file.

    Parameters

    • bytes: any

      a #GBytes for the firmware, e.g. firmware.cab

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Gets a device by it's device ID.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets all the devices registered with the daemon.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.

    Parameters

    • guid: string

      the GUID, e.g. e22c4520-43dc-5bb3-8245-5787fead9b63

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns Fwupd.Device[]

  • Gets any devices that provide a specific GUID. An error is returned if no devices contains this GUID.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    • guid: string

      the GUID, e.g. e22c4520-43dc-5bb3-8245-5787fead9b63

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Gets all the downgrades for a specific device.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets all the history.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getHostMachineId(): string
  • Gets the string that represents the host machine ID

    Returns string

  • getHostProduct(): string
  • Gets the string that represents the host running fwupd

    Returns string

  • Gets all the host security attributes from the daemon.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getHostSecurityId(): string
  • Gets the string that represents the host machine ID

    Returns string

  • Gets the internal #GMainContext to use for synchronous methods. By default the value is set a new #GMainContext.

    Returns MainContext

  • getPercentage(): number
  • Gets all the plugins being used by the daemon.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getProperty(propertyName?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional propertyName: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • getQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • Gets all the releases for a specific device

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets a specific remote that has been configured for the system.

    Parameters

    • remoteId: string

      the remote ID, e.g. lvfs-testing

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns Fwupd.Remote

  • Gets a specific remote that has been configured for the system.

    Parameters

    • remoteId: string

      the remote ID, e.g. lvfs-testing

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Gets the list of remotes that have been configured for the system.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • Gets all the report metadata from the daemon.

    Parameters

    Returns HashTable<string | number | symbol, string | number | boolean>

  • Gets all the report metadata from the daemon.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getReportMetadataFinish(res: AsyncResult): HashTable<string | number | symbol, string | number | boolean>
  • Gets the result of fwupd_client_get_report_metadata_async().

    Parameters

    Returns HashTable<string | number | symbol, string | number | boolean>

  • Gets the results of a previous firmware update for a specific device.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getTainted(): boolean
  • Gets if the daemon has been tainted by 3rd party code.

    Returns boolean

  • Gets all the upgrades for a specific device.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    Returns void

  • getUserAgent(): string
  • Gets the string that represents the user agent that is used for uploading and downloading. The user agent will contain the runtime version of fwupd somewhere in the provided string.

    Returns string

  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • Install a file onto a specific device.

    Parameters

    • deviceId: string

      the device ID

    • filename: string

      the filename to install

    • installFlags: Fwupd.InstallFlags

      the #FwupdInstallFlags, e.g. %FWUPD_INSTALL_FLAG_ALLOW_REINSTALL

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Install firmware onto a specific device.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    • deviceId: string

      the device ID

    • filename: string

      the filename to install

    • installFlags: Fwupd.InstallFlags

      the #FwupdInstallFlags, e.g. %FWUPD_INSTALL_FLAG_ALLOW_REINSTALL

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Install firmware onto a specific device.

    Parameters

    • deviceId: string

      the device ID

    • bytes: any

      #GBytes

    • installFlags: Fwupd.InstallFlags

      the #FwupdInstallFlags, e.g. %FWUPD_INSTALL_FLAG_ALLOW_REINSTALL

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Install firmware onto a specific device.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    • deviceId: string

      the device ID

    • bytes: any

      #GBytes

    • installFlags: Fwupd.InstallFlags

      the #FwupdInstallFlags, e.g. %FWUPD_INSTALL_FLAG_ALLOW_REINSTALL

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Installs a new release on a device, downloading the firmware if required.

    Parameters

    Returns boolean

  • Installs a new release on a device, downloading the firmware if required.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    Returns void

  • Installs a new release on a device, downloading the firmware if required.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    Returns void

  • isFloating(): boolean
  • modifyConfig(key: string, value: string, cancellable: Gio.Cancellable): boolean
  • Modifies a daemon config option. The daemon will only respond to this request with proper permissions

    Parameters

    • key: string

      key, e.g. DisabledPlugins

    • value: string

      value, e.g. *

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Modifies a daemon config option. The daemon will only respond to this request with proper permissions

    Parameters

    • key: string

      key, e.g. DisabledPlugins

    • value: string

      value, e.g. *

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • modifyDevice(deviceId: string, key: string, value: string, cancellable: Gio.Cancellable): boolean
  • Modifies a device in a specific way. Not all properties on the #FwupdDevice are settable by the client, and some may have other restrictions on value.

    NOTE: User authentication may be required to complete this action.

    Parameters

    • deviceId: string

      the device ID

    • key: string

      the key, e.g. Flags

    • value: string

      the key, e.g. reported

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Modifies a device in a specific way. Not all properties on the #FwupdDevice are settable by the client, and some may have other restrictions on value.

    Parameters

    • deviceId: string

      the device ID

    • key: string

      the key, e.g. Flags

    • value: string

      the key, e.g. reported

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • modifyRemote(remoteId: string, key: string, value: string, cancellable: Gio.Cancellable): boolean
  • Modifies a system remote in a specific way.

    NOTE: User authentication may be required to complete this action.

    Parameters

    • remoteId: string

      the remote ID, e.g. lvfs-testing

    • key: string

      the key, e.g. Enabled

    • value: string

      the key, e.g. true

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Modifies a system remote in a specific way.

    Parameters

    • remoteId: string

      the remote ID, e.g. lvfs-testing

    • key: string

      the key, e.g. Enabled

    • value: string

      the key, e.g. true

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • notify(propertyName: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • propertyName: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • off(sigName: "changed", callback: Fwupd.Client_ChangedSignalCallback): EventEmitter
  • off(sigName: "device-added", callback: Fwupd.Client_DeviceAddedSignalCallback): EventEmitter
  • off(sigName: "device-changed", callback: Fwupd.Client_DeviceChangedSignalCallback): EventEmitter
  • off(sigName: "device-removed", callback: Fwupd.Client_DeviceRemovedSignalCallback): EventEmitter
  • off(sigName: "status-changed", callback: Client_StatusChangedSignalCallback): EventEmitter
  • off(sigName: "notify::daemon-version", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::host-machine-id", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::host-product", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::host-security-id", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::interactive", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::percentage", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::soup-session", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::status", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::tainted", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: string, callback: ((...args: any[]) => void)): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::daemon-version"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-machine-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-product"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-security-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::interactive"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::percentage"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::soup-session"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::status"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::tainted"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • on(sigName: "changed", callback: Fwupd.Client_ChangedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "device-added", callback: Fwupd.Client_DeviceAddedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "device-changed", callback: Fwupd.Client_DeviceChangedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "device-removed", callback: Fwupd.Client_DeviceRemovedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "status-changed", callback: Client_StatusChangedSignalCallback, after?: boolean): EventEmitter
  • on(sigName: "notify::daemon-version", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::host-machine-id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::host-product", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::host-security-id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::interactive", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::percentage", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::soup-session", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::status", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::tainted", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::daemon-version"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-machine-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-product"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-security-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::interactive"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::percentage"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::soup-session"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::status"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::tainted"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • once(sigName: "changed", callback: Fwupd.Client_ChangedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "device-added", callback: Fwupd.Client_DeviceAddedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "device-changed", callback: Fwupd.Client_DeviceChangedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "device-removed", callback: Fwupd.Client_DeviceRemovedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "status-changed", callback: Client_StatusChangedSignalCallback, after?: boolean): EventEmitter
  • once(sigName: "notify::daemon-version", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::host-machine-id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::host-product", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::host-security-id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::interactive", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::percentage", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::soup-session", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::status", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::tainted", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    Returns EventEmitter

  • Parameters

    • sigName: "notify::daemon-version"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-machine-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-product"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::host-security-id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::interactive"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::percentage"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::soup-session"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::status"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::tainted"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • Refreshes a remote by downloading new metadata.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    Returns void

  • runDispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • Signs the data using the client self-signed certificate.

    Parameters

    • value: string

      A string to sign, typically a JSON blob

    • flags: SelfSignFlags

      #FwupdSelfSignFlags, e.g. %FWUPD_SELF_SIGN_FLAG_ADD_TIMESTAMP

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns string

  • Signs the data using the client self-signed certificate.

    You must have called fwupd_client_connect_async() on self before using this method.

    Parameters

    • value: string

      A string to sign, typically a JSON blob

    • flags: SelfSignFlags

      #FwupdSelfSignFlags, e.g. %FWUPD_SELF_SIGN_FLAG_ADD_TIMESTAMP

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • setApprovedFirmware(checksums: string, cancellable: Gio.Cancellable): boolean
  • Sets the list of approved firmware.

    Parameters

    • checksums: string

      Array of checksums

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Gets the result of fwupd_client_set_approved_firmware_async().

    Parameters

    Returns boolean

  • setBlockedFirmware(checksums: string, cancellable: Gio.Cancellable): boolean
  • Sets the list of approved firmware.

    Parameters

    • checksums: string

      Array of checksums

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Gets the result of fwupd_client_set_blocked_firmware_async().

    Parameters

    Returns boolean

  • setData(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • Sets the features the client supports. This allows firmware to depend on specific front-end features, for instance showing the user an image on how to detach the hardware.

    Clients can call this none or multiple times.

    Parameters

    Returns boolean

  • Sets the features the client supports. This allows firmware to depend on specific front-end features, for instance showing the user an image on how to detach the hardware.

    Parameters

    Returns void

  • Gets the result of fwupd_client_set_feature_flags_async().

    Parameters

    Returns boolean

  • Sets the internal #GMainContext to use for returning progress signals.

    Parameters

    • mainCtx: MainContext

      #GMainContext or %NULL to use the global default main context

    Returns void

  • setProperty(propertyName: string, value?: any): void
  • Sets a property on an object.

    Parameters

    • propertyName: string

      the name of the property to set

    • Optional value: any

      the value

    Returns void

  • setUserAgent(userAgent: string): void
  • Manually sets the user agent that is used for downloading. The user agent should contain the runtime version of fwupd somewhere in the provided string.

    Parameters

    • userAgent: string

      the user agent ID, e.g. gnome-software/3.34.1

    Returns void

  • setUserAgentForPackage(packageName: string, packageVersion: string): void
  • Builds a user-agent to use for the download.

    Supplying harmless details to the server means it knows more about each client. This allows the web service to respond in a different way, for instance sending a different metadata file for old versions of fwupd, or returning an error for Solaris machines.

    Before freaking out about theoretical privacy implications, much more data than this is sent to each and every website you visit.

    Parameters

    • packageName: string

      client program name, e.g. "gnome-software"

    • packageVersion: string

      client program version, e.g. "3.28.1"

    Returns void

  • stealData(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • stealQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • thawNotify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • Unlocks a specific device so firmware can be read or wrote.

    Parameters

    • deviceId: string

      the device ID

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Unlocks a specific device so firmware can be read or wrote.

    Parameters

    Returns void

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • updateMetadata(remoteId: string, metadataFn: string, signatureFn: string, cancellable: Gio.Cancellable): boolean
  • Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.

    The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.

    Parameters

    • remoteId: string

      the remote ID, e.g. lvfs-testing

    • metadataFn: string

      the XML metadata filename

    • signatureFn: string

      the GPG signature file

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • updateMetadataBytes(remoteId: string, metadata: any, signature: any, cancellable: Gio.Cancellable): boolean
  • Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.

    The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.

    Parameters

    • remoteId: string

      remote ID, e.g. lvfs-testing

    • metadata: any

      XML metadata data

    • signature: any

      signature data

    • cancellable: Gio.Cancellable

      #GCancellable, or %NULL

    Returns boolean

  • Updates the metadata. This allows a session process to download the metadata and metadata signing file to be passed into the daemon to be checked and parsed.

    The remote_id allows the firmware to be tagged so that the remote can be matched when the firmware is downloaded.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    • remoteId: string

      remote ID, e.g. lvfs-testing

    • metadata: any

      XML metadata data

    • signature: any

      signature data

    • cancellable: Gio.Cancellable

      #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Gets the result of fwupd_client_update_metadata_bytes_async().

    Parameters

    Returns boolean

  • Uploads data to a remote server. The fwupd_client_set_user_agent() function should be called before this method is used.

    Parameters

    • url: string

      the remote URL

    • payload: string

      payload string

    • signature: string

      signature string

    • flags: ClientUploadFlags

      #FwupdClientDownloadFlags, e.g. %FWUPD_CLIENT_DOWNLOAD_FLAG_NONE

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns any

  • Uploads data to a remote server. The fwupd_client_set_user_agent() function should be called before this method is used.

    You must have called fwupd_client_connect_async() on self before using this method.

    NOTE: This method is thread-safe, but progress signals will be emitted in the global default main context, if not explicitly set with fwupd_client_set_main_context().

    Parameters

    • url: string

      the remote URL

    • payload: string

      payload string

    • signature: string

      signature string

    • flags: ClientUploadFlags

      #FwupdClientDownloadFlags, e.g. %FWUPD_CLIENT_DOWNLOAD_FLAG_NONE

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    • callback: AsyncReadyCallback

      the function to run on completion

    Returns void

  • Verify a specific device.

    Parameters

    • deviceId: string

      the device ID

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Update the verification record for a specific device.

    Parameters

    • deviceId: string

      the device ID

    • cancellable: Gio.Cancellable

      the #GCancellable, or %NULL

    Returns boolean

  • Update the verification record for a specific device.

    Parameters

    Returns void

  • watchClosure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compatControl(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • propertyName: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • objectType: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method