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 APP_DOMAIN_VERIFY_MGR_SERVICE_PROXY_H 17 #define APP_DOMAIN_VERIFY_MGR_SERVICE_PROXY_H 18 19 #include "i_app_domain_verify_mgr_service.h" 20 #include "iremote_proxy.h" 21 #include "want.h" 22 23 namespace OHOS { 24 namespace AppDomainVerify { 25 class AppDomainVerifyMgrServiceProxy : public IRemoteProxy<IAppDomainVerifyMgrService> { 26 public: 27 explicit AppDomainVerifyMgrServiceProxy(const sptr<IRemoteObject>& object); 28 ~AppDomainVerifyMgrServiceProxy() override; 29 void VerifyDomain(const std::string& appIdentifier, const std::string& bundleName, 30 const std::string& fingerprint, const std::vector<SkillUri>& skillUris) override; 31 bool ClearDomainVerifyStatus(const std::string& appIdentifier, const std::string& bundleName) override; 32 bool FilterAbilities(const OHOS::AAFwk::Want& want, 33 const std::vector<OHOS::AppExecFwk::AbilityInfo>& originAbilityInfos, 34 std::vector<OHOS::AppExecFwk::AbilityInfo>& filteredAbilityInfos) override; 35 bool QueryDomainVerifyStatus( 36 const std::string& bundleName, DomainVerifyStatus& domainVerificationState) override; 37 bool QueryAllDomainVerifyStatus(BundleVerifyStatusInfo& bundleVerifyStatusInfo) override; 38 bool SaveDomainVerifyStatus( 39 const std::string& bundleName, const VerifyResultInfo& verifyResultInfo) override; 40 bool IsAtomicServiceUrl(const std::string& url) override; 41 void ConvertToExplicitWant(OHOS::AAFwk::Want& implicitWant, sptr<IConvertCallback>& callback) override; 42 void UpdateWhiteListUrls(const std::vector<std::string>& urls) override; 43 int QueryAssociatedDomains(const std::string& bundleName, std::vector<std::string>& domains) override; 44 int QueryAssociatedBundleNames(const std::string& domain, std::vector<std::string>& bundleNames) override; 45 int GetDeferredLink(std::string& link) override; 46 int QueryAppDetailsWant(const std::string& link, AAFwk::Want& want) override; 47 private: 48 static inline BrokerDelegator<AppDomainVerifyMgrServiceProxy> delegator_; 49 }; 50 } // namespace AppDomainVerify 51 } // namespace OHOS 52 53 #endif // APP_DOMAIN_VERIFY_SERVICE_PROXY_H