acquire-item.h   acquire-item.h 
skipping to change at line 289 skipping to change at line 289
/** The filename of the diff. */ /** The filename of the diff. */
string file; string file;
/** The sha1 hash of the diff. */ /** The sha1 hash of the diff. */
string sha1; string sha1;
/** The size of the diff. */ /** The size of the diff. */
unsigned long size; unsigned long size;
}; };
/*}} }*/ /*}} }*/
/** \brief An item that is responsible for fetching a SubIndex {{{
*
* The MetaIndex file includes only records for important indexes
* and records for these SubIndex files so these can carry records
* for addition files like PDiffs and Translations
*/
class pkgAcqSubIndex : public pkgAcquire::Item
{
protected:
/** \brief If \b true, debugging information will be written to std::clo
g. */
bool Debug;
/** \brief The item that is currently being downloaded. */
pkgAcquire::ItemDesc Desc;
/** \brief The Hash that this file should have after download
*/
HashString ExpectedHash;
public:
// Specialized action members
virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
virtual void Done(string Message,unsigned long Size,string Md5Hash,
pkgAcquire::MethodConfig *Cnf);
virtual string DescURI() {return Desc.URI;};
virtual string Custom600Headers();
virtual bool ParseIndex(string const &IndexFile);
/** \brief Create a new pkgAcqSubIndex.
*
* \param Owner The Acquire object that owns this item.
*
* \param URI The URI of the list file to download.
*
* \param URIDesc A long description of the list file to download.
*
* \param ShortDesc A short description of the list file to download.
*
* \param ExpectedHash The list file's MD5 signature.
*/
pkgAcqSubIndex(pkgAcquire *Owner, string const &URI,string const &URIDes
c,
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 {{{
* package list diffs and starting the package list's download. * package list diffs and starting the package list's download.
* *
* This item downloads the Index file and parses it, then enqueues * This item downloads the Index file and parses it, then enqueues
* additional downloads of either the individual patches (using * additional downloads of either the individual patches (using
* pkgAcqIndexDiffs) or the entire Packages file (using pkgAcqIndex). * pkgAcqIndexDiffs) or the entire Packages file (using pkgAcqIndex).
* *
* \sa pkgAcqIndexDiffs, pkgAcqIndex * \sa pkgAcqIndexDiffs, pkgAcqIndex
*/ */
class pkgAcqDiffIndex : public pkgAcquire::Item class pkgAcqDiffIndex : public pkgAcquire::Item
skipping to change at line 450 skipping to change at line 494
/** The current status of this patch. */ /** The current status of this patch. */
enum DiffState enum DiffState
{ {
/** \brief The diff is in an unknown state. */ /** \brief The diff is in an unknown state. */
StateFetchUnkown, StateFetchUnkown,
/** \brief The diff is currently being fetched. */ /** \brief The diff is currently being fetched. */
StateFetchDiff, StateFetchDiff,
/** \brief The diff is currently being uncompressed. */ /** \brief The diff is currently being uncompressed. */
StateUnzipDiff, StateUnzipDiff, // FIXME: No longer used
/** \brief The diff is currently being applied. */ /** \brief The diff is currently being applied. */
StateApplyDiff StateApplyDiff
} State; } State;
public: public:
/** \brief Called when the patch file failed to be downloaded. /** \brief Called when the patch file failed to be downloaded.
* *
* This method will fall back to downloading the whole index file * This method will fall back to downloading the whole index file
skipping to change at line 529 skipping to change at line 573
pkgAcquire::ItemDesc Desc; pkgAcquire::ItemDesc Desc;
/** \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; string RealURI;
/** \brief The expected hashsum of the decompressed index file. */ /** \brief The expected hashsum of the decompressed index file. */
HashString ExpectedHash; HashString ExpectedHash;
/** \brief The compression-related file extension that is being /** \brief The compression-related file extensions that are being
* added to the downloaded file (e.g., ".gz" or ".bz2"). * added to the downloaded file one by one if first fails (e.g., "gz bz
2").
*/ */
string CompressionExtension; string CompressionExtension;
public: public:
// Specialized action members // Specialized action members
virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
virtual void Done(string Message,unsigned long Size,string Md5Hash, virtual void Done(string Message,unsigned long Size,string Md5Hash,
pkgAcquire::MethodConfig *Cnf); pkgAcquire::MethodConfig *Cnf);
virtual string Custom600Headers(); virtual string Custom600Headers();
virtual string DescURI() {return RealURI + CompressionExtension;}; virtual string DescURI() {return Desc.URI;};
virtual string HashSum() {return ExpectedHash.toStr(); }; virtual string HashSum() {return ExpectedHash.toStr(); };
/** \brief Create a pkgAcqIndex. /** \brief Create a pkgAcqIndex.
* *
* \param Owner The pkgAcquire object with which this item is * \param Owner The pkgAcquire object with which this item is
* associated. * associated.
* *
* \param URI The URI of the index file that is to be downloaded. * \param URI The URI of the index file that is to be downloaded.
* *
* \param URIDesc A "URI-style" description of this index file. * \param URIDesc A "URI-style" description of this index file.
skipping to change at line 566 skipping to change at line 610
* *
* \param compressExt The compression-related extension with which * \param compressExt The compression-related extension with which
* this index file should be downloaded, or "" to autodetect * this index file should be downloaded, or "" to autodetect
* Compression types can be set with config Acquire::CompressionTypes, * Compression types can be set with config Acquire::CompressionTypes,
* 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, pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc, HashString ExpectedHash, string ShortDesc, HashString ExpectedHash,
string compressExt=""); 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 &ShortD
esc);
}; };
/*}} }*/ /*}} }*/
/** \brief An acquire item that is responsible for fetching a {{{ /** \brief An acquire item that is responsible for fetching a {{{
* translated index file. * translated index file.
* *
* The only difference from pkgAcqIndex is that transient failures * The only difference from pkgAcqIndex is that transient failures
* are suppressed: no error occurs if the translated index file is * are suppressed: no error occurs if the translated index file is
* missing. * missing.
*/ */
class pkgAcqIndexTrans : public pkgAcqIndex class pkgAcqIndexTrans : public pkgAcqIndex
skipping to change at line 595 skipping to change at line 642
* associated. * associated.
* *
* \param URI The URI of the index file that is to be downloaded. * \param URI The URI of the index file that is to be downloaded.
* *
* \param URIDesc A "URI-style" description of this index file. * \param URIDesc A "URI-style" description of this index file.
* *
* \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, pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
string ShortDesc); string ShortDesc);
pkgAcqIndexTrans(pkgAcquire *Owner, struct IndexTarget const * const Tar
get,
HashString const &ExpectedHash, indexRecords const *Meta
IndexParser);
}; };
/*}} }*/ /*}} }*/
/** \brief Information about an index file. */ /*{{ {*/ /** \brief Information about an index file. */ /*{{ {*/
struct IndexTarget struct IndexTarget
{ {
/** \brief A URI from which the index file can be downloaded. */ /** \brief A URI from which the index file can be downloaded. */
string URI; string URI;
/** \brief A description of the index file. */ /** \brief A description of the index file. */
string Description; string Description;
/** \brief A shorter description of the index file. */ /** \brief A shorter description of the index file. */
string ShortDesc; 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; string MetaKey;
//FIXME: We should use virtual methods here instead…
bool IsOptional() const;
bool IsSubIndex() const;
}; };
/*}} }*/ /*}} }*/
/** \brief Information about an optional index file. */
/*{{{*/
struct OptionalIndexTarget : public IndexTarget
{
};
/*}}
}*/
/** \brief An acquire item that downloads the detached signature {{{ /** \brief An acquire item that downloads the detached signature {{{
* of a meta-index (Release) file, then queues up the release * of a meta-index (Release) file, then queues up the release
* file itself. * file itself.
* *
* \todo Why protected members? * \todo Why protected members?
* *
* \sa pkgAcqMetaIndex * \sa pkgAcqMetaIndex
*/ */
class pkgAcqMetaSig : public pkgAcquire::Item class pkgAcqMetaSig : public pkgAcquire::Item
{ {
skipping to change at line 773 skipping to change at line 832
virtual string DescURI() {return RealURI; }; virtual 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 URI,string URIDesc, string ShortDesc,
string SigFile, string SigFile,
const vector<struct IndexTarget*>* IndexTargets, const vector<struct IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser); indexRecords* MetaIndexParser);
}; };
/*}} }*/ /*}} }*/
/** \brief An item repsonsible for downloading clearsigned metaindexes {{{*
/
class pkgAcqMetaClearSig : public pkgAcqMetaIndex
{
/** \brief The URI of the meta-index file for the detached signature */
string MetaIndexURI;
/** \brief A "URI-style" description of the meta-index file */
string MetaIndexURIDesc;
/** \brief A brief description of the meta-index file */
string MetaIndexShortDesc;
/** \brief The URI of the detached meta-signature file if the clearsigne
d one failed. */
string MetaSigURI;
/** \brief A "URI-style" description of the meta-signature file */
string MetaSigURIDesc;
/** \brief A brief description of the meta-signature file */
string MetaSigShortDesc;
public:
void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
/** \brief Create a new pkgAcqMetaClearSig. */
pkgAcqMetaClearSig(pkgAcquire *Owner,
string const &URI, string const &URIDesc, string const &Shor
tDesc,
string const &MetaIndexURI, string const &MetaIndexURIDesc,
string const &MetaIndexShortDesc,
string const &MetaSigURI, string const &MetaSigURIDesc, stri
ng const &MetaSigShortDesc,
const vector<struct IndexTarget*>* IndexTargets,
indexRecords* MetaIndexParser);
};
/*}}
}*/
/** \brief An item that is responsible for fetching a package file. {{{ /** \brief An item that is responsible for fetching a package file. {{{
* *
* If the package file already exists in the cache, nothing will be * If the package file already exists in the cache, nothing will be
* done. * done.
*/ */
class pkgAcqArchive : public pkgAcquire::Item class pkgAcqArchive : public pkgAcquire::Item
{ {
protected: protected:
/** \brief The package version being fetched. */ /** \brief The package version being fetched. */
pkgCache::VerIterator Version; pkgCache::VerIterator Version;
 End of changes. 9 change blocks. 
4 lines changed or deleted 112 lines changed or added


 cacheiterators.h   cacheiterators.h 
skipping to change at line 99 skipping to change at line 99
// Group Iterator /*{{ {*/ // Group Iterator /*{{ {*/
/* Packages with the same name are collected in a Group so someone only /* Packages with the same name are collected in a Group so someone only
interest in package names can iterate easily over the names, so the interest in package names can iterate easily over the names, so the
different architectures can be treated as of the "same" package different architectures can be treated as of the "same" package
(apt internally treat them as totally different packages) */ (apt internally treat them as totally different packages) */
class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> { class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
long HashIndex; long HashIndex;
protected: protected:
inline Group* OwnerPointer() const { inline Group* OwnerPointer() const {
return Owner->GrpP; return (Owner != 0) ? Owner->GrpP : 0;
}; };
public: public:
// This constructor is the 'begin' constructor, never use it. // This constructor is the 'begin' constructor, never use it.
inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(O wner), HashIndex(-1) { inline GrpIterator(pkgCache &Owner) : Iterator<Group, GrpIterator>(O wner), HashIndex(-1) {
S = OwnerPointer(); S = OwnerPointer();
operator ++(0); operator ++(0);
}; };
virtual void operator ++(int); virtual void operator ++(int);
skipping to change at line 140 skipping to change at line 140
inline GrpIterator() : Iterator<Group, GrpIterator>(), HashIndex(0) {}; inline GrpIterator() : Iterator<Group, GrpIterator>(), HashIndex(0) {};
}; };
/*}} }*/ /*}} }*/
// Package Iterator /*{{ {*/ // Package Iterator /*{{ {*/
class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> { class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
long HashIndex; long HashIndex;
protected: protected:
inline Package* OwnerPointer() const { inline Package* OwnerPointer() const {
return Owner->PkgP; return (Owner != 0) ? Owner->PkgP : 0;
}; };
public: public:
// This constructor is the 'begin' constructor, never use it. // This constructor is the 'begin' constructor, never use it.
inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator> (Owner), HashIndex(-1) { inline PkgIterator(pkgCache &Owner) : Iterator<Package, PkgIterator> (Owner), HashIndex(-1) {
S = OwnerPointer(); S = OwnerPointer();
operator ++(0); operator ++(0);
}; };
virtual void operator ++(int); virtual void operator ++(int);
skipping to change at line 187 skipping to change at line 187
if (S == 0) if (S == 0)
S = OwnerPointer(); S = OwnerPointer();
}; };
inline PkgIterator() : Iterator<Package, PkgIterator>(), HashIndex(0 ) {}; inline PkgIterator() : Iterator<Package, PkgIterator>(), HashIndex(0 ) {};
}; };
/*}} }*/ /*}} }*/
// Version Iterator /*{{ {*/ // Version Iterator /*{{ {*/
class pkgCache::VerIterator : public Iterator<Version, VerIterator> { class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
protected: protected:
inline Version* OwnerPointer() const { inline Version* OwnerPointer() const {
return Owner->VerP; return (Owner != 0) ? Owner->VerP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->VerP) S = Owner->VerP + S->Ne xtVer;}; void operator ++(int) {if (S != Owner->VerP) S = Owner->VerP + S->Ne xtVer;};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Comparison // Comparison
int CompareVer(const VerIterator &B) const; int CompareVer(const VerIterator &B) const;
/** \brief compares two version and returns if they are similar /** \brief compares two version and returns if they are similar
skipping to change at line 244 skipping to change at line 244
if (S == 0) if (S == 0)
S = OwnerPointer(); S = OwnerPointer();
}; };
inline VerIterator() : Iterator<Version, VerIterator>() {}; inline VerIterator() : Iterator<Version, VerIterator>() {};
}; };
/*}} }*/ /*}} }*/
// Description Iterator /*{{{*/ // Description Iterator /*{{{*/
class pkgCache::DescIterator : public Iterator<Description, DescIterator> { class pkgCache::DescIterator : public Iterator<Description, DescIterator> {
protected: protected:
inline Description* OwnerPointer() const { inline Description* OwnerPointer() const {
return Owner->DescP; return (Owner != 0) ? Owner->DescP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->DescP) S = Owner->DescP + S-> NextDesc;}; void operator ++(int) {if (S != Owner->DescP) S = Owner->DescP + S-> NextDesc;};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Comparison // Comparison
int CompareDesc(const DescIterator &B) const; int CompareDesc(const DescIterator &B) const;
skipping to change at line 273 skipping to change at line 273
S = Owner.DescP; S = Owner.DescP;
}; };
}; };
/*}} }*/ /*}} }*/
// Dependency iterator /*{{ {*/ // Dependency iterator /*{{ {*/
class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> { class pkgCache::DepIterator : public Iterator<Dependency, DepIterator> {
enum {DepVer, DepRev} Type; enum {DepVer, DepRev} Type;
protected: protected:
inline Dependency* OwnerPointer() const { inline Dependency* OwnerPointer() const {
return Owner->DepP; return (Owner != 0) ? Owner->DepP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->DepP) S = Owner->DepP + void operator ++(int) {if (S != Owner->DepP) S = Owner->DepP +
(Type == DepVer ? S->NextDepends : S->NextRevDepends);}; (Type == DepVer ? S->NextDepends : S->NextRevDepends);};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Accessors // Accessors
inline const char *TargetVer() const {return S->Version == 0?0:Owner ->StrP + S->Version;}; inline const char *TargetVer() const {return S->Version == 0?0:Owner ->StrP + S->Version;};
skipping to change at line 318 skipping to change at line 318
}; };
inline DepIterator() : Iterator<Dependency, DepIterator>(), Type(Dep Ver) {}; inline DepIterator() : Iterator<Dependency, DepIterator>(), Type(Dep Ver) {};
}; };
/*}} }*/ /*}} }*/
// Provides iterator /*{{ {*/ // Provides iterator /*{{ {*/
class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> { class pkgCache::PrvIterator : public Iterator<Provides, PrvIterator> {
enum {PrvVer, PrvPkg} Type; enum {PrvVer, PrvPkg} Type;
protected: protected:
inline Provides* OwnerPointer() const { inline Provides* OwnerPointer() const {
return Owner->ProvideP; return (Owner != 0) ? Owner->ProvideP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->ProvideP) S = Owner->ProvideP + void operator ++(int) {if (S != Owner->ProvideP) S = Owner->ProvideP +
(Type == PrvVer?S->NextPkgProv:S->NextProvides);}; (Type == PrvVer?S->NextPkgProv:S->NextProvides);};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Accessors // Accessors
inline const char *Name() const {return Owner->StrP + Owner->PkgP[S- >ParentPkg].Name;}; inline const char *Name() const {return Owner->StrP + Owner->PkgP[S- >ParentPkg].Name;};
skipping to change at line 352 skipping to change at line 352
Iterator<Provides, PrvIterator>(Owner, Trg), Type(PrvPkg) { Iterator<Provides, PrvIterator>(Owner, Trg), Type(PrvPkg) {
if (S == 0) if (S == 0)
S = Owner.ProvideP; S = Owner.ProvideP;
}; };
}; };
/*}} }*/ /*}} }*/
// Package file /*{{{*/ // Package file /*{{{*/
class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileItera tor> { class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileItera tor> {
protected: protected:
inline PackageFile* OwnerPointer() const { inline PackageFile* OwnerPointer() const {
return Owner->PkgFileP; return (Owner != 0) ? Owner->PkgFileP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->PkgFileP) S = Owner->PkgFileP + S->NextFile;}; void operator ++(int) {if (S != Owner->PkgFileP) S = Owner->PkgFileP + S->NextFile;};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Accessors // Accessors
inline const char *FileName() const {return S->FileName == 0?0:Owner ->StrP + S->FileName;}; inline const char *FileName() const {return S->FileName == 0?0:Owner ->StrP + S->FileName;};
inline const char *Archive() const {return S->Archive == 0?0:Owner-> StrP + S->Archive;}; inline const char *Archive() const {return S->Archive == 0?0:Owner-> StrP + S->Archive;};
skipping to change at line 385 skipping to change at line 385
// Constructors // Constructors
inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {}; inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {};
inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgF ileIterator>(Owner, Owner.PkgFileP) {}; inline PkgFileIterator(pkgCache &Owner) : Iterator<PackageFile, PkgF ileIterator>(Owner, Owner.PkgFileP) {};
inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator< PackageFile, PkgFileIterator>(Owner, Trg) {}; inline PkgFileIterator(pkgCache &Owner,PackageFile *Trg) : Iterator< PackageFile, PkgFileIterator>(Owner, Trg) {};
}; };
/*}} }*/ /*}} }*/
// Version File /*{{{*/ // Version File /*{{{*/
class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFil eIterator> { class pkgCache::VerFileIterator : public pkgCache::Iterator<VerFile, VerFil eIterator> {
protected: protected:
inline VerFile* OwnerPointer() const { inline VerFile* OwnerPointer() const {
return Owner->VerFileP; return (Owner != 0) ? Owner->VerFileP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->VerFileP) S = Owner->VerFileP + S->NextFile;}; void operator ++(int) {if (S != Owner->VerFileP) S = Owner->VerFileP + S->NextFile;};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Accessors // Accessors
inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S ->File + Owner->PkgFileP);}; inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S ->File + Owner->PkgFileP);};
inline VerFileIterator() : Iterator<VerFile, VerFileIterator>() {}; inline VerFileIterator() : Iterator<VerFile, VerFileIterator>() {};
inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Iterator<VerF ile, VerFileIterator>(Owner, Trg) {}; inline VerFileIterator(pkgCache &Owner,VerFile *Trg) : Iterator<VerF ile, VerFileIterator>(Owner, Trg) {};
}; };
/*}} }*/ /*}} }*/
// Description File /*{{ {*/ // Description File /*{{ {*/
class pkgCache::DescFileIterator : public Iterator<DescFile, DescFileIterat or> { class pkgCache::DescFileIterator : public Iterator<DescFile, DescFileIterat or> {
protected: protected:
inline DescFile* OwnerPointer() const { inline DescFile* OwnerPointer() const {
return Owner->DescFileP; return (Owner != 0) ? Owner->DescFileP : 0;
}; };
public: public:
// Iteration // Iteration
void operator ++(int) {if (S != Owner->DescFileP) S = Owner->DescFil eP + S->NextFile;}; void operator ++(int) {if (S != Owner->DescFileP) S = Owner->DescFil eP + S->NextFile;};
inline void operator ++() {operator ++(0);}; inline void operator ++() {operator ++(0);};
// Accessors // Accessors
inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S ->File + Owner->PkgFileP);}; inline PkgFileIterator File() const {return PkgFileIterator(*Owner,S ->File + Owner->PkgFileP);};
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added


 config.h   config.h 
