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 SET_POLICIES_TYPE = 1; 37 constexpr int32_t SET_POLICY_TYPE = 2; 38 constexpr int32_t BLUETOOTH_WHITELIST_MAX_SIZE = 1000; 39 constexpr int32_t DEFAULT_LOOP_MAX_SIZE = 10000; 40 constexpr uint32_t POLICIES_MAX_SIZE = 200; 41 42 const char* const PERMISSION_TAG_VERSION_11 = "version_11"; 43 const char* const PERMISSION_TAG_VERSION_12 = "version_12"; 44 const char* const PERMISSION_TAG_SYSTEM_API = "system"; 45 const char* const PERMISSION_TAG_NORMAL = "normal"; 46 namespace Browser { 47 const char* const GET_MANAGED_BROWSER_VERSION = "version"; 48 const char* const GET_MANAGED_BROWSER_FILE_DATA = "fileData"; 49 const char* const GET_SELF_MANAGED_BROWSER_FILE_DATA = "selfFileData"; 50 const char* const BROWSER_WITHOUT_PERMISSION = "withoutPermission"; 51 } 52 53 namespace DeviceInfo { 54 const char* const DEVICE_NAME = "deviceName"; 55 const char* const DEVICE_SERIAL = "deviceSerial"; 56 const char* const SIM_INFO = "simInfo"; 57 const char* const SIM_SLOT_ID = "slotId"; 58 const char* const SIM_MEID = "MEID"; 59 const char* const SIM_IMSI = "IMSI"; 60 const char* const SIM_ICCID = "ICCID"; 61 const char* const SIM_IMEI = "IMEI"; 62 constexpr int32_t SIM_SLOT_ID_0 = 0; 63 constexpr int32_t SIM_SLOT_ID_1 = 1; 64 } // namespace DeviceInfo 65 66 namespace Restrictions { 67 const char* const LABEL_DISALLOWED_POLICY_BLUETOOTH = "bluetooth"; 68 const char* const LABEL_DISALLOWED_POLICY_MODIFY_DATETIME = "modifyDateTime"; 69 const char* const LABEL_DISALLOWED_POLICY_PRINTER = "printer"; 70 const char* const LABEL_DISALLOWED_POLICY_HDC = "hdc"; 71 const char* const LABEL_DISALLOWED_POLICY_MIC = "microphone"; 72 const char* const LABEL_DISALLOWED_POLICY_FINGER_PRINT = "fingerprint"; 73 const char* const LABEL_DISALLOWED_POLICY_SCREENSHOT = "screenshot"; 74 const char* const LABEL_DISALLOWED_POLICY_SCREEN_RECORD = "screenRecord"; 75 const char* const LABEL_DISALLOWED_POLICY_USB = "usb"; 76 const char* const LABEL_DISALLOWED_POLICY_WIFI = "wifi"; 77 const char* const LABEL_DISALLOWED_POLICY_DISK_RECOVERY_KEY = "diskRecoveryKey"; 78 const char* const LABEL_DISALLOWED_POLICY_NEAR_LINK = "nearLink"; 79 const char* const LABEL_DISALLOWED_POLICY_CAMERA = "camera"; 80 } // namespace Restrictions 81 82 namespace SecurityManager { 83 const char* const PATCH = "patch"; 84 const char* const ENCRYPTION = "encryption"; 85 const char* const ROOT = "root"; 86 } // namespace SecurityManager 87 88 namespace DeviceSettings { 89 const char* const SCREEN_OFF = "screenOff"; 90 const char* const POWER_POLICY = "powerPolicy"; 91 const char* const DATE_TIME = "dateTime"; 92 } // namespace DeviceSettings 93 94 namespace DeviceControl { 95 const char* const RESET_FACTORY = "resetFactory"; 96 const char* const REBOOT = "reboot"; 97 const char* const SHUT_DOWN = "shutDown"; 98 const char* const LOCK_SCREEN = "lockScreen"; 99 } // namespace DeviceControl 100 } // namespace EdmConstants 101 } // namespace EDM 102 } // namespace OHOS 103 104 #endif // COMMON_NATIVE_INCLUDE_EDM_CONSTANTS_H 105