summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edsplistparser.h
blob: 7d9eb5849439ef3f646104cab46e7cd540d0a928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
/* ######################################################################

   EDSP Package List Parser - This implements the abstract parser
   interface for the APT specific intermediate format which is passed
   to external resolvers

   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_EDSPLISTPARSER_H
#define PKGLIB_EDSPLISTPARSER_H

#include <apt-pkg/deblistparser.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgcache.h>

#include <string>
#include <string_view>


class APT_HIDDEN edspLikeListParser : public debListParser
{
   public:
   bool NewVersion(pkgCache::VerIterator &Ver) override;
   std::vector<std::string> AvailableDescriptionLanguages() override;
   std::string_view Description_md5() override;
   uint32_t VersionHash() override;

   explicit edspLikeListParser(FileFd *File);
   ~edspLikeListParser() override;
};

class APT_HIDDEN edspListParser : public edspLikeListParser
{
   FileFd extendedstates;
   FileFd preferences;

protected:
   bool ParseStatus(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver) override;

public:
   explicit edspListParser(FileFd *File);
   ~edspListParser() override;
};

class APT_HIDDEN eippListParser : public edspLikeListParser
{
protected:
   bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver) override;

public:
   explicit eippListParser(FileFd *File);
   ~eippListParser() override;
};
#endif