X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/47371b0047432ba7a5ee87173b00f912cdcd14e6..5a8cd0703bcc751ff5eb0ae5bf196e61bd428c91:/apt-pkg/aptconfiguration.h diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index 2ba1b3825..e098d0fd6 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,7 +37,7 @@ 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 prefered usage order */ std::vector static const getCompressionTypes(bool const &Cached = true); @@ -66,6 +67,51 @@ public: /*{{{*/ std::vector static const getLanguages(bool const &All = false, bool const &Cached = true, char const ** const Locale = 0); + /** \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 + */ + std::vector static const getArchitectures(bool const &Cached = true); + + /** \brief Are we interested in the given Architecture? + * + * \param Arch we want to check + * \return true if we are interested, false otherwise + */ + bool static const checkArchitecture(std::string const &Arch); + + /** \brief Representation of supported compressors */ + struct Compressor { + std::string Name; + std::string Extension; + std::string Binary; + std::vector CompressArgs; + std::vector UncompressArgs; + unsigned short Cost; + + Compressor(char const *name, char const *extension, char const *binary, + char const *compressArg, char const *uncompressArg, + unsigned short const cost); + Compressor() : Cost(std::numeric_limits::max()) {}; + }; + + /** \brief Return a vector of Compressors supported for data.tar's + * + * \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 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(); + /*}}}*/ + private: /*{{{*/ + void static setDefaultConfigurationForCompressors(); /*}}}*/ }; /*}}}*/