summaryrefslogtreecommitdiff
path: root/lib/xdg-app-bundle-ref.h
blob: 9abf1be8a236c72889c335c897b75bb5e011c581 (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
/*
 * Copyright © 2015 Red Hat, Inc
 *
 * This program 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 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *       Alexander Larsson <alexl@redhat.com>
 */

#if !defined (__XDG_APP_H_INSIDE__) && !defined (XDG_APP_COMPILATION)
#error "Only <xdg-app.h> can be included directly."
#endif

#ifndef __XDG_APP_BUNDLE_REF_H__
#define __XDG_APP_BUNDLE_REF_H__

typedef struct _XdgAppBundleRef XdgAppBundleRef;

#include <gio/gio.h>
#include <xdg-app-ref.h>

#define XDG_APP_TYPE_BUNDLE_REF xdg_app_bundle_ref_get_type()
#define XDG_APP_BUNDLE_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XDG_APP_TYPE_BUNDLE_REF, XdgAppBundleRef))
#define XDG_APP_IS_BUNDLE_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XDG_APP_TYPE_BUNDLE_REF))

XDG_APP_EXTERN GType xdg_app_bundle_ref_get_type (void);

struct _XdgAppBundleRef {
  XdgAppRef parent;
};

typedef struct {
  XdgAppRefClass parent_class;
} XdgAppBundleRefClass;

XDG_APP_EXTERN XdgAppBundleRef *xdg_app_bundle_ref_new            (GFile *file,
                                                                   GError **error);
XDG_APP_EXTERN GFile           *xdg_app_bundle_ref_get_file       (XdgAppBundleRef *self);
XDG_APP_EXTERN GBytes          *xdg_app_bundle_ref_get_metadata   (XdgAppBundleRef  *self);
XDG_APP_EXTERN GBytes          *xdg_app_bundle_ref_get_appstream  (XdgAppBundleRef  *self);
XDG_APP_EXTERN GBytes          *xdg_app_bundle_ref_get_icon       (XdgAppBundleRef  *self,
                                                                   int               size);
XDG_APP_EXTERN char            *xdg_app_bundle_ref_get_origin     (XdgAppBundleRef  *self);
XDG_APP_EXTERN guint64          xdg_app_bundle_ref_get_installed_size (XdgAppBundleRef  *self);


#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(XdgAppBundleRef, g_object_unref)
#endif

#endif /* __XDG_APP_BUNDLE_REF_H__ */