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 SECURITY_GUARD_MODEL_ANALYSIS_DEFINE_H 17 #define SECURITY_GUARD_MODEL_ANALYSIS_DEFINE_H 18 19 #include <string> 20 21 namespace OHOS::Security::SecurityGuard { 22 constexpr const char* MODEL_CFG_KEY = "modelcfg"; 23 constexpr const char* THREAT_CFG_KEY = "threatcfg"; 24 constexpr const char* EVENT_CFG_KEY = "eventcfg"; 25 constexpr const char* DATA_MGR_CFG_KEY = "datamgrcfg"; 26 27 // model config key 28 constexpr const char* MODEL_CFG_MODEL_ID_KEY = "modelId"; 29 constexpr const char* MODEL_CFG_PATH_KEY = "path"; 30 constexpr const char* MODEL_CFG_FORMAT_KEY = "format"; 31 constexpr const char* MODEL_CFG_START_MODE_KEY = "start-mode"; 32 constexpr const char* MODEL_CFG_PRELOAD_KEY = "preload"; 33 constexpr const char* MODEL_CFG_EVENT_LIST_KEY = "eventList"; 34 constexpr const char* MODEL_CFG_PERMISSIONS_KEY = "permissions"; 35 constexpr const char* MODEL_CFG_DB_TABLE_KEY = "db_table"; 36 constexpr const char* MODEL_CFG_RUNNING_CNTL_KEY = "running_cntl"; 37 constexpr const char* MODEL_CFG_CALLER_KEY = "caller"; 38 constexpr const char* MODEL_CFG_TYPE_KEY = "type"; 39 constexpr const char* MODEL_CFG_BUILD_IN_CFG_KEY = "buildInDetectionCfg"; 40 constexpr const char* MODEL_CFG_APP_DETECTION_CFG_KEY = "appDetectionCfg"; 41 42 // threat config key 43 constexpr const char* THREAT_CFG_THREAT_ID_KEY = "threatId"; 44 constexpr const char* THREAT_CFG_THREAT_NAME_KEY = "threatName"; 45 constexpr const char* THREAT_CFG_VERSION_KEY = "version"; 46 constexpr const char* THREAT_CFG_EVENT_LIST_KEY = "eventList"; 47 constexpr const char* THREAT_CFG_COMPUTE_MODEL_KEY = "computeModel"; 48 49 // event config key 50 constexpr const char* EVENT_CFG_EVENT_ID_KEY = "eventId"; 51 constexpr const char* EVENT_CFG_EVENT_NAME_KEY = "eventName"; 52 constexpr const char* EVENT_CFG_VERSION_KEY = "version"; 53 constexpr const char* EVENT_CFG_EVENT_TYPE_KEY = "eventType"; 54 constexpr const char* EVENT_CFG_COLLECT_ON_START_KEY = "collectOnStart"; 55 constexpr const char* EVENT_CFG_DATA_SENSITIVITY_LEVEL_KEY = "dataSensitivityLevel"; 56 constexpr const char* EVENT_CFG_STORAGE_RAM_NUM_KEY = "storageRamNums"; 57 constexpr const char* EVENT_CFG_STORAGE_ROM_NUM_KEY = "storageRomNums"; 58 constexpr const char* EVENT_CFG_STORAGE_TIME_KEY = "storageTime"; 59 constexpr const char* EVENT_CFG_OWNER_KEY = "owner"; 60 constexpr const char* EVENT_CFG_SOURCE_KEY = "source"; 61 constexpr const char* EVENT_CFG_DB_TABLE_KEY = "db_table"; 62 constexpr const char* EVENT_CFG_USER_ID_KEY = "userId"; 63 constexpr const char* EVENT_CFG_DEVICE_ID_KEY = "deviceId"; 64 constexpr const char* EVENT_CFG_PROG_KEY = "prog"; 65 // date manager key 66 constexpr const char* DATA_MGR_DEVICE_ROM_KEY = "deviceRom"; 67 constexpr const char* DATA_MGR_DEVICE_RAM_KEY = "deviceRam"; 68 constexpr const char* DATA_MGR_EVENT_MAX_ROM_NUM_KEY = "eventMaxRamNum"; 69 constexpr const char* DATA_MGR_EVENT_MAX_RAM_NUM_KEY = "eventMaxRomNum"; 70 71 // event date key 72 constexpr const char* EVENT_DATA_EVENT_ID_KEY = "eventId"; 73 constexpr const char* EVENT_DATA_VERSION_KEY = "version"; 74 constexpr const char* EVENT_DATA_DATE_KEY = "date"; 75 constexpr const char* EVENT_DATA_EVENT_CONTENT_KEY = "eventContent"; 76 77 // event content key 78 constexpr const char* EVENT_CONTENT_STATUS_KEY = "status"; 79 constexpr const char* EVENT_CONTENT_CRED_KEY = "cred"; 80 constexpr const char* EVENT_CONTENT_EXTRA_KEY = "extra"; 81 } // namespace OHOS::Security::SecurityGuard 82 83 #endif // SECURITY_GUARD_MODEL_ANALYSIS_DEFINE_H 84