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
12class RUDIMENTS_DLLSPEC httprequest : public input {
13 public:
15 virtual ~httprequest();
16
17
18
21 virtual void writeVariables();
22
23
24
26 const char *getEnvironmentVariable(const char *name);
27
30
32 const char * const *getEnvironmentVariables();
33
36 const char * const *getEnvironmentValues();
37
41 bool setEnvironmentVariable(const char *name,
42 const char *value);
43
47
48
49
51 const char *getParameter(const char *name);
52
58 const char * const *exceptions);
59
66 const char * const *excepcions);
67
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
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
146
150 const char * const *getAllVariables();
151
154 const char * const *getAllValues();
155
156
157
171 ssize_t read(byte_t *buffer, size_t size);
172
186 ssize_t read(char *buffer, size_t length);
187
201 ssize_t read(char *character);
202
216 ssize_t read(wchar_t *buffer, size_t length);
217
231 ssize_t read(wchar_t *character);
232
246 ssize_t readUcs2(ucs2_t *buffer, size_t length);
247
261 ssize_t readUcs2(ucs2_t *character);
262
276 ssize_t read(int16_t *number);
277
291 ssize_t read(int32_t *number);
292
306 ssize_t read(int64_t *number);
307
320 ssize_t read(byte_t *character);
321
335 ssize_t read(uint16_t *number);
336
350 ssize_t read(uint32_t *number);
351
365 ssize_t read(uint64_t *number);
366
380 ssize_t read(float *number);
381
395 ssize_t read(double *number);
396
397
398
406 virtual bool getMethodIsAllowed(
407 const char *deniedmethods,
408 const char *allowedmethods);
409
419 const char *deniedcontenttypes,
420 const char *allowedcontenttypes);
421
429 virtual bool getIpIsAllowed(
430 const char *deniedips,
431 const char *allowedips);
432
441 const char *deniedreferers,
442 const char *allowedreferers);
443
444
446 const char *variable;
447 bool allowempty;
448 };
449
473
474 #include <rudiments/private/httprequest.h>
475};
476
477
478#endif
Definition character.h:11
Definition httprequest.h:12
uint64_t getCookieCount()
uint64_t getParameterCount()
ssize_t read(int64_t *number)
ssize_t readUcs2(ucs2_t *character)
bool setParameter(const char *name, const char *value)
const char *const * getCookieVariables()
bool getRequiredParametersWereProvided(parameterrequirement **pr)
ssize_t read(int16_t *number)
ssize_t read(uint32_t *number)
ssize_t readUcs2(ucs2_t *buffer, size_t length)
ssize_t read(wchar_t *character)
void writeEnvironment()
virtual bool getContentTypeIsAllowed(const char *deniedcontenttypes, const char *allowedcontenttypes)
virtual bool getMethodIsAllowed(const char *deniedmethods, const char *allowedmethods)
ssize_t read(wchar_t *buffer, size_t length)
const char *const * getEnvironmentValues()
ssize_t read(char *character)
const char *const * getEnvironmentVariables()
const char *const * getAllVariables()
const char * getEnvironmentVariable(const char *name)
const char * getCookie(const char *name)
const char *const * getParameterVariables()
virtual void writeVariables()
ssize_t read(int32_t *number)
bool setCookie(const char *name, const char *value)
virtual bool getIpIsAllowed(const char *deniedips, const char *allowedips)
void getParametersAsGetString(output *container, const char *const *exceptions)
ssize_t read(double *number)
const char * getFileParameterMimeType(const char *name)
uint64_t getEnvironmentVariableCount()
ssize_t read(uint64_t *number)
const char *const * getFileNames()
ssize_t read(char *buffer, size_t length)
ssize_t read(float *number)
ssize_t read(uint16_t *number)
const char * getParameter(const char *name)
virtual bool getRefererIsAllowed(const char *deniedreferers, const char *allowedreferers)
const char * getFileParameterFileName(const char *name)
ssize_t read(byte_t *character)
ssize_t read(byte_t *buffer, size_t size)
bool setEnvironmentVariable(const char *name, const char *value)
uint64_t getFileCount()
bool setFileParameter(const char *name, const char *filename, const char *tempfilename, const char *mimetype)
uint64_t getAllVariableCount()
void getParametersAsHiddenVariables(output *container, const char *const *excepcions)
void removeTempFiles()
const char * getFileParameterTempFileName(const char *name)
const char *const * getCookieValues()
const char *const * getParameterValues()
const char *const * getAllValues()
Definition httpserverapi.h:22
Definition input.h:11
Definition output.h:11
Definition httprequest.h:445