summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--installer/pkgmgr_installer.c9
-rw-r--r--installer/pkgmgr_installer.h11
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