Line | |
---|
1 | |
---|
2 | #ifndef _LLIUREX_APT_COMMANDS_ |
---|
3 | #define _LLIUREX_APT_COMMANDS_ |
---|
4 | |
---|
5 | #include "Sources.hpp" |
---|
6 | |
---|
7 | #include <vector> |
---|
8 | #include <map> |
---|
9 | |
---|
10 | #define CONF_PATH "/usr/share/lliurex-apt/sources/conf.d/" |
---|
11 | #define SOURCES_LIST "/etc/apt/sources.list" |
---|
12 | |
---|
13 | namespace net |
---|
14 | { |
---|
15 | namespace lliurex |
---|
16 | { |
---|
17 | namespace apt |
---|
18 | { |
---|
19 | namespace command |
---|
20 | { |
---|
21 | |
---|
22 | class Match |
---|
23 | { |
---|
24 | public: |
---|
25 | |
---|
26 | Sources * sources; |
---|
27 | FindLineStatus status; |
---|
28 | |
---|
29 | Match(Sources * source,FindLineStatus status); |
---|
30 | }; |
---|
31 | |
---|
32 | /*! |
---|
33 | Inits gio and glib |
---|
34 | */ |
---|
35 | void Init(); |
---|
36 | |
---|
37 | /*! |
---|
38 | Loads setup |
---|
39 | */ |
---|
40 | std::vector<Sources> LoadConf(); |
---|
41 | |
---|
42 | /*! |
---|
43 | Prints sources.list to stdout |
---|
44 | */ |
---|
45 | void Show(); |
---|
46 | |
---|
47 | /*! |
---|
48 | List installed setups |
---|
49 | */ |
---|
50 | void List(std::vector<Sources> & conf); |
---|
51 | |
---|
52 | |
---|
53 | /*! |
---|
54 | Analyzes a given input source and a list of available setups, and |
---|
55 | returns a vector of matches |
---|
56 | */ |
---|
57 | std::vector<Match> Check(Sources & src,std::vector<Sources> & conf); |
---|
58 | |
---|
59 | /*! |
---|
60 | Create a source using an input and a set of targets |
---|
61 | */ |
---|
62 | Sources Set(Sources & isrc,std::vector<Sources> & conf, |
---|
63 | std::vector<std::string> & targets,bool reset=false); |
---|
64 | |
---|
65 | /*! |
---|
66 | Adds a source line to a source |
---|
67 | */ |
---|
68 | Sources Add(Sources & isrc,std::string line); |
---|
69 | |
---|
70 | |
---|
71 | |
---|
72 | } |
---|
73 | } |
---|
74 | } |
---|
75 | } |
---|
76 | |
---|
77 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.