Rudiments
httpresponse.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information
3
4#ifndef RUDIMENTS_HTTPRESPONSE_H
5#define RUDIMENTS_HTTPRESPONSE_H
6
7#include <rudiments/private/httpresponseincludes.h>
8
11class RUDIMENTS_DLLSPEC httpresponse : public output {
12 public:
15
17 virtual ~httpresponse();
18
23
28
34 void sendContentTypeHeader(const char *type,
35 const char *subtype);
36
45 void sendContentTypeHeader(const char *type,
46 const char *subtype,
47 const char *charset);
48
58 void sendContentTypeHeader(const char *type,
59 const char *subtype,
60 const char *charset,
61 const char *boundary);
62
65 void sendCrLf();
66
68 void setCookie(const char *name, const char *value,
69 const char *domain, const char *path,
70 const char *expires, bool secure);
71
74 const char *getBoundaryString();
75
78
81
83 httpresponse *sendStatusHeader(const char *status);
84
86 httpresponse *sendHeader(const char *header);
87
89 httpresponse *sendHeader(const char *header,
90 const char *value);
91
95 ssize_t write(const byte_t *string, size_t size);
96
100 ssize_t write(const char *string);
101
107 ssize_t write(const char *string, size_t length);
108
112 ssize_t write(char character);
113
117 ssize_t write(const wchar_t *string);
118
124 ssize_t write(const wchar_t *string, size_t length);
125
129 ssize_t write(wchar_t character);
130
134 ssize_t writeUcs2(const ucs2_t *string);
135
141 ssize_t writeUcs2(const ucs2_t *string, size_t length);
142
146 ssize_t writeUcs2(ucs2_t character);
147
151 ssize_t write(int16_t number);
152
156 ssize_t write(int32_t number);
157
161 ssize_t write(int64_t number);
162
166 ssize_t write(byte_t character);
167
171 ssize_t write(uint16_t number);
172
176 ssize_t write(uint32_t number);
177
181 ssize_t write(uint64_t number);
182
186 ssize_t write(float number);
187
191 ssize_t write(double number);
192
194 ssize_t write(file *filebuffer);
195
196 #include <rudiments/private/httpresponse.h>
197
198};
199
200#endif
Definition character.h:11
Definition file.h:19
Definition httpresponse.h:11
ssize_t write(double number)
ssize_t write(wchar_t character)
ssize_t writeUcs2(const ucs2_t *string, size_t length)
ssize_t write(uint16_t number)
ssize_t write(char character)
void sendContentTypeHeader(const char *type, const char *subtype, const char *charset, const char *boundary)
ssize_t write(byte_t character)
ssize_t writeUcs2(const ucs2_t *string)
ssize_t write(const byte_t *string, size_t size)
ssize_t write(const char *string, size_t length)
ssize_t writeUcs2(ucs2_t character)
ssize_t write(file *filebuffer)
ssize_t write(int16_t number)
httpresponse(httpserverapi *sapi)
void sendCrLf()
httpresponse * sendHeader(const char *header, const char *value)
ssize_t write(const wchar_t *string, size_t length)
void setCookie(const char *name, const char *value, const char *domain, const char *path, const char *expires, bool secure)
ssize_t write(uint64_t number)
ssize_t write(float number)
ssize_t write(const char *string)
ssize_t write(int64_t number)
const char * getBoundaryString()
ssize_t write(uint32_t number)
void sendTextPlainHeader()
void sendContentTypeHeader(const char *type, const char *subtype, const char *charset)
void sendTextHtmlHeader()
httpresponse * sendHeader(const char *header)
virtual ~httpresponse()
ssize_t write(const wchar_t *string)
void sendContentTypeHeader(const char *type, const char *subtype)
void sendMultiPartBoundary(output *out)
httpresponse * sendStatusHeader(const char *status)
void sendFinalMultiPartBoundary(output *out)
ssize_t write(int32_t number)
Definition httpserverapi.h:22
Definition output.h:11