2013-01-17 19:39:09 +01:00
|
|
|
// Copyright (c) 2013 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
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
2011-02-10 02:17:54 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/response_ctocpp.h"
|
|
|
|
#include "libcef_dll/transfer_util.h"
|
|
|
|
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
int CefResponseCToCpp::GetStatus() {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, get_status))
|
2011-02-10 02:17:54 +01:00
|
|
|
return 0;
|
2011-12-08 02:38:30 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
int _retval = struct_->get_status(struct_);
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CefResponseCToCpp::SetStatus(int status) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, set_status))
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
struct_->set_status(struct_,
|
|
|
|
status);
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CefString CefResponseCToCpp::GetStatusText() {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, get_status_text))
|
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_string_userfree_t _retval = struct_->get_status_text(struct_);
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CefResponseCToCpp::SetStatusText(const CefString& statusText) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, set_status_text))
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: statusText; type: string_byref_const
|
|
|
|
DCHECK(!statusText.empty());
|
|
|
|
if (statusText.empty())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
struct_->set_status_text(struct_,
|
|
|
|
statusText.GetStruct());
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CefString CefResponseCToCpp::GetMimeType() {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, get_mime_type))
|
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_string_userfree_t _retval = struct_->get_mime_type(struct_);
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CefResponseCToCpp::SetMimeType(const CefString& mimeType) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, set_mime_type))
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: mimeType; type: string_byref_const
|
|
|
|
DCHECK(!mimeType.empty());
|
|
|
|
if (mimeType.empty())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
struct_->set_mime_type(struct_,
|
|
|
|
mimeType.GetStruct());
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
CefString CefResponseCToCpp::GetHeader(const CefString& name) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, get_header))
|
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: name; type: string_byref_const
|
|
|
|
DCHECK(!name.empty());
|
|
|
|
if (name.empty())
|
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_string_userfree_t _retval = struct_->get_header(struct_,
|
|
|
|
name.GetStruct());
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CefResponseCToCpp::GetHeaderMap(HeaderMap& headerMap) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, get_header_map))
|
2011-02-10 02:17:54 +01:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Translate param: headerMap; type: string_map_multi_byref
|
|
|
|
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
|
|
|
DCHECK(headerMapMultimap);
|
|
|
|
if (headerMapMultimap)
|
|
|
|
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
struct_->get_header_map(struct_,
|
|
|
|
headerMapMultimap);
|
2011-02-10 02:17:54 +01:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Restore param:headerMap; type: string_map_multi_byref
|
|
|
|
if (headerMapMultimap) {
|
|
|
|
headerMap.clear();
|
|
|
|
transfer_string_multimap_contents(headerMapMultimap, headerMap);
|
|
|
|
cef_string_multimap_free(headerMapMultimap);
|
|
|
|
}
|
2011-02-10 02:17:54 +01:00
|
|
|
}
|
|
|
|
|
2012-01-10 00:46:23 +01:00
|
|
|
void CefResponseCToCpp::SetHeaderMap(const HeaderMap& headerMap) {
|
2011-12-08 02:38:30 +01:00
|
|
|
if (CEF_MEMBER_MISSING(struct_, set_header_map))
|
2011-04-21 18:46:16 +02:00
|
|
|
return;
|
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Translate param: headerMap; type: string_map_multi_byref_const
|
|
|
|
cef_string_multimap_t headerMapMultimap = cef_string_multimap_alloc();
|
|
|
|
DCHECK(headerMapMultimap);
|
|
|
|
if (headerMapMultimap)
|
|
|
|
transfer_string_multimap_contents(headerMap, headerMapMultimap);
|
2011-04-21 18:46:16 +02:00
|
|
|
|
2011-12-08 02:38:30 +01:00
|
|
|
// Execute
|
|
|
|
struct_->set_header_map(struct_,
|
|
|
|
headerMapMultimap);
|
|
|
|
|
|
|
|
// Restore param:headerMap; type: string_map_multi_byref_const
|
|
|
|
if (headerMapMultimap)
|
|
|
|
cef_string_multimap_free(headerMapMultimap);
|
2011-04-21 18:46:16 +02:00
|
|
|
}
|
|
|
|
|
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 CefCToCpp<CefResponseCToCpp, CefResponse,
|
|
|
|
cef_response_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|