Browse Source

use forward declaration in headers if possible instead of includes

David Kalnischkies 15 years ago
parent
commit
472ff00ef2
99 changed files with 380 additions and 232 deletions
  1. 1 0
      apt-inst/contrib/arfile.cc
  2. 2 1
      apt-inst/contrib/arfile.h
  3. 1 0
      apt-inst/contrib/extracttar.cc
  4. 3 2
      apt-inst/contrib/extracttar.h
  5. 7 0
      apt-inst/database.cc
  6. 6 2
      apt-inst/database.h
  7. 1 0
      apt-inst/deb/debfile.cc
  8. 4 1
      apt-inst/deb/debfile.h
  9. 2 0
      apt-inst/deb/dpkgdb.cc
  10. 5 0
      apt-inst/deb/dpkgdb.h
  11. 1 0
      apt-inst/extract.cc
  12. 2 1
      apt-inst/filelist.h
  13. 2 0
      apt-pkg/acquire-item.cc
  14. 119 119
      apt-pkg/acquire-item.h
  15. 3 3
      apt-pkg/acquire-method.h
  16. 3 0
      apt-pkg/algorithms.cc
  17. 2 1
      apt-pkg/algorithms.h
  18. 1 0
      apt-pkg/cachefile.cc
  19. 5 4
      apt-pkg/cachefile.h
  20. 1 0
      apt-pkg/cacheiterators.h
  21. 5 2
      apt-pkg/cacheset.cc
  22. 8 5
      apt-pkg/cacheset.h
  23. 2 0
      apt-pkg/cdrom.cc
  24. 2 1
      apt-pkg/cdrom.h
  25. 1 0
      apt-pkg/clean.cc
  26. 1 0
      apt-pkg/contrib/cmndline.cc
  27. 1 3
      apt-pkg/contrib/cmndline.h
  28. 1 0
      apt-pkg/contrib/mmap.cc
  29. 2 1
      apt-pkg/contrib/mmap.h
  30. 2 0
      apt-pkg/contrib/netrc.cc
  31. 3 1
      apt-pkg/contrib/netrc.h
  32. 1 0
      apt-pkg/deb/deblistparser.cc
  33. 0 1
      apt-pkg/deb/deblistparser.h
  34. 3 0
      apt-pkg/deb/debmetaindex.cc
  35. 22 21
      apt-pkg/deb/debmetaindex.h
  36. 2 0
      apt-pkg/deb/debrecords.cc
  37. 1 1
      apt-pkg/deb/debrecords.h
  38. 3 1
      apt-pkg/deb/debsystem.h
  39. 1 1
      apt-pkg/depcache.cc
  40. 3 2
      apt-pkg/depcache.h
  41. 7 0
      apt-pkg/edsp.cc
  42. 8 3
      apt-pkg/edsp.h
  43. 1 0
      apt-pkg/edsp/edspindexfile.cc
  44. 0 1
      apt-pkg/edsp/edspindexfile.h
  45. 2 3
      apt-pkg/edsp/edsplistparser.h
  46. 2 0
      apt-pkg/indexfile.h
  47. 3 0
      apt-pkg/indexrecords.cc
  48. 0 1
      apt-pkg/indexrecords.h
  49. 2 0
      apt-pkg/init.cc
  50. 2 2
      apt-pkg/init.h
  51. 0 3
      apt-pkg/metaindex.h
  52. 1 2
      apt-pkg/packagemanager.h
  53. 2 0
      apt-pkg/pkgcachegen.cc
  54. 4 2
      apt-pkg/pkgsystem.h
  55. 2 0
      apt-pkg/sourcelist.cc
  56. 4 2
      apt-pkg/sourcelist.h
  57. 1 0
      apt-pkg/srcrecords.cc
  58. 1 0
      apt-pkg/tagfile.cc
  59. 4 2
      apt-pkg/tagfile.h
  60. 2 0
      apt-pkg/vendorlist.cc
  61. 3 2
      apt-pkg/vendorlist.h
  62. 1 2
      apt-pkg/version.h
  63. 3 1
      cmdline/acqprogress.h
  64. 5 1
      cmdline/apt-cache.cc
  65. 2 0
      cmdline/apt-cdrom.cc
  66. 1 0
      cmdline/apt-config.cc
  67. 1 0
      cmdline/apt-dump-solver.cc
  68. 1 0
      cmdline/apt-extracttemplates.cc
  69. 5 0
      cmdline/apt-get.cc
  70. 2 0
      cmdline/apt-internal-solver.cc
  71. 1 0
      cmdline/apt-mark.cc
  72. 2 0
      cmdline/apt-sortpkgs.cc
  73. 2 1
      debian/changelog
  74. 1 0
      ftparchive/cachedb.cc
  75. 4 4
      ftparchive/cachedb.h
  76. 2 1
      ftparchive/contents.h
  77. 2 3
      ftparchive/multicompress.h
  78. 3 2
      ftparchive/writer.h
  79. 1 0
      methods/bzip2.cc
  80. 1 0
      methods/cdrom.cc
  81. 2 0
      methods/connect.cc
  82. 2 1
      methods/connect.h
  83. 1 0
      methods/copy.cc
  84. 1 0
      methods/file.cc
  85. 1 0
      methods/ftp.cc
  86. 4 0
      methods/ftp.h
  87. 1 0
      methods/gpgv.cc
  88. 6 0
      methods/http.cc
  89. 5 2
      methods/http.h
  90. 1 0
      methods/https.cc
  91. 2 1
      methods/https.h
  92. 2 1
      methods/mirror.cc
  93. 13 12
      methods/mirror.h
  94. 1 0
      methods/rred.cc
  95. 3 0
      methods/rsh.cc
  96. 5 3
      methods/rsh.h
  97. 1 0
      test/interactive-helper/extract-control.cc
  98. 1 0
      test/interactive-helper/test_udevcdrom.cc
  99. 2 0
      test/interactive-helper/testextract.cc

+ 1 - 0
apt-inst/contrib/arfile.cc

@@ -18,6 +18,7 @@
 
 
 #include <apt-pkg/arfile.h>
 #include <apt-pkg/arfile.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 
 
 #include <stdlib.h>
 #include <stdlib.h>

+ 2 - 1
apt-inst/contrib/arfile.h

@@ -17,7 +17,8 @@
 
 
 
 
 #include <string>
 #include <string>
