summaryrefslogtreecommitdiffstats
path: root/lib/gs-app.h
blob: 5240b2ede5f44442b31c582631f36f5695f8ae97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 * vi:set noexpandtab tabstop=8 shiftwidth=8:
 *
 * Copyright (C) 2013-2018 Richard Hughes <richard@hughsie.com>
 * Copyright (C) 2014-2018 Kalev Lember <klember@redhat.com>
 *
 * SPDX-License-Identifier: GPL-2.0+
 */

#pragma once

#include <glib-object.h>
#include <gdk/gdk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <libsoup/soup.h>
#include <appstream.h>

#include <gs-app-permissions.h>

G_BEGIN_DECLS

/* Dependency loop means we can’t include the header. */
typedef struct _GsPlugin GsPlugin;
typedef struct _GsAppList GsAppList;

#define GS_TYPE_APP (gs_app_get_type ())

G_DECLARE_DERIVABLE_TYPE (GsApp, gs_app, GS, APP, GObject)

struct _GsAppClass
{
	GObjectClass		 parent_class;
	void			 (*to_string)	(GsApp		*app,
						 GString	*str);
	gpointer		 padding[30];
};

/**
 * GsAppState:
 * @GS_APP_STATE_UNKNOWN:			Unknown state
 * @GS_APP_STATE_INSTALLED:			Application is installed
 * @GS_APP_STATE_AVAILABLE:			Application is available
 * @GS_APP_STATE_AVAILABLE_LOCAL:		Application is locally available as a file
 * @GS_APP_STATE_UPDATABLE:			Application is installed and updatable
 * @GS_APP_STATE_UNAVAILABLE:			Application is referenced, but not available
 * @GS_APP_STATE_QUEUED_FOR_INSTALL:		Application is queued for install
 * @GS_APP_STATE_INSTALLING:			Application is being installed
 * @GS_APP_STATE_REMOVING:			Application is being removed
 * @GS_APP_STATE_UPDATABLE_LIVE:		Application is installed and updatable live
 * @GS_APP_STATE_PURCHASABLE:			Application is available for purchasing
 * @GS_APP_STATE_PURCHASING:			Application is being purchased
 * @GS_APP_STATE_PENDING_INSTALL:		Application is installed, but may have pending some actions,
 *						like restart, to finish it
 * @GS_APP_STATE_PENDING_REMOVE:		Application is removed, but may have pending some actions,
 *						like restart, to finish it
 *
 * The application state.
 **/
typedef enum {
	GS_APP_STATE_UNKNOWN,				/* Since: 0.2.2 */
	GS_APP_STATE_INSTALLED,				/* Since: 0.2.2 */
	GS_APP_STATE_AVAILABLE,				/* Since: 0.2.2 */
	GS_APP_STATE_AVAILABLE_LOCAL,			/* Since: 0.2.2 */
	GS_APP_STATE_UPDATABLE,				/* Since: 0.2.2 */
	GS_APP_STATE_UNAVAILABLE,			/* Since: 0.2.2 */
	GS_APP_STATE_QUEUED_FOR_INSTALL,		/* Since: 0.2.2 */
	GS_APP_STATE_INSTALLING,			/* Since: 0.2.2 */
	GS_APP_STATE_REMOVING,				/* Since: 0.2.2 */
	GS_APP_STATE_UPDATABLE_LIVE,			/* Since: 0.5.4 */
	GS_APP_STATE_PURCHASABLE,			/* Since: 0.5.17 */
	GS_APP_STATE_PURCHASING,			/* Since: 0.5.17 */
	GS_APP_STATE_PENDING_INSTALL,			/* Since: 41 */
	GS_APP_STATE_PENDING_REMOVE,			/* Since: 41 */
	GS_APP_STATE_LAST  /*< skip >*/
} GsAppState;

/**
 * GsAppSpecialKind:
 * @GS_APP_SPECIAL_KIND_NONE:			No special occupation
 * @GS_APP_SPECIAL_KIND_OS_UPDATE:		Application represents an OS update
 *
 * 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.
 **/
