ExpatParser.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_ESIEXPATPARSER_H
10#define SQUID_ESIEXPATPARSER_H
11
12#if USE_SQUID_ESI && HAVE_LIBEXPAT
13
14#include "esi/Parser.h"
15
16#if HAVE_EXPAT_H
17#include <expat.h>
18#endif
19
20class ESIExpatParser : public ESIParser
21{
22
23public:
24 ESIExpatParser(ESIParserClient *);
25 ~ESIExpatParser() override;
26
28 bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream) override;
29
30 long int lineNumber() const override;
31 char const * errorString() const override;
32
34
35private:
37 mutable XML_Parser p;
38 static void Start(void *data, const XML_Char *el, const char **attr);
39 static void End(void *data, const XML_Char *el);
40 static void Default (void *data, const XML_Char *s, int len);
41 static void Comment (void *data, const XML_Char *s);
42 XML_Parser &myParser() const {return p;}
43
44 ESIParserClient *theClient;
45};
46
47#endif /* USE_SQUID_ESI */
48
49#endif /* SQUID_ESIEXPATPARSER_H */
50
virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream)=0
virtual long int lineNumber() const =0
virtual char const * errorString() const =0
#define EsiParserDeclaration
Definition: Parser.h:70
void Start(const Comm::ConnectionPointer &conn, IDCB *callback, void *cbdata)
Definition: Ident.cc:264

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors