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=5e9c88099be2c8d7ce3574999097423432efd220$
|
2020-03-19 16:34:15 +01:00
|
|
|
//
|
|
|
|
|
|
|
|
#include "libcef_dll/cpptoc/media_sink_cpptoc.h"
|
|
|
|
#include "libcef_dll/cpptoc/media_source_cpptoc.h"
|
2020-07-14 22:43:57 +02:00
|
|
|
#include "libcef_dll/ctocpp/media_sink_device_info_callback_ctocpp.h"
|
2020-03-19 16:34:15 +01:00
|
|
|
#include "libcef_dll/shutdown_checker.h"
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// MEMBER FUNCTIONS - Body may be edited by hand.
|
|
|
|
|
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
media_sink_get_id(struct _cef_media_sink_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefString _retval = CefMediaSinkCppToC::Get(self)->GetId();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
|
|
|
cef_string_userfree_t CEF_CALLBACK
|
|
|
|
media_sink_get_name(struct _cef_media_sink_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return NULL;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefString _retval = CefMediaSinkCppToC::Get(self)->GetName();
|
|
|
|
|
|
|
|
// Return type: string
|
|
|
|
return _retval.DetachToUserFree();
|
|
|
|
}
|
|
|
|
|
2020-04-29 21:01:09 +02:00
|
|
|
cef_media_sink_icon_type_t CEF_CALLBACK
|
|
|
|
media_sink_get_icon_type(struct _cef_media_sink_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-04-29 21:01:09 +02:00
|
|
|
return CEF_MSIT_GENERIC;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-04-29 21:01:09 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
cef_media_sink_icon_type_t _retval =
|
|
|
|
CefMediaSinkCppToC::Get(self)->GetIconType();
|
|
|
|
|
|
|
|
// Return type: simple
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
2020-07-14 22:43:57 +02:00
|
|
|
void CEF_CALLBACK media_sink_get_device_info(
|
|
|
|
struct _cef_media_sink_t* self,
|
|
|
|
struct _cef_media_sink_device_info_callback_t* callback) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-07-14 22:43:57 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-07-14 22:43:57 +02:00
|
|
|
// Verify param: callback; type: refptr_diff
|
|
|
|
DCHECK(callback);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!callback) {
|
2020-07-14 22:43:57 +02:00
|
|
|
return;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-07-14 22:43:57 +02:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
CefMediaSinkCppToC::Get(self)->GetDeviceInfo(
|
|
|
|
CefMediaSinkDeviceInfoCallbackCToCpp::Wrap(callback));
|
|
|
|
}
|
|
|
|
|
2020-03-19 16:34:15 +01:00
|
|
|
int CEF_CALLBACK media_sink_is_cast_sink(struct _cef_media_sink_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefMediaSinkCppToC::Get(self)->IsCastSink();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK media_sink_is_dial_sink(struct _cef_media_sink_t* self) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefMediaSinkCppToC::Get(self)->IsDialSink();
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CEF_CALLBACK
|
|
|
|
media_sink_is_compatible_with(struct _cef_media_sink_t* self,
|
|
|
|
struct _cef_media_source_t* source) {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
|
|
|
|
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
|
|
|
|
|
|
|
|
DCHECK(self);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!self) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
// Verify param: source; type: refptr_same
|
|
|
|
DCHECK(source);
|
2023-01-02 23:47:15 +01:00
|
|
|
if (!source) {
|
2020-03-19 16:34:15 +01:00
|
|
|
return 0;
|
2023-01-02 23:47:15 +01:00
|
|
|
}
|
2020-03-19 16:34:15 +01:00
|
|
|
|
|
|
|
// Execute
|
|
|
|
bool _retval = CefMediaSinkCppToC::Get(self)->IsCompatibleWith(
|
|
|
|
CefMediaSourceCppToC::Unwrap(source));
|
|
|
|
|
|
|
|
// Return type: bool
|
|
|
|
return _retval;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
// CONSTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMediaSinkCppToC::CefMediaSinkCppToC() {
|
|
|
|
GetStruct()->get_id = media_sink_get_id;
|
|
|
|
GetStruct()->get_name = media_sink_get_name;
|
2020-04-29 21:01:09 +02:00
|
|
|
GetStruct()->get_icon_type = media_sink_get_icon_type;
|
2020-07-14 22:43:57 +02:00
|
|
|
GetStruct()->get_device_info = media_sink_get_device_info;
|
2020-03-19 16:34:15 +01:00
|
|
|
GetStruct()->is_cast_sink = media_sink_is_cast_sink;
|
|
|
|
GetStruct()->is_dial_sink = media_sink_is_dial_sink;
|
|
|
|
GetStruct()->is_compatible_with = media_sink_is_compatible_with;
|
|
|
|
}
|
|
|
|
|
|
|
|
// DESTRUCTOR - Do not edit by hand.
|
|
|
|
|
|
|
|
CefMediaSinkCppToC::~CefMediaSinkCppToC() {
|
|
|
|
shutdown_checker::AssertNotShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <>
|
|
|
|
CefRefPtr<CefMediaSink>
|
|
|
|
CefCppToCRefCounted<CefMediaSinkCppToC, CefMediaSink, cef_media_sink_t>::
|
|
|
|
UnwrapDerived(CefWrapperType type, cef_media_sink_t* s) {
|
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 CefCppToCRefCounted<CefMediaSinkCppToC,
|
|
|
|
CefMediaSink,
|
|
|
|
cef_media_sink_t>::kWrapperType =
|
|
|
|
WT_MEDIA_SINK;
|