From: Szymon Jastrzebski Date: Wed, 23 Jan 2019 14:06:31 +0000 (+0100) Subject: [Content] Adding comments in code and adding deprecation log X-Git-Tag: submit/tizen/20190315.163126~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29c81443bbe79f225937079047c42fd5c9f9bca3;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Content] Adding comments in code and adding deprecation log http://suprem.sec.samsung.net/jira/browse/ACR-1249 [Verification] Content TCT 100% Change-Id: Ie3c2450e46c343b2db350475b0ec679d485e2d70 Signed-off-by: Szymon Jastrzebski --- diff --git a/src/content/content_manager.cc b/src/content/content_manager.cc index e3c2ce2d..782f2a3e 100644 --- a/src/content/content_manager.cc +++ b/src/content/content_manager.cc @@ -398,6 +398,10 @@ void ContentDirToJson(media_folder_h folder, picojson::object& o) { // storageType ret = media_folder_get_storage_type(folder, &storage_type); + // TODO: The function media_folder_get_storage_type is marked as deprecated since 5.0. + // As an alternative, it is recommended to use storage_get_type_dev function. However, + // this function does not work with internal storages. The media_folder_get_storage_type + // function should be kept or moved to internal header by Native API. if (ret == MEDIA_CONTENT_ERROR_NONE) { if (storage_type == MEDIA_CONTENT_STORAGE_INTERNAL) { o["storageType"] = picojson::value(std::string("INTERNAL")); @@ -541,6 +545,10 @@ static void FolderToJson(media_folder_h folder, picojson::object* out) { date = stat_res.st_mtime; ret = media_folder_get_storage_type(folder, &storageType); + // TODO: The function media_folder_get_storage_type is marked as deprecated since 5.0. + // As an alternative, it is recommended to use storage_get_type_dev function. However, + // this function does not work with internal storages. The media_folder_get_storage_type + // function should be kept or moved to internal header by Native API. if (ret != MEDIA_CONTENT_ERROR_NONE) { LogAndReportError(ContentManager::convertError(ret), out, ("Failed: media_folder_get_storage_type")); diff --git a/src/content/js/datatypes.js b/src/content/js/datatypes.js index f632dedc..60b95cc7 100755 --- a/src/content/js/datatypes.js +++ b/src/content/js/datatypes.js @@ -85,6 +85,7 @@ function ContentDirectory(data) { }, storageType: { get: function() { + utils_.printDeprecationWarningFor('ContentDirectoryStorageType'); return storageType; }, set: function(v) {