1 /*
2  * Copyright (c) 2023-2024 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 COMMON_NATIVE_INCLUDE_EDM_CONSTANTS_H
17 #define COMMON_NATIVE_INCLUDE_EDM_CONSTANTS_H
18 
19 #include <iostream>
20 
21 namespace OHOS {
22 namespace EDM {
23 namespace EdmConstants {
24     constexpr int32_t DECIMAL = 10;
25     constexpr int32_t APPID_MAX_SIZE = 200;
26     constexpr int32_t DEFAULT_USER_ID = 100;
27     constexpr int32_t USB_ERRCODE_INTERFACE_NO_INIT = 88080389;
28     constexpr uint32_t ALLOWED_USB_DEVICES_MAX_SIZE = 1000;
29     constexpr int32_t STORAGE_USB_POLICY_READ_WRITE = 0;
30     constexpr int32_t STORAGE_USB_POLICY_READ_ONLY = 1;
31     constexpr int32_t STORAGE_USB_POLICY_DISABLED = 2;
32     constexpr int32_t USB_INTERFACE_DESCRIPTOR = 0;
33     constexpr int32_t USB_DEVICE_DESCRIPTOR = 1;
34     constexpr uint32_t DISALLOWED_USB_DEVICES_TYPES_MAX_SIZE = 200;
35     constexpr int32_t AUTO_START_APPS_MAX_SIZE = 10;
36     constexpr int32_t BLUETOOTH_WHITELIST_MAX_SIZE = 1000;
37     constexpr int32_t DISALLOW_LIST_FOR_ACCOUNT_MAX_SIZE = 1000;
38 
39     const char* const PERMISSION_TAG_VERSION_11 = "version_11";
40     const char* const PERMISSION_TAG_VERSION_12 = "version_12";
41     const char* const PERMISSION_TAG_SYSTEM_API = "system";
42 
43     const char* const DISALLOW_FOR_ACCOUNT_TYPE = "disallowForAccount";
44     const char* const FINGERPRINT_AUTH_TYPE = "fingerprintAuth";
45 
46 
47     namespace DeviceInfo {
48         const char* const DEVICE_NAME = "deviceName";
49         const char* const DEVICE_SERIAL = "deviceSerial";
50         const char* const SIM_INFO = "simInfo";
51         const char* const SIM_SLOT_ID = "slotId";
52         const char* const SIM_MEID = "MEID";
53         const char* const SIM_IMSI = "IMSI";
54         const char* const SIM_ICCID = "ICCID";
55         const char* const SIM_IMEI = "IMEI";
56         constexpr int32_t SIM_SLOT_ID_0 = 0;
57         constexpr int32_t SIM_SLOT_ID_1 = 1;
58     } // namespace DeviceInfo
59 
60     namespace Restrictions {
61         const char* const LABEL_DISALLOWED_POLICY_BLUETOOTH = "bluetooth";
62         const char* const LABEL_DISALLOWED_POLICY_MODIFY_DATETIME = "modifyDateTime";
63         const char* const LABEL_DISALLOWED_POLICY_PRINTER = "printer";
64         const char* const LABEL_DISALLOWED_POLICY_HDC = "hdc";
65         const char* const LABEL_DISALLOWED_POLICY_MIC = "microphone";
66         const char* const LABEL_DISALLOWED_POLICY_FINGER_PRINT = "fingerprint";
67         const char* const LABEL_DISALLOWED_POLICY_SCREENSHOT = "screenshot";
68         const char* const LABEL_DISALLOWED_POLICY_SCREEN_RECORD = "screenRecord";
69         const char* const LABEL_DISALLOWED_POLICY_USB = "usb";
70         const char* const LABEL_DISALLOWED_POLICY_WIFI = "wifi";
71         const char* const LABEL_DISALLOWED_POLICY_DISK_RECOVERY_KEY = "diskRecoveryKey";
72         const char* const LABEL_DISALLOWED_POLICY_NEAR_LINK = "nearLink";
73         const char* const LABEL_DISALLOWED_POLICY_TETHERING = "tethering";
74         const char* const LABEL_DISALLOWED_POLICY_INACTIVE_USER_FREEZE = "inactiveUserFreeze";
75         const char* const LABEL_DISALLOWED_POLICY_CAMERA = "camera";
76     } // namespace Restrictions
77 
78     namespace SecurityManager {
79         const char* const PATCH = "patch";
80         const char* const ENCRYPTION = "encryption";
81         const char* const ROOT = "root";
82         const char* const SET_SINGLE_WATERMARK_TYPE = "single";
83         const char* const SET_ALL_WATERMARK_TYPE = "all";
84     } // namespace SecurityManager
85 
86     namespace DeviceSettings {
87         const char* const SCREEN_OFF = "screenOff";
88         const char* const POWER_POLICY = "powerPolicy";
89         const char* const DATE_TIME = "dateTime";
90     } // namespace DeviceSettings
91 
92     namespace DeviceControl {
93         const char* const RESET_FACTORY = "resetFactory";
94         const char* const REBOOT = "reboot";
95         const char* const SHUT_DOWN = "shutDown";
96         const char* const LOCK_SCREEN = "lockScreen";
97     } // namespace DeviceControl
98 } // namespace EdmConstants
99 } // namespace EDM
100 } // namespace OHOS
101 
102 #endif // COMMON_NATIVE_INCLUDE_EDM_CONSTANTS_H
103