Browse Source

use forward declaration in headers if possible instead of includes

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

1
apt-inst/contrib/arfile.cc

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

3
apt-inst/contrib/arfile.h

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

1
apt-inst/contrib/extracttar.cc

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

5
apt-inst/contrib/extracttar.h

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

7
apt-inst/database.cc

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

8
apt-inst/database.h

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

1
apt-inst/deb/debfile.cc

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

5
apt-inst/deb/debfile.h

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

2
apt-inst/deb/dpkgdb.cc

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

5
apt-inst/deb/dpkgdb.h

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

1
apt-inst/extract.cc

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

3
apt-inst/filelist.h

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

2
apt-pkg/acquire-item.cc

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

238
apt-pkg/acquire-item.h

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

6
apt-pkg/acquire-method.h

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

3
apt-pkg/algorithms.cc

@ -23,6 +23,9 @@
#include <apt-pkg/sptr.h>
#include <apt-pkg/acquire-item.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 <cstdlib>

3
apt-pkg/algorithms.h

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

1
apt-pkg/cachefile.cc

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

9
apt-pkg/cachefile.h

@ -17,11 +17,12 @@
#ifndef PKGLIB_CACHEFILE_H
#define PKGLIB_CACHEFILE_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
{

1
apt-pkg/cacheiterators.h

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

7
apt-pkg/cacheset.cc

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

13
apt-pkg/cacheset.h

@ -16,9 +16,12 @@
#include <set>
#include <string>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/error.h>
#include <apt-pkg/pkgcache.h>
/*}}}*/
class pkgCacheFile;
namespace APT {
class PackageSet;
class VersionSet;
@ -37,10 +40,10 @@ public: /*{{{*/
ShowError(ShowError), ErrorType(ErrorType) {};
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,
string const &ver, bool const &verIsRel) {};
std::string const &ver, bool const &verIsRel) {};
virtual pkgCache::PkgIterator canNotFindPkgName(pkgCacheFile &Cache, std::string const &str);
virtual PackageSet canNotFindTask(pkgCacheFile &Cache, std::string pattern);
@ -265,7 +268,7 @@ public: /*{{{*/
inline pkgCache::VerFileIterator FileList() const { return (**this).FileList(); };
inline bool Downloadable() const { return (**this).Downloadable(); };
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 pkgCache::VerFileIterator NewestFile() const { return (**this).NewestFile(); };
};

2
apt-pkg/cdrom.cc

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

3
apt-pkg/cdrom.h

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

1
apt-pkg/clean.cc

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

1
apt-pkg/contrib/cmndline.cc

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

4
apt-pkg/contrib/cmndline.h

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

1
apt-pkg/contrib/mmap.cc

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

3
apt-pkg/contrib/mmap.h

@ -27,7 +27,8 @@
#include <string>
#include <apt-pkg/fileutl.h>
class FileFd;
/* 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

2
apt-pkg/contrib/netrc.cc

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

4
apt-pkg/contrib/netrc.h

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

1
apt-pkg/deb/deblistparser.cc

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

1
apt-pkg/deb/deblistparser.h

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

3
apt-pkg/deb/debmetaindex.cc

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

43
apt-pkg/deb/debmetaindex.h

@ -3,9 +3,10 @@
#define PKGLIB_DEBMETAINDEX_H
#include <apt-pkg/metaindex.h>
#include <apt-pkg/sourcelist.h>
#include <map>
#include <string>
#include <vector>
class debReleaseIndex : public metaIndex {
public:
@ -13,43 +14,43 @@ class debReleaseIndex : public metaIndex {
class debSectionEntry
{
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;
};
private:
/** \brief dpointer placeholder (for later in case we need it) */
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;
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 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;
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);
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);
};

2
apt-pkg/deb/debrecords.cc

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

2
apt-pkg/deb/debrecords.h

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

4
apt-pkg/deb/debsystem.h

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

2
apt-pkg/depcache.cc

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

5
apt-pkg/depcache.h

@ -40,12 +40,13 @@
#include <apt-pkg/configuration.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/progress.h>
#include <apt-pkg/error.h>
#include <vector>
#include