// Copyright 2012 Google Inc. All Rights Reserved. #ifndef CDM_BASE_LICENSE_H_ #define CDM_BASE_LICENSE_H_ #include "license_protocol.pb.h" #include "wv_cdm_types.h" namespace wvcdm { using video_widevine_server::sdk::LicenseIdentification; class CryptoSession; class CdmLicense { public: CdmLicense(); ~CdmLicense(); bool Init(const std::string& token, CryptoSession* session); bool PrepareKeyRequest(const CdmInitData& init_data, CdmKeyMessage* signed_request); bool PrepareKeyRenewalRequest(CdmKeyMessage* signed_request); bool HandleKeyResponse(const CdmKeyResponse& license_response); bool HandleKeyRenewalResponse(const CdmKeyResponse& license_response); private: LicenseIdentification license_id_; CryptoSession* session_; std::string token_; CORE_DISALLOW_COPY_AND_ASSIGN(CdmLicense); }; } // namespace wvcdm #endif // CDM_BASE_LICENSE_H_