summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-02-27 23:01:40 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-02-27 23:01:40 +0100
commit03bef78461c6f443187b60799402624326843396 (patch)
tree82befecf33cd7abd714a12502e7da0b20efd6133 /apt-pkg/aptconfiguration.h
parent31273d9ff4fa1a6e073168e9cbaa91d1f53be853 (diff)
- load the supported compressors from configuration
- support adding new compressors by configuration
Diffstat (limited to 'apt-pkg/aptconfiguration.h')
-rw-r--r--apt-pkg/aptconfiguration.h26
1 files changed, 26 insertions, 0 deletions
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<std::string> CompressArgs;
+ std::vector<std::string> 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<Compressor> static const getCompressors(bool const Cached = true);
+ /*}}}*/
+ private: /*{{{*/
+ void static setDefaultConfigurationForCompressors();
/*}}}*/
};
/*}}}*/