• 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 #include "app_startup_task.h"
17 
18 namespace OHOS {
19 namespace AbilityRuntime {
AppStartupTask(const std::string & name)20 AppStartupTask::AppStartupTask(const std::string& name) : StartupTask(name)
21 {
22 }
23 
24 AppStartupTask::~AppStartupTask() = default;
25 
GetIsExcludeFromAutoStart() const26 bool AppStartupTask::GetIsExcludeFromAutoStart() const
27 {
28     return isExcludeFromAutoStart_;
29 }
30 
SetIsExcludeFromAutoStart(bool excludeFromAutoStart)31 void AppStartupTask::SetIsExcludeFromAutoStart(bool excludeFromAutoStart)
32 {
33     isExcludeFromAutoStart_ = excludeFromAutoStart;
34 }
35 
SetModuleName(const std::string & moduleName)36 void AppStartupTask::SetModuleName(const std::string &moduleName)
37 {
38     moduleName_ = moduleName;
39 }
40 
GetModuleName() const41 const std::string& AppStartupTask::GetModuleName() const
42 {
43     return moduleName_;
44 }
45 
SetModuleType(AppExecFwk::ModuleType moduleType)46 void AppStartupTask::SetModuleType(AppExecFwk::ModuleType moduleType)
47 {
48     moduleType_ = moduleType;
49 }
50 
GetModuleType() const51 AppExecFwk::ModuleType AppStartupTask::GetModuleType() const
52 {
53     return moduleType_;
54 }
55 
SetMatchRules(StartupTaskMatchRules matchRules)56 void AppStartupTask::SetMatchRules(StartupTaskMatchRules matchRules)
57 {
58     matchRules_ = std::move(matchRules);
59 }
60 
GetUriMatchRules() const61 const std::vector<std::string> &AppStartupTask::GetUriMatchRules() const
62 {
63     return matchRules_.uris;
64 }
65 
GetInsightIntentMatchRules() const66 const std::vector<std::string> &AppStartupTask::GetInsightIntentMatchRules() const
67 {
68     return matchRules_.insightIntents;
69 }
70 
GetActionMatchRules() const71 const std::vector<std::string> &AppStartupTask::GetActionMatchRules() const
72 {
73     return matchRules_.actions;
74 }
75 
GetCustomizationMatchRules() const76 const std::vector<std::string> &AppStartupTask::GetCustomizationMatchRules() const
77 {
78     return matchRules_.customization;
79 }
80 } // namespace AbilityRuntime
81 } // namespace OHOS
82