- /**
- * @brief : This API moves the package from sd card
- to internal memory and vice versa.
- * @param[in] pkgid application package id
- * [Ex: com.samsung.calculator]
- * @param[in] move_type Move type[enum app2ext_move_type]
- * [sd card to internal/internal to sd card]
- * @param[in] dir_list directory structure of the application
- * @pre Package must be installed and its installation
- * location should be known.Use app2sd_get_app_install_location()
- * to get installation location.
- * @see app2sd_get_app_install_location().
- * @post Package is moved to new location.
- * @return 0 if success, error code(>0) if fail
- * @remark None.
- *
- *
- @code
- #include <app2sd_interface.h>
- int ret = -1;
- GList* dir_list = NULL;
- // Package manager populates dir_list with directory structure information
- ret = app2sd_get_app_install_location("com.samsung.calculator");
- if(ret == APP2SD_INTERNAL_MEM)
- {
- ret= app2sd_move_installed_app("com.samsung.calculator",
- dir_list, APP2EXT_MOVE_TO_EXT);
- if(!ret)
- printf("\n SUCCESS");
- else
- printf("\n FAILURE");
- }
- else if(ret == APP2SD_EXTERNAL_MEM)
- {
- ret= app2sd_move_installed_app("com.samsung.calculator",
- dir_list, APP2SD_MOVE_TO PHONE);
- if(!ret)
- printf("\n SUCCESS");
- else
- printf("\n FAILURE");
- }
- @endcode
- */
- API int app2sd_move_installed_app(const char *pkgid,
- GList* dir_list, app2ext_move_type move_type);