diff options
-rw-r--r-- | installer/pkgmgr_installer.c | 14 | ||||
-rw-r--r-- | installer/pkgmgr_installer.h | 35 |
2 files changed, 48 insertions, 1 deletions
diff --git a/installer/pkgmgr_installer.c b/installer/pkgmgr_installer.c index 70ab512..f1b79ae 100644 --- a/installer/pkgmgr_installer.c +++ b/installer/pkgmgr_installer.c @@ -59,6 +59,7 @@ #define OPTVAL_KEEP_RWDATA 1004 #define OPTVAL_PARTIAL_RW 1005 #define OPTVAL_MIGRATE_EXTIMG 1006 +#define OPTVAL_SKIP_CHECK_REFERENCE 1007 /* Supported options */ const char *short_opts = "k:l:i:d:c:m:t:o:r:p:s:b:e:M:y:u:w:D:A:qG"; @@ -86,7 +87,8 @@ const struct option long_opts[] = { { "no-remove", 0, NULL, OPTVAL_NO_REMOVAL }, /* for preload RW */ { "keep-rwdata", 0, NULL, OPTVAL_KEEP_RWDATA }, /* for preload RW */ { "partial-rw", 0, NULL, OPTVAL_PARTIAL_RW }, /* for preload RO */ - { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG }, + { "migrate-extimg", 1, NULL, OPTVAL_MIGRATE_EXTIMG }, + { "skip-check-reference", 0, NULL, OPTVAL_SKIP_CHECK_REFERENCE }, { 0, 0, 0, 0 } /* sentinel */ }; @@ -109,6 +111,7 @@ struct pkgmgr_installer { int keep_rwdata; int partial_rw; int debug_mode; + int skip_check_reference; GDBusConnection *conn; }; @@ -420,6 +423,9 @@ pkgmgr_installer_receive_request(pkgmgr_installer *pi, pi->pkgmgr_info = strndup(optarg, MAX_STRLEN); DBG("legacy extimg migration requested"); break; + case OPTVAL_SKIP_CHECK_REFERENCE: + pi->skip_check_reference = 1; + break; case 'k': /* session id */ if (pi->session_id) free(pi->session_id); @@ -714,6 +720,12 @@ API int pkgmgr_installer_get_debug_mode(pkgmgr_installer *pi) return pi->debug_mode; } +API int pkgmgr_installer_get_skip_check_reference(pkgmgr_installer *pi) +{ + CHK_PI_RET(PKGMGR_REQ_INVALID); + return pi->skip_check_reference; +} + API int pkgmgr_installer_send_app_uninstall_signal(pkgmgr_installer *pi, const char *pkg_type, const char *pkgid, diff --git a/installer/pkgmgr_installer.h b/installer/pkgmgr_installer.h index c108979..5393c3e 100644 --- a/installer/pkgmgr_installer.h +++ b/installer/pkgmgr_installer.h @@ -769,6 +769,41 @@ int main(int argc, char **argv) int pkgmgr_installer_get_debug_mode(pkgmgr_installer *pi); /** + @brief Get skip_check_reference value + @pre pkgmgr_installer_receive_request() must be called. + @post None + @see pkgmgr_installer_receive_request + @param[in] pi pkgmgr_installer object + @return Operation result + @retval 0 if a request does not skip checking reference + @retval 1 if a request skip checking reference + @remark None + @code +#include <pkgmgr_installer.h> +int main(int argc, char **argv) +{ + pkgmgr_installer *pi; + int r = 0; + int check_reference = 0; + + pi = pkgmgr_installer_new(); + if(!pi) return -1; + if(pkgmgr_installer_receive_request(pi, argc, argv)) { + r = -1; + goto CLEANUP_RET; + } + check_reference = pkgmgr_installer_get_skip_check_reference(pi); + + // Do something... + + pkgmgr_installer_free(pi); + return r; +} + @endcode +*/ +int pkgmgr_installer_get_skip_check_reference(pkgmgr_installer *pi); + +/** @brief Send a app status signal @pre None @post None |