Files
ladybird/Libraries/LibWeb/EncryptedMediaExtensions/EncryptedMediaExtensions.h
Shannon Booth 5adfd1c43a LibWeb/Bindings: Generate struct definitions from IDL dictionaries
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.
2026-05-09 10:49:49 +02:00

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;
};
}