|
|
@ -35,10 +35,10 @@ static |
|
|
int |
|
|
int |
|
|
httpResponseCtor(void * _this, va_list * params) |
|
|
httpResponseCtor(void * _this, va_list * params) |
|
|
{ |
|
|
{ |
|
|
HttpResponse this = _this; |
|
|
|
|
|
|
|
|
TR_HttpResponse this = _this; |
|
|
char * reason; |
|
|
char * reason; |
|
|
|
|
|
|
|
|
TR_PARENTCALL(TR_Response, _this, TR_Class, ctor, params); |
|
|
|
|
|
|
|
|
TR_PARENTCALL(TR_HttpResponse, _this, TR_Class, ctor, params); |
|
|
|
|
|
|
|
|
this->status = va_arg(* params, unsigned int); |
|
|
this->status = va_arg(* params, unsigned int); |
|
|
reason = va_arg(* params, char *); |
|
|
reason = va_arg(* params, char *); |
|
|
@ -53,18 +53,18 @@ static |
|
|
void |
|
|
void |
|
|
httpResponseDtor(void * _this) |
|
|
httpResponseDtor(void * _this) |
|
|
{ |
|
|
{ |
|
|
HttpResponse this = _this; |
|
|
|
|
|
|
|
|
TR_HttpResponse this = _this; |
|
|
|
|
|
|
|
|
TR_MEM_FREE(this->reason); |
|
|
TR_MEM_FREE(this->reason); |
|
|
|
|
|
|
|
|
TR_PARENTCALL(TR_Response, _this, TR_Class, dtor); |
|
|
|
|
|
|
|
|
TR_PARENTCALL(TR_HttpResponse, _this, TR_Class, dtor); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static |
|
|
static |
|
|
size_t |
|
|
size_t |
|
|
sizeGet(void * _this) |
|
|
sizeGet(void * _this) |
|
|
{ |
|
|
{ |
|
|
HttpResponse this = _this; |
|
|
|
|
|
|
|
|
TR_HttpResponse this = _this; |
|
|
size_t size = 0; |
|
|
size_t size = 0; |
|
|
|
|
|
|
|
|
size += strlen(((HttpMessage)this)->version) + 1; |
|
|
size += strlen(((HttpMessage)this)->version) + 1; |
|
|
@ -78,7 +78,7 @@ static |
|
|
char * |
|
|
char * |
|
|
toString(void * _this, char * string) |
|
|
toString(void * _this, char * string) |
|
|
{ |
|
|
{ |
|
|
HttpResponse this = _this; |
|
|
|
|
|
|
|
|
TR_HttpResponse this = _this; |
|
|
|
|
|
|
|
|
strcpy(string, ((HttpMessage)this)->version); |
|
|
strcpy(string, ((HttpMessage)this)->version); |
|
|
string += strlen(string); |
|
|
string += strlen(string); |
|
|
@ -99,7 +99,7 @@ toString(void * _this, char * string) |
|
|
TR_INIT_IFACE(TR_Class, httpResponseCtor, httpResponseDtor, NULL); |
|
|
TR_INIT_IFACE(TR_Class, httpResponseCtor, httpResponseDtor, NULL); |
|
|
TR_INIT_IFACE(HttpIntro, sizeGet, toString); |
|
|
TR_INIT_IFACE(HttpIntro, sizeGet, toString); |
|
|
TR_CREATE_CLASS( |
|
|
TR_CREATE_CLASS( |
|
|
HttpResponse, |
|
|
|
|
|
|
|
|
TR_HttpResponse, |
|
|
HttpMessage, |
|
|
HttpMessage, |
|
|
NULL, |
|
|
NULL, |
|
|
TR_IF(TR_Class), |
|
|
TR_IF(TR_Class), |
|
|
|