File: pkgtools.h

package info (click to toggle)
packagekit 1.2.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 11,224 kB
  • sloc: ansic: 52,083; cpp: 10,938; xml: 4,828; python: 3,791; sh: 269; perl: 60; makefile: 53
file content (36 lines) | stat: -rw-r--r-- 811 bytes parent folder | download | duplicates (4)
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
#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 */