1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_OHOS_DM_JSON_CONFIG_H
17 #define OHOS_OHOS_DM_JSON_CONFIG_H
18 
19 #include <string>
20 
21 namespace OHOS {
22 namespace DistributedHardware {
23 const std::string adapterJsonConfigString =
24     R"({
25     "devicemanager_adapter_components": [
26         {
27             "name": "crypto_adapter",
28             "type": "CPYPTO",
29             "version": "1.0",
30             "funcName": "CreateCryptoAdapterObject",
31             "soName": "libdevicemanager_crypto_adapter.z.so",
32             "soPath": "/system/lib/"
33         },
34         {
35             "name": "device_decision",
36             "type": "DECISION",
37             "version": "1.0",
38             "funcName": "CreateDeviceDecisionObject",
39             "soName": "libdevicemanagerext_decision.z.so",
40             "soPath": "/system/lib/"
41         }
42     ]
43 })";
44 
45 const std::string authJsonConfigString =
46     R"({
47     "devicemanager_auth_components": [
48         {
49             "name": "pin_auth",
50             "type": "AUTHENTICATE",
51             "version": "1.0",
52             "authType": 1,
53             "funcName": "CreatePinAuthObject",
54             "soName": "libdevicemanagerext_pin_auth.z.so",
55             "soPath": "/system/lib/"
56         },
57         {
58             "name": "QRcode_auth",
59             "type": "AUTHENTICATE",
60             "version": "1.0",
61             "authType": 2,
62             "funcName": "CreateQRcodeAuthObject",
63             "soName": "libdevicemanager_qrcodeauth.z.so",
64             "soPath": "/system/lib/"
65         },
66         {
67             "name": "nfc_auth",
68             "type": "AUTHENTICATE",
69             "version": "1.0",
70             "authType": 3,
71             "funcName": "CreateNfcAuthObject",
72             "soName": "libdevicemanager_nfcauth.z.so",
73             "soPath": "/system/lib/"
74         },
75         {
76             "name": "no_interaction_auth",
77             "type": "AUTHENTICATE",
78             "version": "1.0",
79             "authType": 4,
80             "funcName": "CreatePinAuthObject",
81             "soName": "libdevicemanagerext_no_interaction_auth.z.so",
82             "soPath": "/system/lib/"
83         }
84     ]
85 })";
86 } // namespace DistributedHardware
87 } // namespace OHOS
88 #endif // OHOS_OHOS_DM_JSON_CONFIG_H
89