]> git.saurik.com Git - apt.git/blame - apt-pkg/tagfile-compat.cc
use buffered writing for InRelease splitting
[apt.git] / apt-pkg / tagfile-compat.cc
CommitLineData
eff0c22e
JAK
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3// $Id: tagfile.cc,v 1.37.2.2 2003/12/31 16:02:30 mdz Exp $
4/* ######################################################################
5
6 Fast scanner for RFC-822 type header information
7
8 This uses a rotating buffer to load the package information into.
9 The scanner runs over it and isolates and indexes a single section.
10
11 This defines compat functions for the external code.
12
13 ##################################################################### */
14 /*}}}*/
15
16#include<config.h>
17#define APT_COMPILING_TAGFILE_COMPAT_CC
18#include <apt-pkg/tagfile.h>
19
20using std::string;
21using APT::StringView;
22
23
24bool pkgTagSection::Exists(const char* const Tag) const
25{
26 return Exists(StringView(Tag));
27}
28
29bool pkgTagSection::Find(const char *Tag,unsigned int &Pos) const
30{
31 return Find(StringView(Tag), Pos);
32}
33
34bool pkgTagSection::Find(const char *Tag,const char *&Start,
35 const char *&End) const
36{
37 return Find(StringView(Tag), Start, End);
38}
39
40string pkgTagSection::FindS(const char *Tag) const
41{
42 return Find(StringView(Tag)).to_string();
43}
44
45string pkgTagSection::FindRawS(const char *Tag) const
46{
47 return FindRaw(StringView(Tag)).to_string();
48}
49
50signed int pkgTagSection::FindI(const char *Tag,signed long Default) const
51{
52 return FindI(StringView(Tag), Default);
53}
54
55unsigned long long pkgTagSection::FindULL(const char *Tag, unsigned long long const &Default) const
56{
57 return FindULL(StringView(Tag), Default);
58}
59 /*}}}*/
60
61bool pkgTagSection::FindB(const char *Tag, bool const &Default) const
62{
63 return FindB(StringView(Tag), Default);
64}
65
66bool pkgTagSection::FindFlag(const char * const Tag, uint8_t &Flags,
67 uint8_t const Flag) const
68{
69 return FindFlag(StringView(Tag), Flags, Flag);
70}
71
72bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags,
73 unsigned long Flag) const
74{
75 return FindFlag(StringView(Tag), Flags, Flag);
76}