-#include <apt-pkg/fileutl.h>
+
+class FileFd;
 
 
 class ARArchive
 class ARArchive
 {
 {

+ 1 - 0
apt-inst/contrib/extracttar.cc

@@ -18,6 +18,7 @@
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
 #include<config.h>
 #include<config.h>
 
 
+#include <apt-pkg/dirstream.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>

+ 3 - 2
apt-inst/contrib/extracttar.h

@@ -15,9 +15,10 @@
 #define PKGLIB_EXTRACTTAR_H
 #define PKGLIB_EXTRACTTAR_H
 
 
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
-#include <apt-pkg/dirstream.h>
 
 
-#include <algorithm>
+#include <string>
+
+class pkgDirStream;
 
 
 class ExtractTar
 class ExtractTar
 {
 {

+ 7 - 0
apt-inst/database.cc

@@ -11,6 +11,8 @@
 #include<config.h>
 #include<config.h>
 
 
 #include <apt-pkg/database.h>
 #include <apt-pkg/database.h>
+#include <apt-pkg/filelist.h>
+#include <apt-pkg/pkgcachegen.h>
 									/*}}}*/
 									/*}}}*/
 
 
 // DataBase::GetMetaTmp - Get the temp dir				/*{{{*/
 // DataBase::GetMetaTmp - Get the temp dir				/*{{{*/
@@ -26,3 +28,8 @@ bool pkgDataBase::GetMetaTmp(std::string &Dir)
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
+pkgDataBase::~pkgDataBase()
+{
+   delete Cache;
+   delete FList;
+}

+ 6 - 2
apt-inst/database.h

@@ -21,9 +21,13 @@
 #ifndef PKGLIB_DATABASE_H
 #ifndef PKGLIB_DATABASE_H
 #define PKGLIB_DATABASE_H
 #define PKGLIB_DATABASE_H
 
 
-#include <apt-pkg/filelist.h>
 #include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/pkgcachegen.h>
 
 
+#include <string>
+
+class pkgFLCache;
+class OpProgress;
+
 class pkgDataBase
 class pkgDataBase
 {
 {
    protected:
    protected:
@@ -46,7 +50,7 @@ class pkgDataBase
    virtual bool LoadChanges() = 0;
    virtual bool LoadChanges() = 0;
 
 
    pkgDataBase() : Cache(0), FList(0) {};
    pkgDataBase() : Cache(0), FList(0) {};
-   virtual ~pkgDataBase() {delete Cache; delete FList;};
+   virtual ~pkgDataBase();
 };
 };
 
 
 #endif
 #endif

+ 1 - 0
apt-inst/deb/debfile.cc

@@ -18,6 +18,7 @@
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
 #include<config.h>
 #include<config.h>
 
 
+#include <apt-pkg/database.h>
 #include <apt-pkg/debfile.h>
 #include <apt-pkg/debfile.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/extracttar.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>

+ 4 - 1
apt-inst/deb/debfile.h

@@ -25,9 +25,12 @@
 
 
 
 
 #include <apt-pkg/arfile.h>
 #include <apt-pkg/arfile.h>
-#include <apt-pkg/database.h>
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/pkgcache.h>
+
+class FileFd;
+class pkgDataBase;
 
 
 class debDebFile
 class debDebFile
 {
 {

+ 2 - 0
apt-inst/deb/dpkgdb.cc

@@ -21,6 +21,8 @@
 #include <apt-pkg/progress.h>
 #include <apt-pkg/progress.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/filelist.h>
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <errno.h>
 #include <errno.h>

+ 5 - 0
apt-inst/deb/dpkgdb.h

@@ -22,6 +22,11 @@
 
 
 #include <apt-pkg/database.h>
 #include <apt-pkg/database.h>
 
 
+#include <string>
+
+class DynamicMMap;
+class OpProgress;
+
 class debDpkgDB : public pkgDataBase
 class debDpkgDB : public pkgDataBase
 {
 {
    protected:
    protected:

+ 1 - 0
apt-inst/extract.cc

@@ -49,6 +49,7 @@
 #include <apt-pkg/extract.h>
 #include <apt-pkg/extract.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/debversion.h>
 #include <apt-pkg/debversion.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <stdio.h>

+ 2 - 1
apt-inst/filelist.h

@@ -28,9 +28,10 @@
 #ifndef PKGLIB_FILELIST_H
 #ifndef PKGLIB_FILELIST_H
 #define PKGLIB_FILELIST_H
 #define PKGLIB_FILELIST_H
 
 
+#include <apt-pkg/mmap.h>
 
 
 #include <cstring>
 #include <cstring>
-#include <apt-pkg/mmap.h>
+#include <string>
 
 
 class pkgFLCache
 class pkgFLCache
 {
 {

+ 2 - 0
apt-pkg/acquire-item.cc

@@ -25,6 +25,8 @@
 #include <apt-pkg/md5.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/sha1.h>
 #include <apt-pkg/sha1.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/metaindex.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <unistd.h>

+ 119 - 119
apt-pkg/acquire-item.h

@@ -21,13 +21,9 @@
 #define PKGLIB_ACQUIRE_ITEM_H
 #define PKGLIB_ACQUIRE_ITEM_H
 
 
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/acquire.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/vendor.h>
-#include <apt-pkg/sourcelist.h>
-#include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexrecords.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/weakptr.h>
 #include <apt-pkg/weakptr.h>
+#include <apt-pkg/pkgcache.h>
 
 
 /** \addtogroup acquire
 /** \addtogroup acquire
  *  @{
  *  @{
@@ -35,6 +31,10 @@
  *  \file acquire-item.h
  *  \file acquire-item.h
  */
  */
 
 
+class indexRecords;
+class pkgRecords;
+class pkgSourceList;
+
 /** \brief Represents the process by which a pkgAcquire object should	{{{
 /** \brief Represents the process by which a pkgAcquire object should	{{{
  *  retrieve a file or a collection of files.
  *  retrieve a file or a collection of files.
  *
  *
@@ -74,7 +74,7 @@ class pkgAcquire::Item : public WeakPointable
     *  \param To The new name of #From.  If #To exists it will be
     *  \param To The new name of #From.  If #To exists it will be
     *  overwritten.
     *  overwritten.
     */
     */
-   void Rename(string From,string To);
+   void Rename(std::string From,std::string To);
    
    
    public:
    public:
 
 
@@ -109,7 +109,7 @@ class pkgAcquire::Item : public WeakPointable
    /** \brief Contains a textual description of the error encountered
    /** \brief Contains a textual description of the error encountered
     *  if #Status is #StatError or #StatAuthError.
     *  if #Status is #StatError or #StatAuthError.
     */
     */
-   string ErrorText;
+   std::string ErrorText;
 
 
    /** \brief The size of the object to fetch. */
    /** \brief The size of the object to fetch. */
    unsigned long long FileSize;
    unsigned long long FileSize;
@@ -143,7 +143,7 @@ class pkgAcquire::Item : public WeakPointable
     *  download progress indicator's overall statistics.
     *  download progress indicator's overall statistics.
     */
     */
    bool Local;
    bool Local;
-   string UsedMirror;
+   std::string UsedMirror;
 
 
    /** \brief The number of fetch queues into which this item has been
    /** \brief The number of fetch queues into which this item has been
     *  inserted.
     *  inserted.
@@ -158,7 +158,7 @@ class pkgAcquire::Item : public WeakPointable
    /** \brief The name of the file into which the retrieved object
    /** \brief The name of the file into which the retrieved object
     *  will be written.
     *  will be written.
     */
     */
-   string DestFile;
+   std::string DestFile;
 
 
    /** \brief Invoked by the acquire worker when the object couldn't
    /** \brief Invoked by the acquire worker when the object couldn't
     *  be fetched.
     *  be fetched.
@@ -173,7 +173,7 @@ class pkgAcquire::Item : public WeakPointable
     *
     *
     *  \sa pkgAcqMethod
     *  \sa pkgAcqMethod
     */
     */
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
 
 
    /** \brief Invoked by the acquire worker when the object was
    /** \brief Invoked by the acquire worker when the object was
     *  fetched successfully.
     *  fetched successfully.
@@ -194,7 +194,7 @@ class pkgAcquire::Item : public WeakPointable
     *
     *
     *  \sa pkgAcqMethod
     *  \sa pkgAcqMethod
     */
     */
-   virtual void Done(string Message,unsigned long long Size,string Hash,
+   virtual void Done(std::string Message,unsigned long long Size,std::string Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
 
 
    /** \brief Invoked when the worker starts to fetch this object.
    /** \brief Invoked when the worker starts to fetch this object.
@@ -206,7 +206,7 @@ class pkgAcquire::Item : public WeakPointable
     *
     *
     *  \sa pkgAcqMethod
     *  \sa pkgAcqMethod
     */
     */
-   virtual void Start(string Message,unsigned long long Size);
+   virtual void Start(std::string Message,unsigned long long Size);
 
 
    /** \brief Custom headers to be sent to the fetch process.
    /** \brief Custom headers to be sent to the fetch process.
     *
     *
@@ -216,18 +216,18 @@ class pkgAcquire::Item : public WeakPointable
     *  line, so they should (if nonempty) have a leading newline and
     *  line, so they should (if nonempty) have a leading newline and
     *  no trailing newline.
     *  no trailing newline.
     */
     */
-   virtual string Custom600Headers() {return string();};
+   virtual std::string Custom600Headers() {return std::string();};
 
 
    /** \brief A "descriptive" URI-like string.
    /** \brief A "descriptive" URI-like string.
     *
     *
     *  \return a URI that should be used to describe what is being fetched.
     *  \return a URI that should be used to describe what is being fetched.
     */
     */
-   virtual string DescURI() = 0;
+   virtual std::string DescURI() = 0;
    /** \brief Short item description.
    /** \brief Short item description.
     *
     *
     *  \return a brief description of the object being fetched.
     *  \return a brief description of the object being fetched.
     */
     */
-   virtual string ShortDesc() {return DescURI();}
+   virtual std::string ShortDesc() {return DescURI();}
 
 
    /** \brief Invoked by the worker when the download is completely done. */
    /** \brief Invoked by the worker when the download is completely done. */
    virtual void Finished() {};
    virtual void Finished() {};
@@ -237,7 +237,7 @@ class pkgAcquire::Item : public WeakPointable
     *  \return the HashSum of this object, if applicable; otherwise, an
     *  \return the HashSum of this object, if applicable; otherwise, an
     *  empty string.
     *  empty string.
     */
     */
-   virtual string HashSum() {return string();};
+   virtual std::string HashSum() {return std::string();};
 
 
    /** \return the acquire process with which this item is associated. */
    /** \return the acquire process with which this item is associated. */
    pkgAcquire *GetOwner() {return Owner;};
    pkgAcquire *GetOwner() {return Owner;};
@@ -253,7 +253,7 @@ class pkgAcquire::Item : public WeakPointable
     * 
     * 
     *  \param FailCode A short failure string that is send
     *  \param FailCode A short failure string that is send
     */
     */
-   void ReportMirrorFailure(string FailCode);
+   void ReportMirrorFailure(std::string FailCode);
 
 
 
 
    /** \brief Initialize an item.
    /** \brief Initialize an item.
@@ -278,10 +278,10 @@ class pkgAcquire::Item : public WeakPointable
 /** \brief Information about an index patch (aka diff). */		/*{{{*/
 /** \brief Information about an index patch (aka diff). */		/*{{{*/
 struct DiffInfo {
 struct DiffInfo {
    /** The filename of the diff. */
    /** The filename of the diff. */
-   string file;
+   std::string file;
 
 
    /** The sha1 hash of the diff. */
    /** The sha1 hash of the diff. */
-   string sha1;
+   std::string sha1;
 
 
    /** The size of the diff. */
    /** The size of the diff. */
    unsigned long size;
    unsigned long size;
@@ -308,12 +308,12 @@ class pkgAcqSubIndex : public pkgAcquire::Item
 
 
  public:
  public:
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string Md5Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string DescURI() {return Desc.URI;};
-   virtual string Custom600Headers();
-   virtual bool ParseIndex(string const &IndexFile);
+   virtual std::string DescURI() {return Desc.URI;};
+   virtual std::string Custom600Headers();
+   virtual bool ParseIndex(std::string const &IndexFile);
 
 
    /** \brief Create a new pkgAcqSubIndex.
    /** \brief Create a new pkgAcqSubIndex.
     *
     *
@@ -327,8 +327,8 @@ class pkgAcqSubIndex : public pkgAcquire::Item
     *
     *
     *  \param ExpectedHash The list file's MD5 signature.
     *  \param ExpectedHash The list file's MD5 signature.
     */
     */
-   pkgAcqSubIndex(pkgAcquire *Owner, string const &URI,string const &URIDesc,
-		   string const &ShortDesc, HashString const &ExpectedHash);
+   pkgAcqSubIndex(pkgAcquire *Owner, std::string const &URI,std::string const &URIDesc,
+		   std::string const &ShortDesc, HashString const &ExpectedHash);
 };
 };
 									/*}}}*/
 									/*}}}*/
 /** \brief An item that is responsible for fetching an index file of	{{{
 /** \brief An item that is responsible for fetching an index file of	{{{
@@ -352,7 +352,7 @@ class pkgAcqDiffIndex : public pkgAcquire::Item
    /** \brief The URI of the index file to recreate at our end (either
    /** \brief The URI of the index file to recreate at our end (either
     *  by downloading it or by applying partial patches).
     *  by downloading it or by applying partial patches).
     */
     */
-   string RealURI;
+   std::string RealURI;
 
 
    /** \brief The Hash that the real index file should have after
    /** \brief The Hash that the real index file should have after
     *  all patches have been applied.
     *  all patches have been applied.
@@ -362,20 +362,20 @@ class pkgAcqDiffIndex : public pkgAcquire::Item
    /** \brief The index file which will be patched to generate the new
    /** \brief The index file which will be patched to generate the new
     *  file.
     *  file.
     */
     */
-   string CurrentPackagesFile;
+   std::string CurrentPackagesFile;
 
 
    /** \brief A description of the Packages file (stored in
    /** \brief A description of the Packages file (stored in
     *  pkgAcquire::ItemDesc::Description).
     *  pkgAcquire::ItemDesc::Description).
     */
     */
-   string Description;
+   std::string Description;
 
 
  public:
  public:
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string Md5Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string DescURI() {return RealURI + "Index";};
-   virtual string Custom600Headers();
+   virtual std::string DescURI() {return RealURI + "Index";};
+   virtual std::string Custom600Headers();
 
 
    /** \brief Parse the Index file for a set of Packages diffs.
    /** \brief Parse the Index file for a set of Packages diffs.
     *
     *
@@ -387,7 +387,7 @@ class pkgAcqDiffIndex : public pkgAcquire::Item
     *  \return \b true if the Index file was successfully parsed, \b
     *  \return \b true if the Index file was successfully parsed, \b
     *  false otherwise.
     *  false otherwise.
     */
     */
-   bool ParseDiffIndex(string IndexDiffFile);
+   bool ParseDiffIndex(std::string IndexDiffFile);
    
    
 
 
    /** \brief Create a new pkgAcqDiffIndex.
    /** \brief Create a new pkgAcqDiffIndex.
@@ -402,8 +402,8 @@ class pkgAcqDiffIndex : public pkgAcquire::Item
     *
     *
     *  \param ExpectedHash The list file's MD5 signature.
     *  \param ExpectedHash The list file's MD5 signature.
     */
     */
-   pkgAcqDiffIndex(pkgAcquire *Owner,string URI,string URIDesc,
-		   string ShortDesc, HashString ExpectedHash);
+   pkgAcqDiffIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc,
+		   std::string ShortDesc, HashString ExpectedHash);
 };
 };
 									/*}}}*/
 									/*}}}*/
 /** \brief An item that is responsible for fetching all the patches	{{{
 /** \brief An item that is responsible for fetching all the patches	{{{
@@ -460,7 +460,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
    /** \brief The URI of the package index file that is being
    /** \brief The URI of the package index file that is being
     *  reconstructed.
     *  reconstructed.
     */
     */
-   string RealURI;
+   std::string RealURI;
 
 
    /** \brief The HashSum of the package index file that is being
    /** \brief The HashSum of the package index file that is being
     *  reconstructed.
     *  reconstructed.
@@ -468,7 +468,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
    HashString ExpectedHash;
    HashString ExpectedHash;
 
 
    /** A description of the file being downloaded. */
    /** A description of the file being downloaded. */
-   string Description;
+   std::string Description;
 
 
    /** The patches that remain to be downloaded, including the patch
    /** The patches that remain to be downloaded, including the patch
     *  being downloaded right now.  This list should be ordered so
     *  being downloaded right now.  This list should be ordered so
@@ -478,10 +478,10 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
     *  dictionary instead of relying on ordering and stripping them
     *  dictionary instead of relying on ordering and stripping them
     *  off the front?
     *  off the front?
     */
     */
-   vector<DiffInfo> available_patches;
+   std::vector<DiffInfo> available_patches;
 
 
    /** Stop applying patches when reaching that sha1 */
    /** Stop applying patches when reaching that sha1 */
-   string ServerSha1;
+   std::string ServerSha1;
 
 
    /** The current status of this patch. */
    /** The current status of this patch. */
    enum DiffState
    enum DiffState
@@ -506,11 +506,11 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
     *  This method will fall back to downloading the whole index file
     *  This method will fall back to downloading the whole index file
     *  outright; its arguments are ignored.
     *  outright; its arguments are ignored.
     */
     */
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
 
 
-   virtual void Done(string Message,unsigned long long Size,string Md5Hash,
+   virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string DescURI() {return RealURI + "Index";};
+   virtual std::string DescURI() {return RealURI + "Index";};
 
 
    /** \brief Create an index diff item.
    /** \brief Create an index diff item.
     *
     *
@@ -534,10 +534,10 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item
     *  should be ordered so that each diff appears before any diff
     *  should be ordered so that each diff appears before any diff
     *  that depends on it.
     *  that depends on it.
     */
     */
-   pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc,
-		    string ShortDesc, HashString ExpectedHash,
-		    string ServerSha1,
-		    vector<DiffInfo> diffs=vector<DiffInfo>());
+   pkgAcqIndexDiffs(pkgAcquire *Owner,std::string URI,std::string URIDesc,
+		    std::string ShortDesc, HashString ExpectedHash,
+		    std::string ServerSha1,
+		    std::vector<DiffInfo> diffs=std::vector<DiffInfo>());
 };
 };
 									/*}}}*/
 									/*}}}*/
 /** \brief An acquire item that is responsible for fetching an index	{{{
 /** \brief An acquire item that is responsible for fetching an index	{{{
@@ -577,7 +577,7 @@ class pkgAcqIndex : public pkgAcquire::Item
    /** \brief The object that is actually being fetched (minus any
    /** \brief The object that is actually being fetched (minus any
     *  compression-related extensions).
     *  compression-related extensions).
     */
     */
-   string RealURI;
+   std::string RealURI;
 
 
    /** \brief The expected hashsum of the decompressed index file. */
    /** \brief The expected hashsum of the decompressed index file. */
    HashString ExpectedHash;
    HashString ExpectedHash;
@@ -585,17 +585,17 @@ class pkgAcqIndex : public pkgAcquire::Item
    /** \brief The compression-related file extensions that are being
    /** \brief The compression-related file extensions that are being
     *  added to the downloaded file one by one if first fails (e.g., "gz bz2").
     *  added to the downloaded file one by one if first fails (e.g., "gz bz2").
     */
     */
-   string CompressionExtension;
+   std::string CompressionExtension;
 
 
    public:
    public:
    
    
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string Md5Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string Custom600Headers();
-   virtual string DescURI() {return Desc.URI;};
-   virtual string HashSum() {return ExpectedHash.toStr(); };
+   virtual std::string Custom600Headers();
+   virtual std::string DescURI() {return Desc.URI;};
+   virtual std::string HashSum() {return ExpectedHash.toStr(); };
 
 
    /** \brief Create a pkgAcqIndex.
    /** \brief Create a pkgAcqIndex.
     *
     *
@@ -616,12 +616,12 @@ class pkgAcqIndex : public pkgAcquire::Item
     *  default is ".lzma" or ".bz2" (if the needed binaries are present)
     *  default is ".lzma" or ".bz2" (if the needed binaries are present)
     *  fallback is ".gz" or none.
     *  fallback is ".gz" or none.
     */
     */
-   pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
-	       string ShortDesc, HashString ExpectedHash, 
-	       string compressExt="");
+   pkgAcqIndex(pkgAcquire *Owner,std::string URI,std::string URIDesc,
+	       std::string ShortDesc, HashString ExpectedHash, 
+	       std::string compressExt="");
    pkgAcqIndex(pkgAcquire *Owner, struct IndexTarget const * const Target,
    pkgAcqIndex(pkgAcquire *Owner, struct IndexTarget const * const Target,
 			 HashString const &ExpectedHash, indexRecords const *MetaIndexParser);
 			 HashString const &ExpectedHash, indexRecords const *MetaIndexParser);
-   void Init(string const &URI, string const &URIDesc, string const &ShortDesc);
+   void Init(std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc);
 };
 };
 									/*}}}*/
 									/*}}}*/
 /** \brief An acquire item that is responsible for fetching a		{{{
 /** \brief An acquire item that is responsible for fetching a		{{{
@@ -635,8 +635,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex
 {
 {
    public:
    public:
   
   
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual string Custom600Headers();
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual std::string Custom600Headers();
 
 
    /** \brief Create a pkgAcqIndexTrans.
    /** \brief Create a pkgAcqIndexTrans.
     *
     *
@@ -649,8 +649,8 @@ class pkgAcqIndexTrans : public pkgAcqIndex
     *
     *
     *  \param ShortDesc A brief description of this index file.
     *  \param ShortDesc A brief description of this index file.
     */
     */
-   pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
-		    string ShortDesc);
+   pkgAcqIndexTrans(pkgAcquire *Owner,std::string URI,std::string URIDesc,
+		    std::string ShortDesc);
    pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Target,
    pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Target,
 		    HashString const &ExpectedHash, indexRecords const *MetaIndexParser);
 		    HashString const &ExpectedHash, indexRecords const *MetaIndexParser);
 };
 };
