KaimingRemote

KaimingRemote — Remote repository

Functions

Properties

char * name Read / Write
KaimingRemoteType type Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── KaimingRemote

Description

A KaimingRemote object provides information about a remote repository (or short: remote) that has been configured.

At its most basic level, a remote has a name and the URL for the repository. In addition, they provide some additional information that can be useful when presenting repositories in a UI, such as a title, a priority or a "don't enumerate" flags.

To obtain KaimingRemote objects for the configured remotes on a system, use kaiming_installation_list_remotes() or kaiming_installation_get_remote_by_name().

Functions

kaiming_remote_new ()

KaimingRemote *
kaiming_remote_new (const char *name);

Returns a new remote object which can be used to configure a new remote.

Note: This is a local configuration object, you must commit changes using kaiming_installation_modify_remote() or kaiming_installation_add_remote() for the changes to take effect.

Parameters

name

a name

 

Returns

a new KaimingRemote.

[transfer full]


kaiming_remote_new_from_file ()

KaimingRemote *
kaiming_remote_new_from_file (const char *name,
                              GBytes *data,
                              GError **error);

Returns a new pre-filled remote object which can be used to configure a new remote. The fields in the remote are filled in according to the values in the passed in kaimingrepo file.

Note: This is a local configuration object, you must commit changes using kaiming_installation_modify_remote() or kaiming_installation_add_remote() for the changes to take effect.

Parameters

name

a name

 

data

The content of a kaimingrepo file

 

error

return location for a GError

 

Returns

a new KaimingRemote, or NULL on error.

[transfer full]

Since: 1.3.4


kaiming_remote_get_name ()

const char *
kaiming_remote_get_name (KaimingRemote *self);

Returns the name of the remote repository.

Parameters

self

a KaimingRemote

 

Returns

the name.

[transfer none]


kaiming_remote_get_appstream_dir ()

GFile *
kaiming_remote_get_appstream_dir (KaimingRemote *self,
                                  const char *arch);

Returns the directory where this remote will store locally cached appstream information for the specified arch .

Parameters

self

a KaimingRemote

 

arch

which architecture to fetch (default: current architecture).

[nullable]

Returns

a GFile.

[transfer full]


kaiming_remote_get_appstream_timestamp ()

GFile *
kaiming_remote_get_appstream_timestamp
                               (KaimingRemote *self,
                                const char *arch);

Returns the timestamp file that will be updated whenever the appstream information has been updated (or tried to update) for the specified arch .

Parameters

self

a KaimingRemote

 

arch

which architecture to fetch (default: current architecture).

[nullable]

Returns

a GFile.

[transfer full]


kaiming_remote_get_collection_id ()

char *
kaiming_remote_get_collection_id (KaimingRemote *self);

Returns the repository collection ID of this remote, if set.

Parameters

self

a KaimingRemote

 

Returns

the collection ID, or NULL if unset.

[transfer full][nullable]


kaiming_remote_set_collection_id ()

void
kaiming_remote_set_collection_id (KaimingRemote *self,
                                  const char *collection_id);

Sets the repository collection ID of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

collection_id

The new collection ID, or NULL to unset.

[nullable]

kaiming_remote_get_default_branch ()

char *
kaiming_remote_get_default_branch (KaimingRemote *self);

Returns the default branch configured for the remote.

Parameters

self

a KaimingRemote

 

Returns

the default branch, or NULL.

[transfer full]

Since: 0.6.12


kaiming_remote_set_default_branch ()

void
kaiming_remote_set_default_branch (KaimingRemote *self,
                                   const char *default_branch);

Sets the default branch configured for this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

default_branch

The new default_branch, or NULL to unset

 

Since: 0.6.12


kaiming_remote_get_gpg_verify ()

gboolean
kaiming_remote_get_gpg_verify (KaimingRemote *self);

Returns whether GPG verification is enabled for the remote.

Parameters

self

a KaimingRemote

 

