FlatpakRemote: Flatpak Library Reference Manual

## FlatpakRemote FlatpakRemote — Remote repository |

## Functions

FlatpakRemote * | flatpak_remote_new ()
FlatpakRemote * | flatpak_remote_new_from_file ()
const char * | flatpak_remote_get_name ()
GFile * | flatpak_remote_get_appstream_dir ()
GFile * | flatpak_remote_get_appstream_timestamp ()
char * | flatpak_remote_get_collection_id ()
void | flatpak_remote_set_collection_id ()
char * | flatpak_remote_get_default_branch ()
void | flatpak_remote_set_default_branch ()
gboolean | flatpak_remote_get_gpg_verify ()
void | flatpak_remote_set_gpg_verify ()
void | flatpak_remote_set_gpg_key ()
gboolean | flatpak_remote_get_nodeps ()
void | flatpak_remote_set_nodeps ()
gboolean | flatpak_remote_get_noenumerate ()
void | flatpak_remote_set_noenumerate ()
int | flatpak_remote_get_prio ()
void | flatpak_remote_set_prio ()
FlatpakRemoteType | flatpak_remote_get_remote_type ()
char * | flatpak_remote_get_title ()
void | flatpak_remote_set_title ()
char * | flatpak_remote_get_comment ()
void | flatpak_remote_set_comment ()
char * | flatpak_remote_get_description ()
void | flatpak_remote_set_description ()
char * | flatpak_remote_get_homepage ()
void | flatpak_remote_set_homepage ()
char * | flatpak_remote_get_icon ()
void | flatpak_remote_set_icon ()
char * | flatpak_remote_get_url ()
void | flatpak_remote_set_url ()
gboolean | flatpak_remote_get_disabled ()
void | flatpak_remote_set_disabled ()
char * | flatpak_remote_get_filter ()
void | flatpak_remote_set_filter ()
char * | flatpak_remote_get_main_ref ()
void | flatpak_remote_set_main_ref ()

## Properties

gchar * | name | Read / Write
FlatpakRemoteType | type | Read / Write / Construct Only

## Types and Values

struct | FlatpakRemote
enum | FlatpakRemoteType

## Object Hierarchy

        GObject
        ╰── FlatpakRemote

## Description

A FlatpakRemote 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 FlatpakRemote objects for the configured remotes on a system, use `flatpak_installation_list_remotes()` or `flatpak_installation_get_remote_by_name()`.

## Functions

### flatpak_remote_new ()

    FlatpakRemote *
    flatpak_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 `flatpak_installation_modify_remote()` or `flatpak_installation_add_remote()` for the changes to take effect.

#### Parameters

name | a name |

#### Returns

a new FlatpakRemote.

[transfer full]

### flatpak_remote_new_from_file ()

    FlatpakRemote *
    flatpak_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 flatpakrepo file.

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

#### Parameters

name | a name |
data | The content of a flatpakrepo file |
error | return location for a GError |

#### Returns

a new FlatpakRemote, or `NULL` on error.

[transfer full]

Since: 1.3.4

### flatpak_remote_get_name ()

    const char *
    flatpak_remote_get_name (FlatpakRemote *self);

Returns the name of the remote repository.

#### Parameters

self | a FlatpakRemote |

#### Returns

the name.

[transfer none]

### flatpak_remote_get_appstream_dir ()

    GFile *
    flatpak_remote_get_appstream_dir (FlatpakRemote *self,
                                      const char *arch);

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

#### Parameters

self | a FlatpakRemote |
arch | which architecture to fetch (default: current architecture). | [nullable]

#### Returns

a GFile.

[transfer full]

