HCE project C++ developers source code library
1.1.1
HCE project developer library
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
HttpParser.h
Go to the documentation of this file.
1
#ifndef HTTPPARSER_H
2
#define HTTPPARSER_H
3
#include <sys/types.h>
4
#include <stdlib.h>
5
#include <
string.h
>
6
#include <new>
7
#include <List.h>
8
9
#define HTTP_GET 0
10
#define HTTP_POST 1
11
#define delimiter(x) ( (x) == ' ' || (x) == '\t' || (x) == '\n' || (x) == '\r')
12
13
struct
Variable
14
{
15
char
*
name
;
16
char
*
value
;
17
};
18
class
HttpParser
19
{
20
public
:
21
HttpParser
(
const
char
*content,
size_t
contentLen);
22
~HttpParser
();
23
char
*
getByName
(
const
char
*var);
24
List<Variable*>*
getAll
(){
return
&vars;}
25
short
getMethod
(){
return
method;}
26
private
:
27
void
parseGET();
28
void
parsePOST();
29
void
parse(
const
char
*pos);
30
List<Variable*> vars;
31
short
method;
32
const
char
*content;
33
size_t
contentLen;
34
};
35
#endif
36
sources
applicationFramework
src
HttpParser.h
Generated on Mon Jan 13 2014 13:08:36 for HCE project C++ developers source code library by
1.8.1.2