ExpatParser.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
20 class ESIExpatParser : public ESIParser
21 {
22 
23 public:
24  ESIExpatParser(ESIParserClient *);
25  ~ESIExpatParser();
26 
28  bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream);
29 
30  long int lineNumber() const;
31  char const * errorString() const;
32 
34 
35 private:
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 char const * errorString() const =0
#define EsiParserDeclaration
Definition: Parser.h:71
char * p
Definition: membanger.c:43
void const char HLPCB void * data
Definition: stub_helper.cc:16
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
virtual long int lineNumber() const =0
void Start(const Comm::ConnectionPointer &conn, IDCB *callback, void *cbdata)
Definition: Ident.cc:237
virtual bool parse(char const *dataToParse, size_t const lengthOfData, bool const endOfStream)=0

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors