26 #include <sys/types.h>
40 HttpResponse
this = _this;
45 this->status = va_arg(* params,
unsigned int);
46 reason = va_arg(* params,
char *);
48 this->reason =
memCalloc(1, strlen(reason)+1);
49 strcpy(this->reason, reason);
58 HttpResponse
this = _this;
69 HttpResponse
this = _this;
72 size += strlen(((HttpMessage)
this)->version) + 1;
74 size += strlen(this->reason) + 2;
83 HttpResponse
this = _this;
85 strcpy(
string, ((HttpMessage)
this)->version);
86 string += strlen(
string);
89 snprintf(
string, 4,
"%d", this->status);
90 string += strlen(
string);
93 strcpy(
string, this->reason);
94 string += strlen(
string);
static int httpResponseCtor(void *_this, va_list *params)
static size_t sizeGet(void *_this)
void * memCalloc(size_t, size_t)
static char * toString(void *_this, char *string)
INIT_IFACE(Class, httpResponseCtor, httpResponseDtor, NULL)
CREATE_CLASS(HttpResponse, HttpMessage, IFACE(Class), IFACE(HttpIntro))
#define PARENTCALL(object, _iface, method,...)
static void httpResponseDtor(void *_this)