Returns

whether GPG verification is enabled


kaiming_remote_set_gpg_verify ()

void
kaiming_remote_set_gpg_verify (KaimingRemote *self,
                               gboolean gpg_verify);

Sets the gpg_verify config of this remote. See kaiming_remote_get_gpg_verify().

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

gpg_verify

a bool

 

kaiming_remote_set_gpg_key ()

void
kaiming_remote_set_gpg_key (KaimingRemote *self,
                            GBytes *gpg_key);

Sets the trusted gpg key for this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

gpg_key

a GBytes with gpg binary key data

 

kaiming_remote_get_nodeps ()

gboolean
kaiming_remote_get_nodeps (KaimingRemote *self);

Returns whether this remote should be used to find dependencies.

Parameters

self

a KaimingRemote

 

Returns

whether the remote is marked as "don't use for dependencies"


kaiming_remote_set_nodeps ()

void
kaiming_remote_set_nodeps (KaimingRemote *self,
                           gboolean nodeps);

Sets the nodeps config of this remote. See kaiming_remote_get_nodeps().

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

nodeps

a bool

 

kaiming_remote_get_noenumerate ()

gboolean
kaiming_remote_get_noenumerate (KaimingRemote *self);

Returns whether this remote should be used to list applications.

Parameters

self

a KaimingRemote

 

Returns

whether the remote is marked as "don't enumerate"


kaiming_remote_set_noenumerate ()

void
kaiming_remote_set_noenumerate (KaimingRemote *self,
                                gboolean noenumerate);

Sets the noenumeration config of this remote. See kaiming_remote_get_noenumerate().

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

noenumerate

a bool

 

kaiming_remote_get_prio ()

int
kaiming_remote_get_prio (KaimingRemote *self);

Returns the priority for the remote.

Parameters

self

a KaimingRemote

 

Returns

the priority


kaiming_remote_set_prio ()

void
kaiming_remote_set_prio (KaimingRemote *self,
                         int prio);

Sets the prio config of this remote. See kaiming_remote_get_prio().

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

prio

a bool

 

kaiming_remote_get_remote_type ()

KaimingRemoteType
kaiming_remote_get_remote_type (KaimingRemote *self);

Get the value of “type”.

Parameters

self

a KaimingRemote

 

Returns

the type of remote this is

Since: 0.9.8


kaiming_remote_get_title ()

char *
kaiming_remote_get_title (KaimingRemote *self);

Returns the title of the remote.

Parameters

self

a KaimingRemote

 

Returns

the title.

[transfer full]


kaiming_remote_set_title ()

void
kaiming_remote_set_title (KaimingRemote *self,
                          const char *title);

Sets the repository title of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

title

The new title, or NULL to unset

 

kaiming_remote_get_comment ()

char *
kaiming_remote_get_comment (KaimingRemote *self);

Returns the comment of the remote.

Parameters

self

a KaimingRemote

 

Returns

the comment.

[transfer full]

Since: 1.4


kaiming_remote_set_comment ()

void
kaiming_remote_set_comment (KaimingRemote *self,
                            const char *comment);

Sets the comment of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

comment

The new comment

 

Since: 1.4


kaiming_remote_get_description ()

char *
kaiming_remote_get_description (KaimingRemote *self);

Returns the description of the remote.

Parameters

self

a KaimingRemote

 

Returns

the description.

[transfer full]

Since: 1.4


kaiming_remote_set_description ()

void
kaiming_remote_set_description (KaimingRemote *self,
                                const char *description);

Sets the description of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

description

The new description

 

Since: 1.4


kaiming_remote_get_homepage ()

char *
kaiming_remote_get_homepage (KaimingRemote *self);

Returns the homepage url of the remote.

Parameters

self

a KaimingRemote

 

Returns

the homepage url.

[transfer full]

Since: 1.4


kaiming_remote_set_homepage ()

void
kaiming_remote_set_homepage (KaimingRemote *self,
                             const char *homepage);

