Source release 17.1.0
This commit is contained in:
@@ -1,39 +1,43 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine Master
|
||||
// License Agreement.
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
|
||||
#ifndef WVCDM_CORE_CLIENT_IDENTIFICATION_H_
|
||||
#define WVCDM_CORE_CLIENT_IDENTIFICATION_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
// ClientIdentification fills in the ClientIdentification portion
|
||||
// of the License or Provisioning request messages.
|
||||
|
||||
#include "disallow_copy_and_assign.h"
|
||||
#include "license_protocol.pb.h"
|
||||
#include "wv_cdm_types.h"
|
||||
|
||||
namespace wvcdm {
|
||||
|
||||
class CryptoSession;
|
||||
|
||||
class ClientIdentification {
|
||||
public:
|
||||
ClientIdentification() : is_license_request_(true) {}
|
||||
ClientIdentification() {}
|
||||
virtual ~ClientIdentification() {}
|
||||
|
||||
// Call this method when used with provisioning requests
|
||||
CdmResponseType Init(CryptoSession* crypto_session);
|
||||
// Call this method when used with provisioning requests. |client_token| may
|
||||
// be empty and the token will be retrieved from OEMCrypto. In case of the
|
||||
// second stage of provisioning 4, an OEM cert must be provided via
|
||||
// |client_token|. |crypto_session| must not be nullptr.
|
||||
CdmResponseType InitForProvisioningRequest(const std::string& client_token,
|
||||
CryptoSession* crypto_session);
|
||||
|
||||
// Use in conjunction with license requests
|
||||
// |client_token| must be provided
|
||||
// |device_id| optional
|
||||
// |crypto_session| input parameter, mandatory
|
||||
CdmResponseType Init(const std::string& client_token,
|
||||
const std::string& device_id,
|
||||
CryptoSession* crypto_session);
|
||||
CdmResponseType InitForLicenseRequest(const std::string& client_token,
|
||||
CryptoSession* crypto_session);
|
||||
|
||||
// Fill the ClientIdentification portion of the license or provisioning
|
||||
// request
|
||||
CdmResponseType InitForOtaKeyboxProvisioning(CryptoSession* crypto_session);
|
||||
|
||||
// Fill the ClientIdentification portion of the license, DRM cert
|
||||
// provisioning or OTA keybox provisioning request.
|
||||
// |app_parameters| parameters provided by client/app to be included in
|
||||
// provisioning/license request. optional, only used
|
||||
// if |is_license_request| is true
|
||||
@@ -51,14 +55,13 @@ class ClientIdentification {
|
||||
bool GetProvisioningTokenType(
|
||||
video_widevine::ClientIdentification::TokenType* token_type);
|
||||
|
||||
bool is_license_request_;
|
||||
bool is_license_request_ = false;
|
||||
bool is_okp_request_ = false;
|
||||
std::string client_token_;
|
||||
std::string device_id_;
|
||||
CryptoSession* crypto_session_;
|
||||
CryptoSession* crypto_session_ = nullptr;
|
||||
|
||||
CORE_DISALLOW_COPY_AND_ASSIGN(ClientIdentification);
|
||||
};
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_CLIENT_IDENTIFICATION_H_
|
||||
|
||||
Reference in New Issue
Block a user