mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 17:37:33 +02:00
Previously we were inconsistent by generating code for enum definitions but not generating code for dictionaries. With future changes to the IDL generator to expose helpers to convert to and from IDL values this produced circular depdendencies. To solve this problem, also generate the dictionary definitions in bindings headers.
44 lines
903 B
C++
44 lines
903 B
C++
/*
|
|
* Copyright (c) 2025, Psychpsyo <psychpsyo@gmail.com>
|
|
* Copyright (c) 2025, stelar7 <dudedbz@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <LibWeb/Bindings/MediaKeySystemAccess.h>
|
|
|
|
namespace Web::EncryptedMediaExtensions {
|
|
|
|
// https://w3c.github.io/encrypted-media/#dom-mediakeysystemmediacapability
|
|
struct MediaKeySystemMediaCapability {
|
|
Utf16String content_type;
|
|
Optional<Utf16String> encryption_scheme;
|
|
Utf16String robustness;
|
|
};
|
|
|
|
struct MediaKeyRestrictions {
|
|
bool distinctive_identifiers { true };
|
|
bool persist_state { true };
|
|
};
|
|
|
|
enum CapabilitiesType {
|
|
Audio,
|
|
Video
|
|
};
|
|
|
|
enum ConsentStatus {
|
|
ConsentDenied,
|
|
InformUser,
|
|
Allowed
|
|
};
|
|
|
|
struct ConsentConfiguration {
|
|
ConsentStatus status { ConsentStatus::ConsentDenied };
|
|
Optional<Bindings::MediaKeySystemConfiguration> configuration;
|
|
};
|
|
|
|
}
|