typedef enum {
	GS_APP_SPECIAL_KIND_NONE,		/* Since: 40 */
	GS_APP_SPECIAL_KIND_OS_UPDATE,		/* Since: 40 */
} GsAppSpecialKind;

/**
 * GsAppKudo:
 * @GS_APP_KUDO_MY_LANGUAGE:		Localised in my language
 * @GS_APP_KUDO_RECENT_RELEASE:		Released recently
 * @GS_APP_KUDO_FEATURED_RECOMMENDED:	Chosen for the front page
 * @GS_APP_KUDO_MODERN_TOOLKIT:		Uses a modern toolkit
 * @GS_APP_KUDO_SEARCH_PROVIDER:	Provides a search provider
 * @GS_APP_KUDO_INSTALLS_USER_DOCS:	Installs user docs
 * @GS_APP_KUDO_USES_NOTIFICATIONS:	Registers notifications
 * @GS_APP_KUDO_HAS_KEYWORDS:		Has at least 1 keyword
 * @GS_APP_KUDO_HAS_SCREENSHOTS:	Supplies screenshots
 * @GS_APP_KUDO_HIGH_CONTRAST:		Installs a high contrast icon
 * @GS_APP_KUDO_HI_DPI_ICON:		Installs a HiDPI icon
 * @GS_APP_KUDO_SANDBOXED:		Application is sandboxed
 * @GS_APP_KUDO_SANDBOXED_SECURE:	Application is sandboxed securely
 *
 * Any awards given to the application.
 **/
typedef enum {
	GS_APP_KUDO_MY_LANGUAGE			= 1 << 0,
	GS_APP_KUDO_RECENT_RELEASE		= 1 << 1,
	GS_APP_KUDO_FEATURED_RECOMMENDED	= 1 << 2,
	GS_APP_KUDO_MODERN_TOOLKIT		= 1 << 3,
	GS_APP_KUDO_SEARCH_PROVIDER		= 1 << 4,
	GS_APP_KUDO_INSTALLS_USER_DOCS		= 1 << 5,
	GS_APP_KUDO_USES_NOTIFICATIONS		= 1 << 6,
	GS_APP_KUDO_HAS_KEYWORDS		= 1 << 7,
	GS_APP_KUDO_HAS_SCREENSHOTS		= 1 << 9,
	GS_APP_KUDO_HIGH_CONTRAST		= 1 << 13,
	GS_APP_KUDO_HI_DPI_ICON			= 1 << 14,
	GS_APP_KUDO_SANDBOXED			= 1 << 15,
	GS_APP_KUDO_SANDBOXED_SECURE		= 1 << 16,
	GS_APP_KUDO_LAST  /*< skip >*/
} GsAppKudo;

/**
 * GsAppQuirk:
 * @GS_APP_QUIRK_NONE:			No special attributes
 * @GS_APP_QUIRK_PROVENANCE:		Installed by OS vendor
 * @GS_APP_QUIRK_COMPULSORY:		Cannot be removed
 * @GS_APP_QUIRK_HAS_SOURCE:		Has a source to allow staying up-to-date
 * @GS_APP_QUIRK_IS_WILDCARD:		Matches applications from any plugin
 * @GS_APP_QUIRK_NEEDS_REBOOT:		A reboot is required after the action
 * @GS_APP_QUIRK_NOT_REVIEWABLE:	The app is not reviewable
 * @GS_APP_QUIRK_NOT_LAUNCHABLE:	The app is not launchable (run-able)
 * @GS_APP_QUIRK_NEEDS_USER_ACTION:	The component requires some kind of user action
 * @GS_APP_QUIRK_IS_PROXY:		Is a proxy app that operates on other applications
 * @GS_APP_QUIRK_REMOVABLE_HARDWARE:	The device is unusable whilst the action is performed
 * @GS_APP_QUIRK_DEVELOPER_VERIFIED:	The app developer has been verified
 * @GS_APP_QUIRK_PARENTAL_FILTER:	The app has been filtered by parental controls, and should be hidden
 * @GS_APP_QUIRK_NEW_PERMISSIONS:	The update requires new permissions
 * @GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE:	The app cannot be run by the current user due to parental controls, and should not be launchable
 * @GS_APP_QUIRK_HIDE_FROM_SEARCH:	The app should not be shown in search results
 * @GS_APP_QUIRK_HIDE_EVERYWHERE:	The app should not be shown anywhere (it’s blocklisted)
 * @GS_APP_QUIRK_DO_NOT_AUTO_UPDATE:	The app should not be automatically updated
 * @GS_APP_QUIRK_DEVELOPMENT_SOURCE:	The app is from a development source (Since: 43)
 *
 * The application attributes.
 **/
