summaryrefslogtreecommitdiff
path: root/libappstream-builder/asb-app.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-06-17 11:52:49 +0100
committerRichard Hughes <richard@hughsie.com>2014-06-17 12:01:32 +0100
commit1284b3fa0addf21070c6d9ce697623a04862cdde (patch)
treea9ecf1b4d984e41e56179ebd6453288dd712843e /libappstream-builder/asb-app.h
parent0ec1dd10ee2281d4f6e102e4e8da8365332540b1 (diff)
downloadappstream-glib-1284b3fa0addf21070c6d9ce697623a04862cdde.tar.gz
Add libappstream-builder from the createrepo_as project
Diffstat (limited to 'libappstream-builder/asb-app.h')
-rw-r--r--libappstream-builder/asb-app.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/libappstream-builder/asb-app.h b/libappstream-builder/asb-app.h
new file mode 100644
index 0000000..f31f579
--- /dev/null
+++ b/libappstream-builder/asb-app.h
@@ -0,0 +1,86 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2014 Richard Hughes <richard@hughsie.com>
+ *
+ * Licensed under the GNU Lesser General Public License Version 2.1
+ *
+ * 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.1 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, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef ASB_APP_H
+#define ASB_APP_H
+
+#include <stdarg.h>
+#include <glib-object.h>
+#include <appstream-glib.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+#include "asb-package.h"
+
+#define ASB_TYPE_APP (asb_app_get_type())
+#define ASB_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ASB_TYPE_APP, AsbApp))
+#define ASB_APP_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST((cls), ASB_TYPE_APP, AsbAppClass))
+#define ASB_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ASB_TYPE_APP))
+#define ASB_IS_APP_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE((cls), ASB_TYPE_APP))
+#define ASB_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ASB_TYPE_APP, AsbAppClass))
+
+G_BEGIN_DECLS
+
+typedef struct _AsbApp AsbApp;
+typedef struct _AsbAppClass AsbAppClass;
+
+struct _AsbApp
+{
+ AsApp parent;
+};
+
+struct _AsbAppClass
+{
+ AsAppClass parent_class;
+};
+
+GType asb_app_get_type (void);
+
+
+AsbApp *asb_app_new (AsbPackage *pkg,
+ const gchar *id_full);
+gchar *asb_app_to_xml (AsbApp *app);
+void asb_app_add_veto (AsbApp *app,
+ const gchar *fmt,
+ ...)
+ G_GNUC_PRINTF(2,3);
+void asb_app_add_requires_appdata (AsbApp *app,
+ const gchar *fmt,
+ ...)
+ G_GNUC_PRINTF(2,3);
+void asb_app_set_requires_appdata (AsbApp *app,
+ gboolean requires_appdata);
+void asb_app_set_pixbuf (AsbApp *app,
+ GdkPixbuf *pixbuf);
+gboolean asb_app_add_screenshot_source (AsbApp *app,
+ const gchar *filename,
+ GError **error);
+
+GPtrArray *asb_app_get_requires_appdata (AsbApp *app);
+GPtrArray *asb_app_get_vetos (AsbApp *app);
+AsbPackage *asb_app_get_package (AsbApp *app);
+
+gboolean asb_app_save_resources (AsbApp *app,
+ GError **error);
+
+
+G_END_DECLS
+
+#endif /* ASB_APP_H */