X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/03bef78461c6f443187b60799402624326843396..3af3768e1a0ae8519ac85fbe1eb4494eeb076fa2:/apt-pkg/aptconfiguration.h diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index e4bc5e683..dfed194ae 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -13,6 +13,7 @@ // Include Files /*{{{*/ #include #include +#include /*}}}*/ namespace APT { class Configuration { /*{{{*/ @@ -36,14 +37,14 @@ public: /*{{{*/ * \param Cached saves the result so we need to calculated it only once * this parameter should ony be used for testing purposes. * - * \return a vector of (all) Language Codes in the prefered usage order + * \return a vector of the compression types in the preferred usage order */ std::vector static const getCompressionTypes(bool const &Cached = true); /** \brief Returns a vector of Language Codes * * Languages can be defined with their two or five chars long code. - * This methods handles the various ways to set the prefered codes, + * This methods handles the various ways to set the preferred codes, * honors the environment and ensures that the codes are not listed twice. * * The special word "environment" will be replaced with the long and the short @@ -51,7 +52,7 @@ public: /*{{{*/ * duplicates. So in an german local the setting "environment, de_DE, en, de" * will result in "de_DE, de, en". * - * Another special word is "none" which separates the prefered from all codes + * Another special word is "none" which separates the preferred from all codes * in this setting. So setting and method can be used to get codes the user want * to see or to get all language codes APT (should) have Translations available. * @@ -61,17 +62,25 @@ public: /*{{{*/ * \param Locale don't get the locale from the system but use this one instead * this parameter should ony be used for testing purposes. * - * \return a vector of (all) Language Codes in the prefered usage order + * \return a vector of (all) Language Codes in the preferred usage order */ std::vector static const getLanguages(bool const &All = false, bool const &Cached = true, char const ** const Locale = 0); + /** \brief Are we interested in the given Language? + * + * \param Lang is the language we want to check + * \param All defines if we check against all codes or only against used codes + * \return true if we are interested, false otherwise + */ + bool static checkLanguage(std::string Lang, bool const All = false); + /** \brief Returns a vector of Architectures we support * * \param Cached saves the result so we need to calculated it only once * this parameter should ony be used for testing purposes. * - * \return a vector of Architectures in prefered order + * \return a vector of Architectures in preferred order */ std::vector static const getArchitectures(bool const &Cached = true); @@ -80,7 +89,7 @@ public: /*{{{*/ * \param Arch we want to check * \return true if we are interested, false otherwise */ - bool static const checkArchitecture(std::string const &Arch); + bool static checkArchitecture(std::string const &Arch); /** \brief Representation of supported compressors */ struct Compressor { @@ -94,7 +103,7 @@ public: /*{{{*/ Compressor(char const *name, char const *extension, char const *binary, char const *compressArg, char const *uncompressArg, unsigned short const cost); - Compressor() {}; + Compressor() : Cost(std::numeric_limits::max()) {}; }; /** \brief Return a vector of Compressors supported for data.tar's @@ -105,6 +114,14 @@ public: /*{{{*/ * \return a vector of Compressors */ std::vector static const getCompressors(bool const Cached = true); + + /** \brief Return a vector of extensions supported for data.tar's */ + std::vector static const getCompressorExtensions(); + + /** \return Return a vector of enabled build profile specifications */ + std::vector static const getBuildProfiles(); + /** \return Return a comma-separated list of enabled build profile specifications */ + std::string static const getBuildProfilesString(); /*}}}*/ private: /*{{{*/ void static setDefaultConfigurationForCompressors();