The interface is defined in hardware/interfaces/drm/aidl(http://go/ag/15329852). Test: build m android.hardware.drm-service.widevine -j128 Test: build_and_run_all_unit_tests.sh for hidl tests Test: atest VtsAidlHalDrmTargetTest Bug: 200055138 Bug: 170964303 Change-Id: If2f2a129914436ba5cef1c46f6cb9415e12c3d1c
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
//
|
|
// Copyright 2021 Google LLC. All Rights Reserved. This file and proprietary
|
|
// source code may only be used and distributed under the Widevine License
|
|
// Agreement.
|
|
//
|
|
|
|
#ifndef WV_CRYPTO_FACTORY_H_
|
|
#define WV_CRYPTO_FACTORY_H_
|
|
|
|
#include <aidl/android/hardware/drm/BnCryptoFactory.h>
|
|
#include <aidl/android/hardware/drm/ICryptoFactory.h>
|
|
#include <aidl/android/hardware/drm/ICryptoPlugin.h>
|
|
|
|
#include "WVTypes.h"
|
|
|
|
namespace wvdrm {
|
|
namespace hardware {
|
|
namespace drm {
|
|
namespace widevine {
|
|
|
|
struct WVCryptoFactory : public ::aidl::android::hardware::drm::BnCryptoFactory {
|
|
public:
|
|
WVCryptoFactory() {}
|
|
virtual ~WVCryptoFactory() {}
|
|
|
|
::ndk::ScopedAStatus createPlugin(
|
|
const ::aidl::android::hardware::drm::Uuid& in_uuid,
|
|
const std::vector<uint8_t>& in_initData,
|
|
std::shared_ptr<::aidl::android::hardware::drm::ICryptoPlugin>*
|
|
_aidl_return) override;
|
|
|
|
::ndk::ScopedAStatus isCryptoSchemeSupported(
|
|
const ::aidl::android::hardware::drm::Uuid& in_uuid,
|
|
bool* _aidl_return) override;
|
|
|
|
private:
|
|
WVDRM_DISALLOW_COPY_AND_ASSIGN(WVCryptoFactory);
|
|
};
|
|
|
|
} // namespace widevine
|
|
} // namespace drm
|
|
} // namespace hardware
|
|
} // namespace wvdrm
|
|
|
|
#endif // WV_CRYPTO_FACTORY_H_
|