skipping to change at line 41 skipping to change at line 41
/* Define if we have enabled pthread support */ /* Define if we have enabled pthread support */
/* #undef HAVE_PTHREAD */ /* #undef HAVE_PTHREAD */
/* If there is no socklen_t, define this for the netdb shim */ /* If there is no socklen_t, define this for the netdb shim */
/* #undef NEED_SOCKLEN_T_DEFINE */ /* #undef NEED_SOCKLEN_T_DEFINE */
/* Define the arch name string */ /* Define the arch name string */
#define COMMON_ARCH "i386" #define COMMON_ARCH "i386"
/* The version number string */ /* The version number string */
#define VERSION "0.8.10.3" #define VERSION "0.8.11.1"
/* The package name string */ /* The package name string */
#define PACKAGE "apt" #define PACKAGE "apt"
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added


 debmetaindex.h   debmetaindex.h 
skipping to change at line 40 skipping to change at line 40
virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) con st; virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) con st;
vector <struct IndexTarget *>* ComputeIndexTargets() const; vector <struct IndexTarget *>* ComputeIndexTargets() const;
string Info(const char *Type, string const &Section, string const &Arch= "") const; string Info(const char *Type, string const &Section, string const &Arch= "") const;
string MetaIndexInfo(const char *Type) const; string MetaIndexInfo(const char *Type) const;
string MetaIndexFile(const char *Types) const; string MetaIndexFile(const char *Types) const;
string MetaIndexURI(const char *Type) const; string MetaIndexURI(const char *Type) const;
string IndexURI(const char *Type, string const &Section, string const &A rch="native") const; string IndexURI(const char *Type, string const &Section, string const &A rch="native") const;
string IndexURISuffix(const char *Type, string const &Section, string co nst &Arch="native") const; string IndexURISuffix(const char *Type, string const &Section, string co nst &Arch="native") const;
string SourceIndexURI(const char *Type, const string &Section) const; string SourceIndexURI(const char *Type, const string &Section) const;
string SourceIndexURISuffix(const char *Type, const string &Section) con st; string SourceIndexURISuffix(const char *Type, const string &Section) con st;
string TranslationIndexURI(const char *Type, const string &Section) cons
t;
string TranslationIndexURISuffix(const char *Type, const string &Section
) const;
virtual vector <pkgIndexFile *> *GetIndexFiles(); virtual vector <pkgIndexFile *> *GetIndexFiles();
virtual bool IsTrusted() const; virtual bool IsTrusted() const;
void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry); void PushSectionEntry(vector<string> const &Archs, const debSectionEntry *Entry);
void PushSectionEntry(string const &Arch, const debSectionEntry *Entry); void PushSectionEntry(string const &Arch, const debSectionEntry *Entry);
void PushSectionEntry(const debSectionEntry *Entry); void PushSectionEntry(const debSectionEntry *Entry);
}; };
#endif #endif
 End of changes. 1 change blocks. 
