summaryrefslogtreecommitdiff
path: root/libappstream-builder/asb-plugin-loader.h
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-06-19 17:18:07 +0100
committerRichard Hughes <richard@hughsie.com>2014-06-19 18:23:29 +0100
commit45602f0e77a25a62b3af5e1b4c7a0cd815e54415 (patch)
treedafd7ddedd96c3e22b6b857ca4d332177cbc3485 /libappstream-builder/asb-plugin-loader.h
parentc7ea8bf5daabb5174ffac9a14fc70c510a9caf23 (diff)
downloadappstream-glib-45602f0e77a25a62b3af5e1b4c7a0cd815e54415.tar.gz
Convert AsbPluginLoader to an actual GObject
We want to start storing things in addition to the array of plugins (e.g. the AsbContext) so expand this out into an actual object. Also, this is an API change, but the whole of libappstream-builder is marked as 'Unstable' for now, and asb-plugin-loader.h has never been installed.
Diffstat (limited to 'libappstream-builder/asb-plugin-loader.h')
-rw-r--r--libappstream-builder/asb-plugin-loader.h67
1 files changed, 49 insertions, 18 deletions
diff --git a/libappstream-builder/asb-plugin-loader.h b/libappstream-builder/asb-plugin-loader.h
index 1630d2c..3e75bdb 100644
--- a/libappstream-builder/asb-plugin-loader.h
+++ b/libappstream-builder/asb-plugin-loader.h
@@ -19,30 +19,61 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __ASB_PLUGIN_LOADER_H
-#define __ASB_PLUGIN_LOADER_H
+#ifndef ASB_PLUGIN_LOADER_H
+#define ASB_PLUGIN_LOADER_H
-#include <glib.h>
+#include <glib-object.h>
#include "asb-plugin.h"
+#define ASB_TYPE_PLUGIN_LOADER (asb_plugin_loader_get_type())
+#define ASB_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ASB_TYPE_PLUGIN_LOADER, AsbPluginLoader))
+#define ASB_PLUGIN_LOADER_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST((cls), ASB_TYPE_PLUGIN_LOADER, AsbPluginLoaderClass))
+#define ASB_IS_PLUGIN_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ASB_TYPE_PLUGIN_LOADER))
+#define ASB_IS_PLUGIN_LOADER_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE((cls), ASB_TYPE_PLUGIN_LOADER))
+#define ASB_PLUGIN_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ASB_TYPE_PLUGIN_LOADER, AsbPluginLoaderClass))
+
G_BEGIN_DECLS
-gboolean asb_plugin_loader_setup (GPtrArray *plugins,
- GError **error);
-GPtrArray *asb_plugin_loader_get_globs (GPtrArray *plugins);
-void asb_plugin_loader_merge (GPtrArray *plugins,
- GList **apps);
-gboolean asb_plugin_loader_process_app (GPtrArray *plugins,
- AsbPackage *pkg,
- AsbApp *app,
- const gchar *tmpdir,
- GError **error);
-GPtrArray *asb_plugin_loader_new (void);
-void asb_plugin_loader_free (GPtrArray *plugins);
-AsbPlugin *asb_plugin_loader_match_fn (GPtrArray *plugins,
- const gchar *filename);
+typedef struct _AsbPluginLoader AsbPluginLoader;
+typedef struct _AsbPluginLoaderClass AsbPluginLoaderClass;
+
+struct _AsbPluginLoader
+{
+ GObject parent;
+};
+
+struct _AsbPluginLoaderClass
+{
+ GObjectClass parent_class;
+ /*< private >*/
+ void (*_as_reserved1) (void);
+ void (*_as_reserved2) (void);
+ void (*_as_reserved3) (void);
+ void (*_as_reserved4) (void);
+ void (*_as_reserved5) (void);
+ void (*_as_reserved6) (void);
+ void (*_as_reserved7) (void);
+ void (*_as_reserved8) (void);
+};
+
+GType asb_plugin_loader_get_type (void);
+AsbPluginLoader *asb_plugin_loader_new (AsbContext *ctx);
+
+gboolean asb_plugin_loader_setup (AsbPluginLoader *plugin_loader,
+ GError **error);
+GPtrArray *asb_plugin_loader_get_globs (AsbPluginLoader *plugin_loader);
+GPtrArray *asb_plugin_loader_get_plugins (AsbPluginLoader *plugin_loader);
+void asb_plugin_loader_merge (AsbPluginLoader *plugin_loader,
+ GList **apps);
+gboolean asb_plugin_loader_process_app (AsbPluginLoader *plugin_loader,
+ AsbPackage *pkg,
+ AsbApp *app,
+ const gchar *tmpdir,
+ GError **error);
+AsbPlugin *asb_plugin_loader_match_fn (AsbPluginLoader *plugin_loader,
+ const gchar *filename);
G_END_DECLS
-#endif /* __ASB_PLUGIN_LOADER_H */
+#endif /* ASB_PLUGIN_LOADER_H */