source: box/trunk/lib/httpserver/HTTPQueryDecoder.h @ 926

Revision 926, 1.1 KB checked in by ben, 6 years ago (diff)

Contribute code: SMTP client, HTTP server, Database drivers, Web app framework, refs #6

Line 
1// --------------------------------------------------------------------------
2//
3// File
4//              Name:    HTTPQueryDecoder.h
5//              Purpose: Utility class to decode HTTP query strings
6//              Created: 26/3/04
7//
8// --------------------------------------------------------------------------
9
10#ifndef HTTPQUERYDECODER__H
11#define HTTPQUERYDECODER__H
12
13#include "HTTPRequest.h"
14
15// --------------------------------------------------------------------------
16//
17// Class
18//              Name:    HTTPQueryDecoder
19//              Purpose: Utility class to decode HTTP query strings
20//              Created: 26/3/04
21//
22// --------------------------------------------------------------------------
23class HTTPQueryDecoder
24{
25public:
26        HTTPQueryDecoder(HTTPRequest::Query_t &rDecodeInto);
27        ~HTTPQueryDecoder();
28private:
29        // no copying
30        HTTPQueryDecoder(const HTTPQueryDecoder &);
31        HTTPQueryDecoder &operator=(const HTTPQueryDecoder &);
32public:
33
34        void DecodeChunk(const char *pQueryString, int QueryStringSize);
35        void Finish();
36
37private:
38        HTTPRequest::Query_t &mrDecodeInto;
39        std::string mCurrentKey;
40        std::string mCurrentValue;
41        bool mInKey;
42        char mEscaped[4];
43        int mEscapedState;
44};
45
46#endif // HTTPQUERYDECODER__H
47
Note: See TracBrowser for help on using the repository browser.