]>
git.saurik.com Git - apt.git/blob - apt-pkg/srcrecords.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: srcrecords.h,v 1.3 1999/04/07 05:30:18 jgg Exp $
4 /* ######################################################################
6 Source Package Records - Allows access to source package records
8 Parses and allows access to the list of source records and searching by
9 source name on that list.
11 ##################################################################### */
13 #ifndef PKGLIB_SRCRECORDS_H
14 #define PKGLIB_SRCRECORDS_H
17 #pragma interface "apt-pkg/srcrecords.h"
20 #include <apt-pkg/fileutl.h>
21 #include <apt-pkg/sourcelist.h>
27 // Describes a single file
35 // Abstract parser for each source record
39 pkgSourceList::const_iterator SrcItem
;
43 inline pkgSourceList::const_iterator
Source() const {return SrcItem
;};
45 virtual bool Restart() = 0;
46 virtual bool Step() = 0;
47 virtual bool Jump(unsigned long Off
) = 0;
48 virtual unsigned long Offset() = 0;
50 virtual string
Package() = 0;
51 virtual string
Version() = 0;
52 virtual string
Maintainer() = 0;
53 virtual string
Section() = 0;
54 virtual const char **Binaries() = 0;
55 virtual bool Files(vector
<File
> &F
) = 0;
57 Parser(FileFd
*File
,pkgSourceList::const_iterator SrcItem
) : File(File
),
59 virtual ~Parser() {delete File
;};
64 // The list of files and the current parser pointer
73 // Locate a package by name
74 Parser
*Find(const char *Package
,bool SrcOnly
= false);
76 pkgSrcRecords(pkgSourceList
&List
);