diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:24 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:53:24 +0000 |
commit | 36375005d9e971d2fdfc62224671f009ce7adaf9 (patch) | |
tree | 4793d82c73be374f8f7a629237af2d73874fb468 /apt-pkg/acquire-item.h | |
parent | 36f610f18a9a12c02ba89c6bb84726f7ed3ba7ad (diff) |
working apt-get source
Author: jgg
Date: 1999-04-07 05:30:17 GMT
working apt-get source
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r-- | apt-pkg/acquire-item.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index e5e7c701d..205537eae 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acquire-item.h,v 1.17 1999/03/27 03:02:38 jgg Exp $ +// $Id: acquire-item.h,v 1.18 1999/04/07 05:30:17 jgg Exp $ /* ###################################################################### Acquire Item - Item to acquire @@ -65,10 +65,10 @@ class pkgAcquire::Item virtual void Done(string Message,unsigned long Size,string Md5Hash); virtual void Start(string Message,unsigned long Size); virtual string Custom600Headers() {return string();}; + virtual string DescURI() = 0; // Inquire functions virtual string MD5Sum() {return string();}; - virtual string Describe() = 0; Item(pkgAcquire *Owner); virtual ~Item(); @@ -89,7 +89,7 @@ class pkgAcqIndex : public pkgAcquire::Item // Specialized action members virtual void Done(string Message,unsigned long Size,string Md5Hash); virtual string Custom600Headers(); - virtual string Describe(); + virtual string DescURI() {return Location->PackagesURI();}; pkgAcqIndex(pkgAcquire *Owner,const pkgSourceList::Item *Location); }; @@ -108,7 +108,7 @@ class pkgAcqIndexRel : public pkgAcquire::Item virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf); virtual void Done(string Message,unsigned long Size,string Md5Hash); virtual string Custom600Headers(); - virtual string Describe(); + virtual string DescURI() {return Location->ReleaseURI();}; pkgAcqIndexRel(pkgAcquire *Owner,const pkgSourceList::Item *Location); }; @@ -136,12 +136,28 @@ class pkgAcqArchive : 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 string Describe(); virtual string MD5Sum() {return MD5;}; + virtual string DescURI() {return Desc.URI;}; pkgAcqArchive(pkgAcquire *Owner,pkgSourceList *Sources, pkgRecords *Recs,pkgCache::VerIterator const &Version, string &StoreFilename); }; +// Fetch a generic file to the current directory +class pkgAcqFile : public pkgAcquire::Item +{ + pkgAcquire::ItemDesc Desc; + string MD5; + + public: + + // Specialized action members + virtual void Done(string Message,unsigned long Size,string Md5Hash); + virtual string DescURI() {return Desc.URI;}; + + pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,unsigned long Size, + string Desc,string ShortDesc); +}; + #endif |