apt  0.9.7.9
aptconfiguration.h
1 // -*- mode: cpp; mode: fold -*-
2 // Description /*{{{*/
10  /*}}}*/
11 #ifndef APT_CONFIGURATION_H
12 #define APT_CONFIGURATION_H
13 // Include Files /*{{{*/
14 #include <string>
15 #include <vector>
16 #include <limits>
17  /*}}}*/
18 namespace APT {
19 class Configuration { /*{{{*/
20 public: /*{{{*/
42  std::vector<std::string> static const getCompressionTypes(bool const &Cached = true);
43 
67  std::vector<std::string> static const getLanguages(bool const &All = false,
68  bool const &Cached = true, char const ** const Locale = 0);
69 
76  bool static const checkLanguage(std::string Lang, bool const All = false);
77 
85  std::vector<std::string> static const getArchitectures(bool const &Cached = true);
86 
92  bool static const checkArchitecture(std::string const &Arch);
93 
95  struct Compressor {
96  std::string Name;
97  std::string Extension;
98  std::string Binary;
99  std::vector<std::string> CompressArgs;
100  std::vector<std::string> UncompressArgs;
101  unsigned short Cost;
102 
103  Compressor(char const *name, char const *extension, char const *binary,
104  char const *compressArg, char const *uncompressArg,
105  unsigned short const cost);
106  Compressor() : Cost(std::numeric_limits<unsigned short>::max()) {};
107  };
108 
116  std::vector<Compressor> static const getCompressors(bool const Cached = true);
117 
119  std::vector<std::string> static const getCompressorExtensions();
120  /*}}}*/
121  private: /*{{{*/
122  void static setDefaultConfigurationForCompressors();
123  /*}}}*/
124 };
125  /*}}}*/
126 }
127 #endif