Home | History | Annotate | Download | only in functional
      1 /*
      2  * Copyright (C) 2019 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef DRM_HAL_CLEARKEY_MODULE_H
     18 #define DRM_HAL_CLEARKEY_MODULE_H
     19 
     20 #include "drm_hal_vendor_module_api.h"
     21 
     22 namespace android {
     23 namespace hardware {
     24 namespace drm {
     25 namespace V1_2 {
     26 namespace vts {
     27 
     28 class DrmHalVTSClearkeyModule : public DrmHalVTSVendorModule_V1 {
     29    public:
     30     DrmHalVTSClearkeyModule() {}
     31     virtual ~DrmHalVTSClearkeyModule() {}
     32 
     33     virtual uint32_t getAPIVersion() const override { return 1; }
     34 
     35     virtual std::string getServiceName() const override { return "clearkey"; }
     36 
     37     virtual std::vector<uint8_t> getUUID() const override {
     38         return {0xE2, 0x71, 0x9D, 0x58, 0xA9, 0x85, 0xB3, 0xC9,
     39                 0x78, 0x1A, 0xB0, 0x30, 0xAF, 0x78, 0xD3, 0x0E };
     40     }
     41 
     42 
     43     virtual std::vector<uint8_t> handleProvisioningRequest(
     44             const std::vector<uint8_t>& provisioningRequest,
     45             const std::string& url) override;
     46 
     47     virtual std::vector<DrmHalVTSClearkeyModule::ContentConfiguration>
     48             getContentConfigurations() const override;
     49 
     50     virtual std::vector<uint8_t> handleKeyRequest(
     51             const std::vector<uint8_t>& keyRequest,
     52             const std::string& serverUrl) override;
     53 };
     54 
     55 }  // namespace vts
     56 }  // namespace V1_2
     57 }  // namespace drm
     58 }  // namespace hardware
     59 }  // namespace android
     60 
     61 #endif  // DRM_HAL_CLEARKEY_MODULE_H
     62