summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-item.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-04-15 11:27:58 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-04-15 11:27:58 +0000
commitac5b205a831168ee76e8760e19eb7d43aa361851 (patch)
treeffdd7a31b57c952ffd16db4fe10dce5ed6bb36d9 /apt-pkg/acquire-item.h
parent5c2d9c95d85122aca1fe18356097380dc8ded879 (diff)
* first rewrite of the apt pdiff support patch finished
Diffstat (limited to 'apt-pkg/acquire-item.h')
-rw-r--r--apt-pkg/acquire-item.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h
index ea71153d5..f56fd0465 100644
--- a/apt-pkg/acquire-item.h
+++ b/apt-pkg/acquire-item.h
@@ -82,6 +82,41 @@ class pkgAcquire::Item
virtual ~Item();
};
+// item for index diffs
+class pkgAcqIndexDiffs : public pkgAcquire::Item
+{
+ protected:
+ bool Debug;
+ pkgAcquire::ItemDesc Desc;
+ string RealURI;
+ string ExpectedMD5;
+ // this is the SHA-1 sum we expect after the patching
+ string ServerSha1;
+ string CurrentPackagesFile;
+ string Description;
+ vector<string> needed_files;
+
+ 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 RealURI + "Index";};
+
+
+ // various helpers
+ bool ParseIndexDiff(string IndexDiffFile);
+ void QueueDiffIndex(string URI);
+ bool QueueNextDiff();
+ bool ApplyDiff(string PatchFile);
+ void Finish(bool allDone=false);
+
+ pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc,
+ string ShortDesct, string ExpectedMD5,
+ vector<string> diffs=vector<string>());
+};
+
// Item class for index files
class pkgAcqIndex : public pkgAcquire::Item
{
@@ -92,7 +127,7 @@ class pkgAcqIndex : public pkgAcquire::Item
pkgAcquire::ItemDesc Desc;
string RealURI;
string ExpectedMD5;
-
+
public:
// Specialized action members