Top |
struct | FlatpakInstallation |
enum | FlatpakQueryFlags |
enum | FlatpakUpdateFlags |
enum | FlatpakInstallFlags |
enum | FlatpakUninstallFlags |
enum | FlatpakLaunchFlags |
enum | FlatpakStorageType |
FlatpakInstallation is the toplevel object that software installers should use to operate on an flatpak applications.
An FlatpakInstallation object provides information about an installation location for flatpak applications. Typical installation locations are either system-wide (in $prefix/var/lib/flatpak) or per-user (in ~/.local/share/flatpak).
FlatpakInstallation can list configured remotes as well as installed application and runtime references (in short: refs), and it can add, remove and modify remotes.
FlatpakInstallation can also run, install, update and uninstall applications and runtimes, but FlatpakTransaction is a better, high-level API for these tasks.
To get a list of all configured installations, use flatpak_get_system_installations()
,
together with flatpak_installation_new_user()
.
The FlatpakInstallation API is threadsafe in the sense that it is safe to run two operations at the same time, in different threads (or processes).
FlatpakInstallation * flatpak_installation_new_system (GCancellable *cancellable
,GError **error
);
Creates a new FlatpakInstallation for the default system-wide installation.
FlatpakInstallation * flatpak_installation_new_system_with_id (const char *id
,GCancellable *cancellable
,GError **error
);
Creates a new FlatpakInstallation for the system-wide installation id
.
id |
the ID of the system-wide installation. |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 0.8
FlatpakInstallation * flatpak_installation_new_user (GCancellable *cancellable
,GError **error
);
Creates a new FlatpakInstallation for the per-user installation.
FlatpakInstallation * flatpak_installation_new_for_path (GFile *path
,gboolean user
,GCancellable *cancellable
,GError **error
);
Creates a new FlatpakInstallation for the installation at the given path
.
path |
a GFile |
|
user |
whether this is a user-specific location |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean
flatpak_installation_get_is_user (FlatpakInstallation *self
);
Returns whether the installation is for a user-specific location.
GFile *
flatpak_installation_get_path (FlatpakInstallation *self
);
Returns the installation location for self
.
GFileMonitor * flatpak_installation_create_monitor (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Gets monitor object for the installation. The returned file monitor will emit the “changed” signal whenever an application or runtime was installed, uninstalled or updated.
FlatpakInstalledRef * flatpak_installation_install (FlatpakInstallation *self
,const char *remote_name
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_install
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_install()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_install()
instead. It has a lot more interesting features.
Install a new application or runtime.
Note that this function was originally written to always return a FlatpakInstalledRef. Since 0.9.13, passing FLATPAK_INSTALL_FLAGS_NO_DEPLOY will only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, so FLATPAK_ERROR_ONLY_PULLED will be set and the caller must respond accordingly.
self |
||
remote_name |
name of the remote to use |
|
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app/runtime to fetch |
|
arch |
which architecture to fetch (default: current architecture). |
[nullable] |
branch |
which branch to fetch (default: 'master'). |
[nullable] |
progress |
progress callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakInstalledRef * flatpak_installation_install_full (FlatpakInstallation *self
,FlatpakInstallFlags flags
,const char *remote_name
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,const char * const *subpaths
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_install_full
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_install()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_install()
instead. It has a lot more interesting features.
Install a new application or runtime.
Note that this function was originally written to always return a FlatpakInstalledRef. Since 0.9.13, passing FLATPAK_INSTALL_FLAGS_NO_DEPLOY will only pull refs into the local flatpak repository without deploying them, however this function will be unable to provide information on the installed ref, so FLATPAK_ERROR_ONLY_PULLED will be set and the caller must respond accordingly.
self |
||
flags |
set of FlatpakInstallFlags flag |
|
remote_name |
name of the remote to use |
|
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app/runtime to fetch |
|
arch |
which architecture to fetch (default: current architecture). |
[nullable] |
branch |
which branch to fetch (default: 'master'). |
[nullable] |
subpaths |
A list of subpaths to fetch, or |
[nullable][array zero-terminated=1] |
progress |
progress callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakInstalledRef * flatpak_installation_update (FlatpakInstallation *self
,FlatpakUpdateFlags flags
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_update
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_update()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_update()
instead. It has a lot more interesting features.
Update an application or runtime.
If the specified package is not installed, then FLATPAK_ERROR_NOT_INSTALLED
will be thrown.
If no updates could be found on the remote end and the package is
already up to date, then FLATPAK_ERROR_ALREADY_INSTALLED
will be thrown.
self |
||
flags |
set of FlatpakUpdateFlags flag |
|
kind |
whether this is an app or runtime |
|
name |
name of the app or runtime to update |
|
arch |
architecture of the app or runtime to update (default: current architecture). |
[nullable] |
branch |
name of the branch of the app or runtime to update (default: master). |
[nullable] |
progress |
the callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakInstalledRef * flatpak_installation_update_full (FlatpakInstallation *self
,FlatpakUpdateFlags flags
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,const char * const *subpaths
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_update_full
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_update()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_update()
instead. It has a lot more interesting features.
Update an application or runtime.
If the specified package is not installed, then FLATPAK_ERROR_NOT_INSTALLED
will be thrown.
If no updates could be found on the remote end and the package is
already up to date, then FLATPAK_ERROR_ALREADY_INSTALLED
will be thrown.
self |
||
flags |
set of FlatpakUpdateFlags flag |
|
kind |
whether this is an app or runtime |
|
name |
name of the app or runtime to update |
|
arch |
architecture of the app or runtime to update (default: current architecture). |
[nullable] |
branch |
name of the branch of the app or runtime to update (default: master). |
[nullable] |
subpaths |
A list of subpaths to fetch, or |
[nullable][array zero-terminated=1] |
progress |
the callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_uninstall (FlatpakInstallation *self
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_uninstall
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_uninstall()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_uninstall()
instead. It has a lot more interesting features.
Uninstall an application or runtime.
self |
||
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app or runtime to uninstall |
|
arch |
architecture of the app or runtime to uninstall; if
|
[nullable] |
branch |
name of the branch of the app or runtime to uninstall;
if |
[nullable] |
progress |
the callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_uninstall_full (FlatpakInstallation *self
,FlatpakUninstallFlags flags
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_uninstall_full
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_uninstall()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_uninstall()
instead. It has a lot more interesting features.
Uninstall an application or runtime.
self |
||
flags |
set of FlatpakUninstallFlags flags |
|
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app or runtime to uninstall |
|
arch |
architecture of the app or runtime to uninstall; if
|
[nullable] |
branch |
name of the branch of the app or runtime to uninstall;
if |
[nullable] |
progress |
the callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 0.11.8
gboolean flatpak_installation_launch (FlatpakInstallation *self
,const char *name
,const char *arch
,const char *branch
,const char *commit
,GCancellable *cancellable
,GError **error
);
Launch an installed application.
You can use flatpak_installation_get_installed_ref()
or
flatpak_installation_get_current_installed_app()
to find out what builds
are available, in order to get a value for commit
.
self |
||
name |
name of the app to launch |
|
arch |
which architecture to launch (default: current architecture). |
[nullable] |
branch |
which branch of the application (default: "master"). |
[nullable] |
commit |
the commit of |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_launch_full (FlatpakInstallation *self
,FlatpakLaunchFlags flags
,const char *name
,const char *arch
,const char *branch
,const char *commit
,FlatpakInstance **instance_out
,GCancellable *cancellable
,GError **error
);
Launch an installed application.
You can use flatpak_installation_get_installed_ref()
or
flatpak_installation_get_current_installed_app()
to find out what builds
are available, in order to get a value for commit
.
Compared to flatpak_installation_launch()
, this function returns a FlatpakInstance
that can be used to get information about the running instance. You can also use
it to wait for the instance to be done with g_child_watch_add()
if you pass the
FLATPAK_LAUNCH_FLAGS_DO_NOT_REAP flag.
self |
||
flags |
set of FlatpakLaunchFlags |
|
name |
name of the app to launch |
|
arch |
which architecture to launch (default: current architecture). |
[nullable] |
branch |
which branch of the application (default: "master"). |
[nullable] |
commit |
the commit of |
[nullable] |
instance_out |
return location for a FlatpakInstance. |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 1.1
FlatpakInstalledRef * flatpak_installation_get_current_installed_app (FlatpakInstallation *self
,const char *name
,GCancellable *cancellable
,GError **error
);
Get the last build of reference name
that was installed with
flatpak_installation_install()
, or NULL
if the reference has
never been installed locally.
self |
||
name |
the name of the app |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
const char *
flatpak_installation_get_display_name (FlatpakInstallation *self
);
Returns the display name of the installation for self
.
Note that this function may return NULL
if the installation
does not have a display name.
Since: 0.8
const char *
flatpak_installation_get_id (FlatpakInstallation *self
);
Returns the ID of the installation for self
.
The ID for the default system installation is "default". The ID for the user installation is "user".
Since: 0.8
FlatpakInstalledRef * flatpak_installation_get_installed_ref (FlatpakInstallation *self
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,GCancellable *cancellable
,GError **error
);
Returns information about an installed ref, such as the available builds, its size, location, etc.
self |
||
kind |
whether this is an app or runtime |
|
name |
name of the app/runtime to fetch |
|
arch |
which architecture to fetch (default: current architecture). |
[nullable] |
branch |
which branch to fetch (default: "master"). |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_get_min_free_space_bytes (FlatpakInstallation *self
,guint64 *out_bytes
,GError **error
);
Returns the min-free-space config value from the OSTree repository of this installation.
Applications can use this value, together with information about the available disk space and the size of pending updates or installs, to estimate whether a pull operation will fail due to running out of disk space.
Since: 1.1
gint
flatpak_installation_get_priority (FlatpakInstallation *self
);
Returns the numeric priority of the installation for self
.
Since: 0.8
FlatpakStorageType
flatpak_installation_get_storage_type (FlatpakInstallation *self
);
Returns the type of storage of the installation for self
.
Since: 0.8
void flatpak_installation_set_no_interaction (FlatpakInstallation *self
,gboolean no_interaction
);
This method can be used to prevent interactive authorization dialogs to appear
for operations on self
. This is useful for background operations that are not
directly triggered by a user action.
By default, interaction is allowed.
Since: 1.1.1
gboolean
flatpak_installation_get_no_interaction
(FlatpakInstallation *self
);
Returns the value set with flatpak_installation_set_no_interaction()
.
Since: 1.1.1
GPtrArray * flatpak_installation_list_installed_refs (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Lists the installed references.
a GPtrArray of FlatpakInstalledRef instances.
[transfer container][element-type FlatpakInstalledRef]
GPtrArray * flatpak_installation_list_installed_refs_by_kind (FlatpakInstallation *self
,FlatpakRefKind kind
,GCancellable *cancellable
,GError **error
);
Lists the installed references of a specific kind.
self |
||
kind |
the kind of installation |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakInstalledRef instances.
[transfer container][element-type FlatpakInstalledRef]
GPtrArray * flatpak_installation_list_installed_refs_for_update (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Lists the installed apps and runtimes that have an update available, either
from the configured remote or locally available but not deployed (see
flatpak_transaction_set_no_deploy()
).
This also checks if any of FlatpakInstalledRef has a missing FlatpakRelatedRef
(which has should-download
set to TRUE
) or runtime. If so, it adds the
ref to the returning GPtrArray to pull in the FlatpakRelatedRef or runtime
again via an update operation in FlatpakTransaction.
In case more than one app needs an update of the same runtime or extension, this function will return all of those apps.
a GPtrArray of
FlatpakInstalledRef instances, or NULL
on error.
[transfer container][element-type FlatpakInstalledRef]
GPtrArray * flatpak_installation_list_installed_related_refs_sync (FlatpakInstallation *self
,const char *remote_name
,const char *ref
,GCancellable *cancellable
,GError **error
);
Lists all the locally installed refs that are related to ref
. These are
things that are interesting to install, update, or uninstall together with
ref
. For instance, locale data or debug information.
Note that while the related refs are usually installed from the same remote
as ref
(remote_name
), it is possible they were installed from another
remote.
This function is similar to flatpak_installation_list_remote_related_refs_sync, but instead of looking at what is available on the remote, it only looks at the locally installed refs. This is useful for instance when you're looking for related refs to uninstall, or when you're planning to use FLATPAK_UPDATE_FLAGS_NO_PULL to install previously pulled refs.
self |
||
remote_name |
the name of the remote providing |
|
ref |
the ref |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakRelatedRef instances.
[transfer container][element-type FlatpakRelatedRef]
Since: 0.6.7
GPtrArray * flatpak_installation_list_unused_refs (FlatpakInstallation *self
,const char *arch
,GCancellable *cancellable
,GError **error
);
Lists the installed references that are not 'used'.
A reference is used if it is either an application,
or the runtime or sdk of a used ref, or an extension of a used ref.
Pinned runtimes are also considered used; see flatpak-pin(1) and
flatpak_installation_list_pinned_refs()
.
self |
||
arch |
if non- |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakInstalledRef instances.
[transfer container][element-type FlatpakInstalledRef]
Since: 1.1.2
GPtrArray * flatpak_installation_list_remote_refs_sync (FlatpakInstallation *self
,const char *remote_or_uri
,GCancellable *cancellable
,GError **error
);
Lists all the applications and runtimes in a remote.
self |
||
remote_or_uri |
the name or URI of the remote |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakRemoteRef instances.
[transfer container][element-type FlatpakRemoteRef]
GPtrArray * flatpak_installation_list_remote_refs_sync_full (FlatpakInstallation *self
,const char *remote_or_uri
,FlatpakQueryFlags flags
,GCancellable *cancellable
,GError **error
);
Lists all the applications and runtimes in a remote.
self |
||
remote_or_uri |
the name or URI of the remote |
|
flags |
set of FlatpakQueryFlags |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakRemoteRef instances.
[transfer container][element-type FlatpakRemoteRef]
Since: 1.3.3
GPtrArray * flatpak_installation_list_remotes_by_type (FlatpakInstallation *self
,const FlatpakRemoteType types[]
,gsize num_types
,GCancellable *cancellable
,GError **error
);
Lists only the remotes whose type is included in the types
argument.
Since flatpak 1.7 this will never return any types except FLATPAK_REMOTE_TYPE_STATIC. Equivalent functionallity to FLATPAK_REMOTE_TYPE_USB can be had by listing remote refs with FLATPAK_QUERY_FLAGS_ONLY_SIDELOADED.
self |
||
types |
an array of FlatpakRemoteType. |
[array length=num_types] |
num_types |
the number of types provided in |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
GPtrArray * flatpak_installation_list_remote_related_refs_sync (FlatpakInstallation *self
,const char *remote_name
,const char *ref
,GCancellable *cancellable
,GError **error
);
Lists all the available refs on remote_name
that are related to
ref
, and the subpaths to use. These are things that are
interesting to install, update, or uninstall together with
ref
. For instance, locale data or debug information.
The returned list contains all available related refs, but not
every one should always be installed. For example,
flatpak_related_ref_should_download()
returns TRUE
if the
reference should be installed/updated with the app, and
flatpak_related_ref_should_delete()
returns TRUE
if it
should be uninstalled with the main ref.
The commit property of each FlatpakRelatedRef is not guaranteed to be
non-NULL
.
self |
||
remote_name |
the name of the remote |
|
ref |
the ref |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a GPtrArray of FlatpakRelatedRef instances.
[transfer container][element-type FlatpakRelatedRef]
Since: 0.6.7
GPtrArray * flatpak_installation_list_remotes (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Lists the static remotes, in priority (highest first) order. For same priority, an earlier added remote comes before a later added one.
FlatpakRemote * flatpak_installation_get_remote_by_name (FlatpakInstallation *self
,const gchar *name
,GCancellable *cancellable
,GError **error
);
Looks up a remote by name.
self |
||
name |
a remote name |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
GBytes * flatpak_installation_fetch_remote_metadata_sync (FlatpakInstallation *self
,const char *remote_name
,FlatpakRef *ref
,GCancellable *cancellable
,GError **error
);
Obtains the metadata file from a commit.
NOTE: Since 0.11.4 this information is accessible in FlatpakRemoteRef, so this function is not very useful anymore.
self |
||
remote_name |
the name of the remote |
|
ref |
the ref |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakRemoteRef * flatpak_installation_fetch_remote_ref_sync (FlatpakInstallation *self
,const char *remote_name
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,GCancellable *cancellable
,GError **error
);
Gets the current remote branch of a ref in the remote.
self |
||
remote_name |
the name of the remote |
|
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app/runtime to fetch |
|
arch |
which architecture to fetch (default: current architecture). |
[nullable] |
branch |
which branch to fetch (default: 'master'). |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakRemoteRef * flatpak_installation_fetch_remote_ref_sync_full (FlatpakInstallation *self
,const char *remote_name
,FlatpakRefKind kind
,const char *name
,const char *arch
,const char *branch
,FlatpakQueryFlags flags
,GCancellable *cancellable
,GError **error
);
Gets the current remote branch of a ref in the remote.
self |
||
remote_name |
the name of the remote |
|
kind |
what this ref contains (an FlatpakRefKind) |
|
name |
name of the app/runtime to fetch |
|
arch |
which architecture to fetch (default: current architecture). |
[nullable] |
branch |
which branch to fetch (default: 'master'). |
[nullable] |
flags |
set of FlatpakQueryFlags |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 1.3.3
gboolean flatpak_installation_fetch_remote_size_sync (FlatpakInstallation *self
,const char *remote_name
,FlatpakRef *ref
,guint64 *download_size
,guint64 *installed_size
,GCancellable *cancellable
,GError **error
);
Gets information about the maximum amount of data that needs to be transferred to pull the ref from a remote repository, and about the amount of local disk space that is required to check out this commit.
Note that if there are locally available data that are in the ref, which is common for instance if you're doing an update then the real download size may be smaller than what is returned here.
NOTE: Since 0.11.4 this information is accessible in FlatpakRemoteRef, so this function is not very useful anymore.
self |
||
remote_name |
the name of the remote |
|
ref |
the ref |
|
download_size |
return location for the (maximum) download size. |
[out] |
installed_size |
return location for the installed size. |
[out] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
char * flatpak_installation_load_app_overrides (FlatpakInstallation *self
,const char *app_id
,GCancellable *cancellable
,GError **error
);
Loads the metadata overrides file for an application.
self |
||
app_id |
an application id |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_update_appstream_sync (FlatpakInstallation *self
,const char *remote_name
,const char *arch
,gboolean *out_changed
,GCancellable *cancellable
,GError **error
);
Updates the local copy of appstream for remote_name
for the specified arch
.
If you need progress feedback, use flatpak_installation_update_appstream_full_sync()
.
self |
||
remote_name |
the name of the remote |
|
arch |
Architecture to update, or |
[nullable] |
out_changed |
Set to |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakInstalledRef * flatpak_installation_install_bundle (FlatpakInstallation *self
,GFile *file
,FlatpakProgressCallback progress
,gpointer progress_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_install_bundle
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_install_bundle()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_install_bundle()
instead. It has a lot more interesting features.
Install an application or runtime from an flatpak bundle file. See flatpak-build-bundle(1) for how to create bundles.
self |
||
file |
a GFile that is an flatpak bundle |
|
progress |
progress callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
FlatpakRemoteRef * flatpak_installation_install_ref_file (FlatpakInstallation *self
,GBytes *ref_file_data
,GCancellable *cancellable
,GError **error
);
flatpak_installation_install_ref_file
has been deprecated since version 1.7.0 and should not be used in newly-written code.
Use flatpak_transaction_add_install_flatpakref()
instead.
This is an old deprecated function, you should use
FlatpakTransaction and flatpak_transaction_add_install_flatpakref()
instead. It has a lot more interesting features.
Creates a remote based on the passed in .flatpakref file contents
in ref_file_data
and returns the FlatpakRemoteRef that can be used
to install it.
Note, the FlatpakRemoteRef will not have the commit field set, or other details, to
avoid unnecessary roundtrips. If you need that you have to resolve it
explicitly with flatpak_installation_fetch_remote_ref_sync()
.
self |
||
ref_file_data |
The ref file contents |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
a FlatpakRemoteRef if the remote has been added successfully, NULL
on error.
[transfer full]
Since: 0.6.10
gboolean flatpak_installation_drop_caches (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Drops all internal (in-memory) caches. For instance, this may be needed to pick up new or changed remotes configured outside this installation instance.
gboolean flatpak_installation_add_remote (FlatpakInstallation *self
,FlatpakRemote *remote
,gboolean if_needed
,GCancellable *cancellable
,GError **error
);
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.
self |
||
remote |
the new FlatpakRemote |
|
if_needed |
if |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 1.3.4
gboolean flatpak_installation_modify_remote (FlatpakInstallation *self
,FlatpakRemote *remote
,GCancellable *cancellable
,GError **error
);
Saves changes in the remote
object.
self |
||
remote |
the modified FlatpakRemote |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_remove_remote (FlatpakInstallation *self
,const char *name
,GCancellable *cancellable
,GError **error
);
Removes the remote with the given name from the installation.
self |
||
name |
the name of the remote to remove |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_update_remote_sync (FlatpakInstallation *self
,const char *name
,GCancellable *cancellable
,GError **error
);
Updates the local configuration of a remote repository by fetching the related information from the summary file in the remote OSTree repository and committing the changes to the local installation.
self |
||
name |
the name of the remote to update |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 0.6.13
gboolean flatpak_installation_cleanup_local_refs_sync (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Remove all OSTree refs from the local flatpak repository which are not
in a deployed state. The next time the underlying OSTree repo is pruned,
objects which were attached to that ref will be removed. This is useful if
you pulled a flatpak refs using flatpak_installation_install_full()
and
specified FLATPAK_INSTALL_FLAGS_NO_DEPLOY
but then decided not to
deploy the refs later on and want to remove the local refs to prevent them
from taking up disk space. Note that this will not remove the objects
referred to by ref
from the underlying OSTree repo, you should use
flatpak_installation_prune_local_repo()
to do that.
Since: 0.10.0
char * flatpak_installation_get_config (FlatpakInstallation *self
,const char *key
,GCancellable *cancellable
,GError **error
);
Get a global configuration option for the installation, see
flatpak_installation_set_config_sync()
for supported keys.
self |
||
key |
the name of the key to get |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
The (newly allocated) value, or NULL
on error (G_KEY_FILE_ERROR_KEY_NOT_FOUND
error if key is not set)
char ** flatpak_installation_get_default_languages (FlatpakInstallation *self
,GError **error
);
Get the default languages used by the installation to decide which subpaths to install of locale extensions. This list may also be used by frontends like GNOME Software to decide which language-specific apps to display. An empty array means that all languages should be installed.
A possibly empty array of strings, or NULL
on error.
[array zero-terminated=1][element-type utf8][transfer full]
Since: 1.5.0
char ** flatpak_installation_get_default_locales (FlatpakInstallation *self
,GError **error
);
Like flatpak_installation_get_default_languages()
but includes territory
information (e.g. en_US
rather than en
) which may be included in the
extra-languages
configuration.
Strings returned by this function are in the format specified by
setlocale()
: language[_territory][.codeset][@modifier]
.
A possibly empty array of locale strings, or NULL
on error.
[array zero-terminated=1][element-type utf8][transfer full]
Since: 1.5.1
gboolean flatpak_installation_prune_local_repo (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Remove all orphaned OSTree objects from the underlying OSTree repo in
self
.
Since: 0.10.0
gboolean flatpak_installation_remove_local_ref_sync (FlatpakInstallation *self
,const char *remote_name
,const char *ref
,GCancellable *cancellable
,GError **error
);
Remove the OSTree ref given by remote_name
:ref
from the local flatpak
repository. The next time the underlying OSTree repo is pruned, objects
which were attached to that ref will be removed. This is useful if you
pulled a flatpak ref using flatpak_installation_install_full()
and
specified FLATPAK_INSTALL_FLAGS_NO_DEPLOY
but then decided not to
deploy the ref later on and want to remove the local ref to prevent it
from taking up disk space. Note that this will not remove the objects
referred to by ref
from the underlying OSTree repo, you should use
flatpak_installation_prune_local_repo()
to do that.
self |
||
remote_name |
the name of the remote |
|
ref |
the ref |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
Since: 0.10.0
gboolean flatpak_installation_set_config_sync (FlatpakInstallation *self
,const char *key
,const char *value
,GCancellable *cancellable
,GError **error
);
Set a global configuration option for the installation, currently
the only supported keys are languages
, which is a semicolon-separated
list of language codes like "sv;en;pl"
, or ""
to mean all languages,
and extra-languages
, which is a semicolon-separated list of locale
identifiers like "en;en_DK;zh_HK.big5hkscs;uz_UZ.utf8@cyrillic"
.
self |
||
key |
the name of the key to set |
|
value |
the new value, or |
|
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_update_appstream_full_sync (FlatpakInstallation *self
,const char *remote_name
,const char *arch
,FlatpakProgressCallback progress
,gpointer progress_data
,gboolean *out_changed
,GCancellable *cancellable
,GError **error
);
Updates the local copy of appstream for remote_name
for the specified arch
.
self |
||
remote_name |
the name of the remote |
|
arch |
Architecture to update, or |
[nullable] |
progress |
progress callback. |
[scope call][nullable] |
progress_data |
user data passed to |
[closure progress][nullable] |
out_changed |
Set to |
[nullable] |
cancellable |
a GCancellable. |
[nullable] |
error |
return location for a GError |
gboolean flatpak_installation_run_triggers (FlatpakInstallation *self
,GCancellable *cancellable
,GError **error
);
Run the trigger commands to update the files exported by the apps in
self
. Should be used after one or more app install, upgrade or
uninstall operations with the FLATPAK_INSTALL_FLAGS_NO_TRIGGERS
,
FLATPAK_UPDATE_FLAGS_NO_TRIGGERS
or FLATPAK_UNINSTALL_FLAGS_NO_TRIGGERS
flags set.
Since: 1.0.3
const char *
flatpak_get_default_arch (void
);
Returns the canonical name for the arch of the current machine.
const char *const *
flatpak_get_supported_arches (void
);
Returns the canonical names for the arches that are supported (i.e. can run) on the current machine, in order of priority (default is first).
GPtrArray * flatpak_get_system_installations (GCancellable *cancellable
,GError **error
);
Lists the system installations according to the current configuration and current availability (e.g. doesn't return a configured installation if not reachable).
a GPtrArray of FlatpakInstallation instances.
[transfer container][element-type FlatpakInstallation]
Since: 0.8
void (*FlatpakProgressCallback) (const char *status
,guint progress
,gboolean estimating
,gpointer user_data
);
The progress callback is called repeatedly during long-running operations such as installations or updates, and can be used to update progress information in a user interface.
The callback occurs in the thread-default context of the caller.
Flags to alter the behavior of e.g flatpak_installation_list_remote_refs_sync_full()
.
Default |
||
Don't do any network i/o, but only return cached data. This can return stale data, or a FLATPAK_ERROR_NOT_CACHED error, however it is a lot more efficient if you're doing many requests. |
||
Only list refs available from sideload repos; see flatpak(1). (Since: 1.7) |
||
Include refs from all arches, not just the primary ones. (Since: 1.11.2) |
Since: 1.3.3
Flags to alter the behavior of flatpak_installation_update()
.
Fetch remote builds and install the latest one (default) |
||
Don't install any new builds that might be fetched |
||
Don't try to fetch new builds from the remote repo |
||
Don't use static deltas when pulling |
||
Don't prune the local OSTree repository after updating (Since: 0.11.8) |
||
Don't call triggers after updating. If used,
the caller must later call |
Flags to alter the behavior of flatpak_installation_install_full()
.
Default |
||
Don't use static deltas when pulling |
||
Don't install any new builds that might be fetched |
||
Don't try to fetch new builds from the remote repo |
||
Don't call triggers after installing. If used,
the caller must later call |
Flags to alter the behavior of flatpak_installation_uninstall_full()
.
Default |
||
Don't prune the local OSTree repository after uninstalling |
||
Don't call triggers after uninstalling. If used,
the caller must later call |
Since: 0.11.8
Flags to alter the behavior of flatpak_installation_launch_full()
.
Default |
||
Do not reap the child. Use this if you want to wait
for the child with |