{"createdDate", "MEDIA_ADDED_TIME"},
{"releaseDate", "MEDIA_DATETAKEN"},
{"modifiedDate", "MEDIA_MODIFIED_TIME"},
- {"geolocation.latitude", "MEDIA_LATITUDE"},
- {"geolocation.longitude", "MEDIA_LONGITUDE"},
- {"duration", "MEDIA_DURATION"},
+ {"geolocation.latitude",
+ "MEDIA_LATITUDE"}, // Deprecated since 9.0 //TODO remove after 2 versions
+ {"geolocation.longitude",
+ "MEDIA_LONGITUDE"}, // Deprecated since 9.0 //TODO remove after 2 versions
+ {"duration",
+ "MEDIA_DURATION"}, // Deprecated since 9.0 //TODO remove after 2 versions
{"album", "MEDIA_ALBUM"},
{"artists", "MEDIA_ARTIST"},
{"width", "MEDIA_WIDTH"},
ScopeLogger();
auto it = attributeNameMap.find(name);
if (it != attributeNameMap.end()) {
- if (name == "rating" || name == "description") {
+ if (name == "rating" || name == "description" ||
+ name == "geolocation.latitude" || name == "geolocation.longitude" ||
+ name == "duration") {
std::string warning = "Filtering by attribute '" + name + "'";
common::tools::PrintDeprecationWarningFor(warning.c_str());
}
o["height"] = picojson::value(static_cast<double>(tmpInt));
}
picojson::object geo;
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_latitude(info, &tmpDouble)) {
geo["latitude"] = picojson::value(tmpDouble);
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_longitude(info, &tmpDouble)) {
geo["longitude"] = picojson::value(tmpDouble);
}
}
} else if (type == MEDIA_CONTENT_TYPE_VIDEO) {
o["type"] = picojson::value(std::string("VIDEO"));
+ // Deprecated since 9.0 //TODO remove after 2 versions
video_meta_h video;
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_video(info, &video)) {
+ // Deprecated since 9.0 //TODO remove after 2 versions
std::unique_ptr<std::remove_pointer<video_meta_h>::type, int (*)(video_meta_h)> video_ptr(
video, &video_meta_destroy); // automatically release the memory
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_width(video, &tmpInt)) {
o["width"] = picojson::value(static_cast<double>(tmpInt));
}
-
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_height(video, &tmpInt)) {
o["height"] = picojson::value(static_cast<double>(tmpInt));
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_artist(video, &tmpStr)) {
picojson::array artists;
if (tmpStr) {
}
o["artists"] = picojson::value(artists);
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_album(video, &tmpStr)) {
if (tmpStr) {
o["album"] = picojson::value(tmpStr);
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_duration(video, &tmpInt)) {
o["duration"] = picojson::value(static_cast<double>(tmpInt));
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == video_meta_get_recorded_date(video, &tmpStr)) {
if (tmpStr) {
o["releaseDate"] = picojson::value(get_date(tmpStr));
}
}
picojson::object geo;
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_latitude(info, &tmpDouble)) {
geo["latitude"] = picojson::value(tmpDouble);
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_longitude(info, &tmpDouble)) {
geo["longitude"] = picojson::value(tmpDouble);
}
if (MEDIA_CONTENT_ERROR_NONE == media_info_get_audio(info, &audio)) {
std::unique_ptr<std::remove_pointer<audio_meta_h>::type, int (*)(audio_meta_h)> audio_ptr(
audio, &audio_meta_destroy); // automatically release the memory
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == audio_meta_get_recorded_date(audio, &tmpStr)) {
if (tmpStr) {
o["releaseDate"] = picojson::value(get_date(tmpStr));
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == audio_meta_get_composer(audio, &tmpStr)) {
if (tmpStr) {
picojson::array composers;
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == audio_meta_get_copyright(audio, &tmpStr)) {
if (tmpStr) {
o["copyright"] = picojson::value(std::string(tmpStr));
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == audio_meta_get_bit_rate(audio, &tmpInt)) {
o["bitrate"] = picojson::value(static_cast<double>(tmpInt));
}
o["trackNumber"] = picojson::value();
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
if (MEDIA_CONTENT_ERROR_NONE == audio_meta_get_duration(audio, &tmpInt)) {
o["duration"] = picojson::value(static_cast<double>(tmpInt));
}
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
ret = media_info_get_description(info, &tmpStr);
if (ret == MEDIA_CONTENT_ERROR_NONE) {
if (tmpStr) {
tmpStr = NULL;
}
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
ret = media_info_get_rating(info, &tmpInt);
if (ret == MEDIA_CONTENT_ERROR_NONE) {
o["rating"] = picojson::value(static_cast<double>(tmpInt));
if (ret == MEDIA_CONTENT_ERROR_NONE) {
o["size"] = picojson::value(static_cast<double>(tmpLong));
}
+ // Deprecated since 9.0 //TODO remove after 2 versions
ret = media_info_get_favorite(info, &tmpBool);
if (ret == MEDIA_CONTENT_ERROR_NONE) {
o["isFavorite"] = picojson::value(tmpBool);
return MEDIA_CONTENT_ERROR_DB_FAILED;
}
- media_content_type_e type;
- ret = media_info_get_media_type(media, &type);
- if (ret != MEDIA_CONTENT_ERROR_NONE) {
- LoggerE("Failed: media_info_get_media_type()");
- return ret;
- }
-
+ // Deprecated since 9.0 //TODO remove after 2 versions
ret = media_info_set_favorite(media, is_fav);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
LoggerE("Updating isFavorite failed.");
* limitations under the License.
*/
+var privUtils_ = xwalk.utils;
+
var ContentType = {
IMAGE: 'IMAGE',
VIDEO: 'VIDEO',
Object.defineProperties(this, {
editableAttributes: {
- value: editableAttributes,
- writable: false,
+ get: function () {
+ privUtils_.deprecationWarn(
+ 'editableAttributes is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
+ return editableAttributes;
+ },
+ set: function () { },
enumerable: true
},
id: {
},
releaseDate: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'releaseDate is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return releaseDate;
},
set: function(v) {
},
description: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'description is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return description;
},
set: function(v) {
},
rating: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'rating is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return rating;
},
set: function(v) {
},
isFavorite: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'isFavorite is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return isFavorite;
},
set: function(v) {
+ privUtils_.deprecationWarn(
+ 'isFavorite is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
if (!type_.isNull(v)) {
isFavorite = converter_.toBoolean(v, false);
}
Object.defineProperties(this, {
editableAttributes: {
- value: editableAttributes,
- writable: false,
+ get: function () {
+ privUtils_.deprecationWarn(
+ 'editableAttributes is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
+ return editableAttributes;
+ },
+ set: function () { },
enumerable: true
},
geolocation: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'geolocation is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
// for keep geolocation's latitude and longitude readonly
// we need to return copy of this object
return new tizen.SimpleCoordinates(
},
album: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'album is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return album;
},
set: function(v) {
enumerable: true
},
artists: {
- get: function() {
+ get: function () {
+ privUtils_.deprecationWarn(
+ 'artists is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return artists;
},
set: function(v) {
},
duration: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'duration is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return duration;
},
set: function(v) {
},
width: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'width is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return width;
},
set: function(v) {
},
height: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'height is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return height;
},
set: function(v) {
},
composers: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'composers is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return composers;
},
set: function(v) {
},
copyright: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'copyright is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return copyright;
},
set: function(v) {
},
bitrate: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'bitrate is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return bitrate;
},
set: function(v) {
},
duration: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'duration is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return duration;
},
set: function(v) {
Object.defineProperties(this, {
editableAttributes: {
- value: editableAttributes,
- writable: false,
+ get: function () {
+ privUtils_.deprecationWarn(
+ 'editableAttributes is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
+ return editableAttributes;
+ },
+ set: function () { },
enumerable: true
},
geolocation: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'geolocation is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
// for keep geolocation's latitude and longitude readonly
// we need to return copy of this object
return new tizen.SimpleCoordinates(
};
ContentManager.prototype.update = function() {
+ privUtils_.deprecationWarn(
+ 'ContentManager.update() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
ContentManagerUpdate.apply(this, arguments);
};
successCallback,
errorCallback
) {
+ privUtils_.deprecationWarn(
+ 'ContentManager.updateBatch() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'contents', type: types_.ARRAY, values: Content },
{