INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs-common REQUIRED ecore ecore-imf appcore-common glib-2.0 gobject-2.0 email-service
- dlog db-util elementary efreet-mime drm-client ecore-x sysman vconf evas eina edje icu-i18n ui-gadget-1)
+ capi-content-media-content dlog db-util elementary efreet-mime drm-client ecore-x sysman vconf evas eina edje icu-i18n ui-gadget-1)
FOREACH(flag ${pkgs-common_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
{
debug_log("");
RETURN_VAL_IF_FAIL(STR_VALID(path), EMAIL_EXT_SAVE_ERR_UNKNOWN);
-
+ int ret = 0;
gchar new_path[MAX_PATH_LEN] = { 0, };
gchar tmp_path[MAX_PATH_LEN] = { 0, };
gchar new_filename[MAX_PATH_LEN] = { 0, };
debug_log("new_path:%s", new_path);
/* Move for DRM file */
+
+ ret = media_content_connect();
+ if (!ret) {
+ _create_download_folder();
+
+ /* Copy for non-DRM */
+ if (access(new_path, F_OK) != -1) {
+ debug_log("file existed");
+ err = EMAIL_EXT_SAVE_ERR_ALREADY_EXIST;
+ } else {
+ saved = _copy_actual_file(path, new_path, copy_file_cb);
+ debug_log("saved(%d), err(%d), errno(%d)", saved, err, errno);
+
+ if (saved)
+ err = EMAIL_EXT_SAVE_ERR_NONE;
+ else
+ err = EMAIL_EXT_SAVE_ERR_UNKNOWN;
+ ret = media_content_scan_file(new_path);
+ debug_log("media_content_scan_file: %d", ret);
+ }
- _create_download_folder();
-
- /* Copy for non-DRM */
- if (access(new_path, F_OK) != -1) {
- debug_log("file existed");
- err = EMAIL_EXT_SAVE_ERR_ALREADY_EXIST;
+ snprintf(newpath, MAX_PATH_LEN, "%s", new_path);
+ ret = media_content_disconnect();
+ if (ret) {
+ debug_log("media_content_disconnect() is failed!");
+ }
} else {
- saved = _copy_actual_file(path, new_path, copy_file_cb);
- debug_log("saved(%d), err(%d), errno(%d)", saved, err, errno);
-
- if (saved)
- err = EMAIL_EXT_SAVE_ERR_NONE;
- else
- err = EMAIL_EXT_SAVE_ERR_UNKNOWN;
+ debug_log("media_content_connect() is failed!");
}
-
- snprintf(newpath, MAX_PATH_LEN, "%s", new_path);
-
return err;
}
BuildRequires: pkgconfig(status)
BuildRequires: pkgconfig(capi-media-metadata-extractor)
BuildRequires: pkgconfig(capi-media-image-util)
+BuildRequires: pkgconfig(capi-content-media-content)
BuildRequires: pkgconfig(libexif)
BuildRequires: pkgconfig(libxml-2.0)
Requires: email-service
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs-viewer REQUIRED appcore-efl ui-gadget-1 x11 elementary ecore glib-2.0 gobject-2.0
- status capi-media-metadata-extractor capi-media-image-util
+ status capi-media-metadata-extractor capi-media-image-util capi-content-media-content
email-service edbus capi-appfw-application vconf ewebkit2 contacts-service sysman bundle dlog efreet-mime libmedia-utils calendar-service2 ethumb)
FOREACH(flag ${pkgs-viewer_CFLAGS})
case EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG + 1 : //Save image
{
- if (viewer_get_filepath_from_path(DIR_DEFAULT_MEDIA_PHONE"/Images", img_url, new_path, EINA_TRUE) != EMAIL_EXT_SAVE_ERR_NONE) {
+ int ret = 0;
+ if (viewer_get_filepath_from_path(DIR_DEFAULT_MEDIA_PHONE"/Downloads", img_url, new_path, EINA_TRUE) != EMAIL_EXT_SAVE_ERR_NONE) {
debug_log("file exist!");
}
- if (viewer_save_file(new_path, img_buf, img_buf_len) == EINA_FALSE) {
- debug_log("viewer_save_file error!");
+ ret = media_content_connect();
+ if (!ret) {
+ if (viewer_save_file(new_path, img_buf, img_buf_len) == EINA_FALSE) {
+ debug_log("viewer_save_file error!");
+ } else {
+ char str[128] = { 0, };
+ snprintf(str, sizeof(str), "%s", dgettext("sys_string", "IDS_COM_POP_SAVED"));
+ /*_show_select_info(ug_data, str);*/
+ ret = status_message_post(str);
+ if (ret)
+ debug_log("status_message_post failed: %d", ret);
+ ret = media_content_scan_file(new_path);
+ debug_log("media_content_scan_file: %d", ret);
+ }
+
+ ret = media_content_disconnect();
+ if (ret) {
+ debug_log("media_content_disconnect() is failed!");
+ }
} else {
- char str[128] = { 0, };
- snprintf(str, sizeof(str), "%s", dgettext("sys_string", "IDS_COM_POP_SAVED"));
- int ret = status_message_post(str);
- if (ret)
- debug_log("status_message_post failed: %d", ret);
+ debug_log("media_content_connect() is failed!");
}
}
break;