class LicenseSession
Defined at line 5178 of file fidling/gen/sdk/fidl/fuchsia.media.drm/fuchsia.media.drm/hlcpp/fuchsia/media/drm/cpp/fidl.h
A protocol for exchanging messages pertaining to the establishment of a
media license and the encryption keys associated with it.
If the client closes the `LicenseSession`, any derived Decryptors will also
be closed as the encryption keys will no longer be maintained.
Public Methods
void ~LicenseSession ()
void GenerateLicenseRequest (::fuchsia::media::drm::LicenseInitData init_data, GenerateLicenseRequestCallback callback)
Generates a license request for a session based on the `init_data`.
When the [`LicenseMessage`] has been created, the
`OnLicenseMessageGenerated` event will be triggered with the message to
be sent to the license server.
+ request `init_data` container-specific data that is used to generate a
[`LicenseMessageType.REQUEST`] `LicenseMessage`.
* error an [`Error`] indicating the reason for failure.
void GenerateLicenseRelease (GenerateLicenseReleaseCallback callback)
Initiates the release process for the license session.
This will cause the [`LicenseSession`] to destroy the license and/or
keys associated with the session. If the session is temporary, the
session will send the reply for this request once the license has been
destroyed and then close the `LicenseSession` channel. If the session is
persistent, the session will send the reply for this request once the
license has been destroyed and then it will generate a license release
type [`LicenseMessage`] through the `OnLicenseMessageGenerated` event.
The client must route that message to the license server and the
server's response to `ProcessLicenseServerMessage`. Once the
`LicenseSession` has received the license server's reply, it will close
the `LicenseSession` channel.
* error an [`Error`] indicating the reason for failure.
void ProcessLicenseResponse (::fuchsia::media::drm::LicenseServerMessage response, ProcessLicenseResponseCallback callback)
Updates the [`LicenseSession`] with a message from the license server.
All responses from license requests, renewals, and releases should be
routed to the `LicenseSession` through this method.
+ request `response` a message from the license server to update the
state of the `LicenseSession`.
* error an [`Error`] indicating the reason for failure.
void CreateDecryptor (::fuchsia::media::drm::DecryptorParams params, ::fidl::InterfaceRequest< ::fuchsia::media::StreamProcessor> decryptor)
Creates a Decryptor [`fuchsia.media/StreamProcessor`] to be used to
decrypt content.
This `decryptor` would be restricted to only having access to the
keys maintained by this [`LicenseSession`].
+ request `params` the parameters with which to create the `decryptor`.
+ request `decryptor` the server endpoint of the
`fuchsia.media/StreamProcessor`.