ret = package_info_create(app_id, &package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE || package_info == NULL) {
- LOGE("faild to create package_info. ret: %d", ret);
+ LOGE("failed to create package_info. ret: %d", ret);
ret = STICKER_ERROR_OPERATION_FAILED;
goto cleanup;
}
ret = package_info_get_root_path(package_info, &app_path);
if (ret != PACKAGE_MANAGER_ERROR_NONE || app_path == NULL) {
- LOGE("faild to create package_info. ret: %d", ret);
+ LOGE("failed to create package_info. ret: %d", ret);
ret = STICKER_ERROR_OPERATION_FAILED;
goto cleanup;
}
EXPORT_API int sticker_data_create(sticker_data_h *data_handle)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle)
return STICKER_ERROR_INVALID_PARAMETER;
*data_handle = data_struct;
cleanup:
- if (app_id)
- free(app_id);
+ free(app_id);
return ret;
}
EXPORT_API int sticker_data_destroy(sticker_data_h data_handle)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_clone(sticker_data_h origin_handle, sticker_data_h *target_handle)
{
- sticker_data_h handle;
+ CHECK_STICKER_FEATURE();
+ sticker_data_h handle;
if (!origin_handle || !target_handle)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_app_id(sticker_data_h data_handle, char **app_id)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !app_id)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_set_uri(sticker_data_h data_handle, sticker_data_uri_type_e type, const char *uri)
{
- char *file_path = NULL;
+ CHECK_STICKER_FEATURE();
+ char *file_path = NULL;
if (!data_handle || !type || !uri)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_uri(sticker_data_h data_handle, sticker_data_uri_type_e *type, char **uri)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !type || !uri)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_foreach_keyword(sticker_data_h data_handle, sticker_data_keyword_foreach_cb callback, void *user_data)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !callback)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_add_keyword(sticker_data_h data_handle, const char *keyword)
{
- GList *node;
+ CHECK_STICKER_FEATURE();
+ GList *node;
if (!data_handle || !keyword)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_remove_keyword(sticker_data_h data_handle, const char *keyword)
{
- GList *node;
+ CHECK_STICKER_FEATURE();
+ GList *node;
if (!data_handle || !keyword)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_set_group_name(sticker_data_h data_handle, const char *group)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !group)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_group_name(sticker_data_h data_handle, char **group)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !group)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_set_thumbnail(sticker_data_h data_handle, const char *thumbnail)
{
- char *file_path = NULL;
+ CHECK_STICKER_FEATURE();
+ char *file_path = NULL;
if (!data_handle || !thumbnail)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_thumbnail(sticker_data_h data_handle, char **thumbnail)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !thumbnail)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_set_description(sticker_data_h data_handle, const char *description)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !description)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_description(sticker_data_h data_handle, char **description)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !description)
return STICKER_ERROR_INVALID_PARAMETER;
EXPORT_API int sticker_data_get_date(sticker_data_h data_handle, char **date)
{
+ CHECK_STICKER_FEATURE();
+
if (!data_handle || !date)
return STICKER_ERROR_INVALID_PARAMETER;