apt  0.9.14.1+nmu1
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
static bool const checkLanguage(std::string Lang, bool const All=false)
Are we interested in the given Language?
Definition: aptconfiguration.cc:323
static bool const checkArchitecture(std::string const &Arch)
Are we interested in the given Architecture?
Definition: aptconfiguration.cc:443
static std::vector< std::string > const getLanguages(bool const &All=false, bool const &Cached=true, char const **const Locale=0)
Returns a vector of Language Codes.
Definition: aptconfiguration.cc:118
static std::vector< std::string > const getCompressorExtensions()
Return a vector of extensions supported for data.tar&#39;s.
Definition: aptconfiguration.cc:527
static std::vector< Compressor > const getCompressors(bool const Cached=true)
Return a vector of Compressors supported for data.tar&#39;s.
Definition: aptconfiguration.cc:484
static std::vector< std::string > const getArchitectures(bool const &Cached=true)
Returns a vector of Architectures we support.
Definition: aptconfiguration.cc:334
Representation of supported compressors.
Definition: aptconfiguration.h:95
Provide access methods to various configuration settings.
Definition: aptconfiguration.h:19
static std::vector< std::string > const getCompressionTypes(bool const &Cached=true)
Returns a vector of usable Compression Types.
Definition: aptconfiguration.cc:34