diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-06-08 12:17:49 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-06-08 12:17:49 +0200 |
commit | 36b8ebbb4a5db4909c3cf739d8ea472f70703662 (patch) | |
tree | 1f61af2b972794c17cc926e8b6746db71d9f744a /apt-pkg/tagfile.h | |
parent | 12cd178d6eb61306cc99e5e07c463c800d406771 (diff) | |
parent | ff72bd0dc7bd4d3bb6979e70d7bca9a07d28af28 (diff) |
* [ABI-Break] Implement EDSP in libapt-pkg so that all front-ends which
* [ABI-Break] merge lp:~mvo/apt/sha512-template to add support for sha512
* [ABI-Break] merge lp:~mvo/apt/dpointer to support easier extending
without breaking the ABI
Diffstat (limited to 'apt-pkg/tagfile.h')
-rw-r--r-- | apt-pkg/tagfile.h | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 61491aa04..23f5c57e6 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -23,16 +23,16 @@ #include <apt-pkg/fileutl.h> #include <stdio.h> - + class pkgTagSection { const char *Section; - // We have a limit of 256 tags per section. unsigned int Indexes[256]; unsigned int AlphaIndexes[0x100]; - unsigned int TagCount; + // dpointer placeholder (for later in case we need it) + void *d; /* This very simple hash function for the last 8 letters gives very good performance on the debian package files */ @@ -44,7 +44,6 @@ class pkgTagSection return Res & 0xFF; } - protected: const char *Stop; @@ -80,17 +79,13 @@ class pkgTagSection }; pkgTagSection() : Section(0), Stop(0) {}; + virtual ~pkgTagSection() {}; }; +class pkgTagFilePrivate; class pkgTagFile { - FileFd &Fd; - char *Buffer; - char *Start; - char *End; - bool Done; - unsigned long iOffset; - unsigned long Size; + pkgTagFilePrivate *d; bool Fill(); bool Resize(); @@ -98,11 +93,11 @@ class pkgTagFile public: bool Step(pkgTagSection &Section); - inline unsigned long Offset() {return iOffset;}; + unsigned long Offset(); bool Jump(pkgTagSection &Tag,unsigned long Offset); pkgTagFile(FileFd *F,unsigned long Size = 32*1024); - ~pkgTagFile(); + virtual ~pkgTagFile(); }; /* This is the list of things to rewrite. The rewriter |