~azzar1/snapd-glib-fork/glib-2-40

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
/*
 * Copyright (C) 2016 Canonical Ltd.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2 or version 3 of the License.
 * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
 */

#ifndef __SNAPD_SNAP_H__
#define __SNAPD_SNAP_H__

#if !defined(__SNAPD_GLIB_INSIDE__) && !defined(SNAPD_COMPILATION)
#error "Only <snapd-glib/snapd-glib.h> can be included directly."
#endif

#include <glib-object.h>
#include <snapd-glib/snapd-price.h>

G_BEGIN_DECLS

#define SNAPD_TYPE_SNAP  (snapd_snap_get_type ())

G_DECLARE_FINAL_TYPE (SnapdSnap, snapd_snap, SNAPD, SNAP, GObject)

struct _SnapdSnapClass
{
    /*< private >*/
    GObjectClass parent_class;
};

typedef enum
{
    SNAPD_CONFINEMENT_UNKNOWN,
    SNAPD_CONFINEMENT_STRICT,
    SNAPD_CONFINEMENT_DEVMODE
} SnapdConfinement;

typedef enum
{
    SNAPD_SNAP_TYPE_UNKNOWN,
    SNAPD_SNAP_TYPE_APP,
    SNAPD_SNAP_TYPE_KERNEL,
    SNAPD_SNAP_TYPE_GADGET,
    SNAPD_SNAP_TYPE_OS
} SnapdSnapType;

typedef enum
{
    SNAPD_SNAP_STATUS_UNKNOWN,
    SNAPD_SNAP_STATUS_AVAILABLE,
    SNAPD_SNAP_STATUS_PRICED,
    SNAPD_SNAP_STATUS_INSTALLED,
    SNAPD_SNAP_STATUS_ACTIVE
} SnapdSnapStatus;

GPtrArray        *snapd_snap_get_apps           (SnapdSnap *snap);

const gchar      *snapd_snap_get_channel        (SnapdSnap *snap);

SnapdConfinement  snapd_snap_get_confinement    (SnapdSnap *snap);

const gchar      *snapd_snap_get_description    (SnapdSnap *snap);

const gchar      *snapd_snap_get_developer      (SnapdSnap *snap);

gboolean          snapd_snap_get_devmode        (SnapdSnap *snap);

gint64            snapd_snap_get_download_size  (SnapdSnap *snap);

const gchar      *snapd_snap_get_icon           (SnapdSnap *snap);

const gchar      *snapd_snap_get_id             (SnapdSnap *snap);

GDateTime        *snapd_snap_get_install_date   (SnapdSnap *snap);

gint64            snapd_snap_get_installed_size (SnapdSnap *snap);

const gchar      *snapd_snap_get_name           (SnapdSnap *snap);

GPtrArray        *snapd_snap_get_prices         (SnapdSnap *snap);

gboolean          snapd_snap_get_private        (SnapdSnap *snap);

const gchar      *snapd_snap_get_revision       (SnapdSnap *snap);

SnapdSnapType     snapd_snap_get_snap_type      (SnapdSnap *snap);

SnapdSnapStatus   snapd_snap_get_status         (SnapdSnap *snap);

const gchar      *snapd_snap_get_summary        (SnapdSnap *snap);

gboolean          snapd_snap_get_trymode        (SnapdSnap *snap);

const gchar      *snapd_snap_get_version        (SnapdSnap *snap);

G_END_DECLS

#endif /* __SNAPD_SNAP_H__ */