diff options
author | Ilho Kim <ilho159.kim@samsung.com> | 2020-07-17 17:41:53 +0900 |
---|---|---|
committer | Ilho Kim <ilho159.kim@samsung.com> | 2020-07-22 19:42:25 +0900 |
commit | 6388c19d7963af2943c23f21576b0e901d2df75b (patch) | |
tree | 666569839d948d0e48e5a505270067ef4ff89c4a | |
parent | 9b684941dddf02fdb6311e61a54cf7cc570f1c72 (diff) | |
download | slp-pkgmgr-6388c19d7963af2943c23f21576b0e901d2df75b.tar.gz slp-pkgmgr-6388c19d7963af2943c23f21576b0e901d2df75b.tar.bz2 slp-pkgmgr-6388c19d7963af2943c23f21576b0e901d2df75b.zip |
Add is_upgrade flag to pkgmgr_installer and Setter function
pkgmgr_installer is set by pkgmgr_installer_receive_request() function
and Whether it is an upgrade request or not doesn't know by this function
Change-Id: I3282cd47b4dc27a6ef0d0675d422234f9c402e9f
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
-rw-r--r-- | installer/pkgmgr_installer.c | 9 | ||||
-rw-r--r-- | installer/pkgmgr_installer.h | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/installer/pkgmgr_installer.c b/installer/pkgmgr_installer.c index c1abef0..21a9737 100644 --- a/installer/pkgmgr_installer.c +++ b/installer/pkgmgr_installer.c @@ -101,6 +101,7 @@ const struct option long_opts[] = { struct pkgmgr_installer { int request_type; int move_type; + int is_upgrade; char *pkgmgr_info; char *session_id; char *license_path; @@ -1242,3 +1243,11 @@ API int pkgmgr_installer_send_signals_for_uid(pkgmgr_installer *pi, uid_t uid, return 0; } + +API int pkgmgr_installer_set_is_upgrade(pkgmgr_installer *pi, int is_upgrade) { + if (pi == NULL) + return -1; + + pi->is_upgrade = is_upgrade; + return 0; +} diff --git a/installer/pkgmgr_installer.h b/installer/pkgmgr_installer.h index aab8a2a..2c5f544 100644 --- a/installer/pkgmgr_installer.h +++ b/installer/pkgmgr_installer.h @@ -1209,6 +1209,17 @@ int pkgmgr_installer_send_signals(pkgmgr_installer *pi, int pkgmgr_installer_send_signals_for_uid(pkgmgr_installer *pi, uid_t uid, const char *key, const char *val); +/** + * @brief This API sets is_upgrade_flag of given pkgmgr_installer. + * + * This API is for package-manager client application.\n + * + * @param[in]pi pointer to pkgmgr_installer + * @param[in]is_upgrade is_upgrade flag + * @return 0 if success, error code(<0) if fail\n +*/ +int pkgmgr_installer_set_is_upgrade(pkgmgr_installer *pi, int is_upgrade); + #ifdef __cplusplus } #endif |