• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2024 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 BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_SERVICE_ABILITY_H
17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_SERVICE_ABILITY_H
18 
19 #include "system_ability.h"
20 
21 #include "reminder_agent_service.h"
22 #include "reminder_data_manager.h"
23 #include "system_ability_definition.h"
24 
25 namespace OHOS {
26 namespace Notification {
27 class ReminderAgentServiceAbility final : public SystemAbility {
28 public:
29     /**
30      * @brief The constructor of service ability.
31      *
32      * @param systemAbilityId Indicates the system ability id.
33      * @param runOnCreate Run the system ability on created.
34      */
35     ReminderAgentServiceAbility(const int32_t systemAbilityId, bool runOnCreate);
36 
37     /**
38      * @brief The destructor.
39      */
40     ~ReminderAgentServiceAbility() final;
41 
42     DISALLOW_COPY_AND_MOVE(ReminderAgentServiceAbility);
43     DECLARE_SYSTEM_ABILITY(ReminderAgentServiceAbility);
44 
45 private:
46     void OnStart() final;
47     void OnStop() final;
48 
49 private:
50     sptr<ReminderAgentService> service_;
51     std::shared_ptr<ReminderDataManager> reminderDataManager_;
52 };
53 }  // namespace Notification
54 }  // namespace OHOS
55 
56 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_REMINDER_INCLUDE_REMINDER_SERVICE_ABILITY_H
57