From 03bef78461c6f443187b60799402624326843396 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 27 Feb 2011 23:01:40 +0100 Subject: - load the supported compressors from configuration - support adding new compressors by configuration --- apt-pkg/aptconfiguration.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'apt-pkg/aptconfiguration.h') diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h index dd339d841..e4bc5e683 100644 --- a/apt-pkg/aptconfiguration.h +++ b/apt-pkg/aptconfiguration.h @@ -82,6 +82,32 @@ public: /*{{{*/ */ 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() {}; + }; + + /** \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); + /*}}}*/ + private: /*{{{*/ + void static setDefaultConfigurationForCompressors(); /*}}}*/ }; /*}}}*/ -- cgit v1.2.3