1 /*
2 * Copyright (c) 2022-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 #include "coordination_event_handler.h"
17
18 #include "fi_log.h"
19
20 namespace OHOS {
21 namespace Msdp {
22 namespace DeviceStatus {
23 namespace {
24 constexpr OHOS::HiviewDFX::HiLogLabel LABEL { LOG_CORE, MSDP_DOMAIN_ID, "CoordinationEventHandler" };
25 } // namespace
CoordinationEventHandler(const std::shared_ptr<AppExecFwk::EventRunner> & runner)26 CoordinationEventHandler::CoordinationEventHandler(
27 const std::shared_ptr<AppExecFwk::EventRunner> &runner)
28 : AppExecFwk::EventHandler(runner) {}
29
ProxyPostTask(const Callback & callback,int64_t delayTime)30 bool CoordinationEventHandler::ProxyPostTask(const Callback &callback, int64_t delayTime)
31 {
32 CALL_DEBUG_ENTER;
33 return AppExecFwk::EventHandler::PostTask(callback, delayTime);
34 }
35
ProxyPostTask(const Callback & callback,const std::string & name,int64_t delayTime)36 bool CoordinationEventHandler::ProxyPostTask(const Callback &callback, const std::string &name,
37 int64_t delayTime)
38 {
39 CALL_DEBUG_ENTER;
40 return AppExecFwk::EventHandler::PostTask(callback, name, delayTime);
41 }
42
ProxyRemoveTask(const std::string & name)43 void CoordinationEventHandler::ProxyRemoveTask(const std::string &name)
44 {
45 CALL_DEBUG_ENTER;
46 AppExecFwk::EventHandler::RemoveTask(name);
47 }
48 } // namespace DeviceStatus
49 } // namespace Msdp
50 } // namespace OHOS
51