FwupdRemote

FwupdRemote — a source of firmware

Functions

Types and Values

Description

An object that represents a source of metadata that provides firmware.

See also: FwupdClient

Functions

fwupd_remote_kind_from_string ()

FwupdRemoteKind
fwupd_remote_kind_from_string (const gchar *kind);

Converts an printable string to an enumerated type.

Parameters

kind

a string, e.g. download

 

Since: 0.9.6


fwupd_remote_kind_to_string ()

const gchar *
fwupd_remote_kind_to_string (FwupdRemoteKind kind);

Converts an enumerated type to a printable string.

Parameters

Returns

a string, e.g. download

Since: 0.9.6


fwupd_remote_new ()

FwupdRemote *
fwupd_remote_new (void);

Creates a new fwupd remote.

Returns

a new FwupdRemote

Since: 0.9.3


fwupd_remote_get_id ()

const gchar *
fwupd_remote_get_id (FwupdRemote *self);

Gets the remote ID, e.g. lvfs-testing.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL if unset

Since: 0.9.3


fwupd_remote_get_title ()

const gchar *
fwupd_remote_get_title (FwupdRemote *self);

Gets the remote title, e.g. Linux Vendor Firmware Service.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL if unset

Since: 0.9.8


fwupd_remote_get_agreement ()

const gchar *
fwupd_remote_get_agreement (FwupdRemote *self);

Gets the remote agreement in AppStream markup format

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL if unset

Since: 1.0.7


fwupd_remote_get_checksum ()

const gchar *
fwupd_remote_get_checksum (FwupdRemote *self);

Gets the remote checksum.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL if unset

Since: 1.0.0


fwupd_remote_get_username ()

const gchar *
fwupd_remote_get_username (FwupdRemote *self);

Gets the username configured for the remote.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL for unset

Since: 0.9.5


fwupd_remote_get_password ()

const gchar *
fwupd_remote_get_password (FwupdRemote *self);

Gets the password configured for the remote.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL for unset

Since: 0.9.5


fwupd_remote_get_filename_cache ()

const gchar *
fwupd_remote_get_filename_cache (FwupdRemote *self);

Gets the path and filename that the remote is using for a cache.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL for unset

Since: 0.9.6


fwupd_remote_get_filename_cache_sig ()

const gchar *
fwupd_remote_get_filename_cache_sig (FwupdRemote *self);

Gets the path and filename that the remote is using for a signature cache.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL for unset

Since: 0.9.7


fwupd_remote_get_filename_source ()

const gchar *
fwupd_remote_get_filename_source (FwupdRemote *self);

Gets the path and filename of the remote itself, typically a .conf file.

Parameters

self

A FwupdRemote

 

Returns

a string, or NULL for unset

Since: 0.9.8


fwupd_remote_get_firmware_base_uri ()

const gchar *
fwupd_remote_get_firmware_base_uri (FwupdRemote *self);

Gets the base URI for firmware.

Parameters

self

A FwupdRemote

 

Returns

a URI, or NULL for unset.

[transfer none]

Since: 0.9.7


fwupd_remote_get_report_uri ()

const gchar *
fwupd_remote_get_report_uri (FwupdRemote *self);

Gets the URI for the remote reporting.

Parameters

self

A FwupdRemote

 

Returns

a URI, or NULL for invalid.

[transfer none]

Since: 1.0.4


fwupd_remote_get_metadata_uri ()

const gchar *
fwupd_remote_get_metadata_uri (FwupdRemote *self);

Gets the URI for the remote metadata.

Parameters

self

A FwupdRemote

 

Returns

a URI, or NULL for invalid.

[transfer none]

Since: 0.9.7


fwupd_remote_get_metadata_uri_sig ()

const gchar *
fwupd_remote_get_metadata_uri_sig (FwupdRemote *self);

Gets the URI for the remote metadata signature.

Parameters

self

A FwupdRemote

 

Returns

a URI, or NULL for invalid.

[transfer none]

Since: 0.9.7


fwupd_remote_get_enabled ()

gboolean
fwupd_remote_get_enabled (FwupdRemote *self);

Gets if the remote is enabled and should be used.

Parameters

self

A FwupdRemote

 

Returns

a TRUE if the remote is enabled

Since: 0.9.3


fwupd_remote_get_approval_required ()

gboolean
fwupd_remote_get_approval_required (FwupdRemote *self);

Gets if firmware from the remote should be checked against the list of a approved checksums.

Parameters

self

A FwupdRemote

 

Returns

a TRUE if the remote is restricted

Since: 1.2.6


fwupd_remote_get_priority ()

gint
fwupd_remote_get_priority (FwupdRemote *self);

Gets the priority of the remote, where bigger numbers are better.

Parameters

self

A FwupdRemote

 

Returns

a priority, or 0 for the default value

Since: 0.9.5


fwupd_remote_get_age ()

guint64
fwupd_remote_get_age (FwupdRemote *self);

Gets the age of the remote in seconds.

Parameters

self

A FwupdRemote

 

Returns

a age, or G_MAXUINT64 for unavailable

Since: 0.9.5


fwupd_remote_get_kind ()

FwupdRemoteKind
fwupd_remote_get_kind (FwupdRemote *self);

Gets the kind of the remote.

Parameters

self

A FwupdRemote

 

Since: 0.9.6


fwupd_remote_get_keyring_kind ()

FwupdKeyringKind
fwupd_remote_get_keyring_kind (FwupdRemote *self);

Gets the keyring kind of the remote.

Parameters

self

A FwupdRemote

 

Since: 0.9.7


fwupd_remote_build_firmware_uri ()

gchar *
fwupd_remote_build_firmware_uri (FwupdRemote *self,
                                 const gchar *url,
                                 GError **error);

Builds a URI for the URL using the username and password set for the remote, including any basename URI substitution.

Parameters

self

A FwupdRemote

 

url

the URL to use

 

error

the GError, or NULL

 

Returns

a URI, or NULL for error.

[transfer full]

Since: 0.9.7

Types and Values

FWUPD_TYPE_REMOTE

#define FWUPD_TYPE_REMOTE (fwupd_remote_get_type ())

struct FwupdRemoteClass

struct FwupdRemoteClass {
	GObjectClass		 parent_class;
};

enum FwupdRemoteKind

The kind of remote.

Members

FWUPD_REMOTE_KIND_UNKNOWN

Unknown kind

 

FWUPD_REMOTE_KIND_DOWNLOAD

Requires files to be downloaded

 

FWUPD_REMOTE_KIND_LOCAL

Reads files from the local machine

 

FWUPD_REMOTE_KIND_DIRECTORY

Reads directory from the local machine

 

FwupdRemote

typedef struct _FwupdRemote FwupdRemote;