Top | ![]() |
![]() |
![]() |
![]() |
#define | GS_TYPE_APP |
struct | GsAppClass |
enum | GsAppState |
enum | GsAppSpecialKind |
enum | GsAppKudo |
enum | GsAppQuirk |
#define | GS_APP_INSTALL_DATE_UNSET |
#define | GS_APP_INSTALL_DATE_UNKNOWN |
#define | GS_APP_SIZE_UNKNOWABLE |
enum | GsAppQuality |
enum | GsAppPermissions |
#define | LIMITED_PERMISSIONS |
#define | MEDIUM_PERMISSIONS |
#define | GS_APP_PROGRESS_UNKNOWN |
GsApp |
For GsApps of kind AS_COMPONENT_KIND_DESKTOP_APP
, this object represents a 1:1 mapping
to a .desktop file. The design is such so you can't have different GsApp's for different
versions or architectures of a package. For other AppStream component types, GsApp maps
their properties and AS_COMPONENT_KIND_GENERIC
is used if their type is a generic software
component. For GNOME Software specific app-like entries, which don't correspond to desktop
files or distinct software components, but e.g. represent a system update and its individual
components, use the separate GsAppSpecialKind enum and gs_app_set_special_kind
while setting
the AppStream component-kind to generic.
The GsPluginLoader de-duplicates the GsApp instances that are produced by plugins to ensure that there is a single instance of GsApp for each id, making the id the primary key for this object. This ensures that actions triggered on a GsApp in different parts of gnome-software can be observed by connecting to signals on the GsApp.
Information about other GsApp objects can be stored in this object, for
instance in the gs_app_add_related()
method or gs_app_get_history()
.
const gchar *
gs_app_state_to_string (GsAppState state
);
Converts the enumerated value to an text representation.
GsApp *
gs_app_new (const gchar *id
);
Creates a new application object.
The ID should only be set when the application ID (with optional prefix) is
known; it is perfectly valid to use gs_app_new()
with an id
of NULL
, and
then relying on another plugin to set the id
using gs_app_set_id()
based on
some other information.
For instance, a GsApp is created with no ID when returning results from the packagekit plugin, but with the default source name set as the package name. The source name is read by the appstream plugin, and if matched in the AppStream XML the correct ID is set, along with other higher quality data like the application icon and long description.
Since: 3.22
GsApp *
gs_app_new_from_unique_id (const gchar *unique_id
);
gs_app_new_from_unique_id
is deprecated and should not be used in newly-written code.
Creates a new application object.
The unique ID will be parsed to set some information in the application such
as the scope, bundle kind, id, etc. Unlike gs_app_new()
, it cannot take a
NULL
argument.
unique_id |
an application unique ID, e.g.
|
Since: 3.22
void gs_app_set_from_unique_id (GsApp *app
,const gchar *unique_id
,AsComponentKind kind
);
Sets details on an application object.
The unique ID will be parsed to set some information in the application such as the scope, bundle kind, id, etc.
app |
a GsApp |
|
unique_id |
an application unique ID, e.g.
|
Since: 3.26
gchar *
gs_app_to_string (GsApp *app
);
Converts the application to a string. This is not designed to serialize the object but to produce a string suitable for debugging.
Since: 3.22
void gs_app_to_string_append (GsApp *app
,GString *str
);
Appends the application to an existing string.
Since: 3.26
AsComponentKind
gs_app_get_kind (GsApp *app
);
Gets the kind of the application.
Since: 40
void gs_app_set_kind (GsApp *app
,AsComponentKind kind
);
This sets the kind of the application.
The following state diagram explains the typical states.
All applications start with kind AS_COMPONENT_KIND_UNKNOWN
.
1 2 3 |
PACKAGE --> NORMAL PACKAGE --> SYSTEM NORMAL --> SYSTEM |
Since: 40
GsAppState
gs_app_get_state (GsApp *app
);
Gets the state of the application.
Since: 40
void gs_app_set_state (GsApp *app
,GsAppState state
);
This sets the state of the application.
The following state diagram explains the typical states.
All applications start in state GS_APP_STATE_UNKNOWN
,
but the frontend is not supposed to see GsApps with this state.
Plugins are responsible for changing the state to one of the other states before the GsApp is passed to the frontend.
1 2 3 4 5 6 |
UPDATABLE --> INSTALLING --> INSTALLED UPDATABLE --> REMOVING --> AVAILABLE INSTALLED --> REMOVING --> AVAILABLE AVAILABLE --> INSTALLING --> INSTALLED AVAILABLE <--> QUEUED --> INSTALLING --> INSTALLED UNKNOWN --> UNAVAILABLE |
Since: 3.22
AsComponentScope
gs_app_get_scope (GsApp *app
);
Gets the scope of the application.
Since: 40
void gs_app_set_scope (GsApp *app
,AsComponentScope scope
);
This sets the scope of the application.
Since: 40
AsBundleKind
gs_app_get_bundle_kind (GsApp *app
);
Gets the bundle kind of the application.
Since: 40
void gs_app_set_bundle_kind (GsApp *app
,AsBundleKind bundle_kind
);
This sets the bundle kind of the application.
Since: 40
GsAppSpecialKind
gs_app_get_special_kind (GsApp *app
);
Gets the special occupation of the application.
Since: 40
void gs_app_set_special_kind (GsApp *app
,GsAppSpecialKind kind
);
This sets the special occupation of the application (making
the AsComponentKind of this application AS_COMPONENT_KIND_GENERIC
per definition).
Since: 40
void
gs_app_set_state_recover (GsApp *app
);
Sets the application state to the last status value that was not transient.
Since: 3.22
guint
gs_app_get_progress (GsApp *app
);
Gets the percentage completion.
Since: 3.22
void gs_app_set_progress (GsApp *app
,guint percentage
);
This sets the progress completion of the application. Use
GS_APP_PROGRESS_UNKNOWN
if the progress is unknown or has a wide confidence
interval.
If called more than once with the same value then subsequent calls will be ignored.
app |
a GsApp |
|
percentage |
a percentage progress (0–100 inclusive), or |
Since: 3.22
gboolean
gs_app_get_allow_cancel (GsApp *app
);
Gets whether the app's installation or upgrade can be cancelled.
Since: 3.26
void gs_app_set_allow_cancel (GsApp *app
,gboolean allow_cancel
);
This sets a flag indicating whether the operation can be cancelled or not. This is used by the UI to set the "Cancel" button insensitive as appropriate.
Since: 3.26
const gchar *
gs_app_get_unique_id (GsApp *app
);
Gets the unique application ID used for de-duplication.
If nothing has been set the value from gs_app_get_id()
will be used.
Since: 3.22
const gchar *
gs_app_get_branch (GsApp *app
);
Gets the application branch.
Since: 3.22
void gs_app_set_branch (GsApp *app
,const gchar *branch
);
Sets the application branch.
Since: 3.22
const gchar *
gs_app_get_name (GsApp *app
);
Gets the application name.
Since: 3.22
void gs_app_set_name (GsApp *app
,GsAppQuality quality
,const gchar *name
);
Sets the application name.
app |
a GsApp |
|
quality |
A GsAppQuality, e.g. |
|
name |
The short localized name, e.g. "Calculator" |
Since: 3.22
const gchar *
gs_app_get_renamed_from (GsApp *app
);
Gets the old human-readable name of an application that's being renamed, the
same name that was returned by gs_app_get_name()
before the rename.
Since: 40
void gs_app_set_renamed_from (GsApp *app
,const gchar *renamed_from
);
Sets the old name of an application that's being renamed
Since: 40
const gchar *
gs_app_get_source_default (GsApp *app
);
Gets the default source.
Since: 3.22
void gs_app_add_source (GsApp *app
,const gchar *source
);
Adds a source name for the application.
Since: 3.22
GPtrArray *
gs_app_get_sources (GsApp *app
);
Gets the list of sources for the application.
Since: 3.22
void gs_app_set_sources (GsApp *app
,GPtrArray *sources
);
This name is used for the update page if the application is collected into the 'OS Updates' group. It is typically the package names, although this should not be relied upon.
Since: 3.22
const gchar *
gs_app_get_source_id_default (GsApp *app
);
Gets the default source ID.
Since: 3.22
void gs_app_add_source_id (GsApp *app
,const gchar *source_id
);
Adds a source ID to the application.
Since: 3.22
GPtrArray *
gs_app_get_source_ids (GsApp *app
);
Gets the list of source IDs.
Since: 3.22
void gs_app_set_source_ids (GsApp *app
,GPtrArray *source_ids
);
This ID is used internally to the controlling plugin.
app |
a GsApp |
|
source_ids |
The source-id, e.g. ["gnome-calculator;0.134;fedora"] or ["/home/hughsie/.local/share/applications/0ad.desktop"] |
Since: 3.22
void
gs_app_clear_source_ids (GsApp *app
);
Clear the list of source IDs.
Since: 3.22
const gchar *
gs_app_get_project_group (GsApp *app
);
Gets a project group for the application. Applications belonging to other project groups may not be shown in this software center.
Since: 3.22
void gs_app_set_project_group (GsApp *app
,const gchar *project_group
);
Sets a project group for the application.
Since: 3.22
const gchar *
gs_app_get_developer_name (GsApp *app
);
Gets the developer name for the application.
Since: 3.22
void gs_app_set_developer_name (GsApp *app
,const gchar *developer_name
);
Sets a developer name for the application.
Since: 3.22
const gchar *
gs_app_get_agreement (GsApp *app
);
Gets the agreement text for the application.
Since: 3.28
void gs_app_set_agreement (GsApp *app
,const gchar *agreement
);
Sets the application end-user agreement (e.g. a EULA) in AppStream description format.
Since: 3.28
const gchar *
gs_app_get_version (GsApp *app
);
Gets the exact version for the application.
Since: 3.22
const gchar *
gs_app_get_version_ui (GsApp *app
);
Gets a version string that can be displayed in a UI.
Since: 3.22
void gs_app_set_version (GsApp *app
,const gchar *version
);
This saves the version after stripping out any non-friendly parts, such as distro tags, git revisions and that kind of thing.
Since: 3.22
const gchar *
gs_app_get_summary (GsApp *app
);
Gets the single-line description of the application.
Since: 3.22
void gs_app_set_summary (GsApp *app
,GsAppQuality quality
,const gchar *summary
);
The medium length one-line localized name.
app |
a GsApp |
|
quality |
a GsAppQuality, e.g. |
|
summary |
a string, e.g. "A graphical calculator for GNOME" |
Since: 3.22
const gchar *
gs_app_get_summary_missing (GsApp *app
);
Gets the one-line summary to use when this application is missing.
Since: 3.22
void gs_app_set_summary_missing (GsApp *app
,const gchar *summary_missing
);
Sets the one-line summary to use when this application is missing.
Since: 3.22
const gchar *
gs_app_get_description (GsApp *app
);
Gets the long multi-line description of the application.
Since: 3.22
void gs_app_set_description (GsApp *app
,GsAppQuality quality
,const gchar *description
);
Sets the long multi-line description of the application.
app |
a GsApp |
|
quality |
a GsAppQuality, e.g. |
|
description |
a string, e.g. "GNOME Calculator is a graphical calculator for GNOME..." |
Since: 3.22
const gchar * gs_app_get_url (GsApp *app
,AsUrlKind kind
);
Gets a web address of a specific type.
Since: 40
void gs_app_set_url (GsApp *app
,AsUrlKind kind
,const gchar *url
);
Sets a web address of a specific type.
app |
a GsApp |
|
kind |
a AsUrlKind, e.g. |
|
url |
a web URL, e.g. "http://www.hughsie.com/" |
Since: 40
const gchar *
gs_app_get_url_missing (GsApp *app
);
Gets a web address for the application with explanations why it does not have an installation candidate.
Since: 40
void gs_app_set_url_missing (GsApp *app
,const gchar *url
);
Sets a web address containing explanations why this app does not have an installation candidate.
Since: 40
const gchar * gs_app_get_launchable (GsApp *app
,AsLaunchableKind kind
);
Gets a launchable of a specific type.
Since: 40
void gs_app_set_launchable (GsApp *app
,AsLaunchableKind kind
,const gchar *launchable
);
Sets a launchable of a specific type.
app |
a GsApp |
|
kind |
a AsLaunchableKind, e.g. |
|
launchable |
a way to launch, e.g. "org.gnome.Sysprof2.desktop" |
Since: 40
const gchar *
gs_app_get_license (GsApp *app
);
Gets the project license of the application.
Since: 3.22
gboolean
gs_app_get_license_is_free (GsApp *app
);
Returns if the application is free software.
Since: 3.22
void gs_app_set_license (GsApp *app
,GsAppQuality quality
,const gchar *license
);
Sets the project licenses used in the application.
app |
a GsApp |
|
quality |
a GsAppQuality, e.g. |
|
license |
a SPDX license string, e.g. "GPL-3.0 AND LGPL-2.0+" |
Since: 3.22
gchar **
gs_app_get_menu_path (GsApp *app
);
Returns the menu path which is an array of path elements. The resulting array is an internal structure and must not be modified or freed.
Since: 3.22
void gs_app_set_menu_path (GsApp *app
,gchar **menu_path
);
Sets the new menu path. The menu path is an array of path elements. This function creates a deep copy of the path.
Since: 3.22
const gchar *
gs_app_get_origin (GsApp *app
);
Gets the origin for the application, e.g. "fedora".
Since: 3.22
void gs_app_set_origin (GsApp *app
,const gchar *origin
);
The origin is the original source of the application e.g. "fedora-updates"
Since: 3.22
const gchar *
gs_app_get_origin_appstream (GsApp *app
);
Gets the appstream origin for the application, e.g. "fedora".
Since: 3.28
void gs_app_set_origin_appstream (GsApp *app
,const gchar *origin_appstream
);
The appstream origin is the appstream source of the application e.g. "fedora"
Since: 3.28
const gchar *
gs_app_get_origin_hostname (GsApp *app
);
Gets the hostname of the origin used to install the application, e.g. "fedoraproject.org" or "sdk.gnome.org".
Since: 3.22
void gs_app_set_origin_hostname (GsApp *app
,const gchar *origin_hostname
);
The origin is the hostname of the source used to install the application e.g. "fedoraproject.org"
You can also use a full URL as origin_hostname
and this will be parsed and
the hostname extracted. This process will also remove any unnecessary DNS
prefixes like "download" or "mirrors".
Since: 3.22
GPtrArray *
gs_app_get_screenshots (GsApp *app
);
Gets the list of screenshots.
Since: 3.22
void gs_app_add_screenshot (GsApp *app
,AsScreenshot *screenshot
);
Adds a screenshot to the application.
Since: 40
AsScreenshot *
gs_app_get_action_screenshot (GsApp *app
);
Gets a screenshot for the pending user action.
Since: 40
void gs_app_set_action_screenshot (GsApp *app
,AsScreenshot *screenshot
);
Sets a screenshot used to represent the action.
Since: 40
const gchar *
gs_app_get_update_version (GsApp *app
);
Gets the newest update version.
Since: 3.22
const gchar *
gs_app_get_update_version_ui (GsApp *app
);
Gets the update version for the UI.
Since: 3.22
void gs_app_set_update_version (GsApp *app
,const gchar *update_version
);
Sets the new version number of the update.
Since: 3.22
const gchar *
gs_app_get_update_details (GsApp *app
);
Gets the multi-line description for the update.
Since: 3.22
void gs_app_set_update_details (GsApp *app
,const gchar *update_details
);
Sets the multi-line description for the update.
Since: 3.22
AsUrgencyKind
gs_app_get_update_urgency (GsApp *app
);
Gets the update urgency.
Since: 40
void gs_app_set_update_urgency (GsApp *app
,AsUrgencyKind update_urgency
);
Sets the update urgency.
Since: 40
const gchar *
gs_app_get_management_plugin (GsApp *app
);
Gets the management plugin. This is some metadata about the application which is used to work out which plugin should handle the install, remove or upgrade actions.
Typically plugins will just set this to the plugin name using
gs_plugin_get_name()
.
Since: 3.22
void gs_app_set_management_plugin (GsApp *app
,const gchar *management_plugin
);
The management plugin is the plugin that can handle doing install and remove operations on the GsApp. Typical values include "packagekit" and "flatpak"
It is an error to attempt to change the management plugin once it has been previously set or to try to use this function on a wildcard application.
Since: 3.22
GIcon * gs_app_get_icon_for_size (GsApp *app
,guint size
,guint scale
,const gchar *fallback_icon_name
);
Finds the most appropriate icon in the app
’s set of icons to be loaded at
the given size
×scale
to represent the application. This might be provided
by the backend at the given size
, or downsized from a larger icon provided
by the backend. The return value is guaranteed to be suitable for loading as
a pixbuf at size
, if it’s not NULL
.
If an image at least size
pixels in width isn’t available, and
fallback_icon_name
has not been provided, NULL
will be returned. If
fallback_icon_name
has been provided, a GIcon representing that will be
returned, and NULL
is guaranteed not to be returned.
Icons which come from a remote server (over HTTP or HTTPS) will be returned
as a pointer into a local cache, which may not have been populated. You must
call gs_remote_icon_ensure_cached()
on icons of type GsRemoteIcon to
download them; this function will not do that for you.
This function may do disk I/O or image resizing, but it will not do network I/O to load a pixbuf. It should be acceptable to call this from a UI thread.
Since: 40
GPtrArray *
gs_app_get_icons (GsApp *app
);
Gets the icons for the application.
This will never return an empty array; it will always return either NULL
or
a non-empty array.
an array of icons,
or NULL
if there are no icons.
[transfer none][element-type GIcon][nullable]
Since: 3.22
void gs_app_add_icon (GsApp *app
,GIcon *icon
);
Adds an icon to use for the application. If the first icon added cannot be loaded then the next one is tried.
Since: 40
void
gs_app_remove_all_icons (GsApp *app
);
Remove all icons from app
.
Since: 40
GFile *
gs_app_get_local_file (GsApp *app
);
Gets the file that backs this application, for instance this might be a local file in ~/Downloads that we are installing.
Since: 3.22
void gs_app_set_local_file (GsApp *app
,GFile *local_file
);
Sets the file that backs this application, for instance this might be a local file in ~/Downloads that we are installing.
Since: 3.22
AsContentRating *
gs_app_dup_content_rating (GsApp *app
);
Gets the content rating for this application.
Since: 41
void gs_app_set_content_rating (GsApp *app
,AsContentRating *content_rating
);
Sets the content rating for this application.
Since: 40
GsApp *
gs_app_get_runtime (GsApp *app
);
Gets the runtime for the installed application.
Since: 3.22
void gs_app_set_runtime (GsApp *app
,GsApp *runtime
);
Sets the runtime that the installed application requires.
Since: 3.22
const gchar * gs_app_get_metadata_item (GsApp *app
,const gchar *key
);
Gets some metadata for the application.
Is is expected that plugins namespace any plugin-specific metadata,
for example fwupd::device-id
.
Since: 3.22
GVariant * gs_app_get_metadata_variant (GsApp *app
,const gchar *key
);
Gets some metadata for the application. Is is expected that plugins namespace any plugin-specific metadata.
Since: 3.26
void gs_app_set_metadata (GsApp *app
,const gchar *key
,const gchar *value
);
Sets some metadata for the application. Is is expected that plugins namespace any plugin-specific metadata.
Since: 3.22
void gs_app_set_metadata_variant (GsApp *app
,const gchar *key
,GVariant *value
);
Sets some metadata for the application.
Is is expected that plugins namespace any plugin-specific metadata,
for example fwupd::device-id
.
Since: 3.26
gint
gs_app_get_rating (GsApp *app
);
Gets the percentage rating of the application, where 100 is 5 stars.
Since: 3.22
void gs_app_set_rating (GsApp *app
,gint rating
);
Gets the percentage rating of the application.
Since: 3.22
GArray *
gs_app_get_review_ratings (GsApp *app
);
Gets the review ratings.
Since: 3.22
void gs_app_set_review_ratings (GsApp *app
,GArray *review_ratings
);
Sets the review ratings.
Since: 3.22
GPtrArray *
gs_app_get_reviews (GsApp *app
);
Gets all the user-submitted reviews for the application.
Since: 3.22
void gs_app_add_review (GsApp *app
,AsReview *review
);
Adds a user-submitted review to the application.
Since: 40
void gs_app_remove_review (GsApp *app
,AsReview *review
);
Removes a user-submitted review to the application.
Since: 40
GPtrArray *
gs_app_get_provided (GsApp *app
);
Gets all the provided item sets for the application.
Since: 40
AsProvided * gs_app_get_provided_for_kind (GsApp *app
,AsProvidedKind kind
);
Get an AsProvided object for the given interface type, or NULL
if
none was found.
cpt |
a AsComponent instance. |
|
kind |
kind of the provided item, e.g. |
Since: 40
void gs_app_add_provided_item (GsApp *app
,AsProvidedKind kind
,const gchar *item
);
guint64
gs_app_get_size_installed (GsApp *app
);
Get the value of “size-installed”.
Since: 3.22
void gs_app_set_size_installed (GsApp *app
,guint64 size_installed
);
Sets the installed size of the application.
Since: 3.22
guint64
gs_app_get_size_installed_dependencies
(GsApp *app
);
Get the value of “size-installed-dependencies”.
Since: 41
guint64
gs_app_get_size_user_data (GsApp *app
);
Get the value of “size-user-data”.
Since: 41
void gs_app_set_size_user_data (GsApp *app
,guint64 size_user_data
);
Sets the user data size of the app
.
Since: 41
guint64
gs_app_get_size_cache_data (GsApp *app
);
Get the value of “size-cache-data”.
Since: 41
void gs_app_set_size_cache_data (GsApp *app
,guint64 size_cache_data
);
Sets the cache data size of the app
.
Since: 41
guint64
gs_app_get_size_download (GsApp *app
);
Get the value of “size-download”.
Since: 3.22
void gs_app_set_size_download (GsApp *app
,guint64 size_download
);
Sets the download size of the application, not including any required runtime.
Since: 3.22
guint64
gs_app_get_size_download_dependencies (GsApp *app
);
Get the value of “size-download-dependencies”.
Since: 41
void gs_app_add_related (GsApp *app
,GsApp *app2
);
Adds a related application.
Since: 3.22
void gs_app_add_addon (GsApp *app
,GsApp *addon
);
Adds an addon to the list of application addons.
Since: 3.22
void gs_app_add_history (GsApp *app
,GsApp *app2
);
Adds a history item for this package.
Since: 3.22
guint64
gs_app_get_install_date (GsApp *app
);
Gets the date that an application was installed.
Since: 3.22
void gs_app_set_install_date (GsApp *app
,guint64 install_date
);
Sets the date that an application was installed.
Since: 3.22
guint64
gs_app_get_release_date (GsApp *app
);
Gets the date that an application was released.
Since: 3.40
void gs_app_set_release_date (GsApp *app
,guint64 release_date
);
Sets the date that an application was released.
Since: 3.40
GPtrArray *
gs_app_get_categories (GsApp *app
);
Gets the list of categories for an application.
Since: 3.22
void gs_app_set_categories (GsApp *app
,GPtrArray *categories
);
Set the list of categories for an application.
Since: 3.22
GArray *
gs_app_get_key_colors (GsApp *app
);
Gets the key colors used in the application icon.
Since: 40
void gs_app_set_key_colors (GsApp *app
,GArray *key_colors
);
Sets the key colors used in the application icon.
Since: 40
void gs_app_add_key_color (GsApp *app
,GdkRGBA *key_color
);
Adds a key color used in the application icon.
Since: 3.22
void gs_app_set_is_update_downloaded (GsApp *app
,gboolean is_update_downloaded
);
Sets if the new update is already downloaded for the app.
Since: 3.36
gboolean
gs_app_get_is_update_downloaded (GsApp *app
);
Gets if the new update is already downloaded for the app and is locally available.
Since: 3.36
gboolean gs_app_has_category (GsApp *app
,const gchar *category
);
Checks if the application is in a specific category.
Since: 3.22
void gs_app_add_category (GsApp *app
,const gchar *category
);
Adds a category ID to an application.
Since: 3.22
gboolean gs_app_remove_category (GsApp *app
,const gchar *category
);
Removes an category ID from an application, it exists.
Since: 3.24
void gs_app_add_kudo (GsApp *app
,GsAppKudo kudo
);
Adds a kudo to the application.
Since: 3.22
void gs_app_remove_kudo (GsApp *app
,GsAppKudo kudo
);
Removes a kudo from the application.
Since: 3.30
gboolean gs_app_has_kudo (GsApp *app
,GsAppKudo kudo
);
Finds out if a kudo has been awarded by the application.
Since: 3.22
guint64
gs_app_get_kudos (GsApp *app
);
Gets all the kudos the application has been awarded.
Since: 3.22
guint
gs_app_get_kudos_percentage (GsApp *app
);
Gets the kudos, as a percentage value.
Since: 3.22
gboolean
gs_app_get_to_be_installed (GsApp *app
);
Gets if the application is queued for installation.
This is only set for addons when the user has selected some addons to be installed before installing the main application. Plugins should check all the addons for this property when installing main applications so that the chosen set of addons is also installed at the same time. This is never set when applications do not have addons.
Since: 3.22
void gs_app_set_to_be_installed (GsApp *app
,gboolean to_be_installed
);
Sets if the application is queued for installation.
Since: 3.22
void gs_app_set_match_value (GsApp *app
,guint match_value
);
Set a match quality value, where higher values correspond to a "better" search match, and should be shown above lower results.
Since: 3.22
guint
gs_app_get_match_value (GsApp *app
);
Get a match quality value, where higher values correspond to a "better" search match, and should be shown above lower results.
Note: This value is only valid when processing the result set and may be overwritten on subsequent searches if the plugin is using a cache.
Since: 3.22
gboolean gs_app_has_quirk (GsApp *app
,GsAppQuirk quirk
);
Finds out if an application has a specific quirk.
Since: 3.22
void gs_app_add_quirk (GsApp *app
,GsAppQuirk quirk
);
Adds a quirk to an application.
Since: 3.22
void gs_app_remove_quirk (GsApp *app
,GsAppQuirk quirk
);
Removes a quirk from an application.
Since: 3.22
gboolean
gs_app_is_installed (GsApp *app
);
Gets whether the app is installed or not.
Since: 3.22
gboolean
gs_app_is_updatable (GsApp *app
);
Gets whether the app is updatable or not.
Since: 3.22
gchar *
gs_app_get_origin_ui (GsApp *app
);
Gets the package origin that's suitable for UI use. i.e. The value of “origin-ui”.
Since: 3.32
void gs_app_set_origin_ui (GsApp *app
,const gchar *origin_ui
);
Set the value of “origin-ui”.
gchar *
gs_app_get_packaging_format (GsApp *app
);
Gets the packaging format, e.g. 'RPM' or 'Flatpak'.
Since: 3.32
const gchar *
gs_app_get_packaging_format_raw (GsApp *app
);
Similar to gs_app_get_packaging_format()
, but it does not return a newly
allocated string and the value is not suitable for the UI. Depending on
the plugin, it can be "deb", "flatpak", "package", "RPM", "snap", ....
Since: 41
void gs_app_subsume_metadata (GsApp *app
,GsApp *donor
);
Copies any metadata from donor
to app
.
Since: 3.32
void gs_app_set_update_permissions (GsApp *app
,GsAppPermissions update_permissions
);
GPtrArray *
gs_app_get_version_history (GsApp *app
);
Gets the list of past releases for an application (including the latest one).
a list, or
NULL
if the version history is not known.
[element-type AsRelease][transfer container][nullable]
Since: 41
void gs_app_set_version_history (GsApp *app
,GPtrArray *version_history
);
Set the list of past releases for an application (including the latest one).
app |
a GsApp |
|
version_history |
a set of entries
representing the version history, or |
[element-type AsRelease][nullable] |
Since: 40
void gs_app_ensure_icons_downloaded (GsApp *app
,SoupSession *soup_session
,guint maximum_icon_size
,GCancellable *cancellable
);
Ensure all remote icons in the app
's icons are locally cached.
Since: 41
GPtrArray *
gs_app_get_relations (GsApp *app
);
Gets the value of “relations”. NULL
is equivalent to an empty array.
The returned array should not be modified.
Since: 41
void gs_app_add_relation (GsApp *app
,AsRelation *relation
);
Adds relation
to “relations”. relation
must have all its properties
set already.
Since: 41
void gs_app_set_relations (GsApp *app
,GPtrArray *relations
);
Set “relations” to relations
, replacing its previous value. NULL
is
equivalent to an empty array.
app |
a GsApp |
|
relations |
a new set
of relations for “relations”; |
[element-type AsRelation][nullable][transfer none] |
Since: 41
gboolean
gs_app_get_has_translations (GsApp *app
);
Get the value of “has-translations”.
Since: 41
struct GsAppClass { GObjectClass parent_class; void (*to_string) (GsApp *app, GString *str); gpointer padding[30]; };
The application state.
Unknown state |
||
Application is installed |
||
Application is available |
||
Application is locally available as a file |
||
Application is installed and updatable |
||
Application is referenced, but not available |
||
Application is queued for install |
||
Application is being installed |
||
Application is being removed |
||
Application is installed and updatable live |
||
Application is available for purchasing |
||
Application is being purchased |
||
Application is installed, but may have pending some actions, like restart, to finish it |
||
Application is removed, but may have pending some actions, like restart, to finish it |
||
A special occupation for GsApp. AsComponentKind can not represent certain
GNOME Software specific features, like representing a GsApp as OS updates
which have no associated AppStream entry.
They are represented by a GsApp of kind AS_COMPONENT_KIND_GENERIC
and a value
from GsAppSpecialKind. which does not match any AppStream component type.
Any awards given to the application.
Localised in my language |
||
Released recently |
||
Chosen for the front page |
||
Uses a modern toolkit |
||
Provides a search provider |
||
Installs user docs |
||
Registers notifications |
||
Has at least 1 keyword |
||
Supplies screenshots |
||
Is popular |
||
Installs a high contrast icon |
||
Installs a HiDPI icon |
||
Application is sandboxed |
||
Application is sandboxed securely |
||
The application attributes.
No special attributes |
||
Installed by OS vendor |
||
Cannot be removed |
||
Has a source to allow staying up-to-date |
||
Matches applications from any plugin |
||
A reboot is required after the action |
||
The app is not reviewable |
||
The app has a shortcut in the system |
||
The app is not launchable (run-able) |
||
The component requires some kind of user action |
||
Is a proxy app that operates on other applications |
||
The device is unusable whilst the action is performed |
||
The app developer has been verified |
||
The app has been filtered by parental controls, and should be hidden |
||
The update requires new permissions |
||
The app cannot be run by the current user due to parental controls, and should not be launchable |
||
The app should not be shown in search results |
||
The app should not be shown anywhere (it’s blocklisted) |
||
The app should not be automatically updated |
||
#define GS_APP_PROGRESS_UNKNOWN G_MAXUINT
A value returned by gs_app_get_progress()
if the app’s progress is unknown
or has a wide confidence interval. Typically this would be represented in the
UI using a pulsing progress bar or spinner.
Since: 3.38