@@ -660,18 +660,18 @@ class IndexTarget
 {
 {
  public:
  public:
    /** \brief A URI from which the index file can be downloaded. */
    /** \brief A URI from which the index file can be downloaded. */
-   string URI;
+   std::string URI;
 
 
    /** \brief A description of the index file. */
    /** \brief A description of the index file. */
-   string Description;
+   std::string Description;
 
 
    /** \brief A shorter description of the index file. */
    /** \brief A shorter description of the index file. */
-   string ShortDesc;
+   std::string ShortDesc;
 
 
    /** \brief The key by which this index file should be
    /** \brief The key by which this index file should be
     *  looked up within the meta signature file.
     *  looked up within the meta signature file.
     */
     */
-   string MetaKey;
+   std::string MetaKey;
 
 
    virtual bool IsOptional() const {
    virtual bool IsOptional() const {
       return false;
       return false;
@@ -710,7 +710,7 @@ class pkgAcqMetaSig : public pkgAcquire::Item
 {
 {
    protected:
    protected:
    /** \brief The last good signature file */
    /** \brief The last good signature file */
-   string LastGoodSig;
+   std::string LastGoodSig;
 
 
    /** \brief The fetch request that is currently being processed. */
    /** \brief The fetch request that is currently being processed. */
    pkgAcquire::ItemDesc Desc;
    pkgAcquire::ItemDesc Desc;
@@ -719,20 +719,20 @@ class pkgAcqMetaSig : public pkgAcquire::Item
     *  never modified; it is used to determine the file that is being
     *  never modified; it is used to determine the file that is being
     *  downloaded.
     *  downloaded.
     */
     */
-   string RealURI;
+   std::string RealURI;
 
 
    /** \brief The URI of the meta-index file to be fetched after the signature. */
    /** \brief The URI of the meta-index file to be fetched after the signature. */
-   string MetaIndexURI;
+   std::string MetaIndexURI;
 
 
    /** \brief A "URI-style" description of the meta-index file to be
    /** \brief A "URI-style" description of the meta-index file to be
     *  fetched after the signature.
     *  fetched after the signature.
     */
     */
-   string MetaIndexURIDesc;
+   std::string MetaIndexURIDesc;
 
 
    /** \brief A brief description of the meta-index file to be fetched
    /** \brief A brief description of the meta-index file to be fetched
     *  after the signature.
     *  after the signature.
     */
     */
-   string MetaIndexShortDesc;
+   std::string MetaIndexShortDesc;
 
 
    /** \brief A package-system-specific parser for the meta-index file. */
    /** \brief A package-system-specific parser for the meta-index file. */
    indexRecords* MetaIndexParser;
    indexRecords* MetaIndexParser;
@@ -742,21 +742,21 @@ class pkgAcqMetaSig : public pkgAcquire::Item
     *
     *
     *  \todo Why a list of pointers instead of a list of structs?
     *  \todo Why a list of pointers instead of a list of structs?
     */
     */
-   const vector<struct IndexTarget*>* IndexTargets;
+   const std::vector<struct IndexTarget*>* IndexTargets;
 
 
    public:
    public:
    
    
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string Md5Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string Md5Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string Custom600Headers();
-   virtual string DescURI() {return RealURI; };
+   virtual std::string Custom600Headers();
+   virtual std::string DescURI() {return RealURI; };
 
 
    /** \brief Create a new pkgAcqMetaSig. */
    /** \brief Create a new pkgAcqMetaSig. */
-   pkgAcqMetaSig(pkgAcquire *Owner,string URI,string URIDesc, string ShortDesc,
-		 string MetaIndexURI, string MetaIndexURIDesc, string MetaIndexShortDesc,
-		 const vector<struct IndexTarget*>* IndexTargets,
+   pkgAcqMetaSig(pkgAcquire *Owner,std::string URI,std::string URIDesc, std::string ShortDesc,
+		 std::string MetaIndexURI, std::string MetaIndexURIDesc, std::string MetaIndexShortDesc,
+		 const std::vector<struct IndexTarget*>* IndexTargets,
 		 indexRecords* MetaIndexParser);
 		 indexRecords* MetaIndexParser);
 };
 };
 									/*}}}*/
 									/*}}}*/
@@ -779,17 +779,17 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
    /** \brief The URI that is actually being downloaded; never
    /** \brief The URI that is actually being downloaded; never
     *  modified by pkgAcqMetaIndex.
     *  modified by pkgAcqMetaIndex.
     */
     */
-   string RealURI;
+   std::string RealURI;
 
 
    /** \brief The file in which the signature for this index was stored.
    /** \brief The file in which the signature for this index was stored.
     *
     *
     *  If empty, the signature and the md5sums of the individual
     *  If empty, the signature and the md5sums of the individual
     *  indices will not be checked.
     *  indices will not be checked.
     */
     */
-   string SigFile;
+   std::string SigFile;
 
 
    /** \brief The index files to download. */
    /** \brief The index files to download. */
-   const vector<struct IndexTarget*>* IndexTargets;
+   const std::vector<struct IndexTarget*>* IndexTargets;
 
 
    /** \brief The parser for the meta-index file. */
    /** \brief The parser for the meta-index file. */
    indexRecords* MetaIndexParser;
    indexRecords* MetaIndexParser;
@@ -805,7 +805,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
     *
     *
     *  \return \b true if no fatal errors were encountered.
     *  \return \b true if no fatal errors were encountered.
     */
     */
-   bool VerifyVendor(string Message);
+   bool VerifyVendor(std::string Message);
 
 
    /** \brief Called when a file is finished being retrieved.
    /** \brief Called when a file is finished being retrieved.
     *
     *
@@ -816,7 +816,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
     *  \param Message The message block received from the fetch
     *  \param Message The message block received from the fetch
     *  subprocess.
     *  subprocess.
     */
     */
-   void RetrievalDone(string Message);
+   void RetrievalDone(std::string Message);
 
 
    /** \brief Called when authentication succeeded.
    /** \brief Called when authentication succeeded.
     *
     *
@@ -827,7 +827,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
     *  \param Message The message block received from the fetch
     *  \param Message The message block received from the fetch
     *  subprocess.
     *  subprocess.
     */
     */
-   void AuthDone(string Message);
+   void AuthDone(std::string Message);
 
 
    /** \brief Starts downloading the individual index files.
    /** \brief Starts downloading the individual index files.
     *
     *
@@ -842,17 +842,17 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
    public:
    public:
    
    
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size, string Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size, std::string Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string Custom600Headers();
-   virtual string DescURI() {return RealURI; };
+   virtual std::string Custom600Headers();
+   virtual std::string DescURI() {return RealURI; };
 
 
    /** \brief Create a new pkgAcqMetaIndex. */
    /** \brief Create a new pkgAcqMetaIndex. */
    pkgAcqMetaIndex(pkgAcquire *Owner,
    pkgAcqMetaIndex(pkgAcquire *Owner,
-		   string URI,string URIDesc, string ShortDesc,
-		   string SigFile,
-		   const vector<struct IndexTarget*>* IndexTargets,
+		   std::string URI,std::string URIDesc, std::string ShortDesc,
+		   std::string SigFile,
+		   const std::vector<struct IndexTarget*>* IndexTargets,
 		   indexRecords* MetaIndexParser);
 		   indexRecords* MetaIndexParser);
 };
 };
 									/*}}}*/
 									/*}}}*/
@@ -860,33 +860,33 @@ class pkgAcqMetaIndex : public pkgAcquire::Item
 class pkgAcqMetaClearSig : public pkgAcqMetaIndex
 class pkgAcqMetaClearSig : public pkgAcqMetaIndex
 {
 {
    /** \brief The URI of the meta-index file for the detached signature */
    /** \brief The URI of the meta-index file for the detached signature */
-   string MetaIndexURI;
+   std::string MetaIndexURI;
 
 
    /** \brief A "URI-style" description of the meta-index file */
    /** \brief A "URI-style" description of the meta-index file */
-   string MetaIndexURIDesc;
+   std::string MetaIndexURIDesc;
 
 
    /** \brief A brief description of the meta-index file */
    /** \brief A brief description of the meta-index file */
-   string MetaIndexShortDesc;
+   std::string MetaIndexShortDesc;
 
 
    /** \brief The URI of the detached meta-signature file if the clearsigned one failed. */
    /** \brief The URI of the detached meta-signature file if the clearsigned one failed. */
-   string MetaSigURI;
+   std::string MetaSigURI;
 
 
    /** \brief A "URI-style" description of the meta-signature file */
    /** \brief A "URI-style" description of the meta-signature file */
-   string MetaSigURIDesc;
+   std::string MetaSigURIDesc;
 
 
    /** \brief A brief description of the meta-signature file */
    /** \brief A brief description of the meta-signature file */
-   string MetaSigShortDesc;
+   std::string MetaSigShortDesc;
 
 
 public:
 public:
-   void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual string Custom600Headers();
+   void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual std::string Custom600Headers();
 
 
    /** \brief Create a new pkgAcqMetaClearSig. */
    /** \brief Create a new pkgAcqMetaClearSig. */
    pkgAcqMetaClearSig(pkgAcquire *Owner,
    pkgAcqMetaClearSig(pkgAcquire *Owner,
-		string const &URI, string const &URIDesc, string const &ShortDesc,
-		string const &MetaIndexURI, string const &MetaIndexURIDesc, string const &MetaIndexShortDesc,
-		string const &MetaSigURI, string const &MetaSigURIDesc, string const &MetaSigShortDesc,
-		const vector<struct IndexTarget*>* IndexTargets,
+		std::string const &URI, std::string const &URIDesc, std::string const &ShortDesc,
+		std::string const &MetaIndexURI, std::string const &MetaIndexURIDesc, std::string const &MetaIndexShortDesc,
+		std::string const &MetaSigURI, std::string const &MetaSigURIDesc, std::string const &MetaSigShortDesc,
+		const std::vector<struct IndexTarget*>* IndexTargets,
 		indexRecords* MetaIndexParser);
 		indexRecords* MetaIndexParser);
 };
 };
 									/*}}}*/
 									/*}}}*/
@@ -920,7 +920,7 @@ class pkgAcqArchive : public pkgAcquire::Item
    /** \brief A location in which the actual filename of the package
    /** \brief A location in which the actual filename of the package
     *  should be stored.
     *  should be stored.
     */
     */
-   string &StoreFilename;
+   std::string &StoreFilename;
 
 
    /** \brief The next file for this version to try to download. */
    /** \brief The next file for this version to try to download. */
    pkgCache::VerFileIterator Vf;
    pkgCache::VerFileIterator Vf;
@@ -942,13 +942,13 @@ class pkgAcqArchive : public pkgAcquire::Item
    
    
    public:
    public:
    
    
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string Hash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string Hash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string DescURI() {return Desc.URI;};
-   virtual string ShortDesc() {return Desc.ShortDesc;};
+   virtual std::string DescURI() {return Desc.URI;};
+   virtual std::string ShortDesc() {return Desc.ShortDesc;};
    virtual void Finished();
    virtual void Finished();
-   virtual string HashSum() {return ExpectedHash.toStr(); };
+   virtual std::string HashSum() {return ExpectedHash.toStr(); };
    virtual bool IsTrusted();
    virtual bool IsTrusted();
    
    
    /** \brief Create a new pkgAcqArchive.
    /** \brief Create a new pkgAcqArchive.
@@ -971,7 +971,7 @@ class pkgAcqArchive : public pkgAcquire::Item
     */
     */
    pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
    pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources,
 		 pkgRecords *Recs,pkgCache::VerIterator const &Version,
 		 pkgRecords *Recs,pkgCache::VerIterator const &Version,
-		 string &StoreFilename);
+		 std::string &StoreFilename);
 };
 };
 									/*}}}*/
 									/*}}}*/
 /** \brief Retrieve an arbitrary file to the current directory.		{{{
 /** \brief Retrieve an arbitrary file to the current directory.		{{{
@@ -999,12 +999,12 @@ class pkgAcqFile : public pkgAcquire::Item
    public:
    public:
    
    
    // Specialized action members
    // Specialized action members
-   virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(string Message,unsigned long long Size,string CalcHash,
+   virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
+   virtual void Done(std::string Message,unsigned long long Size,std::string CalcHash,
 		     pkgAcquire::MethodConfig *Cnf);
 		     pkgAcquire::MethodConfig *Cnf);
-   virtual string DescURI() {return Desc.URI;};
-   virtual string HashSum() {return ExpectedHash.toStr(); };
-   virtual string Custom600Headers();
+   virtual std::string DescURI() {return Desc.URI;};
+   virtual std::string HashSum() {return ExpectedHash.toStr(); };
+   virtual std::string Custom600Headers();
 
 
    /** \brief Create a new pkgAcqFile object.
    /** \brief Create a new pkgAcqFile object.
     *
     *
@@ -1037,9 +1037,9 @@ class pkgAcqFile : public pkgAcquire::Item
     * is the absolute name to which the file should be downloaded.
     * is the absolute name to which the file should be downloaded.
     */
     */
 
 