typedef enum {
	GS_APP_QUIRK_NONE		= 0,		/* Since: 3.32 */
	GS_APP_QUIRK_PROVENANCE		= 1 << 0,	/* Since: 3.32 */
	GS_APP_QUIRK_COMPULSORY		= 1 << 1,	/* Since: 3.32 */
	GS_APP_QUIRK_HAS_SOURCE		= 1 << 2,	/* Since: 3.32 */
	GS_APP_QUIRK_IS_WILDCARD	= 1 << 3,	/* Since: 3.32 */
	GS_APP_QUIRK_NEEDS_REBOOT	= 1 << 4,	/* Since: 3.32 */
	GS_APP_QUIRK_NOT_REVIEWABLE	= 1 << 5,	/* Since: 3.32 */
	/* there’s a hole here where GS_APP_QUIRK_HAS_SHORTCUT used to be */
	GS_APP_QUIRK_NOT_LAUNCHABLE	= 1 << 7,	/* Since: 3.32 */
	GS_APP_QUIRK_NEEDS_USER_ACTION	= 1 << 8,	/* Since: 3.32 */
	GS_APP_QUIRK_IS_PROXY 		= 1 << 9,	/* Since: 3.32 */
	GS_APP_QUIRK_REMOVABLE_HARDWARE	= 1 << 10,	/* Since: 3.32 */
	GS_APP_QUIRK_DEVELOPER_VERIFIED	= 1 << 11,	/* Since: 3.32 */
	GS_APP_QUIRK_PARENTAL_FILTER	= 1 << 12,	/* Since: 3.32 */
	GS_APP_QUIRK_NEW_PERMISSIONS	= 1 << 13,	/* Since: 3.32 */
	GS_APP_QUIRK_PARENTAL_NOT_LAUNCHABLE	= 1 << 14,	/* Since: 3.32 */
	GS_APP_QUIRK_HIDE_FROM_SEARCH	= 1 << 15,	/* Since: 3.32 */
	GS_APP_QUIRK_HIDE_EVERYWHERE	= 1 << 16,	/* Since: 3.36 */
	GS_APP_QUIRK_DO_NOT_AUTO_UPDATE	= 1 << 17,	/* Since: 3.36 */
	GS_APP_QUIRK_DEVELOPMENT_SOURCE	= 1 << 18,	/* Since: 43 */
	GS_APP_QUIRK_LAST  /*< skip >*/
} GsAppQuirk;

#define	GS_APP_INSTALL_DATE_UNSET		0
#define	GS_APP_INSTALL_DATE_UNKNOWN		1 /* 1s past the epoch */

/**
 * GsSizeType:
 * @GS_SIZE_TYPE_UNKNOWN:	Size is unknown
 * @GS_SIZE_TYPE_UNKNOWABLE:	Size is unknown and is impossible to calculate
 * @GS_SIZE_TYPE_VALID:		Size is known and valid
 *
 * Types of download or file size for applications.
 *
 * These are used to represent the validity of properties like
 * #GsApp:size-download.
 *
 * Since: 43
 */
typedef enum {
	GS_SIZE_TYPE_UNKNOWN,
	GS_SIZE_TYPE_UNKNOWABLE,
	GS_SIZE_TYPE_VALID,
} GsSizeType;

