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_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_OVERLAY_MANAGER_INTERFACE_H 17 #define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_OVERLAY_MANAGER_INTERFACE_H 18 19 #include "appexecfwk_errors.h" 20 #include "bundle_info.h" 21 #include "iremote_broker.h" 22 23 #include <vector> 24 #include <string> 25 26 namespace OHOS { 27 namespace AppExecFwk { 28 class IOverlayManager : public IRemoteBroker { 29 public: 30 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.bundleManager.OverlayManager"); 31 32 virtual ErrCode GetAllOverlayModuleInfo(const std::string &bundleName, 33 std::vector<OverlayModuleInfo> &overlayModuleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) 34 { 35 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 36 } 37 38 virtual ErrCode GetOverlayModuleInfo(const std::string &bundleName, const std::string &moduleName, 39 OverlayModuleInfo &overlayModuleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) 40 { 41 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 42 } 43 44 virtual ErrCode GetOverlayModuleInfo(const std::string &moduleName, OverlayModuleInfo &overlayModuleInfo, 45 int32_t userId = Constants::UNSPECIFIED_USERID) 46 { 47 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 48 } 49 50 virtual ErrCode GetTargetOverlayModuleInfo(const std::string &targetModuleName, 51 std::vector<OverlayModuleInfo> &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) 52 { 53 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 54 } 55 56 virtual ErrCode GetOverlayModuleInfoByBundleName(const std::string &bundleName, const std::string &moduleName, 57 std::vector<OverlayModuleInfo> &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) 58 { 59 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 60 } 61 62 virtual ErrCode GetOverlayBundleInfoForTarget(const std::string &targetBundleName, 63 std::vector<OverlayBundleInfo> &overlayBundleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) 64 { 65 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 66 } 67 68 virtual ErrCode GetOverlayModuleInfoForTarget(const std::string &targetBundleName, 69 const std::string &targetModuleName, std::vector<OverlayModuleInfo> &overlayModuleInfo, 70 int32_t userId = Constants::UNSPECIFIED_USERID) 71 { 72 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 73 } 74 75 virtual ErrCode SetOverlayEnabled(const std::string &bundleName, const std::string &moduleName, bool isEnabled, 76 int32_t userId = Constants::UNSPECIFIED_USERID) 77 { 78 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 79 } 80 81 virtual ErrCode SetOverlayEnabledForSelf(const std::string &moduleName, bool isEnabled, 82 int32_t userId = Constants::UNSPECIFIED_USERID) 83 { 84 return ERR_BUNDLEMANAGER_OVERLAY_INSTALLATION_FAILED_INTERNAL_ERROR; 85 } 86 }; 87 } // AppExecFwk 88 } // OHOS 89 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_INNERKITS_APPEXECFWK_CORE_INCLUDE_OVERLAY_MANAGER_INTERFACE_H