summaryrefslogtreecommitdiff
path: root/backend/pkgtools.h
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-02-03 14:50:26 +0100
committerEugen Wissner <belka@caraus.de>2026-02-03 14:50:26 +0100
commit97efcb4faa6de6a7a0ba19c483f3e69ef1fbf48d (patch)
treed1488b5b196e1c89191a2b06cfb79df1698ac42c /backend/pkgtools.h
parentda02080fc1db3be9275832b7ad929165b1a38e3e (diff)
downloadkatja-97efcb4faa6de6a7a0ba19c483f3e69ef1fbf48d.tar.gz
Add currently existing PackageKit backend
Diffstat (limited to 'backend/pkgtools.h')
-rw-r--r--backend/pkgtools.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/backend/pkgtools.h b/backend/pkgtools.h
new file mode 100644
index 0000000..cedf315
--- /dev/null
+++ b/backend/pkgtools.h
@@ -0,0 +1,36 @@
+#ifndef __SLACK_PKGTOOLS_H
+#define __SLACK_PKGTOOLS_H
+
+#include <glib-object.h>
+#include <pk-backend.h>
+
+namespace slack {
+
+class Pkgtools
+{
+public:
+ const gchar *get_name () const noexcept;
+ const gchar *get_mirror () const noexcept;
+ guint8 get_order () const noexcept;
+ gboolean is_blacklisted (const gchar *pkg) const noexcept;
+
+ virtual ~Pkgtools () noexcept;
+
+ gboolean download (PkBackendJob *job,
+ gchar *dest_dir_name, gchar *pkg_name) noexcept;
+ void install (PkBackendJob *job, gchar *pkg_name) noexcept;
+
+ virtual GSList *collect_cache_info (const gchar *tmpl) noexcept = 0;
+ virtual void generate_cache (PkBackendJob *job,
+ const gchar *tmpl) noexcept = 0;
+
+protected:
+ gchar *name = NULL;
+ gchar *mirror = NULL;
+ guint8 order;
+ GRegex *blacklist = NULL;
+};
+
+}
+
+#endif /* __SLACK_PKGTOOLS_H */