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 FOUNDATION_BUNDLE_FRAMEWORK_SERVICE_INCLUDE_APP_JUMP_INTERCEPTOR_MANAGER_DB_INTERFACE_H 17 #define FOUNDATION_BUNDLE_FRAMEWORK_SERVICE_INCLUDE_APP_JUMP_INTERCEPTOR_MANAGER_DB_INTERFACE_H 18 19 #include <string> 20 #include <vector> 21 22 #include "app_control_interface.h" 23 #include "app_jump_control_rule.h" 24 25 namespace OHOS { 26 namespace AppExecFwk { 27 using Want = OHOS::AAFwk::Want; 28 class IAppJumpInterceptorlManagerDb { 29 public: 30 31 IAppJumpInterceptorlManagerDb() = default; 32 virtual ~IAppJumpInterceptorlManagerDb() = default; 33 34 virtual ErrCode ConfirmAppJumpControlRule(const std::string &callerBundleName, const std::string &targetBundleName, 35 int32_t userId) = 0; 36 virtual ErrCode AddAppJumpControlRule(const std::vector<AppJumpControlRule> &controlRules, int32_t userId) = 0; 37 virtual ErrCode DeleteAppJumpControlRule(const std::vector<AppJumpControlRule> &controlRules, int32_t userId) = 0; 38 virtual ErrCode DeleteRuleByCallerBundleName(const std::string &callerBundleName, int32_t userId) = 0; 39 virtual ErrCode DeleteRuleByTargetBundleName(const std::string &targetBundleName, int32_t userId) = 0; 40 virtual ErrCode GetAppJumpControlRule(const std::string &callerBundleName, const std::string &targetBundleName, 41 int32_t userId, AppJumpControlRule &controlRule) = 0; 42 virtual bool SubscribeCommonEvent() = 0; 43 }; 44 } // namespace AppExecFwk 45 } // namespace OHOS 46 #endif // FOUNDATION_BUNDLE_FRAMEWORK_SERVICE_INCLUDE_APP_JUMP_INTERCEPTOR_MANAGER_DB_INTERFACE_H