Rudiments: /home/dmuse/temp/rudiments/include/rudiments/httprequest.h Source File

Rudiments

httprequest.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information
3
4 #ifndef RUDIMENTS_HTTPREQUEST_H
5 #define RUDIMENTS_HTTPREQUEST_H
6
7 #include <rudiments/private/httprequestincludes.h>
8
12 class RUDIMENTS_DLLSPEC httprequest {
13 public:
14 httprequest(httpserverapi *sapi);
15 virtual ~httprequest();
16
17
18
21 virtual void dumpVariables();
22
23
24
26 const char *getEnvironmentVariable(const char *name);
27
29 uint64_t getEnvironmentVariableCount();
30
32 const char * const *getEnvironmentVariables();
33
36 const char * const *getEnvironmentValues();
37
41 bool setEnvironmentVariable(const char *name,
42 const char *value);
43
46 void dumpEnvironment();
47
48
49
51 const char *getParameter(const char *name);
52
57 void getParametersAsGetString(output *container,
58 const char * const *exceptions);
59
65 void getParametersAsHiddenVariables(output *container,
66 const char * const *excepcions);
67
69 uint64_t getParameterCount();
70
74 const char * const *getParameterVariables();
75
78 const char * const *getParameterValues();
79
83 bool setParameter(const char *name, const char *value);
84
85
86
89 const char *getFileParameterFilename(const char *name);
90
93 const char *getFileParameterTempFilename(const char *name);
94
96 const char *getFileParameterMimeType(const char *name);
97
99 uint64_t getFileCount();
100
104 const char * const *getFileNames();
105
110 bool setFileParameter(const char *name,
111 const char *filename,
112 const char *tempfilename,
113 const char *mimetype);
114
117 void removeTempFiles();
118
119
120
122 const char *getCookie(const char *name);
123
125 uint64_t getCookieCount();
126
130 const char * const *getCookieVariables();
131
134 const char * const *getCookieValues();
135
139 bool setCookie(const char *name, const char *value);
140
141
142
145 uint64_t getAllVariableCount();
146
150 const char * const *getAllVariables();
151
154 const char * const *getAllValues();
155
163 virtual bool methodAllowed(const char *deniedmethods,
164 const char *allowedmethods);
165
173 virtual bool ipAllowed(const char *deniedips,
174 const char *allowedips);
175
183 virtual bool refererAllowed(const char *deniedreferers,
184 const char *allowedreferers);
185
186
187 struct parameterrequirement {
188 const char *variable;
189 bool allowempty;
190 };
191
213 bool requiredParameters(parameterrequirement **pr);
214
215 #include <rudiments/private/httprequest.h>
216 };
217
218
219 #endif
httprequest
Definition: httprequest.h:12
httprequest::getFileParameterTempFilename
const char * getFileParameterTempFilename(const char *name)
httprequest::getCookieValues
const char *const * getCookieValues()
httprequest::getAllVariables
const char *const * getAllVariables()
httprequest::getCookieCount
uint64_t getCookieCount()
httprequest::getParameterCount
uint64_t getParameterCount()
httprequest::setParameter
bool setParameter(const char *name, const char *value)
httprequest::dumpVariables
virtual void dumpVariables()
httprequest::getEnvironmentVariables
const char *const * getEnvironmentVariables()
httprequest::getFileParameterMimeType
const char * getFileParameterMimeType(const char *name)
httprequest::getParameterVariables
const char *const * getParameterVariables()
httprequest::getAllValues
const char *const * getAllValues()
httprequest::ipAllowed
virtual bool ipAllowed(const char *deniedips, const char *allowedips)
httprequest::refererAllowed
virtual bool refererAllowed(const char *deniedreferers, const char *allowedreferers)
httprequest::dumpEnvironment
void dumpEnvironment()
httprequest::getParameterValues
const char *const * getParameterValues()
httprequest::methodAllowed
virtual bool methodAllowed(const char *deniedmethods, const char *allowedmethods)
httprequest::setCookie
bool setCookie(const char *name, const char *value)
httprequest::getParametersAsGetString
void getParametersAsGetString(output *container, const char *const *exceptions)
httprequest::getEnvironmentValues
const char *const * getEnvironmentValues()
httprequest::requiredParameters
bool requiredParameters(parameterrequirement **pr)
httprequest::getEnvironmentVariableCount
uint64_t getEnvironmentVariableCount()
httprequest::getCookieVariables
const char *const * getCookieVariables()
httprequest::getFileNames
const char *const * getFileNames()
httprequest::getCookie
const char * getCookie(const char *name)
httprequest::getParameter
const char * getParameter(const char *name)
httprequest::setEnvironmentVariable
bool setEnvironmentVariable(const char *name, const char *value)
httprequest::getFileCount
uint64_t getFileCount()
httprequest::setFileParameter
bool setFileParameter(const char *name, const char *filename, const char *tempfilename, const char *mimetype)
httprequest::getAllVariableCount
uint64_t getAllVariableCount()
httprequest::getParametersAsHiddenVariables
void getParametersAsHiddenVariables(output *container, const char *const *excepcions)
httprequest::removeTempFiles
void removeTempFiles()
httprequest::getFileParameterFilename
const char * getFileParameterFilename(const char *name)
httprequest::getEnvironmentVariable
const char * getEnvironmentVariable(const char *name)
httpserverapi
Definition: httpserverapi.h:9
output
Definition: output.h:9
httprequest::parameterrequirement
Definition: httprequest.h:187