forked from borishonman/cydownload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.h
71 lines (65 loc) · 1.45 KB
/
types.h
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
63
64
65
66
67
68
69
70
71
#ifndef TYPES_H
#define TYPES_H
#include <QString>
#include <map>
typedef struct _Repo
{
QString url;
QString origin;
QString label;
QString suite;
QString version;
QString codename;
QString architectures;
QString components;
QString description;
} Repo;
typedef struct _Package
{
QString packageid;
QString version;
QString section;
QString maintainer;
QString depends;
QString architecture;
QString filename;
QString size;
QString installedsize;
QString md5sum;
QString description;
QString name;
QString author;
QString website;
QString depiction;
QString tags;
public:
static _Package null()
{
_Package pkg;
pkg.packageid = "";
pkg.version = "";
pkg.section = "";
pkg.maintainer = "";
pkg.depends = "";
pkg.architecture = "";
pkg.filename = "";
pkg.size = "";
pkg.installedsize = "";
pkg.md5sum = "";
pkg.description = "";
pkg.name = "";
pkg.author = "";
pkg.website = "";
pkg.depiction = "";
return pkg;
}
} Package;
struct strCmp {
bool operator()(QString const &a, QString const &b) const {
return a > b;
}
};
typedef std::map<QString, Package> PackageVersions;
typedef std::map<QString, PackageVersions, strCmp> PackageList;
typedef std::map<QString, PackageList, strCmp> SectionList;
#endif // TYPES_H