• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2018 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 CLEARKEY_DRM_FACTORY_H_
18 #define CLEARKEY_DRM_FACTORY_H_
19 
20 #include <android/hardware/drm/1.1/IDrmPlugin.h>
21 #include <android/hardware/drm/1.1/IDrmFactory.h>
22 
23 #include "ClearKeyTypes.h"
24 
25 namespace android {
26 namespace hardware {
27 namespace drm {
28 namespace V1_1 {
29 namespace clearkey {
30 
31 using ::android::hardware::hidl_array;
32 using ::android::hardware::hidl_string;
33 using ::android::hardware::Return;
34 
35 struct DrmFactory : public IDrmFactory {
DrmFactoryDrmFactory36     DrmFactory() {}
~DrmFactoryDrmFactory37     virtual ~DrmFactory() {}
38 
39     Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
40             override;
41 
42     Return<bool> isContentTypeSupported(const hidl_string &mimeType)
43             override;
44 
45     Return<void> createPlugin(
46             const hidl_array<uint8_t, 16>& uuid,
47             const hidl_string& appPackageName,
48             createPlugin_cb _hidl_cb) override;
49 
50 private:
51     CLEARKEY_DISALLOW_COPY_AND_ASSIGN(DrmFactory);
52 };
53 
54 } // namespace clearkey
55 } // namespace V1_1
56 } // namespace drm
57 } // namespace hardware
58 } // namespace android
59 
60 #endif // CLEARKEY_DRM_FACTORY_H_
61