2 * Copyright (C) 2016 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H
17 #define ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H
19 #include <android/hardware/drm/1.0/IDrmFactory.h>
20 #include <hidl/Status.h>
21 #include <media/drm/DrmAPI.h>
22 #include <media/PluginLoader.h>
23 #include <media/SharedLibrary.h>
29 namespace implementation {
31 using ::android::hardware::drm::V1_0::IDrmFactory;
32 using ::android::hardware::drm::V1_0::IDrmPlugin;
33 using ::android::hardware::hidl_array;
34 using ::android::hardware::hidl_string;
35 using ::android::hardware::hidl_vec;
36 using ::android::hardware::Return;
37 using ::android::hardware::Void;
40 struct DrmFactory : public IDrmFactory {
42 virtual ~DrmFactory() {}
44 // Methods from ::android::hardware::drm::V1_0::IDrmFactory follow.
46 Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
49 Return<bool> isContentTypeSupported(const hidl_string &mimeType)
52 Return<void> createPlugin(const hidl_array<uint8_t, 16>& uuid,
53 const hidl_string& appPackageName, createPlugin_cb _hidl_cb) override;
56 android::PluginLoader<android::DrmFactory> loader;
58 DrmFactory(const DrmFactory &) = delete;
59 void operator=(const DrmFactory &) = delete;
62 extern "C" IDrmFactory* HIDL_FETCH_IDrmFactory(const char* name);
64 } // namespace implementation
67 } // namespace hardware
68 } // namespace android
70 #endif // ANDROID_HARDWARE_DRM_V1_0__DRMFACTORY_H