// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Next MinVersion: 1 module chromeos.cdm.mojom; // Provides an interface for Chrome OS to apply and/or query content protection // settings for an output link. These have no ability to specify a specific // display, so they will be relevant to all external outputs. When the Mojo // connection is dropped, the request will be cancelled. // Next Method ID: 2 [Stable, Uuid="1eab4228-7293-4ec9-ba76-52d9accd451a"] interface OutputProtection { // HDCP protection types. [Stable, Extensible] enum ProtectionType { NONE = 0, HDCP_TYPE_0 = 1, // Inferred to be HDCP 1.4. HDCP_TYPE_1 = 2, // Inferred to be HDCP 2.2. }; // Video output link types. [Stable, Extensible] enum LinkType { NONE = 0, UNKNOWN = 1, INTERNAL = 2, VGA = 4, HDMI = 8, DVI = 16, DISPLAYPORT = 32, NETWORK = 64, }; // Queries link status and protection status. // Clients need to query status periodically in order to detect changes. // // - success: Whether the query succeeded. If false, values of |link_mask| and // |protection| should be ignored. // - link_mask: The type of connected output links, which is a bit-mask of the // LinkType values. // - protection: The highest level of HDCP that is applied across all the // external outputs. QueryStatus@0() => (bool success, uint32 link_mask, ProtectionType protection); // Sets desired protection method. // // When the desired protection method has been applied to all applicable // output links, the |protection| returned by QueryStatus() will be set if it // was able to be achieved. There is no separate error code or callback for a // failure to set a desired ProtectionType. // // Protection will be disabled if no longer desired by all instances. // // - desired_protection: The desired protection method. // - success: True when the protection request has been made. This may be // before the protection has actually been applied. Call QueryStatus() to // get protection status. False if it failed to make the protection request, // and in this case there is no need to call QueryStatus(). EnableProtection@1(ProtectionType desired_protection) => (bool success); };