• 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 <vector>
22 #include <set>
23 namespace OHOS::Security::SecurityCollector {
24 enum EventId : int64_t {
25     PASTEBOARD_EVENTID = 1011015000,
26     ACCOUNT_EVENTID,
27     WINDOW_EVENTID,
28     VOLUMN_EVENTID,
29     PRINTER_EVENTID,
30     FILE_EVENTID,
31     PROCESS_EVENTID,
32     NETWORK_EVENTID,
33     FILE_GUARD_EVENTID,
34     CAMERA_EVENTID,
35     APPLICATION_EVENTID,
36     MOUSE_EVENTID,
37     KEYBOARD_EVENTID,
38 };
39 
40 struct Event {
41     int64_t eventId;
42     std::string version;
43     std::string content;
44     std::string extra;
45     std::string timestamp;
46     int32_t userId;
47     std::string deviceId;
48     std::set<std::string> eventSubscribes;
49 };
50 struct SecurityCollectorEventMuteFilter {
51     int64_t eventId;
52     int64_t type;
53     bool isInclude;
54     std::set<std::string> mutes;
55     bool isSetMute;
56     std::string instanceFlag;
57     bool operator == (const SecurityCollectorEventMuteFilter &input) const
58     {
59         return eventId == input.eventId && isInclude == input.isInclude && type == input.type &&
60             instanceFlag == input.instanceFlag && mutes.size() == input.mutes.size() && mutes == input.mutes;
61     }
62 };
63 } // namespace OHOS::Security::SecurityCollector
64 #endif // SECURITY_COLLECTOR_EVENT_INFO_H