Fwupd.Remote¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
|||
r/w |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Fwupd.Remote(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A source of metadata that provides firmware.
Remotes can be local (e.g. folders on a disk) or remote (e.g. downloaded over HTTP or IPFS).
See also: [class`FwupdClient`]
- classmethod array_from_variant(value)[source]¶
- Parameters:
value (
GLib.Variant
) – the serialized data- Returns:
remotes, or
None
if value was invalid- Return type:
Creates an array of new devices using serialized data.
New in version 1.2.10.
- classmethod flag_from_string(flag)[source]¶
- Parameters:
- Returns:
enumerated value
- Return type:
Converts a string to an enumerated flag.
New in version 1.9.4.
- classmethod flag_to_string(flag)[source]¶
- Parameters:
flag (
Fwupd.RemoteFlags
) – remote attribute flags, e.g.Fwupd.RemoteFlags.ENABLED
- Returns:
string, or
None
- Return type:
Returns the printable string for the flag.
New in version 1.9.4.
- classmethod from_variant(value)[source]¶
- Parameters:
value (
GLib.Variant
) – the serialized data- Returns:
a new
Fwupd.Remote
, orNone
if value was invalid- Return type:
Creates a new remote using serialized data.
New in version 1.0.0.
- classmethod kind_from_string(kind)[source]¶
- Parameters:
- Returns:
- Return type:
Converts an printable string to an enumerated type.
New in version 0.9.6.
- classmethod kind_to_string(kind)[source]¶
- Parameters:
kind (
Fwupd.RemoteKind
) – aFwupd.RemoteKind
, e.g.Fwupd.RemoteKind.DOWNLOAD
- Returns:
a string, e.g.
download
- Return type:
Converts an enumerated type to a printable string.
New in version 0.9.6.
- classmethod new()[source]¶
- Returns:
a new
Fwupd.Remote
- Return type:
Creates a new fwupd remote.
New in version 0.9.3.
- add_flag(flag)[source]¶
- Parameters:
flag (
Fwupd.RemoteFlags
) – theFwupd.RemoteFlags
, e.g.Fwupd.RemoteFlags.APPROVAL_REQUIRED
Adds a specific attribute flag to the attribute.
New in version 1.9.4.
- build_firmware_uri(url)[source]¶
-
Builds a URI for the URL using the username and password set for the remote, including any basename URI substitution.
New in version 0.9.7.
- build_metadata_sig_uri()[source]¶
- Raises:
- Returns:
a URI, or
None
for error- Return type:
Builds a URI for the metadata using the username and password set for the remote.
New in version 1.9.8.
- build_metadata_uri()[source]¶
- Raises:
- Returns:
a URI, or
None
for error- Return type:
Builds a URI for the metadata signature using the username and password set for the remote.
New in version 1.9.8.
- build_report_uri()[source]¶
- Raises:
- Returns:
a URI, or
None
for error- Return type:
Builds a URI for the URL using the username and password set for the remote.
New in version 1.9.1.
- get_age()[source]¶
- Returns:
a age, or
GObject.G_MAXUINT64
for unavailable- Return type:
Gets the age of the remote in seconds.
New in version 0.9.5.
- get_approval_required()[source]¶
-
Gets if firmware from the remote should be checked against the list of a approved checksums.
New in version 1.2.6.
- get_automatic_reports()[source]¶
-
Gets if reports should be automatically uploaded to this remote
New in version 1.3.3.
- get_automatic_security_reports()[source]¶
-
Gets if security reports should be automatically uploaded to this remote
New in version 1.5.0.
- get_filename_cache()[source]¶
-
Gets the path and filename that the remote is using for a cache.
New in version 0.9.6.
- get_filename_cache_sig()[source]¶
-
Gets the path and filename that the remote is using for a signature cache.
New in version 0.9.7.
- get_filename_source()[source]¶
-
Gets the path and filename of the remote itself, typically a
.conf
file.New in version 0.9.8.
- get_flags()[source]¶
- Returns:
remote attribute flags, or 0 if unset
- Return type:
Gets the self flags.
New in version 1.9.4.
- get_keyring_kind()[source]¶
- Returns:
- Return type:
Gets the keyring kind of the remote.
New in version 0.9.7.
- get_metadata_uri_sig()[source]¶
-
Gets the URI for the remote metadata signature.
New in version 0.9.7.
- get_order_after()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets the list of remotes this plugin should be ordered after.
New in version 0.9.5.
- get_order_before()[source]¶
- Returns:
an array
- Return type:
[
str
]
Gets the list of remotes this plugin should be ordered before.
New in version 0.9.5.
- get_priority()[source]¶
- Returns:
a priority, or 0 for the default value
- Return type:
Gets the priority of the remote, where bigger numbers are better.
New in version 0.9.5.
- get_refresh_interval()[source]¶
- Returns:
value in seconds
- Return type:
Sets the plugin refresh interval in seconds.
New in version 1.9.4.
- get_remotes_dir()[source]¶
-
Gets the base directory for storing remote metadata
New in version 1.3.1.
- get_title()[source]¶
-
Gets the remote title, e.g.
Linux Vendor Firmware Service
.New in version 0.9.8.
- has_flag(flag)[source]¶
- Parameters:
flag (
Fwupd.RemoteFlags
) – the remote flag, e.g.Fwupd.RemoteFlags.APPROVAL_REQUIRED
- Returns:
True
if the flag is set- Return type:
Finds if the remote has a specific flag.
New in version 1.9.4.
- load_from_filename(filename, cancellable)[source]¶
- Parameters:
filename (
str
) – a filenamecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Loads metadata about the remote from a keyfile. This can be called zero or multiple times for each remote.
New in version 0.9.3.
- load_signature(filename)[source]¶
-
Parses the signature, updating the metadata URI as appropriate.
New in version 1.4.0.
- load_signature_bytes(bytes)[source]¶
- Parameters:
bytes (
GLib.Bytes
) – data blob- Raises:
- Returns:
True
for success- Return type:
Parses the signature, updating the metadata URI as appropriate.
This can only be called for remotes with
Keyring=jcat
which is the default for most remotes.New in version 1.4.5.
- remove_flag(flag)[source]¶
- Parameters:
flag (
Fwupd.RemoteFlags
) – theFwupd.RemoteFlags
, e.g.Fwupd.RemoteFlags.APPROVAL_REQUIRED
Removes a specific attribute flag from the remote.
New in version 1.9.4.
- save_to_filename(filename, cancellable)[source]¶
- Parameters:
filename (
str
) – a filenamecancellable (
Gio.Cancellable
orNone
) – optionalGio.Cancellable
- Raises:
- Returns:
True
for success- Return type:
Saves metadata about the remote to a keyfile.
New in version 1.8.13.
- set_agreement(agreement)[source]¶
-
Sets the remote agreement in AppStream markup format
New in version 1.0.7.
- set_checksum(checksum_sig)[source]¶
-
Sets the remote signature checksum, typically only useful in the self tests.
NOTE: This should have been called fwupd_remote_set_checksum_sig() but alas, ABI.
New in version 1.8.2.
- set_enabled(enabled)[source]¶
- Parameters:
enabled (
bool
) – boolean
Sets if the remote is enabled and should be used.
New in version 1.8.13.
- set_filename_cache(filename)[source]¶
-
Sets the remote filename cache filename, typically only useful in the self tests.
New in version 1.8.2.
- set_filename_source(filename_source)[source]¶
-
Sets the source filename. This is typically a file in
/etc/fwupd/remotes/
.New in version 1.6.1.
- set_flags(flags)[source]¶
- Parameters:
flags (
Fwupd.RemoteFlags
) – remote attribute flags, e.g.Fwupd.RemoteFlags.APPROVAL_REQUIRED
Sets the attribute flags.
New in version 1.9.4.
- set_id(id)[source]¶
-
Sets the remote title.
NOTE: the ID has to be set before the URL.
New in version 1.9.3.
- set_keyring_kind(keyring_kind)[source]¶
- Parameters:
keyring_kind (
Fwupd.KeyringKind
) – keyring kind e.g.Fwupd.KeyringKind.PKCS7
Sets the keyring kind
New in version 1.5.3.
- set_metadata_uri(metadata_uri)[source]¶
-
Sets the remote metadata URI.
NOTE: This has to be set before the username and password.
New in version 1.8.13.
- set_mtime(mtime)[source]¶
- Parameters:
mtime (
int
) – a UNIX timestamp
Sets the plugin modification time.
New in version 0.9.5.
- set_priority(priority)[source]¶
- Parameters:
priority (
int
) – an integer, where 1 is better
Sets the plugin priority.
New in version 0.9.5.
- setup()[source]¶
- Raises:
- Returns:
True
for success- Return type:
Sets up the remote ready for use, checking that required parameters have been set. Calling this method multiple times has no effect.
New in version 1.6.1.
- to_json(builder)[source]¶
- Parameters:
builder (
Json.Builder
) – a JSON builder
Adds a fwupd remote to a JSON builder
New in version 1.6.2.
Property Details¶
- Fwupd.Remote.props.approval_required¶
-
If firmware from the remote should be checked against the system list of approved firmware.
New in version 1.2.6.
- Fwupd.Remote.props.automatic_reports¶
-
The behavior for auto-uploading reports.
New in version 1.3.3.
- Fwupd.Remote.props.automatic_security_reports¶
-
The behavior for auto-uploading security reports.
New in version 1.5.0.
- Fwupd.Remote.props.enabled¶
-
If the remote is enabled and should be used.
New in version 0.9.3.
- Fwupd.Remote.props.flags¶
-
The remote flags.
New in version 1.9.4.