]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/aptconfiguration.h
- load the supported compressors from configuration
[apt.git] / apt-pkg / aptconfiguration.h
index f2f04a39bd840a9a6db6bfd28f9a935105593a81..e4bc5e68319a4bc1bf8f964ec978cb28f74b1024 100644 (file)
@@ -64,8 +64,50 @@ public:                                                                      /*{{{*/
         *  \return a vector of (all) Language Codes in the prefered usage order
         */
        std::vector<std::string> static const getLanguages(bool const &All = false,
-                       bool const &Cached = true, char const * const Locale = 0);
+                       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<std::string> 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<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();
                                                                        /*}}}*/
 };
                                                                        /*}}}*/