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 FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_EVENT_PUBLISHER_H
17 #define FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_EVENT_PUBLISHER_H
18 
19 #include <string>
20 #include <vector>
21 
22 namespace OHOS {
23 namespace WorkScheduler {
24 class EventPublisher {
25 public:
26     explicit EventPublisher() = default;
27     ~EventPublisher() = default;
28     /**
29      * @brief Publish event.
30      *
31      * @param result The dump result.
32      * @param eventType The event type.
33      * @param eventValue The event value.
34      */
35     void PublishEvent(std::string &result, std::string &eventType, std::string &eventValue);
36     /**
37      * @brief Publish network event.
38      *
39      * @param result The dump result.
40      * @param eventValue The event value.
41      */
42     void PublishNetworkEvent(std::string &result, std::string &eventValue);
43     /**
44      * @brief Publish charging event.
45      *
46      * @param result The dump result.
47      * @param eventValue The event value.
48      */
49     void PublishChargingEvent(std::string &result, std::string &eventValue);
50     /**
51      * @brief Publish storage event.
52      *
53      * @param result The dump result.
54      * @param eventValue The event value.
55      */
56     void PublishStorageEvent(std::string &result, std::string &eventValue);
57     /**
58      * @brief Publish battery status event.
59      *
60      * @param result The dump result.
61      * @param eventValue The event value.
62      */
63     void PublishBatteryStatusEvent(std::string &result, std::string &eventValue);
64     /**
65      * @brief Dump event info.
66      *
67      * @param result The dump result.
68      * @param eventType The event type.
69      * @param eventValue The event value.
70      */
71     void Dump(std::string &result, std::string &eventType, std::string &eventValue);
72 };
73 } // namespace WorkScheduler
74 } // namespace OHOS
75 #endif // FOUNDATION_RESOURCESCHEDULE_WORKSCHEDULER_EVENT_PUBLISHER_H