-
Notifications
You must be signed in to change notification settings - Fork 7
/
xml2c_read.h
executable file
·58 lines (43 loc) · 1.04 KB
/
xml2c_read.h
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
57
58
/*
* Id: $Id: xml2c_read.h 4823 2015-03-28 20:17:30Z cseagle $
* Last Updated: $LastChangedDate: 2015-03-28 20:17:30 +0000 (Sat, 28 Mar 2015) $
*/
#ifndef __XML2C_READ_H
#define __XML2C_READ_H
#include <sys/time.h>
#include <libxml/tree.h>
#include <stdint.h>
#include <pcre.h>
#include <vector>
using std::vector;
#include "action.h"
class MatchPart;
struct Slice;
struct Regex;
class Xml2cRead : public Action {
private:
static unsigned int readId;
unsigned int id;
char *var;
Slice *slice;
Regex *varRegex;
vector<MatchPart*> matchParts;
vector<uint8_t> *delim;
bool lengthIsVar;
unsigned int readLen;
char *lengthVar;
unsigned int timeout_val;
struct timeval timeout;
int echo;
bool invert;
bool povMode;
void doRead(FILE *outfile);
//disable copy
Xml2cRead(const Xml2cRead &rr) {};
const Xml2cRead &operator=(const Xml2cRead &rr) {return *this;}
public:
Xml2cRead(xmlNode *n, bool echoEnable = true);
~Xml2cRead();
virtual void generate(FILE *conn);
};
#endif