1 /*
2  * Copyright (c) 2020 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 /**
17  * @addtogroup BundleManager
18  * @{
19  *
20  * @brief Provides structures and functions for managing application bundles and obtaining application information.
21  *
22  * You can use functions provided by this module to install, update, or uninstall an application, obtain
23  * {@link AbilityInfo} and {@link BundleInfo} about an application, and obtain the bundle name of an application
24  * based on the application's user ID (UID).
25  *
26  * @since 1.0
27  * @version 1.0
28  */
29 
30 /**
31  * @file installParam.h
32  *
33  * @brief Declares the parameters that users can specify when they install, update, or uninstall an application.
34  *
35  * The parameters involve the application installation or update path and whether to retain particular data during
36  * application uninstallation.
37  *
38  * @since 1.0
39  * @version 1.0
40  */
41 
42 #ifndef OHOS_INSTALL_PARAM_H
43 #define OHOS_INSTALL_PARAM_H
44 
45 #include "stdint.h"
46 
47 #include <stdbool.h>
48 
49 enum InstallLocation {
50 /**
51  * The installation or update path is <b>storage/app</b> when {@link installLocation} is set to <b>1</b>.
52  */
53     INSTALL_LOCATION_INTERNAL_ONLY = 1,
54 /**
55  * The installation or update path is <b>sdcard/app</b> when {@link installLocation} is set to <b>2</b>.
56  */
57     INSTALL_LOCATION_PREFER_EXTERNAL = 2,
58 };
59 
60 /**
61 * @brief Defines parameters used for application installation, update, or uninstallation.
62 */
63 typedef struct {
64     /** Installation or update path of the application */
65     int32_t installLocation;
66 
67     /** Whether to retain particular data during application uninstallation */
68     bool keepData;
69 } InstallParam;
70 
71 #endif // OHOS_INSTALL_PARAM_H
72 /** @} */