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 OHOS_ABILITY_RUNTIME_ERMS_MGR_INTERFACE_H 17 #define OHOS_ABILITY_RUNTIME_ERMS_MGR_INTERFACE_H 18 19 #include <string> 20 #include <vector> 21 22 #include "iremote_broker.h" 23 #include "iremote_object.h" 24 25 #include "ability_info.h" 26 #include "erms_mgr_param.h" 27 #include "parcel.h" 28 #include "want.h" 29 30 namespace OHOS { 31 namespace AppExecFwk { 32 using Want = OHOS::AAFwk::Want; 33 using AbilityInfo = OHOS::AppExecFwk::AbilityInfo; 34 using ExtensionAbilityInfo = OHOS::AppExecFwk::ExtensionAbilityInfo; 35 36 // when AG support the SA, this file needs to be removed. 37 class IEcologicalRuleManager : public OHOS::IRemoteBroker { 38 public: 39 IEcologicalRuleManager() = default; 40 virtual ~IEcologicalRuleManager() = default; 41 42 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.IEcologicalRuleManagerService"); 43 QueryFreeInstallExperience(const Want & want,const ErmsParams::CallerInfo & callerInfo,ErmsParams::ExperienceRule & rule)44 virtual int32_t QueryFreeInstallExperience(const Want &want, 45 const ErmsParams::CallerInfo &callerInfo, ErmsParams::ExperienceRule &rule) 46 { 47 return 0; 48 } 49 EvaluateResolveInfos(const Want & want,const ErmsParams::CallerInfo & callerInfo,int32_t type,std::vector<AbilityInfo> & abilityInfos,std::vector<ExtensionAbilityInfo> extensionInfos)50 virtual int32_t EvaluateResolveInfos(const Want &want, const ErmsParams::CallerInfo &callerInfo, int32_t type, 51 std::vector<AbilityInfo> &abilityInfos, std::vector<ExtensionAbilityInfo> extensionInfos) 52 { 53 return 0; 54 } 55 QueryStartExperience(const Want & want,const ErmsParams::CallerInfo & callerInfo,ErmsParams::ExperienceRule & rule)56 virtual int32_t QueryStartExperience(const Want &want, 57 const ErmsParams::CallerInfo &callerInfo, ErmsParams::ExperienceRule &rule) 58 { 59 return 0; 60 } 61 QueryPublishFormExperience(const Want & want,ErmsParams::ExperienceRule & rule)62 virtual int32_t QueryPublishFormExperience(const Want &want, ErmsParams::ExperienceRule &rule) 63 { 64 return 0; 65 } 66 IsSupportPublishForm(const Want & want,const ErmsParams::CallerInfo & callerInfo,ErmsParams::ExperienceRule & rule)67 virtual int32_t IsSupportPublishForm(const Want &want, const ErmsParams::CallerInfo &callerInfo, 68 ErmsParams::ExperienceRule &rule) 69 { 70 return 0; 71 } 72 QueryLastSyncTime()73 virtual long QueryLastSyncTime() 74 { 75 return 0; 76 } 77 }; 78 } // namespace AppExecFwk 79 } // namespace OHOS 80 #endif // OHOS_ABILITY_RUNTIME_ERMS_MGR_INTERFACE_H 81