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