Method
FlatpakInstallationadd_remote
since: 1.3.4
Declaration [src]
gboolean
flatpak_installation_add_remote (
FlatpakInstallation* self,
FlatpakRemote* remote,
gboolean if_needed,
GCancellable* cancellable,
GError** error
)
Description [src]
Adds a new remote object to the set of remotes. This is similar
to flatpak_installation_modify_remote() for non-existing remote
names. However, if the named remote already exists then instead of
modifying it it fails with FLATPAK_ERROR_ALREADY_INSTALLED, or if
if_needed is true it silently succeeds without doing anything.
As an exception to the last, if the local config has a filter defined, but the new remote unsets the filter (for example, it comes from an unfiltered .flatpakref via flatpak_remote_new_from_file()) the the local remote filter gets reset. This is to allow the setup where there is a default setup of a filtered remote, yet you can still use the standard flatpakref file to get the full contents without getting two remotes.
Available since: 1.3.4
Parameters
remote-
Type:
FlatpakRemoteThe new
FlatpakRemote.The data is owned by the caller of the method. if_needed-
Type:
gbooleanIf
TRUE, only add if it doesn’t exists. cancellable-
Type:
GCancellableA
GCancellable.The argument can be NULL.The data is owned by the caller of the method. error-
Type:
GError **The return location for a recoverable error.
The argument can be NULL.If the return location is not NULL, then you must initialize it to aNULLGError*.The argument will be left initialized to NULLby the method if there are no errors.In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.