2020-01-06 10:59:05 +01:00
|
|
|
// Copyright (c) 2020 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.
|
|
|
|
//
|
2020-01-15 14:53:19 +01:00
|
|
|
// $hash=89f51160ee669abdfee47c627c7b7fec0b034b2b$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/post_data_element_ctocpp.h"
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
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.
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") 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
|
2017-05-17 11:29:28 +02:00
|
|
|
return _retval ? true : false;
|
2012-06-19 18:29:49 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") 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
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
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
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->set_to_file(_struct, fileName.GetStruct());
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
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
|
2017-05-17 11:29:28 +02:00
|
|
|
_struct->set_to_bytes(_struct, size, bytes);
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") 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;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall") 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;
|
|
|
|
}
|
|
|
|
|
2018-07-12 19:55:56 +02:00
|
|
|
NO_SANITIZE("cfi-icall")
|
2012-04-03 03:34:16 +02:00
|
|
|
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
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t _retval = _struct->get_bytes(_struct, size, bytes);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
CefPostDataElementCToCpp::CefPostDataElementCToCpp() {}
|
2015-04-26 20:40:01 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefPostDataElementCToCpp::~CefPostDataElementCToCpp() {}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
cef_post_data_element_t* CefCToCppRefCounted<
|
|
|
|
CefPostDataElementCToCpp,
|
|
|
|
CefPostDataElement,
|
|
|
|
cef_post_data_element_t>::UnwrapDerived(CefWrapperType type,
|
|
|
|
CefPostDataElement* c) {
|
2015-04-26 20:40:01 +02:00
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2015-04-26 20:40:01 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefPostDataElementCToCpp,
|
|
|
|
CefPostDataElement,
|
|
|
|
cef_post_data_element_t>::kWrapperType =
|
2015-04-26 20:40:01 +02:00
|
|
|
WT_POST_DATA_ELEMENT;
|