-   pkgAcqFile(pkgAcquire *Owner, string URI, string Hash, unsigned long long Size,
-	      string Desc, string ShortDesc,
-	      const string &DestDir="", const string &DestFilename="",
+   pkgAcqFile(pkgAcquire *Owner, std::string URI, std::string Hash, unsigned long long Size,
+	      std::string Desc, std::string ShortDesc,
+	      const std::string &DestDir="", const std::string &DestFilename="",
 	      bool IsIndexFile=false);
 	      bool IsIndexFile=false);
 };
 };
 									/*}}}*/
 									/*}}}*/

+ 3 - 3
apt-pkg/acquire-method.h

@@ -20,11 +20,11 @@
 #ifndef PKGLIB_ACQUIRE_METHOD_H
 #ifndef PKGLIB_ACQUIRE_METHOD_H
 #define PKGLIB_ACQUIRE_METHOD_H
 #define PKGLIB_ACQUIRE_METHOD_H
 
 
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/strutl.h>
-
 #include <stdarg.h>
 #include <stdarg.h>
 
 
+#include <string>
+#include <vector>
+
 class Hashes;
 class Hashes;
 class pkgAcqMethod
 class pkgAcqMethod
 {
 {

+ 3 - 0
apt-pkg/algorithms.cc

@@ -23,6 +23,9 @@
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/edsp.h>
 #include <apt-pkg/edsp.h>
+#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/progress.h>
 
 
 #include <sys/types.h>
 #include <sys/types.h>
 #include <cstdlib>
 #include <cstdlib>

+ 2 - 1
apt-pkg/algorithms.h

@@ -33,10 +33,11 @@
 
 
 #include <apt-pkg/packagemanager.h>
 #include <apt-pkg/packagemanager.h>
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/depcache.h>
-#include <apt-pkg/acquire.h>
 
 
 #include <iostream>
 #include <iostream>
 
 
+class pkgAcquireStatus;
+
 class pkgSimulate : public pkgPackageManager				/*{{{*/
 class pkgSimulate : public pkgPackageManager				/*{{{*/
 {
 {
    protected:
    protected:

+ 1 - 0
apt-pkg/cachefile.cc

@@ -23,6 +23,7 @@
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/progress.h>
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/

+ 5 - 4
apt-pkg/cachefile.h

@@ -17,11 +17,12 @@
 #ifndef PKGLIB_CACHEFILE_H
 #ifndef PKGLIB_CACHEFILE_H
 #define PKGLIB_CACHEFILE_H
 #define PKGLIB_CACHEFILE_H
 
 
-
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/depcache.h>
-#include <apt-pkg/acquire.h>
-#include <apt-pkg/policy.h>
-#include <apt-pkg/sourcelist.h>
+#include <apt-pkg/macros.h>
+
+class pkgPolicy;
+class pkgSourceList;
+class OpProgress;
 
 
 class pkgCacheFile
 class pkgCacheFile
 {
 {

+ 1 - 0
apt-pkg/cacheiterators.h

@@ -32,6 +32,7 @@
 #include<iterator>
 #include<iterator>
 
 
 #include<string.h>
 #include<string.h>
+
 // abstract Iterator template						/*{{{*/
 // abstract Iterator template						/*{{{*/
 /* This template provides the very basic iterator methods we
 /* This template provides the very basic iterator methods we
    need to have for doing some walk-over-the-cache magic */
    need to have for doing some walk-over-the-cache magic */

+ 5 - 2
apt-pkg/cacheset.cc

@@ -12,11 +12,14 @@
 #include <config.h>
 #include <config.h>
 
 
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/cachefile.h>
 #include <apt-pkg/cachefilter.h>
 #include <apt-pkg/cachefilter.h>
 #include <apt-pkg/cacheset.h>
 #include <apt-pkg/cacheset.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/versionmatch.h>
 #include <apt-pkg/versionmatch.h>
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/policy.h>
 
 
 #include <vector>
 #include <vector>
 
 
@@ -298,7 +301,7 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg,
 	std::string ver;
 	std::string ver;
 	bool verIsRel = false;
 	bool verIsRel = false;
 	size_t const vertag = pkg.find_last_of("/=");
 	size_t const vertag = pkg.find_last_of("/=");
-	if (vertag != string::npos) {
+	if (vertag != std::string::npos) {
 		ver = pkg.substr(vertag+1);
 		ver = pkg.substr(vertag+1);
 		verIsRel = (pkg[vertag] == '/');
 		verIsRel = (pkg[vertag] == '/');
 		pkg.erase(vertag);
 		pkg.erase(vertag);
@@ -316,7 +319,7 @@ APT::VersionSet VersionSet::FromString(pkgCacheFile &Cache, std::string pkg,
 		errors = helper.showErrors(false);
 		errors = helper.showErrors(false);
 	for (PackageSet::const_iterator P = pkgset.begin();
 	for (PackageSet::const_iterator P = pkgset.begin();
 	     P != pkgset.end(); ++P) {
 	     P != pkgset.end(); ++P) {
-		if (vertag == string::npos) {
+		if (vertag == std::string::npos) {
 			verset.insert(VersionSet::FromPackage(Cache, P, fallback, helper));
 			verset.insert(VersionSet::FromPackage(Cache, P, fallback, helper));
 			continue;
 			continue;
 		}
 		}

+ 8 - 5
apt-pkg/cacheset.h

@@ -16,9 +16,12 @@
 #include <set>
 #include <set>
 #include <string>
 #include <string>
 
 
-#include <apt-pkg/cachefile.h>
+#include <apt-pkg/error.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
 									/*}}}*/
 									/*}}}*/
+
+class pkgCacheFile;
+
 namespace APT {
 namespace APT {
 class PackageSet;
 class PackageSet;
 class VersionSet;
 class VersionSet;
@@ -37,10 +40,10 @@ public:									/*{{{*/
 			ShowError(ShowError), ErrorType(ErrorType) {};
 			ShowError(ShowError), ErrorType(ErrorType) {};
 	virtual ~CacheSetHelper() {};
 	virtual ~CacheSetHelper() {};
 
 
-	virtual void showTaskSelection(PackageSet const &pkgset, string const &pattern) {};
-	virtual void showRegExSelection(PackageSet const &pkgset, string const &pattern) {};
+	virtual void showTaskSelection(PackageSet const &pkgset, std::string const &pattern) {};
+	virtual void showRegExSelection(PackageSet const &pkgset, std::string const &pattern) {};
 	virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver,
 	virtual void showSelectedVersion(pkgCache::PkgIterator const &Pkg, pkgCache::VerIterator const Ver,
-				 string const &ver, bool const &verIsRel) {};
+				 std::string const &ver, bool const &verIsRel) {};
 
 
 	virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str);
 	virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str);
 	virtual PackageSet canNotFindTask(pkgCacheFile &Cache, std::string pattern);
 	virtual PackageSet canNotFindTask(pkgCacheFile &Cache, std::string pattern);
@@ -265,7 +268,7 @@ public:									/*{{{*/
 		inline pkgCache::VerFileIterator FileList() const { return (**this).FileList(); };
 		inline pkgCache::VerFileIterator FileList() const { return (**this).FileList(); };
 		inline bool Downloadable() const { return (**this).Downloadable(); };
 		inline bool Downloadable() const { return (**this).Downloadable(); };
 		inline const char *PriorityType() const { return (**this).PriorityType(); };
 		inline const char *PriorityType() const { return (**this).PriorityType(); };
-		inline string RelStr() const { return (**this).RelStr(); };
+		inline std::string RelStr() const { return (**this).RelStr(); };
 		inline bool Automatic() const { return (**this).Automatic(); };
 		inline bool Automatic() const { return (**this).Automatic(); };
 		inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
 		inline pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
 	};
 	};

+ 2 - 0
apt-pkg/cdrom.cc

@@ -8,6 +8,8 @@
 #include<apt-pkg/strutl.h>
 #include<apt-pkg/strutl.h>
 #include<apt-pkg/cdrom.h>
 #include<apt-pkg/cdrom.h>
 #include<apt-pkg/aptconfiguration.h>
 #include<apt-pkg/aptconfiguration.h>
+#include<apt-pkg/configuration.h>
+#include<apt-pkg/fileutl.h>
 
 
 #include<sstream>
 #include<sstream>
 #include<fstream>
 #include<fstream>

+ 2 - 1
apt-pkg/cdrom.h

@@ -1,10 +1,11 @@
 #ifndef PKGLIB_CDROM_H
 #ifndef PKGLIB_CDROM_H
 #define PKGLIB_CDROM_H
 #define PKGLIB_CDROM_H
 
 
-#include<apt-pkg/init.h>
 #include<string>
 #include<string>
 #include<vector>
 #include<vector>
 
 
+class Configuration;
+class OpProgress;
 
 
 class pkgCdromStatus							/*{{{*/
 class pkgCdromStatus							/*{{{*/
 {
 {

+ 1 - 0
apt-pkg/clean.cc

@@ -15,6 +15,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <dirent.h>
 #include <dirent.h>
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 1 - 0
apt-pkg/contrib/cmndline.cc

@@ -13,6 +13,7 @@
 // Include files							/*{{{*/
 // Include files							/*{{{*/
 #include<config.h>
 #include<config.h>
 
 
+#include <apt-pkg/configuration.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>

+ 1 - 3
apt-pkg/contrib/cmndline.h

@@ -44,9 +44,7 @@
 #ifndef PKGLIB_CMNDLINE_H
 #ifndef PKGLIB_CMNDLINE_H
 #define PKGLIB_CMNDLINE_H
 #define PKGLIB_CMNDLINE_H
 
 
-
-
-#include <apt-pkg/configuration.h>
+class Configuration;
 
 
 class CommandLine
 class CommandLine
 {
 {

+ 1 - 0
apt-pkg/contrib/mmap.cc

@@ -21,6 +21,7 @@
 
 
 #include <apt-pkg/mmap.h>
 #include <apt-pkg/mmap.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <sys/mman.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 2 - 1
apt-pkg/contrib/mmap.h

@@ -27,7 +27,8 @@
 
 
 
 
 #include <string>
 #include <string>
-#include <apt-pkg/fileutl.h>
+
+class FileFd;
 
 
 /* This should be a 32 bit type, larger tyes use too much ram and smaller
 /* This should be a 32 bit type, larger tyes use too much ram and smaller
    types are too small. Where ever possible 'unsigned long' should be used
    types are too small. Where ever possible 'unsigned long' should be used

+ 2 - 0
apt-pkg/contrib/netrc.cc

@@ -14,7 +14,9 @@
 #include <config.h>
 #include <config.h>
 
 
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+
 #include <iostream>
 #include <iostream>
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>

+ 3 - 1
apt-pkg/contrib/netrc.h

@@ -14,11 +14,13 @@
 #ifndef NETRC_H
 #ifndef NETRC_H
 #define NETRC_H
 #define NETRC_H
 
 
-#include <apt-pkg/strutl.h>
+#include <string>
 
 
 #define DOT_CHAR "."
 #define DOT_CHAR "."
 #define DIR_CHAR "/"
 #define DIR_CHAR "/"
 
 
+class URI;
+
 // Assume: password[0]=0, host[0] != 0.
 // Assume: password[0]=0, host[0] != 0.
 // If login[0] = 0, search for login and password within a machine section
 // If login[0] = 0, search for login and password within a machine section
 // in the netrc.
 // in the netrc.

+ 1 - 0
apt-pkg/deb/deblistparser.cc

@@ -17,6 +17,7 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/crc-16.h>
 #include <apt-pkg/crc-16.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>

+ 0 - 1
apt-pkg/deb/deblistparser.h

@@ -12,7 +12,6 @@
 #define PKGLIB_DEBLISTPARSER_H
 #define PKGLIB_DEBLISTPARSER_H
 
 
 #include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/pkgcachegen.h>
-#include <apt-pkg/indexfile.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
 
 
 class debListParser : public pkgCacheGenerator::ListParser
 class debListParser : public pkgCacheGenerator::ListParser

+ 3 - 0
apt-pkg/deb/debmetaindex.cc

@@ -4,9 +4,12 @@
 #include <apt-pkg/debmetaindex.h>
 #include <apt-pkg/debmetaindex.h>
 #include <apt-pkg/debindexfile.h>
 #include <apt-pkg/debindexfile.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/indexrecords.h>
+#include <apt-pkg/sourcelist.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 
 
 #include <set>
 #include <set>

+ 22 - 21
apt-pkg/deb/debmetaindex.h

@@ -3,9 +3,10 @@
 #define PKGLIB_DEBMETAINDEX_H
 #define PKGLIB_DEBMETAINDEX_H
 
 
 #include <apt-pkg/metaindex.h>
 #include <apt-pkg/metaindex.h>
-#include <apt-pkg/sourcelist.h>
 
 
 #include <map>
 #include <map>
+#include <string>
+#include <vector>
 
 
 class debReleaseIndex : public metaIndex {
 class debReleaseIndex : public metaIndex {
    public:
    public:
@@ -13,43 +14,43 @@ class debReleaseIndex : public metaIndex {
    class debSectionEntry
    class debSectionEntry
    {
    {
       public:
       public:
-      debSectionEntry (string const &Section, bool const &IsSrc);
-      string const Section;
+      debSectionEntry (std::string const &Section, bool const &IsSrc);
+      std::string const Section;
       bool const IsSrc;
       bool const IsSrc;
    };
    };
 
 
    private:
    private:
    /** \brief dpointer placeholder (for later in case we need it) */
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
    void *d;
-   std::map<string, vector<debSectionEntry const*> > ArchEntries;
+   std::map<std::string, std::vector<debSectionEntry const*> > ArchEntries;
    enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
    enum { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted;
 
 
    public:
    public:
 
 
-   debReleaseIndex(string const &URI, string const &Dist);
-   debReleaseIndex(string const &URI, string const &Dist, bool const Trusted);
+   debReleaseIndex(std::string const &URI, std::string const &Dist);
+   debReleaseIndex(std::string const &URI, std::string const &Dist, bool const Trusted);
    virtual ~debReleaseIndex();
    virtual ~debReleaseIndex();
 
 
-   virtual string ArchiveURI(string const &File) const {return URI + File;};
+   virtual std::string ArchiveURI(std::string const &File) const {return URI + File;};
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const;
-   vector <struct IndexTarget *>* ComputeIndexTargets() const;
-   string Info(const char *Type, string const &Section, string const &Arch="") const;
-   string MetaIndexInfo(const char *Type) const;
-   string MetaIndexFile(const char *Types) const;
-   string MetaIndexURI(const char *Type) const;
-   string IndexURI(const char *Type, string const &Section, string const &Arch="native") const;
-   string IndexURISuffix(const char *Type, string const &Section, string const &Arch="native") const;
-   string SourceIndexURI(const char *Type, const string &Section) const;
-   string SourceIndexURISuffix(const char *Type, const string &Section) const;
-   string TranslationIndexURI(const char *Type, const string &Section) const;
-   string TranslationIndexURISuffix(const char *Type, const string &Section) const;
-   virtual vector <pkgIndexFile *> *GetIndexFiles();
+   std::vector <struct IndexTarget *>* ComputeIndexTargets() const;
+   std::string Info(const char *Type, std::string const &Section, std::string const &Arch="") const;
+   std::string MetaIndexInfo(const char *Type) const;
+   std::string MetaIndexFile(const char *Types) const;
+   std::string MetaIndexURI(const char *Type) const;
+   std::string IndexURI(const char *Type, std::string const &Section, std::string const &Arch="native") const;
+   std::string IndexURISuffix(const char *Type, std::string const &Section, std::string const &Arch="native") const;
+   std::string SourceIndexURI(const char *Type, const std::string &Section) const;
+   std::string SourceIndexURISuffix(const char *Type, const std::string &Section) const;
+   std::string TranslationIndexURI(const char *Type, const std::string &Section) const;
+   std::string TranslationIndexURISuffix(const char *Type, const std::string &Section) const;
+   virtual std::vector <pkgIndexFile *> *GetIndexFiles();
 
 
    void SetTrusted(bool const Trusted);
    void SetTrusted(bool const Trusted);
    virtual bool IsTrusted() const;
    virtual bool IsTrusted() const;
 
 
-   void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
-   void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
+   void PushSectionEntry(std::vector<std::string> const &Archs, const debSectionEntry *Entry);
+   void PushSectionEntry(std::string const &Arch, const debSectionEntry *Entry);
    void PushSectionEntry(const debSectionEntry *Entry);
    void PushSectionEntry(const debSectionEntry *Entry);
 };
 };
 
 

+ 2 - 0
apt-pkg/deb/debrecords.cc

@@ -14,6 +14,8 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/fileutl.h>
+
 #include <langinfo.h>
 #include <langinfo.h>
 									/*}}}*/
 									/*}}}*/
 
 

+ 1 - 1
apt-pkg/deb/debrecords.h

@@ -15,8 +15,8 @@
 #define PKGLIB_DEBRECORDS_H
 #define PKGLIB_DEBRECORDS_H
 
 
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/pkgrecords.h>
-#include <apt-pkg/indexfile.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/fileutl.h>
 
 
 class debRecordParser : public pkgRecords::Parser
 class debRecordParser : public pkgRecords::Parser
 {
 {

+ 3 - 1
apt-pkg/deb/debsystem.h

@@ -11,10 +11,12 @@
 #define PKGLIB_DEBSYSTEM_H
 #define PKGLIB_DEBSYSTEM_H
 
 
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/pkgcache.h>
 
 
 class debSystemPrivate;
 class debSystemPrivate;
-
 class debStatusIndex;
 class debStatusIndex;
+class pkgDepCache;
+
 class debSystem : public pkgSystem
 class debSystem : public pkgSystem
 {
 {
    // private d-pointer
    // private d-pointer

+ 1 - 1
apt-pkg/depcache.cc

@@ -16,13 +16,13 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/algorithms.h>
-
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/progress.h>
 
 
 #include <iostream>
 #include <iostream>
 #include <sstream>
 #include <sstream>

+ 3 - 2
apt-pkg/depcache.h

@@ -40,12 +40,13 @@
 
 
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
-#include <apt-pkg/progress.h>
-#include <apt-pkg/error.h>
 
 
 #include <vector>
 #include <vector>
 #include <memory>
 #include <memory>
 #include <set>
 #include <set>
+#include <list>
+
+class OpProgress;
 
 
 class pkgDepCache : protected pkgCache::Namespace
 class pkgDepCache : protected pkgCache::Namespace
 {
 {

+ 7 - 0
apt-pkg/edsp.cc

@@ -9,17 +9,24 @@
 
 
 #include <apt-pkg/edsp.h>
 #include <apt-pkg/edsp.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/cacheset.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/policy.h>
 #include <apt-pkg/policy.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/progress.h>
 
 
 #include <limits>
 #include <limits>
 #include <stdio.h>
 #include <stdio.h>
 
 
+#include <string>
+
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // we could use pkgCache::DepType and ::Priority, but these would be localized strings…
 // we could use pkgCache::DepType and ::Priority, but these would be localized strings…
 const char * const EDSP::PrioMap[] = {0, "important", "required", "standard",
 const char * const EDSP::PrioMap[] = {0, "important", "required", "standard",
 				      "optional", "extra"};
 				      "optional", "extra"};

+ 8 - 3
apt-pkg/edsp.h

@@ -9,12 +9,17 @@
 #ifndef PKGLIB_EDSP_H
 #ifndef PKGLIB_EDSP_H
 #define PKGLIB_EDSP_H
 #define PKGLIB_EDSP_H
 
 
-#include <apt-pkg/depcache.h>
-#include <apt-pkg/cacheset.h>
-#include <apt-pkg/progress.h>
+#include <apt-pkg/pkgcache.h>
 
 
+#include <list>
 #include <string>
 #include <string>
 
 
+namespace APT {
+	class PackageSet;
+};
+class pkgDepCache;
+class OpProgress;
+
 class EDSP								/*{{{*/
 class EDSP								/*{{{*/
 {
 {
 	// we could use pkgCache::DepType and ::Priority, but these would be localized strings…
 	// we could use pkgCache::DepType and ::Priority, but these would be localized strings…

+ 1 - 0
apt-pkg/edsp/edspindexfile.cc

@@ -15,6 +15,7 @@
 #include <apt-pkg/progress.h>
 #include <apt-pkg/progress.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 0 - 1
apt-pkg/edsp/edspindexfile.h

@@ -8,7 +8,6 @@
 #ifndef PKGLIB_EDSPINDEXFILE_H
 #ifndef PKGLIB_EDSPINDEXFILE_H
 #define PKGLIB_EDSPINDEXFILE_H
 #define PKGLIB_EDSPINDEXFILE_H
 
 
-#include <apt-pkg/indexfile.h>
 #include <apt-pkg/debindexfile.h>
 #include <apt-pkg/debindexfile.h>
 
 
 class edspIndex : public debStatusIndex
 class edspIndex : public debStatusIndex

+ 2 - 3
apt-pkg/edsp/edsplistparser.h

@@ -12,9 +12,8 @@
 #define PKGLIB_EDSPLISTPARSER_H
 #define PKGLIB_EDSPLISTPARSER_H
 
 
 #include <apt-pkg/deblistparser.h>
 #include <apt-pkg/deblistparser.h>
-#include <apt-pkg/pkgcachegen.h>
-#include <apt-pkg/indexfile.h>
-#include <apt-pkg/tagfile.h>
+
+class FileFd;
 
 
 class edspListParser : public debListParser
 class edspListParser : public debListParser
 {
 {

+ 2 - 0
apt-pkg/indexfile.h

@@ -27,10 +27,12 @@
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/macros.h>
 
 
 class pkgAcquire;
 class pkgAcquire;
 class pkgCacheGenerator;
 class pkgCacheGenerator;
 class OpProgress;
 class OpProgress;
+
 class pkgIndexFile
 class pkgIndexFile
 {
 {
    protected:
    protected:

+ 3 - 0
apt-pkg/indexrecords.cc

@@ -10,6 +10,9 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
+
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <clocale>
 #include <clocale>
 
 

+ 0 - 1
apt-pkg/indexrecords.h

@@ -7,7 +7,6 @@
 
 
 
 
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
-#include <apt-pkg/fileutl.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 
 
 #include <map>
 #include <map>

+ 2 - 0
apt-pkg/init.cc

@@ -13,6 +13,8 @@
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <cstdlib>
 #include <cstdlib>
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 2 - 2
apt-pkg/init.h

@@ -13,8 +13,8 @@
 #ifndef PKGLIB_INIT_H
 #ifndef PKGLIB_INIT_H
 #define PKGLIB_INIT_H
 #define PKGLIB_INIT_H
 
 
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/pkgsystem.h>
+class pkgSystem;
+class Configuration;
 
 
 // These lines are extracted by the makefiles and the buildsystem
 // These lines are extracted by the makefiles and the buildsystem
 // Increasing MAJOR or MINOR results in the need of recompiling all
 // Increasing MAJOR or MINOR results in the need of recompiling all

+ 0 - 3
apt-pkg/metaindex.h

@@ -4,10 +4,7 @@
 
 
 #include <string>
 #include <string>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
-#include <apt-pkg/srcrecords.h>
-#include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/indexfile.h>
-#include <apt-pkg/vendor.h>
 
 
 class pkgAcquire;
 class pkgAcquire;
 class pkgCacheGenerator;
 class pkgCacheGenerator;

+ 1 - 2
apt-pkg/packagemanager.h

@@ -23,11 +23,10 @@
 #ifndef PKGLIB_PACKAGEMANAGER_H
 #ifndef PKGLIB_PACKAGEMANAGER_H
 #define PKGLIB_PACKAGEMANAGER_H
 #define PKGLIB_PACKAGEMANAGER_H
 
 
+#include <apt-pkg/pkgcache.h>
 
 
 #include <string>
 #include <string>
 #include <iostream>
 #include <iostream>
-#include <apt-pkg/pkgcache.h>
-#include <apt-pkg/depcache.h>
 #include <set>
 #include <set>
 
 
 class pkgAcquire;
 class pkgAcquire;

+ 2 - 0
apt-pkg/pkgcachegen.cc

@@ -25,6 +25,8 @@
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/pkgsystem.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
+#include <apt-pkg/metaindex.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <vector>
 #include <vector>
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 4 - 2
apt-pkg/pkgsystem.h

@@ -37,14 +37,16 @@
 #ifndef PKGLIB_PKGSYSTEM_H
 #ifndef PKGLIB_PKGSYSTEM_H
 #define PKGLIB_PKGSYSTEM_H
 #define PKGLIB_PKGSYSTEM_H
 
 
+#include <apt-pkg/pkgcache.h>
 
 
-#include <apt-pkg/depcache.h>
 #include <vector>
 #include <vector>
-    
+
+class pkgDepCache;
 class pkgPackageManager;
 class pkgPackageManager;
 class pkgVersioningSystem;
 class pkgVersioningSystem;
 class Configuration;
 class Configuration;
 class pkgIndexFile;
 class pkgIndexFile;
+class PkgFileIterator;
 
 
 class pkgSystem
 class pkgSystem
 {   
 {   

+ 2 - 0
apt-pkg/sourcelist.cc

@@ -15,6 +15,8 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/metaindex.h>
+#include <apt-pkg/indexfile.h>
 
 
 #include <fstream>
 #include <fstream>
 
 

+ 4 - 2
apt-pkg/sourcelist.h

@@ -31,13 +31,15 @@
 #include <vector>
 #include <vector>
 #include <map>
 #include <map>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
-#include <apt-pkg/metaindex.h>
 
 
 using std::string;
 using std::string;
 using std::vector;
 using std::vector;
     
     
 
 
-class pkgAquire;
+class pkgAcquire;
+class pkgIndexFile;
+class metaIndex;
+
 class pkgSourceList
 class pkgSourceList
 {
 {
    public:
    public:

+ 1 - 0
apt-pkg/srcrecords.cc

@@ -17,6 +17,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/metaindex.h>
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/

+ 1 - 0
apt-pkg/tagfile.cc

@@ -16,6 +16,7 @@
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <string>
 #include <string>
 #include <stdio.h>
 #include <stdio.h>

+ 4 - 2
apt-pkg/tagfile.h

@@ -20,10 +20,12 @@
 #ifndef PKGLIB_TAGFILE_H
 #ifndef PKGLIB_TAGFILE_H
 #define PKGLIB_TAGFILE_H
 #define PKGLIB_TAGFILE_H
 
 
-
-#include <apt-pkg/fileutl.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
+#include <string>
+
+class FileFd;
+
 class pkgTagSection
 class pkgTagSection
 {
 {
    const char *Section;
    const char *Section;

+ 2 - 0
apt-pkg/vendorlist.cc

@@ -2,12 +2,14 @@
 
 
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/configuration.h>
 #include <apti18n.h>
 #include <apti18n.h>
 
 
 #if __GNUC__ >= 4
 #if __GNUC__ >= 4
 	#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 	#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 #endif
 #endif
 
 
+#include <apt-pkg/vendor.h>
 #include <apt-pkg/vendorlist.h>
 #include <apt-pkg/vendorlist.h>
 
 
 using std::string;
 using std::string;

+ 3 - 2
apt-pkg/vendorlist.h

@@ -15,10 +15,11 @@
 
 
 #include <string>
 #include <string>
 #include <vector>
 #include <vector>
-#include <apt-pkg/vendor.h>
-#include <apt-pkg/configuration.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>
 
 
+class Vendor;
+class Configuration;
+
 class __deprecated pkgVendorList
 class __deprecated pkgVendorList
 {
 {
    protected:
    protected:

+ 1 - 2
apt-pkg/version.h

@@ -20,8 +20,7 @@
 #ifndef PKGLIB_VERSION_H
 #ifndef PKGLIB_VERSION_H
 #define PKGLIB_VERSION_H
 #define PKGLIB_VERSION_H
 
 
-
-#include <apt-pkg/strutl.h>    
+#include <apt-pkg/strutl.h>
 #include <string>
 #include <string>
 
 
 class pkgVersioningSystem
 class pkgVersioningSystem

+ 3 - 1
cmdline/acqprogress.h

@@ -12,6 +12,8 @@
 
 
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/acquire.h>
 
 
+#include <string>
+
 class AcqTextStatus : public pkgAcquireStatus
 class AcqTextStatus : public pkgAcquireStatus
 {
 {
    unsigned int &ScreenWidth;
    unsigned int &ScreenWidth;
@@ -21,7 +23,7 @@ class AcqTextStatus : public pkgAcquireStatus
    
    
    public:
    public:
    
    
-   virtual bool MediaChange(string Media,string Drive);
+   virtual bool MediaChange(std::string Media,std::string Drive);
    virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
    virtual void IMSHit(pkgAcquire::ItemDesc &Itm);
    virtual void Fetch(pkgAcquire::ItemDesc &Itm);
    virtual void Fetch(pkgAcquire::ItemDesc &Itm);
    virtual void Done(pkgAcquire::ItemDesc &Itm);
    virtual void Done(pkgAcquire::ItemDesc &Itm);

+ 5 - 1
cmdline/apt-cache.cc

@@ -16,7 +16,6 @@
 #include<config.h>
 #include<config.h>
 
 
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
-#include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/cachefile.h>
 #include <apt-pkg/cachefile.h>
 #include <apt-pkg/cacheset.h>
 #include <apt-pkg/cacheset.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
@@ -24,6 +23,7 @@
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/version.h>
@@ -31,6 +31,9 @@
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/metaindex.h>
 
 
 #include <cassert>
 #include <cassert>
 #include <locale.h>
 #include <locale.h>
@@ -40,6 +43,7 @@
 #include <regex.h>
 #include <regex.h>
 #include <stdio.h>
 #include <stdio.h>
 #include <iomanip>
 #include <iomanip>
+#include <algorithm>
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/

+ 2 - 0
cmdline/apt-cdrom.cc

@@ -23,6 +23,8 @@
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/cdrom.h>
 #include <apt-pkg/cdrom.h>
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <locale.h>
 #include <locale.h>
 #include <iostream>
 #include <iostream>

+ 1 - 0
cmdline/apt-config.cc

@@ -24,6 +24,7 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <locale.h>
 #include <locale.h>
 #include <iostream>
 #include <iostream>

+ 1 - 0
cmdline/apt-dump-solver.cc

@@ -12,6 +12,7 @@
 #include <config.h>
 #include <config.h>
 
 
 #include <cstdio>
 #include <cstdio>
+#include <iostream>
 									/*}}}*/
 									/*}}}*/
 
 
 // ShowHelp - Show a help screen					/*{{{*/
 // ShowHelp - Show a help screen					/*{{{*/

+ 1 - 0
cmdline/apt-extracttemplates.cc

@@ -30,6 +30,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>

+ 5 - 0
cmdline/apt-get.cc

@@ -36,6 +36,7 @@
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
 #include <apt-pkg/clean.h>
 #include <apt-pkg/clean.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/version.h>
 #include <apt-pkg/version.h>
@@ -44,6 +45,10 @@
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/md5.h>
 #include <apt-pkg/versionmatch.h>
 #include <apt-pkg/versionmatch.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/indexfile.h>
 
 
 #include "acqprogress.h"
 #include "acqprogress.h"
 
 

+ 2 - 0
cmdline/apt-internal-solver.cc

@@ -11,10 +11,12 @@
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/cachefile.h>
 #include <apt-pkg/cachefile.h>
+#include <apt-pkg/cacheset.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/edsp.h>
 #include <apt-pkg/edsp.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/algorithms.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <config.h>
 #include <config.h>
 #include <apti18n.h>
 #include <apti18n.h>

+ 1 - 0
cmdline/apt-mark.cc

@@ -13,6 +13,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <algorithm>
 #include <algorithm>
 
 

+ 2 - 0
cmdline/apt-sortpkgs.cc

@@ -20,6 +20,8 @@
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <vector>
 #include <vector>
 #include <algorithm>
 #include <algorithm>

+ 2 - 1
debian/changelog

@@ -2,8 +2,9 @@ apt (0.8.16~exp7) experimental; urgency=low
 
 
   [ David Kalnischkies ]
   [ David Kalnischkies ]
   * do not pollute namespace in the headers with using (Closes: #500198)
   * do not pollute namespace in the headers with using (Closes: #500198)
+  * use forward declaration in headers if possible instead of includes
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 19 Sep 2011 13:25:58 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 19 Sep 2011 19:13:48 +0200
 
 
 apt (0.8.16~exp6) experimental; urgency=low
 apt (0.8.16~exp6) experimental; urgency=low
 
 

+ 1 - 0
ftparchive/cachedb.cc

@@ -18,6 +18,7 @@
 #include <apt-pkg/sha2.h>
 #include <apt-pkg/sha2.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
     
     
 #include <netinet/in.h>       // htonl, etc
 #include <netinet/in.h>       // htonl, etc
 
 

+ 4 - 4
ftparchive/cachedb.h

@@ -13,16 +13,16 @@
 #define CACHEDB_H
 #define CACHEDB_H
 
 
 
 
+#include <apt-pkg/debfile.h>
 
 
 #include <db.h>
 #include <db.h>
-#include <string>
-#include <apt-pkg/debfile.h>
 #include <inttypes.h>
 #include <inttypes.h>
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <errno.h>
 #include <errno.h>
-    
+#include <string>
+
 #include "contents.h"
 #include "contents.h"
-    
+
 class CacheDB
 class CacheDB
 {
 {
    protected:
    protected:

+ 2 - 1
ftparchive/contents.h

@@ -12,9 +12,10 @@
     
     
 #include <stdlib.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <stdio.h>
-#include <apt-pkg/debfile.h>
 #include <apt-pkg/dirstream.h>
 #include <apt-pkg/dirstream.h>
 
 
+class debDebFile;
+
 class GenContents
 class GenContents
 {
 {
    struct Node
    struct Node

+ 2 - 3
ftparchive/multicompress.h

@@ -16,11 +16,10 @@
 #ifndef MULTICOMPRESS_H
 #ifndef MULTICOMPRESS_H
 #define MULTICOMPRESS_H
 #define MULTICOMPRESS_H
 
 
-
-
-#include <string>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/aptconfiguration.h>
+
+#include <string>
 #include <stdio.h>
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/types.h>
     
     

+ 3 - 2
ftparchive/writer.h

@@ -22,7 +22,6 @@
 #include <set>
 #include <set>
 
 
 #include "cachedb.h"
 #include "cachedb.h"
-#include "multicompress.h"
 #include "override.h"
 #include "override.h"
 #include "apt-ftparchive.h"
 #include "apt-ftparchive.h"
 
 
@@ -31,7 +30,7 @@ using std::cout;
 using std::endl;
 using std::endl;
 using std::vector;
 using std::vector;
 using std::map;
 using std::map;
-    
+
 class FTWScanner
 class FTWScanner
 {
 {
    protected:
    protected:
@@ -81,6 +80,8 @@ class FTWScanner
    virtual ~FTWScanner() {};
    virtual ~FTWScanner() {};
 };
 };
 
 
+class MultiCompress;
+
 class TranslationWriter
 class TranslationWriter
 {
 {
    MultiCompress *Comp;
    MultiCompress *Comp;

+ 1 - 0
methods/bzip2.cc

@@ -20,6 +20,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <unistd.h>

+ 1 - 0
methods/cdrom.cc

@@ -16,6 +16,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>

+ 2 - 0
methods/connect.cc

@@ -15,6 +15,8 @@
 
 
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
+#include <apt-pkg/acquire-method.h>
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <errno.h>
 #include <errno.h>

+ 2 - 1
methods/connect.h

@@ -11,7 +11,8 @@
 #define CONNECT_H
 #define CONNECT_H
 
 
 #include <string>
 #include <string>
-#include <apt-pkg/acquire-method.h>
+
+class pkgAcqMethod;
 
 
 bool Connect(std::string To,int Port,const char *Service,int DefPort,
 bool Connect(std::string To,int Port,const char *Service,int DefPort,
 	     int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner);
 	     int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner);

+ 1 - 0
methods/copy.cc

@@ -12,6 +12,7 @@
 #include <config.h>
 #include <config.h>
 
 
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>

+ 1 - 0
methods/file.cc

@@ -19,6 +19,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
+#include <apt-pkg/strutl.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <unistd.h>

+ 1 - 0
methods/ftp.cc

@@ -22,6 +22,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/netrc.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>

+ 4 - 0
methods/ftp.h

@@ -10,6 +10,10 @@
 #ifndef APT_FTP_H
 #ifndef APT_FTP_H
 #define APT_FTP_H
 #define APT_FTP_H
 
 
+#include <apt-pkg/strutl.h>
+
+#include <string>
+
 class FTPConn
 class FTPConn
 {
 {
    char Buffer[1024*10];
    char Buffer[1024*10];

+ 1 - 0
methods/gpgv.cc

@@ -5,6 +5,7 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/indexcopy.h>
 #include <apt-pkg/indexcopy.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <utime.h>
 #include <utime.h>
 #include <stdio.h>
 #include <stdio.h>

+ 6 - 0
methods/http.cc

@@ -29,6 +29,7 @@
 
 
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
+#include <apt-pkg/configuration.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/netrc.h>
@@ -288,6 +289,11 @@ void CircleBuf::Stats()
    clog << "Got " << InP << " in " << Diff << " at " << InP/Diff << endl;*/
    clog << "Got " << InP << " in " << Diff << " at " << InP/Diff << endl;*/
 }
 }
 									/*}}}*/
 									/*}}}*/
+CircleBuf::~CircleBuf()
+{
+   delete [] Buf;
+   delete Hash;
+}
 
 
 // ServerState::ServerState - Constructor				/*{{{*/
 // ServerState::ServerState - Constructor				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------

+ 5 - 2
methods/http.h

@@ -13,12 +13,15 @@
 
 
 #define MAXLEN 360
 #define MAXLEN 360
 
 
-#include <apt-pkg/hashes.h>
+#include <apt-pkg/strutl.h>
+
+#include <string>
 
 
 using std::cout;
 using std::cout;
 using std::endl;
 using std::endl;
 
 
 class HttpMethod;
 class HttpMethod;
+class Hashes;
 
 
 class CircleBuf
 class CircleBuf
 {
 {
@@ -80,7 +83,7 @@ class CircleBuf
    void Stats();
    void Stats();
 
 
    CircleBuf(unsigned long long Size);
    CircleBuf(unsigned long long Size);
-   ~CircleBuf() {delete [] Buf; delete Hash;};
+   ~CircleBuf();
 };
 };
 
 
 struct ServerState
 struct ServerState

+ 1 - 0
methods/https.cc

@@ -17,6 +17,7 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/netrc.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>

+ 2 - 1
methods/https.h

@@ -20,7 +20,7 @@ using std::cout;
 using std::endl;
 using std::endl;
 
 
 class HttpsMethod;
 class HttpsMethod;
-
+class FileFd;
 
 
 class HttpsMethod : public pkgAcqMethod
 class HttpsMethod : public pkgAcqMethod
 {
 {
@@ -45,6 +45,7 @@ class HttpsMethod : public pkgAcqMethod
    };
    };
 };
 };
 
 
+#include <apt-pkg/strutl.h>
 URI Proxy;
 URI Proxy;
 
 
 #endif
 #endif

+ 2 - 1
methods/mirror.cc

@@ -18,7 +18,8 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/sourcelist.h>
-
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/metaindex.h>
 
 
 #include <algorithm>
 #include <algorithm>
 #include <fstream>
 #include <fstream>

+ 13 - 12
methods/mirror.h

@@ -11,8 +11,9 @@
 #ifndef APT_MIRROR_H
 #ifndef APT_MIRROR_H
 #define APT_MIRROR_H
 #define APT_MIRROR_H
 
 
-
 #include <iostream>
 #include <iostream>
+#include <string>
+#include <vector>
 
 
 using std::cout;
 using std::cout;
 using std::cerr;
 using std::cerr;
@@ -24,29 +25,29 @@ class MirrorMethod : public HttpMethod
 {
 {
    FetchResult Res;
    FetchResult Res;
    // we simply transform between BaseUri and Mirror
    // we simply transform between BaseUri and Mirror
-   string BaseUri;    // the original mirror://... url
-   string Mirror;     // the selected mirror uri (http://...)
-   vector<string> AllMirrors; // all available mirrors
-   string MirrorFile; // the file that contains the list of mirrors
+   std::string BaseUri;    // the original mirror://... url
+   std::string Mirror;     // the selected mirror uri (http://...)
+   std::vector<std::string> AllMirrors; // all available mirrors
+   std::string MirrorFile; // the file that contains the list of mirrors
    bool DownloadedMirrorFile; // already downloaded this session
    bool DownloadedMirrorFile; // already downloaded this session
-   string Dist;       // the target distrubtion (e.g. sid, oneiric)
+   std::string Dist;       // the target distrubtion (e.g. sid, oneiric)
 
 
    bool Debug;
    bool Debug;
 
 
  protected:
  protected:
-   bool DownloadMirrorFile(string uri);
-   bool RandomizeMirrorFile(string file);
-   string GetMirrorFileName(string uri);
+   bool DownloadMirrorFile(std::string uri);
+   bool RandomizeMirrorFile(std::string file);
+   std::string GetMirrorFileName(std::string uri);
    bool InitMirrors();
    bool InitMirrors();
    bool TryNextMirror();
    bool TryNextMirror();
    void CurrentQueueUriToMirror();
    void CurrentQueueUriToMirror();
-   bool Clean(string dir);
+   bool Clean(std::string dir);
    
    
    // we need to overwrite those to transform the url back
    // we need to overwrite those to transform the url back
-   virtual void Fail(string Why, bool Transient = false);
+   virtual void Fail(std::string Why, bool Transient = false);
    virtual void URIStart(FetchResult &Res);
    virtual void URIStart(FetchResult &Res);
    virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
    virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
-   virtual bool Configuration(string Message);
+   virtual bool Configuration(std::string Message);
 
 
  public:
  public:
    MirrorMethod();
    MirrorMethod();

+ 1 - 0
methods/rred.cc

@@ -7,6 +7,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/uio.h>
 #include <sys/uio.h>

+ 3 - 0
methods/rsh.cc

@@ -14,6 +14,9 @@
 #include <config.h>
 #include <config.h>
 
 
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/hashes.h>
+#include <apt-pkg/configuration.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>

+ 5 - 3
methods/rsh.h

@@ -12,9 +12,9 @@
 
 
 #include <string>
 #include <string>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
-#include <apt-pkg/hashes.h>
-#include <apt-pkg/acquire-method.h>
-#include <apt-pkg/fileutl.h>
+
+class Hashes;
+class FileFd;
 
 
 class RSHConn
 class RSHConn
 {
 {
@@ -50,6 +50,8 @@ class RSHConn
    ~RSHConn();
    ~RSHConn();
 };
 };
 
 
+#include <apt-pkg/acquire-method.h>
+
 class RSHMethod : public pkgAcqMethod
 class RSHMethod : public pkgAcqMethod
 {
 {
    virtual bool Fetch(FetchItem *Itm);
    virtual bool Fetch(FetchItem *Itm);

+ 1 - 0
test/interactive-helper/extract-control.cc

@@ -1,5 +1,6 @@
 #include <apt-pkg/debfile.h>
 #include <apt-pkg/debfile.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/fileutl.h>
 
 
 #include <iostream>
 #include <iostream>
 #include <unistd.h>
 #include <unistd.h>

+ 1 - 0
test/interactive-helper/test_udevcdrom.cc

@@ -3,6 +3,7 @@
 #include <assert.h>
 #include <assert.h>
 
 
 #include <vector>
 #include <vector>
+#include <iostream>
 
 
 int main()
 int main()
 {
 {

+ 2 - 0
test/interactive-helper/testextract.cc

@@ -6,6 +6,8 @@
 #include <apt-pkg/extract.h>
 #include <apt-pkg/extract.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/init.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/pkgsystem.h>
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>