Sets the homepage of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

homepage

The new homepage

 

Since: 1.4


kaiming_remote_get_icon ()

char *
kaiming_remote_get_icon (KaimingRemote *self);

Returns the icon url of the remote.

Parameters

self

a KaimingRemote

 

Returns

the icon url.

[transfer full]

Since: 1.4


kaiming_remote_set_icon ()

void
kaiming_remote_set_icon (KaimingRemote *self,
                         const char *icon);

Sets the homepage of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

icon

The new homepage

 

Since: 1.4


kaiming_remote_get_url ()

char *
kaiming_remote_get_url (KaimingRemote *self);

Returns the repository URL of this remote.

Parameters

self

a KaimingRemote

 

Returns

the URL.

[transfer full]


kaiming_remote_set_url ()

void
kaiming_remote_set_url (KaimingRemote *self,
                        const char *url);

Sets the repository URL of this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

url

The new url

 

kaiming_remote_get_disabled ()

gboolean
kaiming_remote_get_disabled (KaimingRemote *self);

Returns whether this remote is disabled.

Parameters

self

a KaimingRemote

 

Returns

whether the remote is marked as disabled


kaiming_remote_set_disabled ()

void
kaiming_remote_set_disabled (KaimingRemote *self,
                             gboolean disabled);

Sets the disabled config of this remote. See kaiming_remote_get_disabled().

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

disabled

a bool

 

kaiming_remote_get_filter ()

char *
kaiming_remote_get_filter (KaimingRemote *self);

Returns the filter file of the remote.

Parameters

self

a KaimingRemote

 

Returns

a pathname to a filter file.

[transfer full]

Since: 1.4


kaiming_remote_set_filter ()

void
kaiming_remote_set_filter (KaimingRemote *self,
                           const char *filter_path);

Sets a filter for this remote.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

filter_path

The pathname of the new filter file

 

Since: 1.4


kaiming_remote_get_main_ref ()

char *
kaiming_remote_get_main_ref (KaimingRemote *self);

Returns the main ref of this remote, if set. The main ref is the ref that an origin remote is created for.

Parameters

self

a KaimingRemote

 

Returns

the main ref, or NULL.

[transfer full]

Since: 1.1.1


kaiming_remote_set_main_ref ()

void
kaiming_remote_set_main_ref (KaimingRemote *self,
                             const char *main_ref);

Sets the main ref of this remote. The main ref is the ref that an origin remote is created for.

Note: This is a local modification of this object, you must commit changes using kaiming_installation_modify_remote() for the changes to take effect.

Parameters

self

a KaimingRemote

 

main_ref

The new main ref

 

Since: 1.1.1

Types and Values

struct KaimingRemote

struct KaimingRemote;

enum KaimingRemoteType

Different types of KaimingRemote .

Members

KAIMING_REMOTE_TYPE_STATIC

Statically configured remote

 

KAIMING_REMOTE_TYPE_USB

Dynamically detected local pathname remote

 

KAIMING_REMOTE_TYPE_LAN

Dynamically detected network remote

 

Property Details

The “name” property

  “name”                     char *

Name of the remote, as used in configuration files and when interfacing with OSTree. This is typically human readable, but could be generated, and must conform to ostree_validate_remote_name(). It should typically not be presented in the UI.

Owner: KaimingRemote

Flags: Read / Write

Default value: NULL


The “type” property

  “type”                     KaimingRemoteType

The type of the remote: whether it comes from static configuration files (KAIMING_REMOTE_TYPE_STATIC ) or has been dynamically found from the local network or a mounted USB drive (KAIMING_REMOTE_TYPE_LAN , KAIMING_REMOTE_TYPE_USB ). Dynamic remotes may be added and removed over time.

Owner: KaimingRemote

Flags: Read / Write / Construct Only

Default value: KAIMING_REMOTE_TYPE_STATIC

Since: 0.9.8