apt  0.9.7.3
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 
77  std::vector<std::string> static const getArchitectures(bool const &Cached = true);
78 
84  bool static const checkArchitecture(std::string const &Arch);
85 
87  struct Compressor {
88  std::string Name;
89  std::string Extension;
90  std::string Binary;
91  std::vector<std::string> CompressArgs;
92  std::vector<std::string> UncompressArgs;
93  unsigned short Cost;
94 
95  Compressor(char const *name, char const *extension, char const *binary,
96  char const *compressArg, char const *uncompressArg,
97  unsigned short const cost);
98  Compressor() : Cost(std::numeric_limits<unsigned short>::max()) {};
99  };
100 
108  std::vector<Compressor> static const getCompressors(bool const Cached = true);
109 
111  std::vector<std::string> static const getCompressorExtensions();
112  /*}}}*/
113  private: /*{{{*/
114  void static setDefaultConfigurationForCompressors();
115  /*}}}*/
116 };
117  /*}}}*/
118 }
119 #endif