2024-01-05 19:03:36 +01:00
|
|
|
// Copyright (c) 2024 The Chromium Embedded Framework Authors. All rights
|
2020-03-19 16:34:15 +01: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-01-05 19:03:36 +01:00
|
|
|
// $hash=de134596eb11df5c41c982332177d8e903fdc9b0$
|
2020-03-19 16:34:15 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/ctocpp/media_router_ctocpp.h"
|
2024-04-30 17:45:07 +02:00
|
|
|
|
2021-04-15 01:28:22 +02:00
|
|
|
#include "libcef_dll/cpptoc/completion_callback_cpptoc.h"
|
2020-03-19 16:34:15 +01:00
|
|
|
#include "libcef_dll/cpptoc/media_observer_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/media_route_create_callback_cpptoc.h"
|
|
|
|
#include "libcef_dll/ctocpp/media_sink_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/media_source_ctocpp.h"
|
|
|
|
#include "libcef_dll/ctocpp/registration_ctocpp.h"
|
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
// STATIC METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
2021-04-15 01:28:22 +02:00
|
|
|
CefRefPtr<CefMediaRouter> CefMediaRouter::GetGlobalMediaRouter(
|
|
|
|
CefRefPtr<CefCompletionCallback> callback) {
|
2020-03-19 16:34:15 +01:00
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
2021-04-15 01:28:22 +02:00
|
|
|
// Unverified params: callback
|
|
|
|
|
2020-03-19 16:34:15 +01:00
|
|
|
// Execute
|
2021-04-15 01:28:22 +02:00
|
|
|
cef_media_router_t* _retval =
|
|
|
|
cef_media_router_get_global(CefCompletionCallbackCppToC::Wrap(callback));
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefMediaRouterCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
// VIRTUAL METHODS - Body may be edited by hand.
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
CefRefPtr<CefRegistration> CefMediaRouterCToCpp::AddObserver(
|
|
|
|
CefRefPtr<CefMediaObserver> observer) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_media_router_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, add_observer)) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: observer; type: refptr_diff
|
|
|
|
DCHECK(observer.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!observer.get()) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_registration_t* _retval =
|
|
|
|
_struct->add_observer(_struct, CefMediaObserverCppToC::Wrap(observer));
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefRegistrationCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
CefRefPtr<CefMediaSource> CefMediaRouterCToCpp::GetSource(
|
|
|
|
const CefString& urn) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_media_router_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, get_source)) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: urn; type: string_byref_const
|
|
|
|
DCHECK(!urn.empty());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (urn.empty()) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return nullptr;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_media_source_t* _retval = _struct->get_source(_struct, urn.GetStruct());
|
|
|
|
|
|
|
|
// Return type: refptr_same
|
|
|
|
return CefMediaSourceCToCpp::Wrap(_retval);
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall") void CefMediaRouterCToCpp::NotifyCurrentSinks() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_media_router_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, notify_current_sinks)) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->notify_current_sinks(_struct);
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall")
|
|
|
|
void CefMediaRouterCToCpp::CreateRoute(
|
|
|
|
CefRefPtr<CefMediaSource> source,
|
|
|
|
CefRefPtr<CefMediaSink> sink,
|
|
|
|
CefRefPtr<CefMediaRouteCreateCallback> callback) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_media_router_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, create_route)) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Verify param: source; type: refptr_same
|
|
|
|
DCHECK(source.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!source.get()) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
// Verify param: sink; type: refptr_same
|
|
|
|
DCHECK(sink.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!sink.get()) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback.get());
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!callback.get()) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->create_route(_struct, CefMediaSourceCToCpp::Unwrap(source),
|
|
|
|
CefMediaSinkCToCpp::Unwrap(sink),
|
|
|
|
CefMediaRouteCreateCallbackCppToC::Wrap(callback));
|
|
|
|
}
|
|
|
|
|
|
|
|
NO_SANITIZE("cfi-icall") void CefMediaRouterCToCpp::NotifyCurrentRoutes() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
cef_media_router_t* _struct = GetStruct();
|
2023-01-02 23:47:15 +01:00
|
|
|
if (CEF_MEMBER_MISSING(_struct, notify_current_routes)) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
// Execute
|
|
|
|
_struct->notify_current_routes(_struct);
|
|
|
|
}
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMediaRouterCToCpp::CefMediaRouterCToCpp() {}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMediaRouterCToCpp::~CefMediaRouterCToCpp() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
cef_media_router_t*
|
|
|
|
CefCToCppRefCounted<CefMediaRouterCToCpp, CefMediaRouter, cef_media_router_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, CefMediaRouter* c) {
|
2023-05-08 17:15:02 +02:00
|
|
|
DCHECK(false) << "Unexpected class type: " << type;
|
2020-03-19 16:34:15 +01:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefWrapperType CefCToCppRefCounted<CefMediaRouterCToCpp,
|
|
|
|
CefMediaRouter,
|
|
|
|
cef_media_router_t>::kWrapperType =
|
|
|
|
WT_MEDIA_ROUTER;
|