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_BM_INCLUDE_BUNDLE_COMMAND_H 17545fdf9bSopenharmony_ci#define FOUNDATION_APPEXECFWK_STANDARD_TOOLS_BM_INCLUDE_BUNDLE_COMMAND_H 18545fdf9bSopenharmony_ci 19545fdf9bSopenharmony_ci#include "shell_command.h" 20545fdf9bSopenharmony_ci#include "bundle_mgr_interface.h" 21545fdf9bSopenharmony_ci#include "bundle_installer_interface.h" 22545fdf9bSopenharmony_ci 23545fdf9bSopenharmony_cinamespace OHOS { 24545fdf9bSopenharmony_cinamespace AppExecFwk { 25545fdf9bSopenharmony_cinamespace { 26545fdf9bSopenharmony_ciconst std::string TOOL_NAME = "bm"; 27545fdf9bSopenharmony_ci 28545fdf9bSopenharmony_ciconst std::string HELP_MSG = "usage: bm <command> <options>\n" 29545fdf9bSopenharmony_ci "These are common bm commands list:\n" 30545fdf9bSopenharmony_ci " help list available commands\n" 31545fdf9bSopenharmony_ci " install install a bundle with options\n" 32545fdf9bSopenharmony_ci " uninstall uninstall a bundle with options\n" 33545fdf9bSopenharmony_ci " dump dump the bundle info\n" 34545fdf9bSopenharmony_ci " get obtain device udid\n" 35545fdf9bSopenharmony_ci " quickfix quick fix, including query and install\n" 36545fdf9bSopenharmony_ci " compile Compile the software package\n" 37545fdf9bSopenharmony_ci " copy-ap Copy software ap file to /data/local/pgo\n" 38545fdf9bSopenharmony_ci " dump-overlay dump overlay info of the specific overlay bundle\n" 39545fdf9bSopenharmony_ci " dump-target-overlay dump overlay info of the specific target bundle\n" 40545fdf9bSopenharmony_ci " dump-dependencies dump dependencies by given bundle name and module name\n" 41545fdf9bSopenharmony_ci " dump-shared dump inter-application shared library information by bundle name\n"; 42545fdf9bSopenharmony_ci 43545fdf9bSopenharmony_ciconst std::string ENABLE_DISABLE_HELP_MSG = " enable enable the bundle\n" 44545fdf9bSopenharmony_ci " disable disable the bundle\n"; 45545fdf9bSopenharmony_ci 46545fdf9bSopenharmony_ciconst std::string CLEAN_HELP_MSG = " clean clean the bundle data\n"; 47545fdf9bSopenharmony_ci 48545fdf9bSopenharmony_ciconst std::string HELP_MSG_COMPILE = 49545fdf9bSopenharmony_ci "usage: bm compile [-m mode] [-r reset] (bundle-name | -a)\n" 50545fdf9bSopenharmony_ci "options list:\n" 51545fdf9bSopenharmony_ci " -h, --help list available commands.\n" 52545fdf9bSopenharmony_ci " -m, --mode <mode-name> select partial or full mode.\n" 53545fdf9bSopenharmony_ci " -r, --reset clear bundle configuration file data.\n" 54545fdf9bSopenharmony_ci " -a, --all compile or reset all software packages.\n"; 55545fdf9bSopenharmony_ci 56545fdf9bSopenharmony_ciconst std::string HELP_MSG_COPY_AP = 57545fdf9bSopenharmony_ci "usage: bm copy-ap (bundle-name | -a)\n" 58545fdf9bSopenharmony_ci "options list:\n" 59545fdf9bSopenharmony_ci " -h, --help list available commands.\n" 60545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> copy ap by bundle name\n" 61545fdf9bSopenharmony_ci " -a, --all copy all software packages.\n"; 62545fdf9bSopenharmony_ci 63545fdf9bSopenharmony_ciconst std::string HELP_MSG_INSTALL = 64545fdf9bSopenharmony_ci "usage: bm install <options>\n" 65545fdf9bSopenharmony_ci "options list:\n" 66545fdf9bSopenharmony_ci " -h, --help list available commands\n" 67545fdf9bSopenharmony_ci " -p, --bundle-path <file-path> install a hap or hsp by a specified path\n" 68545fdf9bSopenharmony_ci " -p, --bundle-path <file-path> <file-path> ... install one bundle by some hap or hsp paths\n" 69545fdf9bSopenharmony_ci " -p, --bundle-path <bundle-direction> install one bundle by a direction,\n" 70545fdf9bSopenharmony_ci " under which are some hap or hsp files\n" 71545fdf9bSopenharmony_ci " -r -p <bundle-file-path> replace an existing bundle\n" 72545fdf9bSopenharmony_ci " -r --bundle-path <bundle-file-path> replace an existing bundle\n" 73545fdf9bSopenharmony_ci " -s, --shared-bundle-dir-path <shared-bundle-dir-path> install inter-application hsp files\n" 74545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n" 75545fdf9bSopenharmony_ci " -w, --waitting-time <waitting-time> specify waitting time for installation,\n" 76545fdf9bSopenharmony_ci " the minimum waitting time is 180s,\n" 77545fdf9bSopenharmony_ci " the maximum waitting time is 600s\n"; 78545fdf9bSopenharmony_ci 79545fdf9bSopenharmony_ciconst std::string HELP_MSG_UNINSTALL = 80545fdf9bSopenharmony_ci "usage: bm uninstall <options>\n" 81545fdf9bSopenharmony_ci "options list:\n" 82545fdf9bSopenharmony_ci " -h, --help list available commands\n" 83545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> uninstall a bundle by bundle name\n" 84545fdf9bSopenharmony_ci " -m, --module-name <module-name> uninstall a module by module name\n" 85545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n" 86545fdf9bSopenharmony_ci " -k, --keep-data keep the user data after uninstall\n" 87545fdf9bSopenharmony_ci " -s, --shared uninstall inter-application shared library\n" 88545fdf9bSopenharmony_ci " -v, --version uninstall a inter-application shared library by versionCode\n"; 89545fdf9bSopenharmony_ci 90545fdf9bSopenharmony_ciconst std::string HELP_MSG_UNINSTALL_SHARE = 91545fdf9bSopenharmony_ci "usage: bm uninstall-shared <options>\n" 92545fdf9bSopenharmony_ci "options list:\n" 93545fdf9bSopenharmony_ci " -h, --help list available commands\n" 94545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> uninstall a share library by bundle name\n" 95545fdf9bSopenharmony_ci " -v, --version <versionCode> uninstall a share library by versionCode\n"; 96545fdf9bSopenharmony_ci 97545fdf9bSopenharmony_ciconst std::string HELP_MSG_DUMP = 98545fdf9bSopenharmony_ci "usage: bm dump <options>\n" 99545fdf9bSopenharmony_ci "options list:\n" 100545fdf9bSopenharmony_ci " -h, --help list available commands\n" 101545fdf9bSopenharmony_ci " -a, --all list all bundles in system\n" 102545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> list the bundle info by a bundle name\n" 103545fdf9bSopenharmony_ci " -s, --shortcut-info list the shortcut info\n" 104545fdf9bSopenharmony_ci " -d, --device-id <device-id> specify a device id\n" 105545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n"; 106545fdf9bSopenharmony_ci 107545fdf9bSopenharmony_ciconst std::string HELP_MSG_CLEAN = 108545fdf9bSopenharmony_ci "usage: bm clean <options>\n" 109545fdf9bSopenharmony_ci "options list:\n" 110545fdf9bSopenharmony_ci " -h, --help list available commands\n" 111545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> bundle name\n" 112545fdf9bSopenharmony_ci " -c, --cache clean bundle cache files by bundle name\n" 113545fdf9bSopenharmony_ci " -d, --data clean bundle data files by bundle name\n" 114545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n" 115545fdf9bSopenharmony_ci " -i, --app-index <app-index> specify a app index\n"; 116545fdf9bSopenharmony_ci 117545fdf9bSopenharmony_ciconst std::string HELP_MSG_ENABLE = 118545fdf9bSopenharmony_ci "usage: bm enable <options>\n" 119545fdf9bSopenharmony_ci "options list:\n" 120545fdf9bSopenharmony_ci " -h, --help list available commands\n" 121545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> enable bundle by bundle name\n" 122545fdf9bSopenharmony_ci " -a, --ability-name <ability-name> enable ability by ability name\n" 123545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n"; 124545fdf9bSopenharmony_ci 125545fdf9bSopenharmony_ciconst std::string HELP_MSG_DISABLE = 126545fdf9bSopenharmony_ci "usage: bm disable <options>\n" 127545fdf9bSopenharmony_ci "options list:\n" 128545fdf9bSopenharmony_ci " -h, --help list available commands\n" 129545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> disable bundle by bundle name\n" 130545fdf9bSopenharmony_ci " -a, --ability-name <ability-name> disable ability by ability name\n" 131545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n"; 132545fdf9bSopenharmony_ci 133545fdf9bSopenharmony_ciconst std::string HELP_MSG_GET = 134545fdf9bSopenharmony_ci "usage: bm get <options>\n" 135545fdf9bSopenharmony_ci "options list:\n" 136545fdf9bSopenharmony_ci " -h, --help list available commands\n" 137545fdf9bSopenharmony_ci " -u, --udid obtain udid of the current device\n"; 138545fdf9bSopenharmony_ci 139545fdf9bSopenharmony_ciconst std::string HELP_MSG_QUICK_FIX = 140545fdf9bSopenharmony_ci "usage: bm quickfix <options>\n" 141545fdf9bSopenharmony_ci "options list:\n" 142545fdf9bSopenharmony_ci "-h, --help list available commands\n" 143545fdf9bSopenharmony_ci "-q, --query indicates query quickfix, used with -b or --bundle-name\n" 144545fdf9bSopenharmony_ci "-r, --remove indicates remove quickfix, used with -b or --bundle-name\n" 145545fdf9bSopenharmony_ci "-b, --bundle-name <bundle-name> query quickfix status and information by a specified bundle name\n" 146545fdf9bSopenharmony_ci "-d, --debug apply a quickfix debug mode\n" 147545fdf9bSopenharmony_ci "-a, --apply indicates apply quickfix, used with -f or --file-path\n" 148545fdf9bSopenharmony_ci "-t, --target <target-path> indicates a target path to apply quickfix\n" 149545fdf9bSopenharmony_ci "-f, --file-path <file-path> apply a quickfix file by a specified path\n" 150545fdf9bSopenharmony_ci "-f, --file-path <file-path> <file-path> ... apply some quickfix files of one bundle\n" 151545fdf9bSopenharmony_ci "-f, --file-path <bundle-direction> apply quickfix files by direction, under which are quickfix files\n"; 152545fdf9bSopenharmony_ci 153545fdf9bSopenharmony_ciconst std::string HELP_MSG_OVERLAY = 154545fdf9bSopenharmony_ci "usage: bm dump-overlay <options>\n" 155545fdf9bSopenharmony_ci "options list:\n" 156545fdf9bSopenharmony_ci " -h, --help list available commands\n" 157545fdf9bSopenharmony_ci " -b, --bundle-name <bundle-name> bundle name of the overlay bundle\n" 158545fdf9bSopenharmony_ci " -m, --module-name <module-name> module name of the overlay bundle\n" 159545fdf9bSopenharmony_ci " -t, --target-module-name <target-module-name> target module name of overlay bundle\n" 160545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n"; 161545fdf9bSopenharmony_ci 162545fdf9bSopenharmony_ciconst std::string HELP_MSG_OVERLAY_TARGET = 163545fdf9bSopenharmony_ci "usage: bm dump-target-overlay <options>\n" 164545fdf9bSopenharmony_ci "options list:\n" 165545fdf9bSopenharmony_ci " -h, --help list available commands\n" 166545fdf9bSopenharmony_ci " -b, --bundle-name <bundle-name> bundle name of the target overlay bundle\n" 167545fdf9bSopenharmony_ci " -m, --module-name <module-name> module name of the target overlay bundle\n" 168545fdf9bSopenharmony_ci " -u, --user-id <user-id> specify a user id\n"; 169545fdf9bSopenharmony_ci 170545fdf9bSopenharmony_ciconst std::string HELP_MSG_DUMP_SHARED = 171545fdf9bSopenharmony_ci "usage: bm dump-shared <options>\n" 172545fdf9bSopenharmony_ci "eg:bm dump-shared -n <bundle-name> \n" 173545fdf9bSopenharmony_ci "options list:\n" 174545fdf9bSopenharmony_ci " -h, --help list available commands\n" 175545fdf9bSopenharmony_ci " -a, --all list all inter-application shared library name in system\n" 176545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> dump inter-application shared library information by bundleName\n"; 177545fdf9bSopenharmony_ci 178545fdf9bSopenharmony_ciconst std::string HELP_MSG_DUMP_SHARED_DEPENDENCIES = 179545fdf9bSopenharmony_ci "usage: bm dump-dependencies <options>\n" 180545fdf9bSopenharmony_ci "eg:bm dump-dependencies -n <bundle-name> -m <module-name> \n" 181545fdf9bSopenharmony_ci "options list:\n" 182545fdf9bSopenharmony_ci " -h, --help list available commands\n" 183545fdf9bSopenharmony_ci " -n, --bundle-name <bundle-name> dump dependencies by bundleName and moduleName\n" 184545fdf9bSopenharmony_ci " -m, --module-name <module-name> dump dependencies by bundleName and moduleName\n"; 185545fdf9bSopenharmony_ci 186545fdf9bSopenharmony_ciconst std::string STRING_INCORRECT_OPTION = "error: incorrect option"; 187545fdf9bSopenharmony_ciconst std::string HELP_MSG_NO_BUNDLE_PATH_OPTION = 188545fdf9bSopenharmony_ci "error: you must specify a bundle path with '-p' or '--bundle-path'."; 189545fdf9bSopenharmony_ci 190545fdf9bSopenharmony_ciconst std::string HELP_MSG_NO_BUNDLE_NAME_OPTION = 191545fdf9bSopenharmony_ci "error: you must specify a bundle name with '-n' or '--bundle-name'."; 192545fdf9bSopenharmony_ci 193545fdf9bSopenharmony_ciconst std::string STRING_INSTALL_BUNDLE_OK = "install bundle successfully."; 194545fdf9bSopenharmony_ciconst std::string STRING_INSTALL_BUNDLE_NG = "error: failed to install bundle."; 195545fdf9bSopenharmony_ci 196545fdf9bSopenharmony_ciconst std::string STRING_UNINSTALL_BUNDLE_OK = "uninstall bundle successfully."; 197545fdf9bSopenharmony_ciconst std::string STRING_UNINSTALL_BUNDLE_NG = "error: failed to uninstall bundle."; 198545fdf9bSopenharmony_ci 199545fdf9bSopenharmony_ciconst std::string HELP_MSG_NO_DATA_OR_CACHE_OPTION = 200545fdf9bSopenharmony_ci "error: you must specify '-c' or '-d' for 'bm clean' option."; 201545fdf9bSopenharmony_ciconst std::string STRING_CLEAN_CACHE_BUNDLE_OK = "clean bundle cache files successfully."; 202545fdf9bSopenharmony_ciconst std::string STRING_CLEAN_CACHE_BUNDLE_NG = "error: failed to clean bundle cache files."; 203545fdf9bSopenharmony_ci 204545fdf9bSopenharmony_ciconst std::string STRING_CLEAN_DATA_BUNDLE_OK = "clean bundle data files successfully."; 205545fdf9bSopenharmony_ciconst std::string STRING_CLEAN_DATA_BUNDLE_NG = "error: failed to clean bundle data files."; 206545fdf9bSopenharmony_ci 207545fdf9bSopenharmony_ciconst std::string STRING_ENABLE_BUNDLE_OK = "enable bundle successfully."; 208545fdf9bSopenharmony_ciconst std::string STRING_ENABLE_BUNDLE_NG = "error: failed to enable bundle."; 209545fdf9bSopenharmony_ci 210545fdf9bSopenharmony_ciconst std::string STRING_DISABLE_BUNDLE_OK = "disable bundle successfully."; 211545fdf9bSopenharmony_ciconst std::string STRING_DISABLE_BUNDLE_NG = "error: failed to disable bundle."; 212545fdf9bSopenharmony_ci 213545fdf9bSopenharmony_ciconst std::string STRING_GET_UDID_OK = "udid of current device is :"; 214545fdf9bSopenharmony_ciconst std::string STRING_GET_UDID_NG = "error: failed to get udid"; 215545fdf9bSopenharmony_ci 216545fdf9bSopenharmony_ciconst std::string HELP_MSG_NO_REMOVABLE_OPTION = 217545fdf9bSopenharmony_ci "error: you must specify a bundle name with '-n' or '--bundle-name' \n" 218545fdf9bSopenharmony_ci "and a module name with '-m' or '--module-name' \n"; 219545fdf9bSopenharmony_ci 220545fdf9bSopenharmony_ciconst std::string HELP_MSG_DUMP_FAILED = "error: failed to get information and the parameters may be wrong."; 221545fdf9bSopenharmony_ciconst std::string HELP_MSG_COMPILE_FAILED = "error: failed to get information and the parameters may be wrong."; 222545fdf9bSopenharmony_ciconst std::string STRING_REQUIRE_CORRECT_VALUE = "error: option requires a correct value.\n"; 223545fdf9bSopenharmony_ci 224545fdf9bSopenharmony_ciconst std::string STRING_DUMP_OVERLAY_OK = "overlay info is:"; 225545fdf9bSopenharmony_ciconst std::string STRING_DUMP_OVERLAY_NG = "error: failed to get overlay info"; 226545fdf9bSopenharmony_ci 227545fdf9bSopenharmony_ciconst std::string STRING_DUMP_TARGET_OVERLAY_OK = "target overlay info is:"; 228545fdf9bSopenharmony_ciconst std::string STRING_DUMP_TARGET_OVERLAY_NG = "error: failed to get target overlay info"; 229545fdf9bSopenharmony_ciconst std::string MSG_ERR_BUNDLEMANAGER_OVERLAY_FEATURE_IS_NOT_SUPPORTED = "feature is not supported.\n"; 230545fdf9bSopenharmony_ciconst std::string COMPILE_SUCCESS_OK = "compile AOT success.\n"; 231545fdf9bSopenharmony_ciconst std::string COMPILE_RESET = "reset AOT success.\n"; 232545fdf9bSopenharmony_ci} // namespace 233545fdf9bSopenharmony_ci 234545fdf9bSopenharmony_ciclass BundleManagerShellCommand : public ShellCommand { 235545fdf9bSopenharmony_cipublic: 236545fdf9bSopenharmony_ci BundleManagerShellCommand(int argc, char *argv[]); 237545fdf9bSopenharmony_ci ~BundleManagerShellCommand() override 238545fdf9bSopenharmony_ci {} 239545fdf9bSopenharmony_ci 240545fdf9bSopenharmony_ciprivate: 241545fdf9bSopenharmony_ci ErrCode CreateCommandMap() override; 242545fdf9bSopenharmony_ci ErrCode CreateMessageMap() override; 243545fdf9bSopenharmony_ci ErrCode Init() override; 244545fdf9bSopenharmony_ci 245545fdf9bSopenharmony_ci ErrCode RunAsHelpCommand(); 246545fdf9bSopenharmony_ci ErrCode RunAsInstallCommand(); 247545fdf9bSopenharmony_ci ErrCode RunAsUninstallCommand(); 248545fdf9bSopenharmony_ci ErrCode RunAsDumpCommand(); 249545fdf9bSopenharmony_ci ErrCode RunAsCleanCommand(); 250545fdf9bSopenharmony_ci ErrCode RunAsEnableCommand(); 251545fdf9bSopenharmony_ci ErrCode RunAsDisableCommand(); 252545fdf9bSopenharmony_ci ErrCode RunAsGetCommand(); 253545fdf9bSopenharmony_ci ErrCode RunAsQuickFixCommand(); 254545fdf9bSopenharmony_ci ErrCode RunAsDumpOverlay(); 255545fdf9bSopenharmony_ci ErrCode RunAsDumpTargetOverlay(); 256545fdf9bSopenharmony_ci ErrCode RunAsDumpSharedDependenciesCommand(); 257545fdf9bSopenharmony_ci ErrCode RunAsDumpSharedCommand(); 258545fdf9bSopenharmony_ci ErrCode RunAsCompileCommand(); 259545fdf9bSopenharmony_ci ErrCode RunAsCopyApCommand(); 260545fdf9bSopenharmony_ci 261545fdf9bSopenharmony_ci std::string CopyAp(const std::string &bundleName, bool isAllBundle) const; 262545fdf9bSopenharmony_ci 263545fdf9bSopenharmony_ci std::string CompileProcessAot( 264545fdf9bSopenharmony_ci const std::string &bundleName, const std::string &compileMode, bool isAllBundle) const; 265545fdf9bSopenharmony_ci std::string CompileReset(const std::string &bundleName, bool isAllBundle) const; 266545fdf9bSopenharmony_ci 267545fdf9bSopenharmony_ci std::string DumpBundleList(int32_t userId) const; 268545fdf9bSopenharmony_ci std::string DumpBundleInfo(const std::string &bundleName, int32_t userId) const; 269545fdf9bSopenharmony_ci std::string DumpShortcutInfos(const std::string &bundleName, int32_t userId) const; 270545fdf9bSopenharmony_ci std::string DumpDistributedBundleInfo(const std::string &deviceId, const std::string &bundleName); 271545fdf9bSopenharmony_ci std::string DumpDependentModuleNames(const std::string &bundleName, const std::string &moduleName) const; 272545fdf9bSopenharmony_ci std::string DumpSharedDependencies(const std::string &bundleName, const std::string &moduleName) const; 273545fdf9bSopenharmony_ci std::string DumpShared(const std::string &bundleName) const; 274545fdf9bSopenharmony_ci std::string DumpSharedAll() const; 275545fdf9bSopenharmony_ci 276545fdf9bSopenharmony_ci int32_t InstallOperation(const std::vector<std::string> &bundlePaths, InstallParam &installParam, 277545fdf9bSopenharmony_ci int32_t waittingTime, std::string &resultMsg) const; 278545fdf9bSopenharmony_ci int32_t UninstallOperation(const std::string &bundleName, const std::string &moduleName, 279545fdf9bSopenharmony_ci InstallParam &installParam) const; 280545fdf9bSopenharmony_ci int32_t UninstallSharedOperation(const UninstallParam &uninstallParam) const; 281545fdf9bSopenharmony_ci std::string GetUdid() const; 282545fdf9bSopenharmony_ci bool IsInstallOption(int index) const; 283545fdf9bSopenharmony_ci void GetAbsPaths(const std::vector<std::string> &paths, std::vector<std::string> &absPaths) const; 284545fdf9bSopenharmony_ci 285545fdf9bSopenharmony_ci ErrCode GetBundlePath(const std::string& param, std::vector<std::string>& bundlePaths) const; 286545fdf9bSopenharmony_ci 287545fdf9bSopenharmony_ci bool CleanBundleCacheFilesOperation(const std::string &bundleName, int32_t userId, int32_t appIndex = 0) const; 288545fdf9bSopenharmony_ci bool CleanBundleDataFilesOperation(const std::string &bundleName, int32_t userId, int32_t appIndex = 0) const; 289545fdf9bSopenharmony_ci 290545fdf9bSopenharmony_ci bool SetApplicationEnabledOperation(const AbilityInfo &abilityInfo, bool isEnable, int32_t userId) const; 291545fdf9bSopenharmony_ci std::string DumpOverlayInfo(const std::string &bundleName, const std::string &moduleName, 292545fdf9bSopenharmony_ci const std::string &targetModuleName, int32_t userId); 293545fdf9bSopenharmony_ci std::string DumpTargetOverlayInfo(const std::string &bundleName, const std::string &moduleName, int32_t userId); 294545fdf9bSopenharmony_ci ErrCode ParseSharedDependenciesCommand(int32_t option, std::string &bundleName, std::string &moduleName); 295545fdf9bSopenharmony_ci ErrCode ParseSharedCommand(int32_t option, std::string &bundleName, bool &dumpSharedAll); 296545fdf9bSopenharmony_ci ErrCode ParseCopyApCommand(int32_t option, std::string &bundleName, bool &isAllBundle); 297545fdf9bSopenharmony_ci ErrCode DeployQuickFixDisable(const std::vector<std::string> &quickFixFiles, 298545fdf9bSopenharmony_ci std::shared_ptr<QuickFixResult> &quickFixRes, bool isDebug, const std::string &targetPath) const; 299545fdf9bSopenharmony_ci ErrCode DeleteQuickFix(const std::string &bundleName, std::shared_ptr<QuickFixResult> &quickFixRes) const; 300545fdf9bSopenharmony_ci 301545fdf9bSopenharmony_ci sptr<IBundleMgr> bundleMgrProxy_; 302545fdf9bSopenharmony_ci sptr<IBundleInstaller> bundleInstallerProxy_; 303545fdf9bSopenharmony_ci}; 304545fdf9bSopenharmony_ci} // namespace AppExecFwk 305545fdf9bSopenharmony_ci} // namespace OHOS 306545fdf9bSopenharmony_ci 307545fdf9bSopenharmony_ci#endif // FOUNDATION_APPEXECFWK_STANDARD_TOOLS_BM_INCLUDE_BUNDLE_COMMAND_H