本文整理汇总了C++中HeaderList::addElement方法的典型用法代码示例。如果您正苦于以下问题:C++ HeaderList::addElement方法的具体用法?C++ HeaderList::addElement怎么用?C++ HeaderList::addElement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HeaderList
的用法示例。
在下文中一共展示了HeaderList::addElement方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: call_ruby_proc
void CHttpServer::call_ruby_proc( rho::String const &query, String const &body )
{
unsigned long valProc = 0;
convertFromStringA( query.c_str(), valProc );
HeaderList headers;
headers.addElement(HttpHeader("Content-Type","application/x-www-form-urlencoded"));
VALUE req = create_request_hash("", "", "", "", "POST", "", String(), headers, body);
addHashToHash(req,"proc",valProc);
VALUE data = callFramework(req);
String strReply = String(getStringFromValue(data), getStringLenFromValue(data));
rho_ruby_releaseValue(data);
send_response(strReply);
}
示例2: MemHeader
void *mem_alloc_legacy_ex(MEM_FLAG_T flags)
{
#ifdef FILE_DUMP
fprintf(fp_dump, "mem_alloc_legacy_ex %x\n", flags);
#endif
GhwMemHandle *handle;
MemHeader *header = NULL;
handle = mem_allocator->alloc(LEGACY_BLOCK_SIZE, 12);
header = new MemHeader(handle,LEGACY_BLOCK_SIZE,12,flags);
header->setNode(mem_list.addElement(header,0));
return header->getVirt();
}
示例3: call_ruby_method
bool CHttpServer::call_ruby_method(String const &uri, String const &body, String& strReply)
{
Route route;
if (!dispatch(uri, route))
return false;
HeaderList headers;
headers.addElement(HttpHeader("Content-Type","application/x-www-form-urlencoded"));
VALUE req = create_request_hash(route.application, route.model, route.action, route.id,
"POST", uri, String(), headers, body);
VALUE data = callFramework(req);
strReply = String(getStringFromValue(data), getStringLenFromValue(data));
rho_ruby_releaseValue(data);
return true;
}
示例4: mem_wrap
MEM_HANDLE_T mem_wrap(void *p, uint32_t phys,uint32_t size, uint32_t align, MEM_FLAG_T flags, const char *desc)
{
#ifdef FILE_DUMP
fprintf(fp_dump, "mem_wrap %x %x %x %x %x %x\n", p, phys, size, align, flags, desc);
#endif
GhwMemHandle* handle;
MemHeader* header;
if((p == NULL) || (phys == NULL)) {
return MEM_HANDLE_INVALID;
}
handle = (GhwMemHandle*) new GhwMemHandleWrap(size, phys, p);
header = new MemHeader(handle,size,align,flags);
header->setNode(mem_list.addElement(header, 0));
return (void*)header;
}