Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
[ntk/apt.git] / apt-pkg / deb / debindexfile.h
index 678c224..017c69a 100644 (file)
 #ifndef PKGLIB_DEBINDEXFILE_H
 #define PKGLIB_DEBINDEXFILE_H
 
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/srcrecords.h>
 
+#include <string>
+
+class OpProgress;
+class pkgAcquire;
+class pkgCacheGenerator;
 
-#include <apt-pkg/indexfile.h>
 
 class debStatusIndex : public pkgIndexFile
 {
@@ -26,14 +34,14 @@ class debStatusIndex : public pkgIndexFile
    void *d;
 
    protected:
-   string File;
+   std::string File;
 
    public:
 
-   virtual const Type *GetType() const;
+   virtual const Type *GetType() const APT_CONST;
    
    // Interface for acquire
-   virtual string Describe(bool Short) const {return File;};
+   virtual std::string Describe(bool /*Short*/) const {return File;};
    
    // Interface for the Cache Generator
    virtual bool Exists() const;
@@ -43,7 +51,7 @@ class debStatusIndex : public pkgIndexFile
    bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog, unsigned long const Flag) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
-   debStatusIndex(string File);
+   debStatusIndex(std::string File);
    virtual ~debStatusIndex() {};
 };
     
@@ -52,25 +60,25 @@ class debPackagesIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
 
-   string URI;
-   string Dist;
-   string Section;
-   string Architecture;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
+   std::string Architecture;
 
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
    
    public:
    
-   virtual const Type *GetType() const;
+   virtual const Type *GetType() const APT_CONST;
 
    // Stuff for accessing files on remote items
-   virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
-   virtual string ArchiveURI(string File) const {return URI + File;};
+   virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
+   virtual std::string ArchiveURI(std::string File) const {return URI + File;};
    
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
    
    // Interface for the Cache Generator
    virtual bool Exists() const;
@@ -79,8 +87,8 @@ class debPackagesIndex : public pkgIndexFile
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
-   debPackagesIndex(string const &URI, string const &Dist, string const &Section,
-                       bool const &Trusted, string const &Arch = "native");
+   debPackagesIndex(std::string const &URI, std::string const &Dist, std::string const &Section,
+                       bool const &Trusted, std::string const &Arch = "native");
    virtual ~debPackagesIndex() {};
 };
 
@@ -89,23 +97,23 @@ class debTranslationsIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
 
-   string URI;
-   string Dist;
-   string Section;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
    const char * const Language;
    
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
 
-   inline string TranslationFile() const {return string("Translation-").append(Language);};
+   inline std::string TranslationFile() const {return std::string("Translation-").append(Language);};
 
    public:
    
-   virtual const Type *GetType() const;
+   virtual const Type *GetType() const APT_CONST;
 
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
    virtual bool GetIndexes(pkgAcquire *Owner) const;
    
    // Interface for the Cache Generator
@@ -115,7 +123,7 @@ class debTranslationsIndex : public pkgIndexFile
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
-   debTranslationsIndex(string URI,string Dist,string Section, char const * const Language);
+   debTranslationsIndex(std::string URI,std::string Dist,std::string Section, char const * const Language);
    virtual ~debTranslationsIndex() {};
 };
 
@@ -124,25 +132,25 @@ class debSourcesIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
 
-   string URI;
-   string Dist;
-   string Section;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
 
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
    
    public:
 
-   virtual const Type *GetType() const;
+   virtual const Type *GetType() const APT_CONST;
 
    // Stuff for accessing files on remote items
-   virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
+   virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
                             pkgSrcRecords::File const &File) const;
-   virtual string ArchiveURI(string File) const {return URI + File;};
+   virtual std::string ArchiveURI(std::string File) const {return URI + File;};
    
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
 
    // Interface for the record parsers
    virtual pkgSrcRecords::Parser *CreateSrcParser() const;
@@ -152,7 +160,7 @@ class debSourcesIndex : public pkgIndexFile
    virtual bool HasPackages() const {return false;};
    virtual unsigned long Size() const;
    
-   debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
+   debSourcesIndex(std::string URI,std::string Dist,std::string Section,bool Trusted);
    virtual ~debSourcesIndex() {};
 };