Pepper_31_C_interfaces
Public Attributes | List of all members
PPB_OutputProtection_Private_0_1 Struct Reference

#include <ppb_output_protection_private.h>

Collaboration diagram for PPB_OutputProtection_Private_0_1:
Collaboration graph

Public Attributes

PP_Resource(* Create )(PP_Instance instance)
 
PP_Bool(* IsOutputProtection )(PP_Resource resource)
 
int32_t(* QueryStatus )(PP_Resource resource, uint32_t *link_mask, uint32_t *protection_mask, struct PP_CompletionCallback callback)
 
int32_t(* EnableProtection )(PP_Resource resource, uint32_t desired_protection_mask, struct PP_CompletionCallback callback)
 

Detailed Description

The PPB_OutputProtection_Private interface allows controlling output protection.

Example:

op = output_protection->Create(instance);
output_protection->QueryStatus(op, &link_mask, &protection_mask,
done_callback);

In this example, the plugin wants to enforce HDCP for HDMI link.

output_protection->EnableProtection(
}

After EnableProtection() completes, the plugin has to query protection status periodically to make sure the protection is enabled and remains enabled.

Definition at line 90 of file ppb_output_protection_private.h.

Member Data Documentation

PP_Resource(* PPB_OutputProtection_Private_0_1::Create)(PP_Instance instance)

Create() creates a new PPB_OutputProtection_Private object.

[in] instance A PP_Instance identifying one instance of a module.

Returns
A PP_Resource corresponding to a PPB_OutputProtection_Private if successful, 0 if creation failed.

Definition at line 101 of file ppb_output_protection_private.h.

int32_t(* PPB_OutputProtection_Private_0_1::EnableProtection)(PP_Resource resource, uint32_t desired_protection_mask, struct PP_CompletionCallback callback)

Set desired protection methods.

When the desired protection method(s) have been applied to all applicable output links, the relevant bit(s) of the protection_mask returned by QueryStatus() will be set. Otherwise, the relevant bit(s) of protection_mask will not be set; there is no separate error code or callback.

Protections will be disabled if no longer desired by all instances.

Parameters
[in]resourceA PP_Resource corresponding to a PPB_OutputProtection_Private.
[in]desired_protection_maskThe desired protection methods, which is a bit-mask of the PP_OutputProtectionMethod_Private values.
[in]callbackA PP_CompletionCallback to be called when the protection request has been made. This may be before the protection have actually been applied. Call QueryStatus to get protection status.
Returns
An int32_t containing an error code from pp_errors.h.

Definition at line 157 of file ppb_output_protection_private.h.

PP_Bool(* PPB_OutputProtection_Private_0_1::IsOutputProtection)(PP_Resource resource)

IsOutputProtection() determines if the provided resource is a PPB_OutputProtection_Private.

Parameters
[in]resourceA PP_Resource corresponding to a PPB_OutputProtection_Private.
Returns
PP_TRUE if the resource is a PPB_OutputProtection_Private, PP_FALSE if the resource is invalid or some type other than PPB_OutputProtection_Private.

Definition at line 114 of file ppb_output_protection_private.h.

int32_t(* PPB_OutputProtection_Private_0_1::QueryStatus)(PP_Resource resource, uint32_t *link_mask, uint32_t *protection_mask, struct PP_CompletionCallback callback)

Query link status and protection status. Clients have to query status periodically in order to detect changes.

Parameters
[in]resourceA PP_Resource corresponding to a PPB_OutputProtection_Private.
[out]link_maskThe type of connected output links, which is a bit-mask of the PP_OutputProtectionLinkType_Private values.
[out]protection_maskEnabled protection methods, which is a bit-mask of the PP_OutputProtectionMethod_Private values.
[in]callbackA PP_CompletionCallback to run on asynchronous completion of QueryStatus(). This callback will only run if QueryStatus() returns PP_OK_COMPLETIONPENDING.
Returns
An int32_t containing an error code from pp_errors.h.

Definition at line 131 of file ppb_output_protection_private.h.


The documentation for this struct was generated from the following file: