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