/**
 * GsAppQuality:
 * @GS_APP_QUALITY_UNKNOWN:	The quality value is unknown
 * @GS_APP_QUALITY_LOWEST:	Lowest quality
 * @GS_APP_QUALITY_NORMAL:	Normal quality
 * @GS_APP_QUALITY_HIGHEST:	Highest quality
 *
 * Any awards given to the application.
 **/
typedef enum {
	GS_APP_QUALITY_UNKNOWN,
	GS_APP_QUALITY_LOWEST,
	GS_APP_QUALITY_NORMAL,
	GS_APP_QUALITY_HIGHEST,
	GS_APP_QUALITY_LAST  /*< skip >*/
} GsAppQuality;

/**
 * GS_APP_PROGRESS_UNKNOWN:
 *
 * 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
 */
#define GS_APP_PROGRESS_UNKNOWN G_MAXUINT

const gchar 	*gs_app_state_to_string (GsAppState state);

GsApp		*gs_app_new			(const gchar	*id);
G_DEPRECATED_FOR(gs_app_set_from_unique_id)
GsApp		*gs_app_new_from_unique_id	(const gchar	*unique_id);
void		 gs_app_set_from_unique_id	(GsApp		*app,
						 const gchar	*unique_id,
						 AsComponentKind kind);
gchar		*gs_app_to_string		(GsApp		*app);
void		 gs_app_to_string_append	(GsApp		*app,
						 GString	*str);

const gchar	*gs_app_get_id			(GsApp		*app);
void		 gs_app_set_id			(GsApp		*app,
						 const gchar	*id);
AsComponentKind	 gs_app_get_kind		(GsApp		*app);
void		 gs_app_set_kind		(GsApp		*app,
						 AsComponentKind kind);
GsAppState	 gs_app_get_state		(GsApp		*app);
void		 gs_app_set_state		(GsApp		*app,
						 GsAppState	 state);
AsComponentScope gs_app_get_scope		(GsApp		*app);
void		 gs_app_set_scope		(GsApp		*app,
						 AsComponentScope scope);
AsBundleKind	 gs_app_get_bundle_kind		(GsApp		*app);
void		 gs_app_set_bundle_kind		(GsApp		*app,
						 AsBundleKind	 bundle_kind);
GsAppSpecialKind gs_app_get_special_kind	(GsApp		*app);
void		 gs_app_set_special_kind	(GsApp		*app,
						 GsAppSpecialKind kind);
void		 gs_app_set_state_recover	(GsApp		*app);
guint		 gs_app_get_progress		(GsApp		*app);
void		 gs_app_set_progress		(GsApp		*app,
						 guint		 percentage);
gboolean	gs_app_get_allow_cancel		(GsApp	*app);
void		gs_app_set_allow_cancel		 (GsApp	*app,
						  gboolean	allow_cancel);
const gchar	*gs_app_get_unique_id		(GsApp		*app);
const gchar	*gs_app_get_branch		(GsApp		*app);
void		 gs_app_set_branch		(GsApp		*app,
						 const gchar	*branch);
const gchar	*gs_app_get_name		(GsApp		*app);
void		 gs_app_set_name		(GsApp		*app,
						 GsAppQuality	 quality,
						 const gchar	*name);
const gchar	*gs_app_get_renamed_from	(GsApp		*app);
void		 gs_app_set_renamed_from	(GsApp		*app,
						 const gchar	*renamed_from);
const gchar	*gs_app_get_source_default	(GsApp		*app);
void		 gs_app_add_source		(GsApp		*app,
						 const gchar	*source);
GPtrArray	*gs_app_get_sources		(GsApp		*app);
void		 gs_app_set_sources		(GsApp		*app,
						 GPtrArray	*sources);
const gchar	*gs_app_get_source_id_default	(GsApp		*app);
void		 gs_app_add_source_id		(GsApp		*app,
						 const gchar	*source_id);
GPtrArray	*gs_app_get_source_ids		(GsApp		*app);
void		 gs_app_set_source_ids		(GsApp		*app,
						 GPtrArray	*source_ids);
