]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/tagfile.h
By gosh, I think it works
[apt.git] / apt-pkg / tagfile.h
index 661ac4f23fa2adeacca5ea75043b391425bb500c..c97f86d8850568115a3958465b16c28c14b0863a 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: tagfile.h,v 1.2 1998/07/05 05:33:59 jgg Exp $
+// $Id: tagfile.h,v 1.9 1998/08/26 04:52:24 jgg Exp $
 /* ######################################################################
 
    Fast scanner for RFC-822 type header information
@@ -8,7 +8,7 @@
    This parser handles Debian package files (and others). Their form is
    RFC-822 type header fields in groups seperated by a blank line.
    
-   The parser reads the and provides methods to step linearly
+   The parser reads the file and provides methods to step linearly
    over it or to jump to a pre-recorded start point and read that record.
    
    A second class is used to perform pre-parsing of the record. It works
 #ifndef PKGLIB_TAGFILE_H
 #define PKGLIB_TAGFILE_H
 
-#include <pkglib/fileutl.h>
+#ifdef __GNUG__
+#pragma interface "apt-pkg/tagfile.h"
+#endif 
+
+#include <apt-pkg/fileutl.h>
 
 class pkgTagSection
 {
@@ -46,12 +50,13 @@ class pkgTagSection
 
 class pkgTagFile
 {
-   File Fd;
+   FileFd &Fd;
    char *Buffer;
    char *Start;
    char *End;
    unsigned long Left;
    unsigned long iOffset;
+   unsigned long Size;
    
    bool Fill();
    
@@ -59,8 +64,9 @@ class pkgTagFile
 
    bool Step(pkgTagSection &Section);
    inline unsigned long Offset() {return iOffset;};
+   bool Jump(pkgTagSection &Tag,unsigned long Offset);
    
-   pkgTagFile(File &F);
+   pkgTagFile(FileFd &F,unsigned long Size = 32*1024);
 };
 
 #endif