13c3173acSopenharmony_ci/* 23c3173acSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 33c3173acSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 43c3173acSopenharmony_ci * you may not use this file except in compliance with the License. 53c3173acSopenharmony_ci * You may obtain a copy of the License at 63c3173acSopenharmony_ci * 73c3173acSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 83c3173acSopenharmony_ci * 93c3173acSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 103c3173acSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 113c3173acSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 123c3173acSopenharmony_ci * See the License for the specific language governing permissions and 133c3173acSopenharmony_ci * limitations under the License. 143c3173acSopenharmony_ci */ 153c3173acSopenharmony_ci 163c3173acSopenharmony_ci#ifndef CONCURRENT_TASK_SEVICES_INCLUDE_CONCURRENT_TASK_SERVICE_ABILITY_H 173c3173acSopenharmony_ci#define CONCURRENT_TASK_SEVICES_INCLUDE_CONCURRENT_TASK_SERVICE_ABILITY_H 183c3173acSopenharmony_ci 193c3173acSopenharmony_ci#include "system_ability.h" 203c3173acSopenharmony_ci#include "concurrent_task_service.h" 213c3173acSopenharmony_ci 223c3173acSopenharmony_cinamespace OHOS { 233c3173acSopenharmony_cinamespace ConcurrentTask { 243c3173acSopenharmony_ciclass ConcurrentTaskServiceAbility : public SystemAbility { 253c3173acSopenharmony_ci DECLARE_SYSTEM_ABILITY(ConcurrentTaskServiceAbility); 263c3173acSopenharmony_ci 273c3173acSopenharmony_cipublic: 283c3173acSopenharmony_ci ConcurrentTaskServiceAbility(int32_t sysAbilityId, bool runOnCreate) : SystemAbility(sysAbilityId, runOnCreate) {} 293c3173acSopenharmony_ci ~ConcurrentTaskServiceAbility() override = default; 303c3173acSopenharmony_ci 313c3173acSopenharmony_ciprivate: 323c3173acSopenharmony_ci void OnStart() override; 333c3173acSopenharmony_ci 343c3173acSopenharmony_ci void OnStop() override; 353c3173acSopenharmony_ci 363c3173acSopenharmony_ci void OnAddSystemAbility(int32_t systemAbilityId, const std::string& deviceId) override; 373c3173acSopenharmony_ci 383c3173acSopenharmony_ci void OnRemoveSystemAbility(int32_t systemAbilityId, const std::string& deviceId) override; 393c3173acSopenharmony_ci 403c3173acSopenharmony_ci sptr<ConcurrentTaskService> service_; 413c3173acSopenharmony_ci 423c3173acSopenharmony_ci DISALLOW_COPY_AND_MOVE(ConcurrentTaskServiceAbility); 433c3173acSopenharmony_ci}; 443c3173acSopenharmony_ci} // namespace ConcurrentTask 453c3173acSopenharmony_ci} // namespace OHOS 463c3173acSopenharmony_ci 473c3173acSopenharmony_ci#endif // CONCURRENT_TASK_SEVICES_INCLUDE_CONCURRENT_TASK_SERVICE_ABILITY_H 48