Remove cruft from Makefile
[mspang/inapt.git] / inapt.h
1 #include <vector>
2 #include <apt-pkg/pkgcache.h>
3
4 struct inapt_conditional;
5 struct inapt_package;
6
7 struct inapt_action {
8     enum action_t { INSTALL, REMOVE } action;
9     std::vector<std::string> predicates;
10     std::vector<inapt_package *> packages;
11 };
12
13 struct inapt_package {
14     enum inapt_action::action_t action;
15     std::vector<std::string> alternates;
16     std::vector<std::string> predicates;
17     pkgCache::PkgIterator pkg;
18     const char *filename;
19     int linenum;
20 };
21
22 struct inapt_profiles {
23     std::vector<std::string> predicates;
24     std::vector<std::string> profiles;
25 };
26
27 struct inapt_block {
28     std::vector<inapt_action *> actions;
29     std::vector<inapt_conditional *> children;
30     std::vector<inapt_profiles *> profiles;
31 };
32
33 struct inapt_conditional {
34     std::vector<std::string> predicates;
35     struct inapt_block *then_block;
36     struct inapt_block *else_block;
37 };
38
39 void parser(const char *filename, inapt_block *context);