0 lines changed or deleted 4 lines changed or added


 depcache.h   depcache.h 
skipping to change at line 399 skipping to change at line 399
void MarkKeep(PkgIterator const &Pkg, bool Soft = false, void MarkKeep(PkgIterator const &Pkg, bool Soft = false,
bool FromUser = true, unsigned long Depth = 0); bool FromUser = true, unsigned long Depth = 0);
void MarkDelete(PkgIterator const &Pkg, bool Purge = false, void MarkDelete(PkgIterator const &Pkg, bool Purge = false,
unsigned long Depth = 0, bool FromUser = true); unsigned long Depth = 0, bool FromUser = true);
void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true, void MarkInstall(PkgIterator const &Pkg,bool AutoInst = true,
unsigned long Depth = 0, bool FromUser = true, unsigned long Depth = 0, bool FromUser = true,
bool ForceImportantDeps = false); bool ForceImportantDeps = false);
void SetReInstall(PkgIterator const &Pkg,bool To); void SetReInstall(PkgIterator const &Pkg,bool To);
void SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo = tru e); void SetCandidateVersion(VerIterator TargetVer, bool const &Pseudo = tru e);
bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
std::string const &TargetRel);
/** Set the candidate version for dependencies too if needed.
*
* Sets not only the candidate version as SetCandidateVersion does,
* but walks also down the dependency tree and checks if it is required
* to set the candidate of the dependency to a version from the given
* release, too.
*
* \param TargetVer new candidate version of the package
* \param TargetRel try to switch to this release if needed
* \param[out] Changed a list of pairs consisting of the \b old
* version of the changed package and the version which
* required the switch of this dependency
* \return \b true if the switch was successful, \b false otherwise
*/
bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
std::string const &TargetRel,
std::list<std::pair<pkgCache::VerIterator, pkgCa
che::VerIterator> > &Changed);
/** Set the "is automatically installed" flag of Pkg. */ /** Set the "is automatically installed" flag of Pkg. */
void MarkAuto(const PkgIterator &Pkg, bool Auto); void MarkAuto(const PkgIterator &Pkg, bool Auto);
// @} // @}
/** \return \b true if it's OK for MarkInstall to install /** \return \b true if it's OK for MarkInstall to install
* the given package. * the given package.
* *
* See the default implementation for a simple example how this * See the default implementation for a simple example how this
* method can be used. * method can be used.
 End of changes. 1 change blocks. 
0 lines changed or deleted 20 lines changed or added


 fileutl.h   fileutl.h 
skipping to change at line 75 skipping to change at line 75
unsigned long Size(); unsigned long Size();
unsigned long FileSize(); unsigned long FileSize();
bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666); bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666);
bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false); bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false);
bool Close(); bool Close();
bool Sync(); bool Sync();
// Simple manipulators // Simple manipulators
inline int Fd() {return iFd;}; inline int Fd() {return iFd;};
inline void Fd(int fd) {iFd = fd;}; inline void Fd(int fd) {iFd = fd;};
inline gzFile gzFd() {return gz;};
inline bool IsOpen() {return iFd >= 0;}; inline bool IsOpen() {return iFd >= 0;};
inline bool Failed() {return (Flags & Fail) == Fail;}; inline bool Failed() {return (Flags & Fail) == Fail;};
inline void EraseOnFailure() {Flags |= DelOnFail;}; inline void EraseOnFailure() {Flags |= DelOnFail;};
inline void OpFail() {Flags |= Fail;}; inline void OpFail() {Flags |= Fail;};
inline bool Eof() {return (Flags & HitEof) == HitEof;}; inline bool Eof() {return (Flags & HitEof) == HitEof;};
inline string &Name() {return FileName;}; inline string &Name() {return FileName;};
FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(- 1), FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(- 1),
Flags(0), gz(NULL) Flags(0), gz(NULL)
{ {
skipping to change at line 96 skipping to change at line 97
}; };
FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose), gz(NULL) {}; FileFd(int Fd = -1) : iFd(Fd), Flags(AutoClose), gz(NULL) {};
FileFd(int Fd,bool) : iFd(Fd), Flags(0), gz(NULL) {}; FileFd(int Fd,bool) : iFd(Fd), Flags(0), gz(NULL) {};
virtual ~FileFd(); virtual ~FileFd();
}; };
bool RunScripts(const char *Cnf); bool RunScripts(const char *Cnf);
bool CopyFile(FileFd &From,FileFd &To); bool CopyFile(FileFd &From,FileFd &To);
int GetLock(string File,bool Errors = true); int GetLock(string File,bool Errors = true);
bool FileExists(string File); bool FileExists(string File);
bool RealFileExists(string File);
bool DirectoryExists(string const &Path) __attrib_const; bool DirectoryExists(string const &Path) __attrib_const;
bool CreateDirectory(string const &Parent, string const &Path); bool CreateDirectory(string const &Parent, string const &Path);
/** \brief Ensure the existence of the given Path /** \brief Ensure the existence of the given Path
* *
* \param Parent directory of the Path directory - a trailing * \param Parent directory of the Path directory - a trailing
* /apt/ will be removed before CreateDirectory call. * /apt/ will be removed before CreateDirectory call.
* \param Path which should exist after (successful) call * \param Path which should exist after (successful) call
*/ */
bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path); bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path);
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 strutl.h   strutl.h 
skipping to change at line 53 skipping to change at line 53
string OutputInDepth(const unsigned long Depth, const char* Separator=" ") ; string OutputInDepth(const unsigned long Depth, const char* Separator=" ") ;
string URItoFileName(const string &URI); string URItoFileName(const string &URI);
string TimeRFC1123(time_t Date); string TimeRFC1123(time_t Date);
bool RFC1123StrToTime(const char* const str,time_t &time) __must_check; bool RFC1123StrToTime(const char* const str,time_t &time) __must_check;
bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check; bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check;
__deprecated bool StrToTime(const string &Val,time_t &Result); __deprecated bool StrToTime(const string &Val,time_t &Result);
string LookupTag(const string &Message,const char *Tag,const char *Default = 0); string LookupTag(const string &Message,const char *Tag,const char *Default = 0);
int StringToBool(const string &Text,int Default = -1); int StringToBool(const string &Text,int Default = -1);
bool ReadMessages(int Fd, vector<string> &List); bool ReadMessages(int Fd, vector<string> &List);
bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0); bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0);
bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length); bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length);
bool TokSplitString(char Tok,char *Input,char **List, bool TokSplitString(char Tok,char *Input,char **List,
unsigned long ListMax); unsigned long ListMax);
vector<string> VectorizeString(string const &haystack, char const &split) _ _attrib_const; vector<string> VectorizeString(string const &haystack, char const &split) _ _attrib_const;
void ioprintf(ostream &out,const char *format,...) __like_printf(2); void ioprintf(ostream &out,const char *format,...) __like_printf(2);
void strprintf(string &out,const char *format,...) __like_printf(2); void strprintf(string &out,const char *format,...) __like_printf(2);
char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_p rintf(3); char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_p rintf(3);
bool CheckDomainList(const string &Host, const string &List); bool CheckDomainList(const string &Host, const string &List);
int tolower_ascii(int const c) __attrib_const __hot; int tolower_ascii(int const c) __attrib_const __hot;
string StripEpoch(const string &VerStr);
#define APT_MKSTRCMP(name,func) \ #define APT_MKSTRCMP(name,func) \
inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B +strlen(B));}; \ inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B +strlen(B));}; \
inline int name(const char *A,const char *AEnd,const char *B) {return func( A,AEnd,B,B+strlen(B));}; \ inline int name(const char *A,const char *AEnd,const char *B) {return func( A,AEnd,B,B+strlen(B));}; \
inline int name(const string& A,const char *B) {return func(A.c_str(),A.c_s tr()+A.length(),B,B+strlen(B));}; \ inline int name(const string& A,const char *B) {return func(A.c_str(),A.c_s tr()+A.length(),B,B+strlen(B));}; \
inline int name(const string& A,const string& B) {return func(A.c_str(),A.c _str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ inline int name(const string& A,const string& B) {return func(A.c_str(),A.c _str()+A.length(),B.c_str(),B.c_str()+B.length());}; \
inline int name(const string& A,const char *B,const char *BEnd) {return fun c(A.c_str(),A.c_str()+A.length(),B,BEnd);}; inline int name(const string& A,const char *B,const char *BEnd) {return fun c(A.c_str(),A.c_str()+A.length(),B,BEnd);};
#define APT_MKSTRCMP2(name,func) \ #define APT_MKSTRCMP2(name,func) \
inline int name(const char *A,const char *AEnd,const char *B) {return func( A,AEnd,B,B+strlen(B));}; \ inline int name(const char *A,const char *AEnd,const char *B) {return func( A,AEnd,B,B+strlen(B));}; \
 End of changes. 2 change blocks. 
0 lines changed or deleted 2 lines changed or added


 tagfile.h   tagfile.h 
skipping to change at line 61 skipping to change at line 61
inline bool operator ==(const pkgTagSection &rhs) {return Section == rhs .Section;}; inline bool operator ==(const pkgTagSection &rhs) {return Section == rhs .Section;};
inline bool operator !=(const pkgTagSection &rhs) {return Section != rhs .Section;}; inline bool operator !=(const pkgTagSection &rhs) {return Section != rhs .Section;};
bool Find(const char *Tag,const char *&Start, const char *&End) const; bool Find(const char *Tag,const char *&Start, const char *&End) const;
bool Find(const char *Tag,unsigned &Pos) const; bool Find(const char *Tag,unsigned &Pos) const;
string FindS(const char *Tag) const; string FindS(const char *Tag) const;
signed int FindI(const char *Tag,signed long Default = 0) const ; signed int FindI(const char *Tag,signed long Default = 0) const ;
unsigned long long FindULL(const char *Tag, unsigned long long const &De fault = 0) const; unsigned long long FindULL(const char *Tag, unsigned long long const &De fault = 0) const;
bool FindFlag(const char *Tag,unsigned long &Flags, bool FindFlag(const char *Tag,unsigned long &Flags,
unsigned long Flag) const; unsigned long Flag) const;
bool static const FindFlag(unsigned long &Flags, unsigned long Flag,
const char* Start, const char* Stop);
bool Scan(const char *Start,unsigned long MaxLength); bool Scan(const char *Start,unsigned long MaxLength);
inline unsigned long size() const {return Stop - Section;}; inline unsigned long size() const {return Stop - Section;};
void Trim(); void Trim();
virtual void TrimRecord(bool BeforeRecord, const char* &End); virtual void TrimRecord(bool BeforeRecord, const char* &End);
inline unsigned int Count() const {return TagCount;}; inline unsigned int Count() const {return TagCount;};
inline bool Exists(const char* const Tag) {return AlphaIndexes[AlphaHash (Tag)] != 0;} inline bool Exists(const char* const Tag) {return AlphaIndexes[AlphaHash (Tag)] != 0;}
inline void Get(const char *&Start,const char *&Stop,unsigned int I) con st inline void Get(const char *&Start,const char *&Stop,unsigned int I) con st
{Start = Section + Indexes[I]; Stop = Section + Indexes[ I+1];} {Start = Section + Indexes[I]; Stop = Section + Indexes[ I+1];}
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added


 weakptr.h   weakptr.h 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
#ifndef WEAK_POINTER_H #ifndef WEAK_POINTER_H
#define WEAK_POINTER_H #define WEAK_POINTER_H
#include <set> #include <set>
#include <stddef.h>
/** /**
* Class for objects providing support for weak pointers. * Class for objects providing support for weak pointers.
* *
* This class allows for the registration of certain pointers as weak, * This class allows for the registration of certain pointers as weak,
* which will cause them to be set to NULL when the destructor of the * which will cause them to be set to NULL when the destructor of the
* object is called. * object is called.
*/ */
class WeakPointable { class WeakPointable {
private: private:
std::set<WeakPointable**> pointers; std::set<WeakPointable**> pointers;
 End of changes. 1 change blocks. 
0 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/