FwupdRemote

FwupdRemote — a source of firmware

Synopsis

#define             FWUPD_TYPE_REMOTE
struct              FwupdRemoteClass;
enum                FwupdRemoteKind;
FwupdRemoteKind     fwupd_remote_kind_from_string       (const gchar *kind);
const gchar *       fwupd_remote_kind_to_string         (FwupdRemoteKind kind);
FwupdRemote *       fwupd_remote_new                    (void);
const gchar *       fwupd_remote_get_id                 (FwupdRemote *self);
const gchar *       fwupd_remote_get_title              (FwupdRemote *self);
const gchar *       fwupd_remote_get_checksum           (FwupdRemote *self);
const gchar *       fwupd_remote_get_username           (FwupdRemote *self);
const gchar *       fwupd_remote_get_password           (FwupdRemote *self);
const gchar *       fwupd_remote_get_filename_cache     (FwupdRemote *self);
const gchar *       fwupd_remote_get_filename_cache_sig (FwupdRemote *self);
const gchar *       fwupd_remote_get_filename_source    (FwupdRemote *self);
const gchar *       fwupd_remote_get_firmware_base_uri  (FwupdRemote *self);
const gchar *       fwupd_remote_get_metadata_uri       (FwupdRemote *self);
const gchar *       fwupd_remote_get_metadata_uri_sig   (FwupdRemote *self);
gboolean            fwupd_remote_get_enabled            (FwupdRemote *self);
gint                fwupd_remote_get_priority           (FwupdRemote *self);
guint64             fwupd_remote_get_age                (FwupdRemote *self);
FwupdRemoteKind     fwupd_remote_get_kind               (FwupdRemote *self);
FwupdKeyringKind    fwupd_remote_get_keyring_kind       (FwupdRemote *self);
gchar *             fwupd_remote_build_firmware_uri     (FwupdRemote *self,
                                                         const gchar *url,
                                                         GError **error);

Description

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

See also: FwupdClient

Details

FWUPD_TYPE_REMOTE

#define FWUPD_TYPE_REMOTE (fwupd_remote_get_type ())

struct FwupdRemoteClass

struct FwupdRemoteClass {
	GObjectClass		 parent_class;
};

enum FwupdRemoteKind

typedef enum {
	FWUPD_REMOTE_KIND_UNKNOWN,
	FWUPD_REMOTE_KIND_DOWNLOAD,
	FWUPD_REMOTE_KIND_LOCAL,
} FwupdRemoteKind;

FWUPD_REMOTE_KIND_UNKNOWN

FWUPD_REMOTE_KIND_DOWNLOAD

FWUPD_REMOTE_KIND_LOCAL


fwupd_remote_kind_from_string ()

FwupdRemoteKind     fwupd_remote_kind_from_string       (const gchar *kind);

Converts an printable string to an enumerated type.

kind :

a string, e.g. `download`

Returns :

a FwupdRemoteKind, e.g. FWUPD_REMOTE_KIND_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.

kind :

a FwupdRemoteKind, e.g. FWUPD_REMOTE_KIND_DOWNLOAD

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`.

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`.

self :

A FwupdRemote

Returns :

a string, or NULL if unset

Since 0.9.8


fwupd_remote_get_checksum ()

const gchar *       fwupd_remote_get_checksum           (FwupdRemote *self);

Gets the remote checksum.

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.

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.

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.

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.

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.

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.

self :

A FwupdRemote

Returns :

a URI, or NULL for unset. [transfer none]

Since 0.9.7


fwupd_remote_get_metadata_uri ()

const gchar *       fwupd_remote_get_metadata_uri       (FwupdRemote *self);

Gets the URI for the remote metadata.

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.

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.

self :

A FwupdRemote

Returns :

a TRUE if the remote is enabled

Since 0.9.3


fwupd_remote_get_priority ()

gint                fwupd_remote_get_priority           (FwupdRemote *self);

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

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.

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.

self :

A FwupdRemote

Returns :

a FwupdRemoteKind, e.g. FWUPD_REMOTE_KIND_LOCAL

Since 0.9.6


fwupd_remote_get_keyring_kind ()

FwupdKeyringKind    fwupd_remote_get_keyring_kind       (FwupdRemote *self);

Gets the keyring kind of the remote.

self :

A FwupdRemote

Returns :

a FwupdKeyringKind, e.g. FWUPD_KEYRING_KIND_GPG

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.

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