1545fdf9bSopenharmony_ci/*
2545fdf9bSopenharmony_ci * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3545fdf9bSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4545fdf9bSopenharmony_ci * you may not use this file except in compliance with the License.
5545fdf9bSopenharmony_ci * You may obtain a copy of the License at
6545fdf9bSopenharmony_ci *
7545fdf9bSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8545fdf9bSopenharmony_ci *
9545fdf9bSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10545fdf9bSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11545fdf9bSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12545fdf9bSopenharmony_ci * See the License for the specific language governing permissions and
13545fdf9bSopenharmony_ci * limitations under the License.
14545fdf9bSopenharmony_ci */
15545fdf9bSopenharmony_ci
16545fdf9bSopenharmony_ci#ifndef FOUNDATION_APPEXECFWK_STANDARD_TOOLS_TEST_MOCK_MOCK_BUNDLE_MGR_HOST_H
17545fdf9bSopenharmony_ci#define FOUNDATION_APPEXECFWK_STANDARD_TOOLS_TEST_MOCK_MOCK_BUNDLE_MGR_HOST_H
18545fdf9bSopenharmony_ci
19545fdf9bSopenharmony_ci#include "gmock/gmock.h"
20545fdf9bSopenharmony_ci
21545fdf9bSopenharmony_ci#include "app_log_wrapper.h"
22545fdf9bSopenharmony_ci#include "bundle_mgr_host.h"
23545fdf9bSopenharmony_ci
24545fdf9bSopenharmony_cinamespace OHOS {
25545fdf9bSopenharmony_cinamespace AppExecFwk {
26545fdf9bSopenharmony_ciclass MockBundleMgrHost : public BundleMgrHost {
27545fdf9bSopenharmony_cipublic:
28545fdf9bSopenharmony_ci    ErrCode CleanBundleCacheFiles(const std::string &bundleName, const sptr<ICleanCacheCallback> cleanCacheCallback,
29545fdf9bSopenharmony_ci        int32_t userId = Constants::UNSPECIFIED_USERID, int32_t appIndex = 0) override;
30545fdf9bSopenharmony_ci    bool CleanBundleDataFiles(const std::string &bundleName, const int userId = 0, const int appIndex = 0);
31545fdf9bSopenharmony_ci    bool DumpInfos(
32545fdf9bSopenharmony_ci        const DumpFlag flag, const std::string &bundleName, int32_t userId, std::string &result);
33545fdf9bSopenharmony_ci    ErrCode SetApplicationEnabled(const std::string &bundleName, bool isEnable,
34545fdf9bSopenharmony_ci        int32_t userId = Constants::UNSPECIFIED_USERID) override;
35545fdf9bSopenharmony_ci    ErrCode SetAbilityEnabled(const AbilityInfo &abilityInfo, bool isEnable,
36545fdf9bSopenharmony_ci        int32_t userId = Constants::UNSPECIFIED_USERID) override;
37545fdf9bSopenharmony_ci    bool GetBundleArchiveInfo(const std::string &hapFilePath, const BundleFlag flag, BundleInfo &bundleInfo);
38545fdf9bSopenharmony_ci};
39545fdf9bSopenharmony_ci}  // namespace AppExecFwk
40545fdf9bSopenharmony_ci}  // namespace OHOS
41545fdf9bSopenharmony_ci
42545fdf9bSopenharmony_ci#endif  // FOUNDATION_APPEXECFWK_STANDARD_TOOLS_TEST_MOCK_MOCK_BUNDLE_MGR_HOST_H
43