[Content] Remove deprecated native functions, break backward compatibility
[platform/core/api/webapi-plugins.git] / src / content / js / datatypes.js
index 658dc7c..2efea2b 100755 (executable)
@@ -126,14 +126,6 @@ function ContentDirectory(data) {
 
 function Content(data) {
     var editableAttributes = ['isFavorite'];
-    // since 5.5 these attributes are readonly, it is disallowed to modify them,
-    // but for applications developed for earlier versions backward compatibility
-    // is kept
-    if (isEarlierThan55) {
-        editableAttributes.push('name');
-        editableAttributes.push('rating');
-        editableAttributes.push('description');
-    }
     var id;
     var name;
     var type;
@@ -170,10 +162,8 @@ function Content(data) {
                 return name;
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     if (!type_.isNull(v)) {
                         name = converter_.toString(v, false);
                     }
@@ -279,10 +269,8 @@ function Content(data) {
                 return description;
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     description = converter_.toString(v, true);
                 } else {
                     utils_.warn(
@@ -298,10 +286,8 @@ function Content(data) {
                 return rating;
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     if (!type_.isNull(v) && v >= 0 && v <= 10) {
                         rating = converter_.toUnsignedLong(v, false);
                     }
@@ -343,13 +329,6 @@ function VideoContent(data) {
     Content.call(this, data);
 
     var editableAttributes = this.editableAttributes;
-    // since 5.5 this attribute is readonly, it is disallowed to modify it,
-    // but for applications developed for earlier versions backward compatibility
-    // is kept
-    if (isEarlierThan55) {
-        editableAttributes.push('geolocation');
-    }
-
     var geolocation;
     var album;
     var artists;
@@ -365,22 +344,16 @@ function VideoContent(data) {
         },
         geolocation: {
             get: function() {
-                if (isEarlierThan55) {
-                    return geolocation;
-                } else {
-                    // for keep geolocation's latitude and longitude readonly
-                    // we need to return copy of this object
-                    return new tizen.SimpleCoordinates(
-                        geolocation.latitude,
-                        geolocation.longitude
-                    );
-                }
+                // for keep geolocation's latitude and longitude readonly
+                // we need to return copy of this object
+                return new tizen.SimpleCoordinates(
+                    geolocation.latitude,
+                    geolocation.longitude
+                );
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     if (!type_.isNull(v)) {
                         var latitude = converter_.toDouble(v.latitude, false);
                         var longitude = converter_.toDouble(v.longitude, false);
@@ -680,14 +653,6 @@ function ImageContent(data) {
     Content.call(this, data);
 
     var editableAttributes = this.editableAttributes;
-    // since 5.5 these attributes are readonly, it is disallowed to modify them,
-    // but for applications developed for earlier versions backward compatibility
-    // is kept
-    if (isEarlierThan55) {
-        editableAttributes.push('geolocation');
-        editableAttributes.push('orientation');
-    }
-
     var geolocation;
     var width;
     var height;
@@ -701,22 +666,16 @@ function ImageContent(data) {
         },
         geolocation: {
             get: function() {
-                if (isEarlierThan55) {
-                    return geolocation;
-                } else {
-                    // for keep geolocation's latitude and longitude readonly
-                    // we need to return copy of this object
-                    return new tizen.SimpleCoordinates(
-                        geolocation.latitude,
-                        geolocation.longitude
-                    );
-                }
+                // for keep geolocation's latitude and longitude readonly
+                // we need to return copy of this object
+                return new tizen.SimpleCoordinates(
+                    geolocation.latitude,
+                    geolocation.longitude
+                );
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     if (!type_.isNull(v)) {
                         var latitude = converter_.toDouble(v.latitude, false);
                         var longitude = converter_.toDouble(v.longitude, false);
@@ -758,10 +717,8 @@ function ImageContent(data) {
                 return orientation;
             },
             set: function(v) {
-                // since 5.5 this attribute is readonly, it is disallowed to modify it,
-                // but for applications developed for earlier versions backward
-                // compatibility is kept
-                if (isEarlierThan55 || edit_.isAllowed) {
+                // since 5.5 this attribute is readonly, it is disallowed to modify it
+                if (edit_.isAllowed) {
                     if (!type_.isNull(v)) {
                         orientation = converter_.toEnum(
                             v,