• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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_COLLECTOR_EVENT_DEFINE_H
17 #define SECURITY_COLLECTOR_EVENT_DEFINE_H
18 
19 #include <cstdint>
20 #include <string>
21 #include <set>
22 namespace OHOS::Security::SecurityCollector {
23 enum EventId : int64_t {
24     PASTEBOARD_EVENTID = 1011015000,
25     ACCOUNT_EVENTID,
26     WINDOW_EVENTID,
27     VOLUMN_EVENTID,
28     PRINTER_EVENTID,
29     FILE_EVENTID,
30     PROCESS_EVENTID,
31     NETWORK_EVENTID,
32     FILE_GUARD_EVENTID,
33     CAMERA_EVENTID,
34     APPLICATION_EVENTID,
35     MOUSE_EVENTID,
36     KEYBOARD_EVENTID,
37 };
38 
39 struct Event {
40     int64_t eventId;
41     std::string version;
42     std::string content;
43     std::string extra;
44     std::string timestamp;
45     std::set<std::string> eventSubscribes;
46 };
47 
48 using SecurityCollectorEventMuteType = enum {
49     EVENT_TYPE_EQUAL = 0,
50     EVENT_SUB_TYPE_EQUAL = 1,
51     PID_EQUAL = 2,
52     FILE_PATH_EQUAL = 3,
53     FILE_PATH_PREFIX = 4,
54 };
55 
56 using SecurityCollectorEventMuteFilter = struct {
57     int64_t eventId;
58     SecurityCollectorEventMuteType type;
59     std::vector<std::string> mutes;
60     bool isSetMute;
61 };
62 } // namespace OHOS::Security::SecurityCollector
63 #endif // SECURITY_COLLECTOR_EVENT_INFO_H