void		 gs_app_clear_source_ids	(GsApp		*app);
const gchar	*gs_app_get_project_group	(GsApp		*app);
void		 gs_app_set_project_group	(GsApp		*app,
						 const gchar	*project_group);
const gchar	*gs_app_get_developer_name	(GsApp		*app);
void		 gs_app_set_developer_name	(GsApp		*app,
						 const gchar	*developer_name);
const gchar	*gs_app_get_agreement		(GsApp		*app);
void		 gs_app_set_agreement		(GsApp		*app,
						 const gchar	*agreement);
const gchar	*gs_app_get_version		(GsApp		*app);
const gchar	*gs_app_get_version_ui		(GsApp		*app);
void		 gs_app_set_version		(GsApp		*app,
						 const gchar	*version);
const gchar	*gs_app_get_summary		(GsApp		*app);
void		 gs_app_set_summary		(GsApp		*app,
						 GsAppQuality	 quality,
						 const gchar	*summary);
const gchar	*gs_app_get_summary_missing	(GsApp		*app);
void		 gs_app_set_summary_missing	(GsApp		*app,
						 const gchar	*summary_missing);
const gchar	*gs_app_get_description		(GsApp		*app);
void		 gs_app_set_description		(GsApp		*app,
						 GsAppQuality	 quality,
						 const gchar	*description);
const gchar	*gs_app_get_url			(GsApp		*app,
						 AsUrlKind	 kind);
void		 gs_app_set_url			(GsApp		*app,
						 AsUrlKind	 kind,
						 const gchar	*url);
const gchar	*gs_app_get_url_missing		(GsApp		*app);
void		 gs_app_set_url_missing		(GsApp		*app,
						 const gchar	*url);
const gchar	*gs_app_get_launchable		(GsApp		*app,
						 AsLaunchableKind kind);
void		 gs_app_set_launchable		(GsApp		*app,
						 AsLaunchableKind kind,
						 const gchar	*launchable);
const gchar	*gs_app_get_license		(GsApp		*app);
gboolean	 gs_app_get_license_is_free	(GsApp		*app);
void		 gs_app_set_license		(GsApp		*app,
						 GsAppQuality	 quality,
						 const gchar	*license);
gchar		**gs_app_get_menu_path		(GsApp		*app);
void		 gs_app_set_menu_path		(GsApp		*app,
						 gchar		**menu_path);
const gchar	*gs_app_get_origin		(GsApp		*app);
void		 gs_app_set_origin		(GsApp		*app,
						 const gchar	*origin);
const gchar	*gs_app_get_origin_appstream	(GsApp		*app);
void		 gs_app_set_origin_appstream	(GsApp		*app,
						 const gchar	*origin_appstream);
const gchar	*gs_app_get_origin_hostname	(GsApp		*app);
void		 gs_app_set_origin_hostname	(GsApp		*app,
						 const gchar	*origin_hostname);
GPtrArray	*gs_app_get_screenshots		(GsApp		*app);
void		 gs_app_add_screenshot		(GsApp		*app,
						 AsScreenshot	*screenshot);
AsScreenshot	*gs_app_get_action_screenshot	(GsApp		*app);
void		 gs_app_set_action_screenshot	(GsApp		*app,
						 AsScreenshot	*screenshot);
const gchar	*gs_app_get_update_version	(GsApp		*app);
const gchar	*gs_app_get_update_version_ui	(GsApp		*app);
void		 gs_app_set_update_version	(GsApp		*app,
						 const gchar	*update_version);
const gchar	*gs_app_get_update_details_markup
						(GsApp		*app);
void		 gs_app_set_update_details_markup
						(GsApp		*app,
						 const gchar	*markup);
void		 gs_app_set_update_details_text	(GsApp		*app,
						 const gchar	*text);
AsUrgencyKind	 gs_app_get_update_urgency	(GsApp		*app);
void		 gs_app_set_update_urgency	(GsApp		*app,
						 AsUrgencyKind	 update_urgency);
GsPlugin	*gs_app_dup_management_plugin	(GsApp		*app);
gboolean	 gs_app_has_management_plugin	(GsApp		*app,
						 GsPlugin	*plugin);
