diff options
author | Dongsun Lee <ds73.lee@samsung.com> | 2015-08-13 16:35:58 +0900 |
---|---|---|
committer | Dongsun Lee <ds73.lee@samsung.com> | 2015-08-13 16:39:51 +0900 |
commit | 671aefceb8f5249194c2abfc1bdeddb7d16a7631 (patch) | |
tree | 46f5e1e555980a34bfb5eade99257886416a7fcc /include | |
parent | 391c9b75f18989c2778c0cc804a4eddb38a3f050 (diff) | |
download | libwebappenc-671aefceb8f5249194c2abfc1bdeddb7d16a7631.tar.gz libwebappenc-671aefceb8f5249194c2abfc1bdeddb7d16a7631.tar.bz2 libwebappenc-671aefceb8f5249194c2abfc1bdeddb7d16a7631.zip |
change API signatures to support GLOBAL app and NORMAL app at the same timetizen_3.0.m1_tv_releasetizen_3.0.m1_mobile_releasesubmit/tizen_common/20151026.085049submit/tizen_common/20151023.083358submit/tizen/20150820.084129submit/tizen/20150820.083859accepted/tizen/wearable/20150820.115949accepted/tizen/tv/20150820.115853accepted/tizen/mobile/20150820.115727tizen_3.0.m1_tvtizen_3.0.m1_mobile
Change-Id: Ic9a60b295bff13bb59c1c6990dfbad569e92c267
Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/web_app_enc.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/include/web_app_enc.h b/include/web_app_enc.h index 2e31a3c..68a1fd9 100644 --- a/include/web_app_enc.h +++ b/include/web_app_enc.h @@ -31,6 +31,10 @@ extern "C" { */ +/** + * @brief WAE Errors. + * @since_tizen 3.0 + */ typedef enum { WAE_ERROR_NONE = 0x00, /**< Successful */ @@ -46,11 +50,22 @@ typedef enum } wae_error_e; /** + * @brief Application Type. + * @since_tizen 3.0 + */ +typedef enum +{ + WAE_DOWNLOADED_NORMAL_APP = 0, /**< Downloaded Normal Application*/ + WAE_DOWNLOADED_GLOBAL_APP = 1, /**< Downloaded Global Application*/ + WAE_PRELOADED_APP = 2 /**< Preloaded Application*/ +} wae_app_type_e; + +/** * @brief Encrypts web application data with internal key(APP DEK: Application Data Encryption Key). * * @since_tizen 3.0 * @param[in] pPkgId The package id of an application. - * @param[in] isPreloaded True(!=0) if the application is preloaded, otherwise false(==0). + * @param[in] appType The application type. * @param[in] pData The data block to be encrypted. * @param[in] dataLen The length of the data block. * @param[out] ppEncryptedData The data block contaning encrypted data block. Memory allocated for ppEncryptedData. Has to be freed by free() function. @@ -66,14 +81,14 @@ typedef enum * * @see wae_decrypt_web_application() */ -int wae_encrypt_web_application(const char* pPkgId, int isPreloaded, const unsigned char* pData, size_t dataLen, unsigned char** ppEncryptedData, size_t* pEncDataLen); +int wae_encrypt_web_application(const char* pPkgId, wae_app_type_e appType, const unsigned char* pData, size_t dataLen, unsigned char** ppEncryptedData, size_t* pEncDataLen); /** * @brief Encrypts web application data with internal key. * * @since_tizen 3.0 * @param[in] pPkgId The package id of an application. - * @param[in] isPreloaded True(!=0) if the application is preloaded, otherwise false(==0). + * @param[in] appType The application type. * @param[in] pData The data block to be decrypted. * @param[in] dataLen The length of the data block. * @param[out] ppDecryptedData Data block contaning decrypted data block. Memory allocated for ppEncryptedData. Has to be freed by free() function. @@ -89,13 +104,14 @@ int wae_encrypt_web_application(const char* pPkgId, int isPreloaded, const unsig * * @see wae_encrypt_web_application() */ -int wae_decrypt_web_application(const char* pPkgId, int isPreloaded, const unsigned char* pData, size_t dataLen, unsigned char** ppDecryptedData, size_t* pDecDataLen); +int wae_decrypt_web_application(const char* pPkgId, wae_app_type_e appType, const unsigned char* pData, size_t dataLen, unsigned char** ppDecryptedData, size_t* pDecDataLen); /** * @brief Remove a APP DEK(Application Data Encryption Key) used for encrytpion and decryption of a web application. * * @since_tizen 3.0 * @param[in] pPkgId The package id of an application. + * @param[in] appType The application type. * * @return #WAE_ERROR_NONE on success, otherwise a negative error value * @retval #WAE_ERROR_INVALID_PARAMETER Invalid input parameter @@ -105,7 +121,7 @@ int wae_decrypt_web_application(const char* pPkgId, int isPreloaded, const unsig * @retval #WAE_ERROR_UNKNOWN Failed with unknown reason * */ -int wae_remove_app_dek(const char* pPkgId); +int wae_remove_app_dek(const char* pPkgId, wae_app_type_e appType); /** |