]> git.saurik.com Git - apt.git/commitdiff
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 2be1323d1d97ffd375f99d94ce6ae93c60efc390..0f62a34a06bd41025bb88c9c1013c7fcccc3fa3e 100644 (file)
@@ -17,6 +17,9 @@
 
 
 #include <string>
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
 
 class FileFd;
 
index e104417c12890fdff4b7b8d09b02dada51be5960..4b29df3141ae71dfbd54c08fae1b5f381f17a899 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 ccfee3797a134c2a115c8439e7102a2e9e98bace..64e149f98c8b3cc980bed5ae57c2cd2995bae594 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/filelist.h>
+#endif
+
 class pkgFLCache;
 class OpProgress;
 
index 2c4734f9ed47ea3ed3be06b7cad10a98672ceb67..5e1ea1d2f3e505f90ed801c327ad3a9f9b75413a 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 27b8e887bba7a4d4440930321a7546a53675227b..51d539450b012b69e3d3603b7d01eee9c18370dd 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 c3f042ee061d999efb786fbfb7a064efd4aee8bf..2dd9ad685877682058b8a1f1527f5459f3484835 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 fdb64fc5970ab6e866a1e050090b94d2e824e3c5..185d11e963da1c374258f902974e348335e687c0 100644 (file)
@@ -37,6 +37,7 @@
 #include <iostream>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/acquire.h>
 using std::ostream;
 #endif
 
index b56e4285563729516967c93b72d810f174efb791..802b12b619dd8b233a16a2cab0679613e5868c1b 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 d1e396e0f1dae5d6d79b806a81a69a7d765daac0..91d7eec1cfb0311a8d412fe5e51c5497d163a58f 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 4fcf5abcd6965a490ccf064fde578073f4c35162..cedfccff71f8fc4a86d2dace109ca3073b836932 100644 (file)
@@ -5,6 +5,7 @@
 #include<vector>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/init.h>
 using namespace std;
 #endif
 
index b201d98550d62aaffad9941b7fc5f5cd9cdda4c8..9f505fd410547edc8fc2678872a2caa4dfe08e64 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 602de94f8fffca140504d99a5d7ead27aedf5653..6bd4a2d863ca3c118252021c74e0715c5099b068 100644 (file)
@@ -29,6 +29,7 @@
 #include <string>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
 using std::string;
 #endif
 
index 7b94eba88a4c5dc7b5c6380305e2ae8e808a636c..5931d4a429fe061d47c858c80e95a108e7444897 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/strutl.h>
+#endif
+
 #define DOT_CHAR "."
 #define DIR_CHAR "/"
 
index 9519d9711e42c7bf1cd7bb913dd17068943f222c..386d291a2e1378a260a977e03db9137f04fe4748 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 0cba2d8a8f0484e8b352d758604cd27b2c994166..b9ecab97cda0dd5abbe57b36286870346576c6aa 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 9c7ea6b486c8e5803d0d8a6db3623030def2d19a..b5e3bbdba85fd552141784daa3049863224ba9e4 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 f6e6c0afc5aa9ebccffc1b74d293dd3ef0d7e322..7358048ed55dec79fa3370fcdc1f860031fc7239 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 07bbbdd03baad1738b0c9f50d1fed3ee32305530..12b06d143098702b9822082bcaaed6fcc100acce 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 9670c4837d6c540bff1ef3e85c820ccc64b41c80..de10f2d2f7a4ba20a25527b65359c2fc9f0c06db 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 5d82716c7b02613c83223552874c47d6c1ecbfa6..a7bf9de9590a5270cc46a6c1e4b58035fb7d0046 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 fa60a08479991d53047baffcf3f2afce271925ed..a98b939bc69476f1514f20f6054082cd01490a20 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 0c1c7ae5a8b0d4ee9d780805be7176dc6fea56e6..b6f3df7537b65eb52635b583631c02fcdb5bffce 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 0f95257e07ee41e116acef75e7ba3134db3df7d2..5783735ff32e9925247c699438cdcc38ec423299 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 1d807795d30f4f74cd35ced50f3fd0ab44359d5e..1a6a9f01c7ad0bbfcb06484f2ce82d8d9b064627 100644 (file)
@@ -30,6 +30,7 @@
 #include <set>
 
 #ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
 using std::string;
 #endif
 
index 211fd0d5616a5a2ae632f9ee41ff1bd3b02cf2ce..75f7b9fcc3b6a236fa3b500b94e76d1c4d0c5587 100644 (file)
 
 #include <vector>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/depcache.h>
+#endif
+
 class pkgDepCache;
 class pkgPackageManager;
 class pkgVersioningSystem;
index 4509e54b9bbc7afde6e6a0c2c0e79e3c437fd99f..03e29ec345f16dbd91b5095591faed70acd9cf67 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 a5bf5ac90914ec86f0b937508437cc81483e54d8..fd24471c19e83efe1df2e027a25ee0b3f3b80fc1 100644 (file)
 
 #include <string>
 
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
+
 class FileFd;
 
 class pkgTagSection
index 4e050477f039e9a1ae2c30d407d36a8b32609cca..a86ccde7cd6b1370eb7929510452536aa725097c 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