This module is used with the drm VTS tests as part of HIDL/HAL testing. For background reference: hardware/interfaces/drm/1.0/vts/doc/Drm_Vendor_Modules_v1.pdf Change-Id: I38eb13696343e08fa2a1758219350d25698bfb7d related-to-bug: 32815560
49 lines
1.4 KiB
C++
49 lines
1.4 KiB
C++
//
|
|
// Copyright 2017 Google Inc. All Rights Reserved.
|
|
//
|
|
#ifndef WIDEVINE_VENDOR_VTS_MODULE
|
|
#define WIDEVINE_VENDOR_VTS_MODULE
|
|
|
|
#include <utils/Log.h>
|
|
|
|
#include "drm_hal_vendor_module_api.h"
|
|
|
|
using std::vector;
|
|
|
|
/**
|
|
* Define the DrmHalVTSVendorModule_V1 for Widevine. Refer to
|
|
* drm_hal_vendor_module_api.h for more details.
|
|
*/
|
|
namespace widevine_vts {
|
|
|
|
class WidevineVTSVendorModule_V1 : public DrmHalVTSVendorModule_V1 {
|
|
public:
|
|
WidevineVTSVendorModule_V1() {}
|
|
virtual ~WidevineVTSVendorModule_V1() {}
|
|
|
|
virtual vector<uint8_t> getUUID();
|
|
|
|
virtual vector<uint8_t> handleProvisioningRequest(const vector<uint8_t>&
|
|
provisioningRequest, const std::string& url);
|
|
|
|
virtual vector<uint8_t> handleKeyRequest(const vector<uint8_t>&
|
|
keyRequest, const std::string& serverUrl);
|
|
|
|
virtual std::vector<ContentConfiguration> getContentConfigurations();
|
|
|
|
// TODO: change to "widevine" when HAL service is available
|
|
virtual std::string getServiceName() {return "default";}
|
|
|
|
private:
|
|
WidevineVTSVendorModule_V1(const WidevineVTSVendorModule_V1&) = delete;
|
|
void operator=(const WidevineVTSVendorModule_V1&) = delete;
|
|
|
|
std::string toString(std::vector<uint8_t> vector) {
|
|
return std::string(vector.begin(), vector.end());
|
|
}
|
|
};
|
|
}; // namespace widevine_vts
|
|
|
|
#endif //WIDEVINE_VENDOR_VTS_MODULE
|
|
|