revert 2184.1.3: forward declaration instead of headers
authorDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 13 Dec 2011 00:22:38 +0000 (01:22 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Tue, 13 Dec 2011 00:22:38 +0000 (01:22 +0100)
The breakage is just to big for now, so guard the change with
#ifndef APT_8_CLEANER_HEADERS and be nice to library users

28 files changed:
apt-inst/contrib/arfile.h
apt-inst/contrib/extracttar.h
apt-inst/database.h
apt-inst/deb/debfile.h
apt-pkg/acquire-item.h
apt-pkg/acquire-method.h
apt-pkg/algorithms.h
apt-pkg/cachefile.h
apt-pkg/cacheset.h
apt-pkg/cdrom.h
apt-pkg/contrib/cmndline.h
apt-pkg/contrib/mmap.h
apt-pkg/contrib/netrc.h
apt-pkg/deb/deblistparser.h
apt-pkg/deb/debmetaindex.h
apt-pkg/deb/debrecords.h
apt-pkg/depcache.h
apt-pkg/edsp.h
apt-pkg/edsp/edspindexfile.h
apt-pkg/edsp/edsplistparser.h
apt-pkg/indexrecords.h
apt-pkg/init.h
apt-pkg/metaindex.h
apt-pkg/packagemanager.h
apt-pkg/pkgsystem.h
apt-pkg/sourcelist.h
apt-pkg/tagfile.h
apt-pkg/vendorlist.h

index 2be1323..0f62a34 100644 (file)
@@ -17,6 +17,9 @@
 
 
 #include <string>
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
 
 class FileFd;
 
index e104417..4b29df3 100644 (file)
@@ -19,6 +19,8 @@
 #include <string>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/dirstream.h>
+#include <algorithm>
 using std::min;
 #endif
 
index ccfee37..64e149f 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/filelist.h>
+#endif
+
 class pkgFLCache;
 class OpProgress;
 
index 2c4734f..5e1ea1d 100644 (file)
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/pkgcache.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/database.h>
+#endif
+
 class FileFd;
 class pkgDataBase;
 
index 27b8e88..51d5394 100644 (file)
 #include <apt-pkg/weakptr.h>
 #include <apt-pkg/pkgcache.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#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>
+#endif
+
 /** \addtogroup acquire
  *  @{
  *
index c3f042e..2dd9ad6 100644 (file)
 #include <string>
 #include <vector>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/strutl.h>
+#endif
+
 class Hashes;
 class pkgAcqMethod
 {
index fdb64fc..185d11e 100644 (file)
@@ -37,6 +37,7 @@
 #include <iostream>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/acquire.h>
 using std::ostream;
 #endif
 
index b56e428..802b12b 100644 (file)
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/macros.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/acquire.h>
+#include <apt-pkg/policy.h>
+#include <apt-pkg/sourcelist.h>
+#endif
+
 class pkgPolicy;
 class pkgSourceList;
 class OpProgress;
index d1e396e..91d7eec 100644 (file)
 
 #include <apt-pkg/error.h>
 #include <apt-pkg/pkgcache.h>
+
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/cachefile.h>
+#endif
                                                                        /*}}}*/
 
 class pkgCacheFile;
index 4fcf5ab..cedfccf 100644 (file)
@@ -5,6 +5,7 @@
 #include<vector>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/init.h>
 using namespace std;
 #endif
 
index b201d98..9f505fd 100644 (file)
 #ifndef PKGLIB_CMNDLINE_H
 #define PKGLIB_CMNDLINE_H
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/configuration.h>
+#endif
+
 class Configuration;
 
 class CommandLine
index 602de94..6bd4a2d 100644 (file)
@@ -29,6 +29,7 @@
 #include <string>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
 using std::string;
 #endif
 
index 7b94eba..5931d4a 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/strutl.h>
+#endif
+
 #define DOT_CHAR "."
 #define DIR_CHAR "/"
 
index 9519d97..386d291 100644 (file)
 #include <apt-pkg/pkgcachegen.h>
 #include <apt-pkg/tagfile.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/indexfile.h>
+#endif
+
 class debListParser : public pkgCacheGenerator::ListParser
 {
    public:
index 0cba2d8..b9ecab9 100644 (file)
@@ -8,6 +8,10 @@
 #include <string>
 #include <vector>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/sourcelist.h>
+#endif
+
 class debReleaseIndex : public metaIndex {
    public:
 
index 9c7ea6b..b5e3bbd 100644 (file)
 #include <apt-pkg/tagfile.h>
 #include <apt-pkg/fileutl.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/indexfile.h>
+#endif
+
 class debRecordParser : public pkgRecords::Parser
 {
    /** \brief dpointer placeholder (for later in case we need it) */
index f6e6c0a..7358048 100644 (file)
 #include <set>
 #include <list>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/progress.h>
+#include <apt-pkg/error.h>
+#endif
+
 class OpProgress;
 
 class pkgDepCache : protected pkgCache::Namespace
index 07bbbdd..12b06d1 100644 (file)
 #include <list>
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
+#include <apt-pkg/progress.h>
+#endif
+
 class pkgDepCache;
 class OpProgress;
 
index 9670c48..de10f2d 100644 (file)
 
 #include <apt-pkg/debindexfile.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/indexfile.h>
+#endif
+
 class edspIndex : public debStatusIndex
 {
    /** \brief dpointer placeholder (for later in case we need it) */
index 5d82716..a7bf9de 100644 (file)
 
 #include <apt-pkg/deblistparser.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/pkgcachegen.h>
+#include <apt-pkg/indexfile.h>
+#include <apt-pkg/tagfile.h>
+#endif
+
 class FileFd;
 
 class edspListParser : public debListParser
index fa60a08..a98b939 100644 (file)
 #include <vector>
 #include <ctime>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
+
 class indexRecords
 {
    bool parseSumData(const char *&Start, const char *End, std::string &Name,
index 0c1c7ae..b6f3df7 100644 (file)
 #ifndef PKGLIB_INIT_H
 #define PKGLIB_INIT_H
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/pkgsystem.h>
+#endif
+
 class pkgSystem;
 class Configuration;
 
index 0f95257..5783735 100644 (file)
@@ -7,6 +7,9 @@
 #include <apt-pkg/indexfile.h>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/srcrecords.h>
+#include <apt-pkg/pkgrecords.h>
+#include <apt-pkg/vendor.h>
 using std::string;
 #endif
 
index 1d80779..1a6a9f0 100644 (file)
@@ -30,6 +30,7 @@
 #include <set>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
 using std::string;
 #endif
 
index 211fd0d..75f7b9f 100644 (file)
 
 #include <vector>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
+#endif
+
 class pkgDepCache;
 class pkgPackageManager;
 class pkgVersioningSystem;
index 4509e54..03e29ec 100644 (file)
 #include <map>
 #include <apt-pkg/pkgcache.h>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/metaindex.h>
 using std::string;
 using std::vector;
-    
+#endif
 
 class pkgAcquire;
 class pkgIndexFile;
@@ -58,31 +60,31 @@ class pkgSourceList
       const char *Label;
 
       bool FixupURI(string &URI) const;
-      virtual bool ParseLine(vector<metaIndex *> &List,
+      virtual bool ParseLine(std::vector<metaIndex *> &List,
                             const char *Buffer,
-                            unsigned long const &CurLine,string const &File) const;
-      virtual bool CreateItem(vector<metaIndex *> &List,string const &URI,
-                             string const &Dist,string const &Section,
-                             std::map<string, string> const &Options) const = 0;
+                            unsigned long const &CurLine,std::string const &File) const;
+      virtual bool CreateItem(vector<metaIndex *> &List,std::string const &URI,
+                             std::string const &Dist,std::string const &Section,
+                             std::map<std::string, std::string> const &Options) const = 0;
       Type();
       virtual ~Type() {};
    };
    
-   typedef vector<metaIndex *>::const_iterator const_iterator;
+   typedef std::vector<metaIndex *>::const_iterator const_iterator;
    
    protected:
 
-   vector<metaIndex *> SrcList;
+   std::vector<metaIndex *> SrcList;
    
    public:
 
    bool ReadMainList();
-   bool Read(string File);
+   bool Read(std::string File);
 
    // CNC:2003-03-03
    void Reset();
-   bool ReadAppend(string File);
-   bool ReadSourceDir(string Dir);
+   bool ReadAppend(std::string File);
+   bool ReadSourceDir(std::string Dir);
    
    // List accessors
    inline const_iterator begin() const {return SrcList.begin();};
@@ -98,7 +100,7 @@ class pkgSourceList
    time_t GetLastModifiedTime();
 
    pkgSourceList();
-   pkgSourceList(string File);
+   pkgSourceList(std::string File);
    ~pkgSourceList();      
 };
 
index a5bf5ac..fd24471 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
+
 class FileFd;
 
 class pkgTagSection
index 4e05047..a86ccde 100644 (file)
@@ -18,6 +18,8 @@
 #include <apt-pkg/macros.h>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/vendor.h>
+#include <apt-pkg/configuration.h>
 using std::string;
 using std::vector;
 #endif