• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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, const std::string& fingerprint,
30         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(const std::string& bundleName, DomainVerifyStatus& domainVerificationState) override;
36     bool QueryAllDomainVerifyStatus(BundleVerifyStatusInfo& bundleVerifyStatusInfo) override;
37     bool SaveDomainVerifyStatus(const std::string& bundleName, const VerifyResultInfo& verifyResultInfo) override;
38     bool IsAtomicServiceUrl(const std::string& url) override;
39     void ConvertToExplicitWant(OHOS::AAFwk::Want& implicitWant, sptr<IConvertCallback>& callback) override;
40     void UpdateWhiteListUrls(const std::vector<std::string>& urls) override;
41     int QueryAssociatedDomains(const std::string& bundleName, std::vector<std::string>& domains) override;
42     int QueryAssociatedBundleNames(const std::string& domain, std::vector<std::string>& bundleNames) override;
43     int GetDeferredLink(std::string& link) override;
44     int QueryAppDetailsWant(const std::string& link, AAFwk::Want& want) override;
45     bool IsShortUrl(const std::string& url) override;
46     void ConvertFromShortUrl(OHOS::AAFwk::Want& originWant, sptr<IConvertCallback>& callback) override;
47     bool QueryAbilityInfos(const std::string& url, bool withDefault,
48         std::vector<OHOS::AppExecFwk::AbilityInfo>& abilityInfos, bool& findDefaultApp) override;
49 
50 private:
51     static inline BrokerDelegator<AppDomainVerifyMgrServiceProxy> delegator_;
52 };
53 }  // namespace AppDomainVerify
54 }  // namespace OHOS
55 
56 #endif  // APP_DOMAIN_VERIFY_SERVICE_PROXY_H