2012-01-10 00:46:23 +01:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
2011-02-10 02:17:54 +01:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
2011-12-08 02:38:30 +01:00
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
2011-02-10 02:17:54 +01:00
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/response_cpptoc.h"
|
|
|
|
#include "libcef_dll/transfer_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
int CEF_CALLBACK response_get_status(struct _cef_response_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-10 02:17:54 +01:00
|
|
|
return 0;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
int _retval = CefResponseCppToC::Get(self)->GetStatus();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CEF_CALLBACK response_set_status(struct _cef_response_t* self,
|
|
|
|
int status) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefResponseCppToC::Get(self)->SetStatus(
|
|
|
|
status);
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
cef_string_userfree_t CEF_CALLBACK response_get_status_text(
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_response_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-10 02:17:54 +01:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefString _retval = CefResponseCppToC::Get(self)->GetStatusText();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
void CEF_CALLBACK response_set_status_text(struct _cef_response_t* self,
|
2012-01-10 00:46:23 +01:00
|
|
|
const cef_string_t* statusText) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: statusText; type: string_byref_const
|
|
|
|
DCHECK(statusText);
|
|
|
|
if (!statusText)
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefResponseCppToC::Get(self)->SetStatusText(
|
|
|
|
CefString(statusText));
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cef_string_userfree_t CEF_CALLBACK response_get_mime_type(
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_response_t* self) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-04-21 18:46:16 +02:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefString _retval = CefResponseCppToC::Get(self)->GetMimeType();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK response_set_mime_type(struct _cef_response_t* self,
|
2012-01-10 00:46:23 +01:00
|
|
|
const cef_string_t* mimeType) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: mimeType; type: string_byref_const
|
|
|
|
DCHECK(mimeType);
|
|
|
|
if (!mimeType)
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefResponseCppToC::Get(self)->SetMimeType(
|
|
|
|
CefString(mimeType));
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
cef_string_userfree_t CEF_CALLBACK response_get_header(
|
2012-01-10 00:46:23 +01:00
|
|
|
struct _cef_response_t* self, const cef_string_t* name) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return NULL;
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(name);
|
|
|
|
if (!name)
|
2011-02-10 02:17:54 +01:00
|
|
|
return NULL;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefString _retval = CefResponseCppToC::Get(self)->GetHeader(
|
|
|
|
CefString(name));
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void CEF_CALLBACK response_get_header_map(struct _cef_response_t* self,
|
2012-01-10 00:46:23 +01:00
|
|
|
cef_string_multimap_t headerMap) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
2011-02-10 02:17:54 +01:00
|
|
|
return;
|
2011-12-08 02:38:30 +01:00
|
|
|
// Verify param: headerMap; type: string_map_multi_byref
|
|
|
|
DCHECK(headerMap);
|
|
|
|
if (!headerMap)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Translate param: headerMap; type: string_map_multi_byref
|
2012-01-10 00:46:23 +01:00
|
|
|
std::multimap<CefString, CefString> headerMapMultimap;
|
2011-12-08 02:38:30 +01:00
|
|
|
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
2011-02-10 02:17:54 +01:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefResponseCppToC::Get(self)->GetHeaderMap(
|
|
|
|
headerMapMultimap);
|
|
|
|
|
|
|
|
// Restore param: headerMap; type: string_map_multi_byref
|
|
|
|
cef_string_multimap_clear(headerMap);
|
|
|
|
transfer_string_multimap_contents(headerMapMultimap, headerMap);
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
void CEF_CALLBACK response_set_header_map(struct _cef_response_t* self,
|
2012-01-10 00:46:23 +01:00
|
|
|
cef_string_multimap_t headerMap) {
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2011-04-21 18:46:16 +02:00
|
|
|
DCHECK(self);
|
2011-12-08 02:38:30 +01:00
|
|
|
if (!self)
|
|
|
|
return;
|
|
|
|
// Verify param: headerMap; type: string_map_multi_byref_const
|
|
|
|
DCHECK(headerMap);
|
|
|
|
if (!headerMap)
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Translate param: headerMap; type: string_map_multi_byref_const
|
2012-01-10 00:46:23 +01:00
|
|
|
std::multimap<CefString, CefString> headerMapMultimap;
|
2011-12-08 02:38:30 +01:00
|
|
|
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
2011-04-21 18:46:16 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
CefResponseCppToC::Get(self)->SetHeaderMap(
|
|
|
|
headerMapMultimap);
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2011-02-10 02:17:54 +01:00
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefResponseCppToC::CefResponseCppToC(CefResponse* cls)
|
2012-01-10 00:46:23 +01:00
|
|
|
: CefCppToC<CefResponseCppToC, CefResponse, cef_response_t>(cls) {
|
2011-02-10 02:17:54 +01:00
|
|
|
struct_.struct_.get_status = response_get_status;
|
2011-04-21 18:46:16 +02:00
|
|
|
struct_.struct_.set_status = response_set_status;
|
2011-02-10 02:17:54 +01:00
|
|
|
struct_.struct_.get_status_text = response_get_status_text;
|
2011-04-21 18:46:16 +02:00
|
|
|
struct_.struct_.set_status_text = response_set_status_text;
|
|
|
|
struct_.struct_.get_mime_type = response_get_mime_type;
|
|
|
|
struct_.struct_.set_mime_type = response_set_mime_type;
|
2011-02-10 02:17:54 +01:00
|
|
|
struct_.struct_.get_header = response_get_header;
|
|
|
|
struct_.struct_.get_header_map = response_get_header_map;
|
2011-04-21 18:46:16 +02:00
|
|
|
struct_.struct_.set_header_map = response_set_header_map;
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2011-05-20 16:42:25 +02:00
|
|
|
#ifndef NDEBUG
|
2011-02-10 02:17:54 +01:00
|
|
|
template<> long CefCppToC<CefResponseCppToC, CefResponse,
|
|
|
|
cef_response_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|