-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdatatypes.h
84 lines (73 loc) · 2.06 KB
/
datatypes.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
72
73
74
75
76
77
78
79
80
81
82
83
84
/**
* this file is part of kawa
* Copyright (c) 2020-2021 Emily <elishikawa@jagudev.net>
*
* kawa is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* kawa 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with kawa. If not, see <https://www.gnu.org/licenses/>.
**/
#ifndef DATATYPES_H
#define DATATYPES_H
enum pkgtype{source, patch, meta, binary};
enum license{GPLv1, GPLv2, GPLv3, LGPLv1, LGPLv2, LGPLv21, LGPLv3, BSD, FREEOTHER, OTHER, CCBYSA, ZLIB, PUBLICDOMAIN, OSLv3, MIT, OPENSSL, PSFL, APACHE, APACHEv2, VIM};
enum scripts{preinstall, preupdate, dobuild, doinstall, postinstall, postupdate};
struct strarr_retval {
int retc;
char **retval;
};
struct repository {
char reponame[127];
char repourl[511];
char baseurl[511];
};
struct repolist {
int repo_count;
struct repository **repos;
};
struct package {
char *name;
char *description;
char *version;
char *archiveurl;
char *maintainer;
struct strarr_retval depends;
struct strarr_retval conflicts;
char *configurecmd;
struct strarr_retval configureopts;
char *type;
char *sepbuild;
char *uninstallcmd;
char *license;
struct strarr_retval scripts;
int *repoindex;
};
struct pkglist {
int pkg_count;
struct repolist *repos;
struct package **packages;
};
struct ll_node {
struct package current;
struct ll_node *next;
struct ll_node *prev;
};
struct pkg_update {
char *name;
char *version_local;
char *version_remote;
};
struct ll_node_update {
struct pkg_update current;
struct ll_node_update *next;
struct ll_node_update *prev;
};
#endif // DATATYPES_H