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