### flatpak_remote_get_appstream_timestamp ()

    GFile *
    flatpak_remote_get_appstream_timestamp
                                   (FlatpakRemote *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 FlatpakRemote |
arch | which architecture to fetch (default: current architecture). | [nullable]

#### Returns

a GFile.

[transfer full]

### flatpak_remote_get_collection_id ()

    char *
    flatpak_remote_get_collection_id (FlatpakRemote *self);

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

#### Parameters

self | a FlatpakRemote |

#### Returns

the collection ID, or `NULL` if unset.

[transfer full][nullable]

### flatpak_remote_set_collection_id ()

    void
    flatpak_remote_set_collection_id (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
collection_id | The new collection ID, or `NULL` to unset. | [nullable]

### flatpak_remote_get_default_branch ()

    char *
    flatpak_remote_get_default_branch (FlatpakRemote *self);

Returns the default branch configured for the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the default branch, or `NULL`.

[transfer full]

Since: 0.6.12

### flatpak_remote_set_default_branch ()

    void
    flatpak_remote_set_default_branch (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
default_branch | The new default_branch |

Since: 0.6.12

### flatpak_remote_get_gpg_verify ()

    gboolean
    flatpak_remote_get_gpg_verify (FlatpakRemote *self);

Returns whether GPG verification is enabled for the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

whether GPG verification is enabled

### flatpak_remote_set_gpg_verify ()

    void
    flatpak_remote_set_gpg_verify (FlatpakRemote *self,
                                   gboolean gpg_verify);

Sets the gpg_verify config of this remote. See `flatpak_remote_get_gpg_verify()`.

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

#### Parameters

self | a FlatpakRemote |
gpg_verify | a bool |

### flatpak_remote_set_gpg_key ()

    void
    flatpak_remote_set_gpg_key (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
gpg_key | a GBytes with gpg binary key data |

### flatpak_remote_get_nodeps ()

    gboolean
    flatpak_remote_get_nodeps (FlatpakRemote *self);

Returns whether this remote should be used to find dependencies.

#### Parameters

self | a FlatpakRemote |

#### Returns

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

### flatpak_remote_set_nodeps ()

    void
    flatpak_remote_set_nodeps (FlatpakRemote *self,
                               gboolean nodeps);

Sets the nodeps config of this remote. See `flatpak_remote_get_nodeps()`.

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

#### Parameters

self | a FlatpakRemote |
nodeps | a bool |

### flatpak_remote_get_noenumerate ()

    gboolean
    flatpak_remote_get_noenumerate (FlatpakRemote *self);

Returns whether this remote should be used to list applications.

#### Parameters

self | a FlatpakRemote |

#### Returns

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

### flatpak_remote_set_noenumerate ()

    void
    flatpak_remote_set_noenumerate (FlatpakRemote *self,
                                    gboolean noenumerate);

Sets the noenumeration config of this remote. See `flatpak_remote_get_noenumerate()`.

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

#### Parameters

self | a FlatpakRemote |
noenumerate | a bool |

### flatpak_remote_get_prio ()

    int
    flatpak_remote_get_prio (FlatpakRemote *self);

Returns the priority for the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the priority

### flatpak_remote_set_prio ()

    void
    flatpak_remote_set_prio (FlatpakRemote *self,
                             int prio);

Sets the prio config of this remote. See `flatpak_remote_get_prio()`.

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

#### Parameters

self | a FlatpakRemote |
prio | a bool |

### flatpak_remote_get_remote_type ()

    FlatpakRemoteType
    flatpak_remote_get_remote_type (FlatpakRemote *self);

Get the value of “type”.

#### Parameters

self | a FlatpakRemote |

#### Returns

the type of remote this is

Since: 0.9.8

### flatpak_remote_get_title ()

    char *
    flatpak_remote_get_title (FlatpakRemote *self);

Returns the title of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the title.

[transfer full]

### flatpak_remote_set_title ()

    void
    flatpak_remote_set_title (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
title | The new title |

### flatpak_remote_get_comment ()

    char *
    flatpak_remote_get_comment (FlatpakRemote *self);

Returns the comment of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the comment.

[transfer full]

Since: 1.4

### flatpak_remote_set_comment ()

    void
    flatpak_remote_set_comment (FlatpakRemote *self,
                                const char *comment);

Sets the comment of this remote.

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

#### Parameters

self | a FlatpakRemote |
comment | The new comment |

Since: 1.4

### flatpak_remote_get_description ()

    char *
    flatpak_remote_get_description (FlatpakRemote *self);

Returns the description of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the description.

[transfer full]

Since: 1.4

### flatpak_remote_set_description ()

    void
    flatpak_remote_set_description (FlatpakRemote *self,
                                    const char *description);

Sets the description of this remote.

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

#### Parameters

self | a FlatpakRemote |
description | The new description |

Since: 1.4

### flatpak_remote_get_homepage ()

    char *
    flatpak_remote_get_homepage (FlatpakRemote *self);

Returns the homepage url of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the homepage url.

[transfer full]

Since: 1.4

### flatpak_remote_set_homepage ()

    void
    flatpak_remote_set_homepage (FlatpakRemote *self,
                                 const char *homepage);

Sets the homepage of this remote.

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

#### Parameters

self | a FlatpakRemote |
homepage | The new homepage |

Since: 1.4

### flatpak_remote_get_icon ()

    char *
    flatpak_remote_get_icon (FlatpakRemote *self);

Returns the icon url of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the icon url.

[transfer full]

Since: 1.4

### flatpak_remote_set_icon ()

    void
    flatpak_remote_set_icon (FlatpakRemote *self,
                             const char *icon);

Sets the homepage of this remote.

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

#### Parameters

self | a FlatpakRemote |
icon | The new homepage |

Since: 1.4

### flatpak_remote_get_url ()

    char *
    flatpak_remote_get_url (FlatpakRemote *self);

Returns the repository URL of this remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

the URL.

[transfer full]

### flatpak_remote_set_url ()

    void
    flatpak_remote_set_url (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
url | The new url |

### flatpak_remote_get_disabled ()

    gboolean
    flatpak_remote_get_disabled (FlatpakRemote *self);

Returns whether this remote is disabled.

#### Parameters

self | a FlatpakRemote |

#### Returns

whether the remote is marked as disabled

### flatpak_remote_set_disabled ()

    void
    flatpak_remote_set_disabled (FlatpakRemote *self,
                                 gboolean disabled);

Sets the disabled config of this remote. See `flatpak_remote_get_disabled()`.

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

#### Parameters

self | a FlatpakRemote |
disabled | a bool |

### flatpak_remote_get_filter ()

    char *
    flatpak_remote_get_filter (FlatpakRemote *self);

Returns the filter file of the remote.

#### Parameters

self | a FlatpakRemote |

#### Returns

a pathname to a filter file.

[transfer full]

Since: 1.4

### flatpak_remote_set_filter ()

    void
    flatpak_remote_set_filter (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
filter_path | The pathname of the new filter file |

Since: 1.4

### flatpak_remote_get_main_ref ()

    char *
    flatpak_remote_get_main_ref (FlatpakRemote *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 FlatpakRemote |

#### Returns

the main ref, or `NULL`.

[transfer full]

Since: 1.1.1

### flatpak_remote_set_main_ref ()

    void
    flatpak_remote_set_main_ref (FlatpakRemote *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 `flatpak_installation_modify_remote()` for the changes to take effect.

#### Parameters

self | a FlatpakRemote |
main_ref | The new main ref |

Since: 1.1.1

## Types and Values

### struct FlatpakRemote

    struct FlatpakRemote;

### enum FlatpakRemoteType

Different types of `FlatpakRemote` .

#### Members

FLATPAK_REMOTE_TYPE_STATIC | Statically configured remote |
FLATPAK_REMOTE_TYPE_USB | Dynamically detected local pathname remote |
FLATPAK_REMOTE_TYPE_LAN | Dynamically detected network remote |

## Property Details

### The `“name”` property

      “name”                     gchar *

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: FlatpakRemote

Flags: Read / Write

Default value: NULL

### The `“type”` property

      “type”                     FlatpakRemoteType

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

Owner: FlatpakRemote

Flags: Read / Write / Construct Only

Default value: FLATPAK_REMOTE_TYPE_STATIC

Since: 0.9.8