void		 gs_app_set_management_plugin	(GsApp		*app,
						 GsPlugin	*management_plugin);
GIcon		*gs_app_get_icon_for_size	(GsApp		*app,
						 guint		 size,
						 guint		 scale,
						 const gchar	*fallback_icon_name);
GPtrArray	*gs_app_get_icons		(GsApp		*app);
void		 gs_app_add_icon		(GsApp		*app,
						 GIcon		*icon);
void		 gs_app_remove_all_icons	(GsApp		*app);
GFile		*gs_app_get_local_file		(GsApp		*app);
void		 gs_app_set_local_file		(GsApp		*app,
						 GFile		*local_file);
AsContentRating	*gs_app_dup_content_rating	(GsApp		*app);
void		 gs_app_set_content_rating	(GsApp		*app,
						 AsContentRating *content_rating);
GsApp		*gs_app_get_runtime		(GsApp		*app);
void		 gs_app_set_runtime		(GsApp		*app,
						 GsApp		*runtime);
const gchar	*gs_app_get_metadata_item	(GsApp		*app,
						 const gchar	*key);
GVariant	*gs_app_get_metadata_variant	(GsApp		*app,
						 const gchar	*key);
void		 gs_app_set_metadata		(GsApp		*app,
						 const gchar	*key,
						 const gchar	*value);
void		 gs_app_set_metadata_variant	(GsApp		*app,
						 const gchar	*key,
						 GVariant	*value);
gint		 gs_app_get_rating		(GsApp		*app);
void		 gs_app_set_rating		(GsApp		*app,
						 gint		 rating);
GArray		*gs_app_get_review_ratings	(GsApp		*app);
void		 gs_app_set_review_ratings	(GsApp		*app,
						 GArray		*review_ratings);
GPtrArray	*gs_app_get_reviews		(GsApp		*app);
void		 gs_app_add_review		(GsApp		*app,
						 AsReview	*review);
void		 gs_app_remove_review		(GsApp		*app,
						 AsReview	*review);
GPtrArray	*gs_app_get_provided		(GsApp		*app);
AsProvided	*gs_app_get_provided_for_kind	(GsApp		*app,
						 AsProvidedKind kind);
void		 gs_app_add_provided_item	(GsApp		*app,
						 AsProvidedKind kind,
						 const gchar	*item);
GsSizeType	 gs_app_get_size_installed	(GsApp		*app,
						 guint64	*size_bytes_out);
void		 gs_app_set_size_installed	(GsApp		*app,
						 GsSizeType	 size_type,
						 guint64	 size_bytes);
GsSizeType	 gs_app_get_size_installed_dependencies
						(GsApp		*app,
						 guint64	*size_bytes_out);
GsSizeType	 gs_app_get_size_user_data	(GsApp		*app,
						 guint64	*size_bytes_out);
void		 gs_app_set_size_user_data	(GsApp		*app,
						 GsSizeType	 size_type,
						 guint64	 size_bytes);
GsSizeType	 gs_app_get_size_cache_data	(GsApp		*app,
						 guint64	*size_bytes_out);
void		 gs_app_set_size_cache_data	(GsApp		*app,
						 GsSizeType	 size_type,
						 guint64	 size_bytes);
GsSizeType	 gs_app_get_size_download	(GsApp		*app,
						 guint64	*size_bytes_out);
void		 gs_app_set_size_download	(GsApp		*app,
						 GsSizeType	 size_type,
						 guint64	 size_bytes);
GsSizeType	 gs_app_get_size_download_dependencies
						(GsApp		*app,
						 guint64	*size_bytes_out);
void		 gs_app_add_related		(GsApp		*app,
						 GsApp		*app2);
void		 gs_app_add_addons		(GsApp		*app,
						 GsAppList	*addons);
void		 gs_app_add_history		(GsApp		*app,
						 GsApp		*app2);
guint64		 gs_app_get_install_date	(GsApp		*app);
void		 gs_app_set_install_date	(GsApp		*app,
						 guint64	 install_date);
