2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 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.
|
|
|
|
//
|
2024-10-03 18:37:11 +02:00
|
|
|
// $hash=a5ca27729a570de0318a9d15416fee153afaec32$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/binary_value_cpptoc.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// GLOBAL FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CEF_EXPORT cef_binary_value_t* cef_binary_value_create(const void* data,
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t data_size) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: data; type: simple_byaddr
|
|
|
|
DCHECK(data);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!data) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
CefRefPtr<CefBinaryValue> _retval = CefBinaryValue::Create(data, data_size);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
namespace {
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
int CEF_CALLBACK binary_value_is_valid(struct _cef_binary_value_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefBinaryValueCppToC::Get(self)->IsValid();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK binary_value_is_owned(struct _cef_binary_value_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefBinaryValueCppToC::Get(self)->IsOwned();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
int CEF_CALLBACK binary_value_is_same(struct _cef_binary_value_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t* that) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-04-15 15:45:30 +02:00
|
|
|
// Verify param: that; type: refptr_same
|
|
|
|
DCHECK(that);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!that) {
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefBinaryValueCppToC::Get(self)->IsSame(
|
|
|
|
CefBinaryValueCppToC::Unwrap(that));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK binary_value_is_equal(struct _cef_binary_value_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t* that) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2015-04-15 15:45:30 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-04-15 15:45:30 +02:00
|
|
|
// Verify param: that; type: refptr_same
|
|
|
|
DCHECK(that);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!that) {
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefBinaryValueCppToC::Get(self)->IsEqual(
|
|
|
|
CefBinaryValueCppToC::Unwrap(that));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
struct _cef_binary_value_t* CEF_CALLBACK
|
|
|
|
binary_value_copy(struct _cef_binary_value_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefRefPtr<CefBinaryValue> _retval = CefBinaryValueCppToC::Get(self)->Copy();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCppToC::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
2023-10-25 20:20:55 +02:00
|
|
|
const void* CEF_CALLBACK
|
|
|
|
binary_value_get_raw_data(struct _cef_binary_value_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2024-10-03 18:37:11 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2023-10-25 20:20:55 +02:00
|
|
|
DCHECK(self);
|
|
|
|
if (!self) {
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
const void* _retval = CefBinaryValueCppToC::Get(self)->GetRawData();
|
|
|
|
|
|
|
|
// Return type: simple_byaddr
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
size_t CEF_CALLBACK binary_value_get_size(struct _cef_binary_value_t* self) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
size_t _retval = CefBinaryValueCppToC::Get(self)->GetSize();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t CEF_CALLBACK binary_value_get_data(struct _cef_binary_value_t* self,
|
2017-05-17 11:29:28 +02:00
|
|
|
void* buffer,
|
|
|
|
size_t buffer_size,
|
|
|
|
size_t data_offset) {
|
2019-01-23 16:42:12 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
// Verify param: buffer; type: simple_byaddr
|
|
|
|
DCHECK(buffer);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!buffer) {
|
2012-04-03 03:34:16 +02:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Execute
|
2017-05-17 11:29:28 +02:00
|
|
|
size_t _retval = CefBinaryValueCppToC::Get(self)->GetData(buffer, buffer_size,
|
|
|
|
data_offset);
|
2012-04-03 03:34:16 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
} // namespace
|
|
|
|
|
2012-04-03 03:34:16 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
CefBinaryValueCppToC::CefBinaryValueCppToC() {
|
|
|
|
GetStruct()->is_valid = binary_value_is_valid;
|
|
|
|
GetStruct()->is_owned = binary_value_is_owned;
|
|
|
|
GetStruct()->is_same = binary_value_is_same;
|
|
|
|
GetStruct()->is_equal = binary_value_is_equal;
|
|
|
|
GetStruct()->copy = binary_value_copy;
|
2023-10-25 20:20:55 +02:00
|
|
|
GetStruct()->get_raw_data = binary_value_get_raw_data;
|
2015-04-26 20:40:01 +02:00
|
|
|
GetStruct()->get_size = binary_value_get_size;
|
|
|
|
GetStruct()->get_data = binary_value_get_data;
|
|
|
|
}
|
|
|
|
|
2019-01-23 16:42:12 +01:00
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefBinaryValueCppToC::~CefBinaryValueCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefRefPtr<CefBinaryValue>
|
|
|
|
CefCppToCRefCounted<CefBinaryValueCppToC, CefBinaryValue, cef_binary_value_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, cef_binary_value_t* s) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-01-15 14:53:19 +01:00
|
|
|
return nullptr;
|
2012-04-03 03:34:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-17 11:29:28 +02:00
|
|
|
template <>
|
|
|
|
CefWrapperType CefCppToCRefCounted<CefBinaryValueCppToC,
|
|
|
|
CefBinaryValue,
|
|
|
|
cef_binary_value_t>::kWrapperType =
|
|
|
|
WT_BINARY_VALUE;
|