2016-01-08 20:00:27 +01:00
|
|
|
// Copyright (c) 2016 The Chromium Embedded Framework Authors. All rights
|
2015-04-15 15:45:30 +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/binary_value_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/dictionary_value_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/list_value_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/value_ctocpp.h"
|
|
|
|
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
CefRefPtr<CefValue> CefValue::Create() {
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_value_t* _retval = cef_value_create();
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefValueCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
bool CefValueCToCpp::IsValid() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_valid))
|
2015-04-15 15:45:30 +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_valid(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::IsOwned() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_owned))
|
2015-04-15 15:45:30 +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_owned(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::IsReadOnly() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_read_only))
|
2015-04-15 15:45:30 +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);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::IsSame(CefRefPtr<CefValue> that) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_same))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: that; type: refptr_same
|
|
|
|
DCHECK(that.get());
|
|
|
|
if (!that.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_same(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
CefValueCToCpp::Unwrap(that));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::IsEqual(CefRefPtr<CefValue> that) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, is_equal))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: that; type: refptr_same
|
|
|
|
DCHECK(that.get());
|
|
|
|
if (!that.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->is_equal(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
CefValueCToCpp::Unwrap(that));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefValue> CefValueCToCpp::Copy() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, copy))
|
2015-04-15 15:45:30 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _retval = _struct->copy(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefValueCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefValueType CefValueCToCpp::GetType() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_type))
|
2015-04-15 15:45:30 +02:00
|
|
|
return VTYPE_INVALID;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_type_t _retval = _struct->get_type(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::GetBool() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_bool))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->get_bool(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CefValueCToCpp::GetInt() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_int))
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->get_int(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
double CefValueCToCpp::GetDouble() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_double))
|
2015-04-15 15:45:30 +02:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
double _retval = _struct->get_double(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefString CefValueCToCpp::GetString() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_string))
|
2015-04-15 15:45:30 +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_string(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
CefString _retvalStr;
|
|
|
|
_retvalStr.AttachToUserFree(_retval);
|
|
|
|
return _retvalStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefBinaryValue> CefValueCToCpp::GetBinary() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_binary))
|
2015-04-15 15:45:30 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_binary_value_t* _retval = _struct->get_binary(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefBinaryValueCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefDictionaryValue> CefValueCToCpp::GetDictionary() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_dictionary))
|
2015-04-15 15:45:30 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_dictionary_value_t* _retval = _struct->get_dictionary(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefDictionaryValueCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
CefRefPtr<CefListValue> CefValueCToCpp::GetList() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_list))
|
2015-04-15 15:45:30 +02:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_list_value_t* _retval = _struct->get_list(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefListValueCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetNull() {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_null))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_null(_struct);
|
2015-04-15 15:45:30 +02:00
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetBool(bool value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_bool))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_bool(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
value);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetInt(int value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_int))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_int(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
value);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetDouble(double value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_double))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_double(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
value);
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetString(const CefString& value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_string))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Unverified params: value
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_string(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
value.GetStruct());
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetBinary(CefRefPtr<CefBinaryValue> value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_binary))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: value; type: refptr_same
|
|
|
|
DCHECK(value.get());
|
|
|
|
if (!value.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_binary(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
CefBinaryValueCToCpp::Unwrap(value));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetDictionary(CefRefPtr<CefDictionaryValue> value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_dictionary))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: value; type: refptr_same
|
|
|
|
DCHECK(value.get());
|
|
|
|
if (!value.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_dictionary(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
CefDictionaryValueCToCpp::Unwrap(value));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool CefValueCToCpp::SetList(CefRefPtr<CefListValue> value) {
|
2015-04-26 20:40:01 +02:00
|
|
|
cef_value_t* _struct = GetStruct();
|
|
|
|
if (CEF_MEMBER_MISSING(_struct, set_list))
|
2015-04-15 15:45:30 +02:00
|
|
|
return false;
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: value; type: refptr_same
|
|
|
|
DCHECK(value.get());
|
|
|
|
if (!value.get())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
// Execute
|
2015-04-26 20:40:01 +02:00
|
|
|
int _retval = _struct->set_list(_struct,
|
2015-04-15 15:45:30 +02:00
|
|
|
CefListValueCToCpp::Unwrap(value));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval?true:false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefValueCToCpp::CefValueCToCpp() {
|
|
|
|
}
|
|
|
|
|
|
|
|
template<> cef_value_t* CefCToCpp<CefValueCToCpp, CefValue,
|
|
|
|
cef_value_t>::UnwrapDerived(CefWrapperType type, CefValue* c) {
|
|
|
|
NOTREACHED() << "Unexpected class type: " << type;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2016-09-01 13:24:30 +02:00
|
|
|
#if DCHECK_IS_ON()
|
2015-04-15 15:45:30 +02:00
|
|
|
template<> base::AtomicRefCount CefCToCpp<CefValueCToCpp, CefValue,
|
|
|
|
cef_value_t>::DebugObjCt = 0;
|
|
|
|
#endif
|
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
template<> CefWrapperType CefCToCpp<CefValueCToCpp, CefValue,
|
|
|
|
cef_value_t>::kWrapperType = WT_VALUE;
|