// // Copyright 2017 Google Inc. All Rights Reserved. // #ifndef WV_DRM_FACTORY_H_ #define WV_DRM_FACTORY_H_ #include #include "WVGenericCryptoInterface.h" #include "WVTypes.h" namespace wvdrm { namespace hardware { namespace drm { namespace V1_0 { namespace widevine { using ::android::hardware::drm::V1_0::IDrmFactory; using ::android::hardware::drm::V1_0::IDrmPlugin; using ::android::hardware::hidl_array; using ::android::hardware::hidl_string; using ::android::hardware::Return; struct WVDrmFactory : public IDrmFactory { WVDrmFactory() {} virtual ~WVDrmFactory() {} Return isCryptoSchemeSupported(const hidl_array& uuid) override; Return isContentTypeSupported(const hidl_string &mimeType) override; Return createPlugin( const hidl_array& uuid, const hidl_string& appPackageName, createPlugin_cb _hidl_cb) override; private: WVDRM_DISALLOW_COPY_AND_ASSIGN(WVDrmFactory); static WVGenericCryptoInterface sOemCryptoInterface; static bool areSpoidsEnabled(); friend class WVDrmFactoryTest_CalculatesSpoidUseCorrectly_Test; }; extern "C" IDrmFactory* HIDL_FETCH_IDrmFactory(const char* name); } // namespace widevine } // namespace V1_0 } // namespace drm } // namespace hardware } // namespace wvdrm #endif // WV_DRM_FACTORY_H_