diff options
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r-- | apt-pkg/acquire-item.h | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index f763577ee..f39a90c0b 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -194,7 +194,7 @@ class pkgAcquire::Item : public WeakPointable * * \sa pkgAcqMethod */ - virtual void Done(string Message,unsigned long Size,string Hash, + virtual void Done(string Message,unsigned long long Size,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 Size); + virtual void Start(string Message,unsigned long long Size); /** \brief Custom headers to be sent to the fetch process. * @@ -309,7 +309,7 @@ class pkgAcqSubIndex : public pkgAcquire::Item public: // Specialized action members 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 long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string DescURI() {return Desc.URI;}; virtual string Custom600Headers(); @@ -372,7 +372,7 @@ class pkgAcqDiffIndex : public pkgAcquire::Item public: // Specialized action members 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 long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string DescURI() {return RealURI + "Index";}; virtual string Custom600Headers(); @@ -508,7 +508,7 @@ class pkgAcqIndexDiffs : public pkgAcquire::Item */ 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 long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string DescURI() {return RealURI + "Index";}; @@ -581,7 +581,7 @@ class pkgAcqIndex : public pkgAcquire::Item // Specialized action members 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 long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); virtual string DescURI() {return Desc.URI;}; @@ -646,8 +646,9 @@ class pkgAcqIndexTrans : public pkgAcqIndex }; /*}}}*/ /** \brief Information about an index file. */ /*{{{*/ -struct IndexTarget +class IndexTarget { + public: /** \brief A URI from which the index file can be downloaded. */ string URI; @@ -662,14 +663,28 @@ struct IndexTarget */ string MetaKey; - //FIXME: We should use virtual methods here instead… - bool IsOptional() const; - bool IsSubIndex() const; + virtual bool IsOptional() const { + return false; + } + virtual bool IsSubIndex() const { + return false; + } }; /*}}}*/ /** \brief Information about an optional index file. */ /*{{{*/ -struct OptionalIndexTarget : public IndexTarget +class OptionalIndexTarget : public IndexTarget +{ + virtual bool IsOptional() const { + return true; + } +}; + /*}}}*/ +/** \brief Information about an subindex index file. */ /*{{{*/ +class SubIndexTarget : public IndexTarget { + virtual bool IsSubIndex() const { + return true; + } }; /*}}}*/ @@ -723,7 +738,7 @@ class pkgAcqMetaSig : public pkgAcquire::Item // Specialized action members 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 long Size,string Md5Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); virtual string DescURI() {return RealURI; }; @@ -818,7 +833,7 @@ class pkgAcqMetaIndex : public pkgAcquire::Item // Specialized action members virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long Size, string Hash, + virtual void Done(string Message,unsigned long long Size, string Hash, pkgAcquire::MethodConfig *Cnf); virtual string Custom600Headers(); virtual string DescURI() {return RealURI; }; @@ -918,7 +933,7 @@ class pkgAcqArchive : public pkgAcquire::Item public: virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long Size,string Hash, + virtual void Done(string Message,unsigned long long Size,string Hash, pkgAcquire::MethodConfig *Cnf); virtual string DescURI() {return Desc.URI;}; virtual string ShortDesc() {return Desc.ShortDesc;}; @@ -975,7 +990,7 @@ class pkgAcqFile : public pkgAcquire::Item // Specialized action members virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); - virtual void Done(string Message,unsigned long Size,string CalcHash, + virtual void Done(string Message,unsigned long long Size,string CalcHash, pkgAcquire::MethodConfig *Cnf); virtual string DescURI() {return Desc.URI;}; virtual string HashSum() {return ExpectedHash.toStr(); }; @@ -1012,7 +1027,7 @@ 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 Size, + pkgAcqFile(pkgAcquire *Owner, string URI, string Hash, unsigned long long Size, string Desc, string ShortDesc, const string &DestDir="", const string &DestFilename="", bool IsIndexFile=false); |