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_SERVICE_BUNDLEMGR_INCLUDE_OVERLAY_MANAGER_HOST_IMPL_H 17 #define FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_SERVICE_BUNDLEMGR_INCLUDE_OVERLAY_MANAGER_HOST_IMPL_H 18 19 #include <atomic> 20 21 #include "overlay_manager_host.h" 22 23 namespace OHOS { 24 namespace AppExecFwk { 25 class OverlayManagerHostImpl : public OverlayManagerHost { 26 public: 27 OverlayManagerHostImpl(); 28 virtual ~OverlayManagerHostImpl(); 29 30 virtual ErrCode GetAllOverlayModuleInfo(const std::string &bundleName, 31 std::vector<OverlayModuleInfo> &overlayModuleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override; 32 virtual ErrCode GetOverlayModuleInfo(const std::string &bundleName, const std::string &moduleName, 33 OverlayModuleInfo &overlayModuleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override; 34 virtual ErrCode GetOverlayModuleInfo(const std::string &moduleName, OverlayModuleInfo &overlayModuleInfo, 35 int32_t userId = Constants::UNSPECIFIED_USERID) override; 36 virtual ErrCode GetTargetOverlayModuleInfo(const std::string &targetModuleName, 37 std::vector<OverlayModuleInfo> &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override; 38 virtual ErrCode GetOverlayModuleInfoByBundleName(const std::string &bundleName, const std::string &moduleName, 39 std::vector<OverlayModuleInfo> &overlayModuleInfos, int32_t userId = Constants::UNSPECIFIED_USERID) override; 40 virtual ErrCode GetOverlayBundleInfoForTarget(const std::string &targetBundleName, 41 std::vector<OverlayBundleInfo> &overlayBundleInfo, int32_t userId = Constants::UNSPECIFIED_USERID) override; 42 virtual ErrCode GetOverlayModuleInfoForTarget(const std::string &targetBundleName, 43 const std::string &targetModuleName, std::vector<OverlayModuleInfo> &overlayModuleInfo, 44 int32_t userId = Constants::UNSPECIFIED_USERID) override; 45 virtual ErrCode SetOverlayEnabledForSelf(const std::string &moduleName, bool isEnabled, 46 int32_t userId = Constants::UNSPECIFIED_USERID) override; 47 virtual ErrCode SetOverlayEnabled(const std::string &bundleName, const std::string &moduleName, bool isEnabled, 48 int32_t userId = Constants::UNSPECIFIED_USERID) override; 49 }; 50 } // AppExecFwk 51 } // OHOS 52 #endif // FOUNDATION_BUNDLEMANAGER_BUNDLE_FRAMEWORK_SERVICE_BUNDLEMGR_INCLUDE_OVERLAY_MANAGER_HOST_IMPL_H