guint64		 gs_app_get_release_date	(GsApp		*app);
void		 gs_app_set_release_date	(GsApp		*app,
						 guint64	 release_date);
GPtrArray	*gs_app_get_categories		(GsApp		*app);
void		 gs_app_set_categories		(GsApp		*app,
						 GPtrArray	*categories);
GArray		*gs_app_get_key_colors		(GsApp		*app);
void		 gs_app_set_key_colors		(GsApp		*app,
						 GArray		*key_colors);
void		 gs_app_add_key_color		(GsApp		*app,
						 GdkRGBA	*key_color);
gboolean	gs_app_get_user_key_colors	(GsApp		*app);
void            gs_app_set_is_update_downloaded (GsApp         *app,
                                                 gboolean       is_update_downloaded);
gboolean        gs_app_get_is_update_downloaded (GsApp         *app);
gboolean	 gs_app_has_category		(GsApp		*app,
						 const gchar	*category);
void		 gs_app_add_category		(GsApp		*app,
						 const gchar	*category);
gboolean	 gs_app_remove_category		(GsApp		*app,
						 const gchar	*category);
void		 gs_app_add_kudo		(GsApp		*app,
						 GsAppKudo	 kudo);
void		 gs_app_remove_kudo		(GsApp		*app,
						 GsAppKudo	 kudo);
gboolean	 gs_app_has_kudo		(GsApp		*app,
						 GsAppKudo	 kudo);
guint64		 gs_app_get_kudos		(GsApp		*app);
guint		 gs_app_get_kudos_percentage	(GsApp		*app);
gboolean	 gs_app_get_to_be_installed	(GsApp		*app);
void		 gs_app_set_to_be_installed	(GsApp		*app,
						 gboolean	 to_be_installed);
void		 gs_app_set_match_value		(GsApp		*app,
						 guint		 match_value);
guint		 gs_app_get_match_value		(GsApp		*app);

gboolean	 gs_app_has_quirk		(GsApp		*app,
						 GsAppQuirk	 quirk);
void		 gs_app_add_quirk		(GsApp		*app,
						 GsAppQuirk	 quirk);
void		 gs_app_remove_quirk		(GsApp		*app,
						 GsAppQuirk	 quirk);
gboolean	 gs_app_is_installed		(GsApp		*app);
gboolean	 gs_app_is_updatable		(GsApp		*app);
gchar		*gs_app_dup_origin_ui		(GsApp		*app,
						 gboolean	 with_packaging_format);
void		 gs_app_set_origin_ui		(GsApp		*app,
						 const gchar	*origin_ui);
gchar		*gs_app_get_packaging_format	(GsApp		*app);
const gchar	*gs_app_get_packaging_format_raw(GsApp *app);
void		 gs_app_subsume_metadata	(GsApp		*app,
						 GsApp		*donor);
GsAppPermissions *
		 gs_app_dup_permissions		(GsApp		*app);
void		 gs_app_set_permissions		(GsApp		*app,
						 GsAppPermissions *permissions);
GsAppPermissions *
		 gs_app_dup_update_permissions	(GsApp		*app);
void		 gs_app_set_update_permissions	(GsApp		*app,
						 GsAppPermissions *update_permissions);
GPtrArray	*gs_app_get_version_history	(GsApp		*app);
void		 gs_app_set_version_history	(GsApp		*app,
						 GPtrArray	*version_history);
void		gs_app_ensure_icons_downloaded	(GsApp		*app,
						 SoupSession	*soup_session,
						 guint		 maximum_icon_size,
						 GCancellable	*cancellable);

GPtrArray	*gs_app_get_relations		(GsApp		*app);
void		 gs_app_add_relation		(GsApp		*app,
						 AsRelation	*relation);
void		 gs_app_set_relations		(GsApp		*app,
						 GPtrArray	*relations);

gboolean	 gs_app_get_has_translations	(GsApp		*app);
void		 gs_app_set_has_translations	(GsApp		*app,
						 gboolean	 has_translations);
gboolean	 gs_app_is_downloaded		(GsApp		*app);

G_END_DECLS