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 TIMER_INFO_H
17 #define TIMER_INFO_H
18 
19 #include "itimer_info.h"
20 
21 namespace OHOS {
22 namespace MiscServices {
23 class TimerInfo : public ITimerInfo {
24 public:
25     TimerInfo();
26     virtual ~TimerInfo();
27     void OnTrigger() override;
28     void SetType(const int &type) override;
29     void SetRepeat(bool repeat) override;
30     void SetInterval(const uint64_t &interval) override;
31     void SetWantAgent(std::shared_ptr<OHOS::AbilityRuntime::WantAgent::WantAgent> wantAgent) override;
32 };
33 
34 TimerInfo::TimerInfo() = default;
35 
36 TimerInfo::~TimerInfo() = default;
37 
SetType(const int & type)38 void TimerInfo::SetType(const int &type)
39 {
40     this->type = type;
41 }
42 
SetRepeat(bool repeat)43 void TimerInfo::SetRepeat(bool repeat)
44 {
45     this->repeat = repeat;
46 }
SetInterval(const uint64_t & interval)47 void TimerInfo::SetInterval(const uint64_t &interval)
48 {
49     this->interval = interval;
50 }
SetWantAgent(std::shared_ptr<OHOS::AbilityRuntime::WantAgent::WantAgent> wantAgent)51 void TimerInfo::SetWantAgent(std::shared_ptr<OHOS::AbilityRuntime::WantAgent::WantAgent> wantAgent)
52 {
53     this->wantAgent = wantAgent;
54 }
OnTrigger()55 void TimerInfo::OnTrigger()
56 {
57 }
58 } // namespace MiscServices
59 } // namespace OHOS
60 #endif // TIMER_INFO_H