ReactOS  0.4.15-dev-3303-g1ade494
http.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS HTTP Daemon
4  * FILE: include/http.h
5  */
6 #ifndef __HTTP_H
7 #define __HTTP_H
8 
9 #include <windows.h>
10 
11 // Generel HTTP related constants
12 #define NUMMETHODS 7
13 #define NUMGENERELS 7
14 #define NUMREQUESTS 17
15 #define NUMENTITIES 12
16 
17 // HTTP method constants
18 #define hmOPTIONS 0
19 #define hmGET 1
20 #define hmHEAD 2
21 #define hmPOST 3
22 #define hmPUT 4
23 #define hmDELETE 5
24 #define hmTRACE 6
25 
26 class CHttpParser {
27 public:
28  CHAR sBuffer[2048];
31  CHAR sUri[255];
38  CHttpParser();
39  ~CHttpParser();
40  BOOL Complete();
41  BOOL Parse();
42 private:
43  BOOL ReadChar(LPSTR lpsStr);
44  BOOL PeekChar(LPSTR lpsStr);
45  BOOL ReadString(LPSTR lpsStr, UINT nLength);
47  VOID Skip(CHAR sStr);
48  BOOL Expect(CHAR sStr);
49  BOOL ExpectCRLF();
50  BOOL RequestLine();
54  BOOL MessageBody();
55 };
56 
57 #endif /* __HTTP_H */
BOOL ReadString(LPSTR lpsStr, UINT nLength)
Definition: http.cpp:116
CHAR sHeader[63]
Definition: http.h:33
BOOL Complete()
Definition: http.cpp:49
char CHAR
Definition: xmlstorage.h:175
_In_ DWORD nLength
Definition: wincon.h:473
CHAR sMethod[63]
Definition: http.h:34
CHAR sVersion[15]
Definition: http.h:32
BOOL GenerelHeader()
Definition: http.cpp:253
BOOL bUnknownMethod
Definition: http.h:36
char * LPSTR
Definition: xmlstorage.h:182
BOOL ExpectCRLF()
Definition: http.cpp:184
CHttpParser()
Definition: http.cpp:37
BOOL RequestHeader()
Definition: http.cpp:285
UINT nTail
Definition: http.h:30
BOOL Expect(CHAR sStr)
Definition: http.cpp:170
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL bBadRequest
Definition: http.h:37
BOOL ReadSpecial(LPSTR lpStr, UINT nLength)
Definition: http.cpp:142
BOOL PeekChar(LPSTR lpsStr)
Definition: http.cpp:98
CHAR sUri[255]
Definition: http.h:31
BOOL MessageBody()
Definition: http.cpp:374
BOOL RequestLine()
Definition: http.cpp:213
BOOL EntityHeader()
Definition: http.cpp:350
unsigned int UINT
Definition: ndis.h:50
UINT nHead
Definition: http.h:29
BOOL Parse()
Definition: http.cpp:191
UINT nMethodNo
Definition: http.h:35
BOOL ReadChar(LPSTR lpsStr)
Definition: http.cpp:72
VOID Skip(CHAR sStr)
Definition: http.cpp:161
CHAR sBuffer[2048]
Definition: http.h:28
~CHttpParser()
Definition: http.cpp:44