forked from loafle/openapi-generator-original
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh * Rename sample folder: qt5cpp -> cpp-qt5 * Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh * Rename sample folder: cpprest -> cpp-restsdk * Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen * Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh * Rename sample folder: tizen -> cpp-tizen * Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh * Rename sample folder(security): qt5cpp -> cpp-qt5 * Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat * Change sample folder * Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat * Change sample folder * Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat * Change sample folder * Change output folder: tizen -> cpp-tizen * Rename the scripts under bin/openapi3 cpp-restsdk is not exist under bin/openapi3 * Change sample folder
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
#ifndef _REQUESTINFO_H_
|
|
#define _REQUESTINFO_H_
|
|
|
|
#include "NetClient.h"
|
|
|
|
using namespace std;
|
|
|
|
namespace Tizen{
|
|
namespace ArtikCloud {
|
|
|
|
class RequestInfo {
|
|
public:
|
|
string host;
|
|
string path;
|
|
string method;
|
|
map<string, string> queryParams;
|
|
string mBody;
|
|
struct curl_slist* headerList;
|
|
MemoryStruct_s *p_chunk;
|
|
long *code;
|
|
char *errormsg;
|
|
void *userData;
|
|
void(* handler)();
|
|
bool (*processor)(MemoryStruct_s, long, char*, void*, void(*)());
|
|
GThread *thread;
|
|
|
|
RequestInfo(string host, string path, string method, map<string, string> queryParams,
|
|
string mBody, struct curl_slist* headerList, MemoryStruct_s* p_chunk, long* code,
|
|
char* errormsg, void* userData, void(* voidHandler)(),
|
|
bool (*processor)(MemoryStruct_s, long, char*, void*, void(*)()))
|
|
{
|
|
this->host = host;
|
|
this->path = path;
|
|
this->method = method;
|
|
this->queryParams = queryParams;
|
|
this->mBody = mBody;
|
|
this->headerList = headerList;
|
|
this->p_chunk = p_chunk;
|
|
this->code = new long (*code);
|
|
this->errormsg = errormsg;
|
|
this->userData = userData;
|
|
this->handler = reinterpret_cast<void(*)()>(voidHandler);
|
|
this->processor = processor;
|
|
}
|
|
|
|
~RequestInfo()
|
|
{
|
|
curl_slist_free_all(headerList);
|
|
if (this->p_chunk) {
|
|
if((this->p_chunk)->memory) {
|
|
free((this->p_chunk)->memory);
|
|
}
|
|
delete (p_chunk);
|
|
}
|
|
delete (this->code);
|
|
if (this->errormsg) {
|
|
free(this->errormsg);
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
}
|
|
#endif /* REQUESTINFO_H_ */
|