2017-01-11 00:00:30 +01:00
|
|
|
// Copyright (c) 2017 The Chromium Embedded Framework Authors. All rights
|
2012-04-03 03:34:16 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/post_data_element_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
CefRefPtr<CefPostDataElement> CefPostDataElement::Create() {
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_post_data_element_t* _retval = cef_post_data_element_create();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefPostDataElementCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
2012-06-19 18:29:49 +02:00
|
|
|
bool CefPostDataElementCToCpp::IsReadOnly() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_read_only))
|
2012-06-19 18:29:49 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_read_only(_struct);
|
2012-06-19 18:29:49 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
void CefPostDataElementCToCpp::SetToEmpty() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_to_empty))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_to_empty(_struct);
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void CefPostDataElementCToCpp::SetToFile(const CefString& fileName) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_to_file))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: fileName; type: string_byref_const
|
|
|
|
DCHECK(!fileName.empty());
|
|
|
|
if (fileName.empty())
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_to_file(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
fileName.GetStruct());
|
|
|
|
}
|
|
|
|
|
|
|
|
void CefPostDataElementCToCpp::SetToBytes(size_t size, const void* bytes) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_to_bytes))
|
2012-04-03 03:34:16 +02:00
|
|
|
return;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: bytes; type: simple_byaddr
|
|
|
|
DCHECK(bytes);
|
|
|
|
if (!bytes)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
_struct->set_to_bytes(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
size,
|
|
|
|
bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefPostDataElement::Type CefPostDataElementCToCpp::GetType() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_type))
|
2012-04-03 03:34:16 +02:00
|
|
|
return PDE_TYPE_EMPTY;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_postdataelement_type_t _retval = _struct->get_type(_struct);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefPostDataElementCToCpp::GetFile() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_file))
|
2012-04-03 03:34:16 +02:00
|
|
|
return CefString();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_string_userfree_t _retval = _struct->get_file(_struct);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t CefPostDataElementCToCpp::GetBytesCount() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_bytes_count))
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
size_t _retval = _struct->get_bytes_count(_struct);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t CefPostDataElementCToCpp::GetBytes(size_t size, void* bytes) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_post_data_element_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_bytes))
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: bytes; type: simple_byaddr
|
|
|
|
DCHECK(bytes);
|
|
|
|
if (!bytes)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
size_t _retval = _struct->get_bytes(_struct,
|
2012-04-03 03:34:16 +02:00
|
|
|
size,
|
|
|
|
bytes);
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefPostDataElementCToCpp::CefPostDataElementCToCpp() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> cef_post_data_element_t* CefCToCpp<CefPostDataElementCToCpp,
|
|
|
|
CefPostDataElement, cef_post_data_element_t>::UnwrapDerived(
|
|
|
|
CefWrapperType type, CefPostDataElement* c) {
|
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2014-07-15 00:18:51 +02:00
|
|
|
template<> base::AtomicRefCount CefCToCpp<CefPostDataElementCToCpp,
|
|
|
|
CefPostDataElement, cef_post_data_element_t>::DebugObjCt = 0;
|
2012-04-03 03:34:16 +02:00
|
|
|
#endif
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
template<> CefWrapperType CefCToCpp<CefPostDataElementCToCpp,
|
|
|
|
CefPostDataElement, cef_post_data_element_t>::kWrapperType =
|
|
|
|
WT_POST_DATA_ELEMENT;
|