apt @VERSION@

debrecords.h

00001 // -*- mode: cpp; mode: fold -*-
00002 // Description                                                          /*{{{*/
00003 // $Id: debrecords.h,v 1.8 2001/03/13 06:51:46 jgg Exp $
00004 /* ######################################################################
00005    
00006    Debian Package Records - Parser for debian package records
00007    
00008    This provides display-type parsing for the Packages file. This is 
00009    different than the the list parser which provides cache generation
00010    services. There should be no overlap between these two.
00011    
00012    ##################################################################### */
00013                                                                         /*}}}*/
00014 #ifndef PKGLIB_DEBRECORDS_H
00015 #define PKGLIB_DEBRECORDS_H
00016 
00017 #include <apt-pkg/pkgrecords.h>
00018 #include <apt-pkg/indexfile.h>
00019 #include <apt-pkg/tagfile.h>
00020 
00021 class debRecordParser : public pkgRecords::Parser
00022 {
00023    FileFd File;
00024    pkgTagFile Tags;
00025    pkgTagSection Section;
00026    
00027    protected:
00028    
00029    virtual bool Jump(pkgCache::VerFileIterator const &Ver);
00030    virtual bool Jump(pkgCache::DescFileIterator const &Desc);
00031    
00032    public:
00033 
00034    // These refer to the archive file for the Version
00035    virtual string FileName();
00036    virtual string MD5Hash();
00037    virtual string SHA1Hash();
00038    virtual string SHA256Hash();
00039    virtual string SourcePkg();
00040    virtual string SourceVer();
00041    
00042    // These are some general stats about the package
00043    virtual string Maintainer();
00044    virtual string ShortDesc();
00045    virtual string LongDesc();
00046    virtual string Name();
00047    virtual string Homepage();
00048 
00049    virtual void GetRec(const char *&Start,const char *&Stop);
00050    
00051    debRecordParser(string FileName,pkgCache &Cache);
00052 };
00053 
00054 #endif