// Copyright (c) 2026 The Chromium Embedded Framework Authors. All rights
// 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.
//
// $hash=5ffa816b135beb0450aafb5da883d8b102b7ae0c$
//

#include "libcef_dll/ctocpp/test/api_version_test_scoped_library_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/api_version_test_scoped_library_child_child_ctocpp.h"
#include "libcef_dll/ctocpp/test/api_version_test_scoped_library_child_child_v1_ctocpp.h"
#include "libcef_dll/ctocpp/test/api_version_test_scoped_library_child_child_v2_ctocpp.h"

// STATIC METHODS - Body may be edited by hand.

NO_SANITIZE("cfi-icall")
CefOwnPtr<
    CefApiVersionTestScopedLibraryChild> CefApiVersionTestScopedLibraryChild::
    Create() {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  auto *_retval = cef_api_version_test_scoped_library_child_create();

  // Return type: ownptr_same
  return CefApiVersionTestScopedLibraryChildCToCpp_Wrap(_retval);
}

#if CEF_API_ADDED(13301)
NO_SANITIZE("cfi-icall")
CefOwnPtr<
    CefApiVersionTestScopedLibraryChild> CefApiVersionTestScopedLibraryChild::
    Create(int value, int other_value) {
  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  auto *_retval = cef_api_version_test_scoped_library_child_create_with_default(
      value, other_value);

  // Return type: ownptr_same
  return CefApiVersionTestScopedLibraryChildCToCpp_Wrap(_retval);
}
#endif // CEF_API_ADDED(13301)

// VIRTUAL METHODS - Body may be edited by hand.

NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetOtherValue() {
  auto *_struct = GetStruct();
  if (!_struct->get_other_value) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_other_value(_struct);

  // Return type: simple
  return _retval;
}

NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetOtherValue(int value) {
  auto *_struct = GetStruct();
  if (!_struct->set_other_value) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_other_value(_struct, value);
}

NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetValueLegacy() {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->get_value_legacy) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_value_legacy(_struct);

  // Return type: simple
  return _retval;
}

NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetValueLegacy(int value) {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->set_value_legacy) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_value_legacy(_struct, value);
}

#if CEF_API_ADDED(CEF_EXPERIMENTAL)
NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetValueExp() {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->get_value_exp) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_value_exp(_struct);

  // Return type: simple
  return _retval;
}
#endif // CEF_API_ADDED(CEF_EXPERIMENTAL)

#if CEF_API_ADDED(CEF_EXPERIMENTAL)
NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetValueExp(int value) {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->set_value_exp) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_value_exp(_struct, value);
}
#endif // CEF_API_ADDED(CEF_EXPERIMENTAL)

#if CEF_API_REMOVED(13301)
NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetValue() {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->get_value) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_value(_struct);

  // Return type: simple
  return _retval;
}
#endif // CEF_API_REMOVED(13301)

#if CEF_API_REMOVED(13301)
NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetValue(int value) {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->set_value) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_value(_struct, value);
}
#endif // CEF_API_REMOVED(13301)

#if CEF_API_RANGE(13301, 13302)
NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetValueV1() {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->get_value_v1) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_value_v1(_struct);

  // Return type: simple
  return _retval;
}
#endif // CEF_API_RANGE(13301, 13302)

#if CEF_API_RANGE(13301, 13302)
NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetValueV1(int value) {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->set_value_v1) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_value_v1(_struct, value);
}
#endif // CEF_API_RANGE(13301, 13302)

#if CEF_API_ADDED(13302)
NO_SANITIZE("cfi-icall")
int CefApiVersionTestScopedLibraryChildCToCpp::GetValueV2() {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->get_value_v2) {
    return 0;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  int _retval = _struct->get_value_v2(_struct);

  // Return type: simple
  return _retval;
}
#endif // CEF_API_ADDED(13302)

#if CEF_API_ADDED(13302)
NO_SANITIZE("cfi-icall")
void CefApiVersionTestScopedLibraryChildCToCpp::SetValueV2(int value) {
  auto *_struct =
      reinterpret_cast<cef_api_version_test_scoped_library_t *>(GetStruct());
  if (!_struct->set_value_v2) {
    return;
  }

  // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING

  // Execute
  _struct->set_value_v2(_struct, value);
}
#endif // CEF_API_ADDED(13302)

// CONSTRUCTOR - Do not edit by hand.

CefApiVersionTestScopedLibraryChildCToCpp::
    CefApiVersionTestScopedLibraryChildCToCpp() {}

// DESTRUCTOR - Do not edit by hand.

CefApiVersionTestScopedLibraryChildCToCpp::
    ~CefApiVersionTestScopedLibraryChildCToCpp() {}

template <>
cef_api_version_test_scoped_library_child_t *
CefCToCppScoped<CefApiVersionTestScopedLibraryChildCToCpp,
                CefApiVersionTestScopedLibraryChild,
                cef_api_version_test_scoped_library_child_t>::
    UnwrapDerivedOwn(CefWrapperType type,
                     CefOwnPtr<CefApiVersionTestScopedLibraryChild> c) {
#if CEF_API_REMOVED(13301)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildCToCpp_UnwrapOwn(
            CefOwnPtr<CefApiVersionTestScopedLibraryChildChild>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChild *>(
                    c.release()))));
  }
#endif
#if CEF_API_RANGE(13301, 13302)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD_V1) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildV1CToCpp_UnwrapOwn(
            CefOwnPtr<CefApiVersionTestScopedLibraryChildChildV1>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChildV1 *>(
                    c.release()))));
  }
#endif
#if CEF_API_ADDED(13302)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD_V2) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildV2CToCpp_UnwrapOwn(
            CefOwnPtr<CefApiVersionTestScopedLibraryChildChildV2>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChildV2 *>(
                    c.release()))));
  }
#endif
  CHECK(false) << __func__ << " called with unexpected class type " << type;
  return nullptr;
}

template <>
cef_api_version_test_scoped_library_child_t *
CefCToCppScoped<CefApiVersionTestScopedLibraryChildCToCpp,
                CefApiVersionTestScopedLibraryChild,
                cef_api_version_test_scoped_library_child_t>::
    UnwrapDerivedRaw(CefWrapperType type,
                     CefRawPtr<CefApiVersionTestScopedLibraryChild> c) {
#if CEF_API_REMOVED(13301)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildCToCpp_UnwrapRaw(
            CefRawPtr<CefApiVersionTestScopedLibraryChildChild>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChild *>(
                    c))));
  }
#endif
#if CEF_API_RANGE(13301, 13302)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD_V1) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildV1CToCpp_UnwrapRaw(
            CefRawPtr<CefApiVersionTestScopedLibraryChildChildV1>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChildV1 *>(
                    c))));
  }
#endif
#if CEF_API_ADDED(13302)
  if (type == WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD_CHILD_V2) {
    return reinterpret_cast<cef_api_version_test_scoped_library_child_t *>(
        CefApiVersionTestScopedLibraryChildChildV2CToCpp_UnwrapRaw(
            CefRawPtr<CefApiVersionTestScopedLibraryChildChildV2>(
                reinterpret_cast<CefApiVersionTestScopedLibraryChildChildV2 *>(
                    c))));
  }
#endif
  CHECK(false) << __func__ << " called with unexpected class type " << type;
  return nullptr;
}

template <>
CefWrapperType
    CefCToCppScoped<CefApiVersionTestScopedLibraryChildCToCpp,
                    CefApiVersionTestScopedLibraryChild,
                    cef_api_version_test_scoped_library_child_t>::kWrapperType =
        WT_API_VERSION_TEST_SCOPED_LIBRARY_CHILD;
