summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>2024-03-25 14:38:42 +0100
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>2024-04-05 11:02:13 +0200
commite27fc70d9b7db82412d1e0108a748753d3e54bf0 (patch)
tree803db1e8c0a87f45cce94bc2e99a9d2e0229536b
parent240033e560a5997f52f25dcacff5733a5e8f7ea7 (diff)
downloadwebapi-plugins-e27fc70d9b7db82412d1e0108a748753d3e54bf0.tar.gz
webapi-plugins-e27fc70d9b7db82412d1e0108a748753d3e54bf0.tar.bz2
webapi-plugins-e27fc70d9b7db82412d1e0108a748753d3e54bf0.zip
[Content] Deprecate Playlist
[ACR] https://jira.sec.samsung.net/browse/TWDAPI-295 [Verification] Code compiles without errors. Change-Id: Iaff91998ee3cad1b128f55494087333e744bd59d
-rw-r--r--src/content/content_instance.cc16
-rwxr-xr-xsrc/content/js/manager.js12
-rwxr-xr-xsrc/content/js/playlist.js52
3 files changed, 80 insertions, 0 deletions
diff --git a/src/content/content_instance.cc b/src/content/content_instance.cc
index 9b46159c..c6d4ac73 100644
--- a/src/content/content_instance.cc
+++ b/src/content/content_instance.cc
@@ -32,6 +32,7 @@
#include "content/content_manager.h"
using namespace common;
+using common::tools::PrintDeprecationWarningFor;
namespace extension {
namespace content {
@@ -665,6 +666,7 @@ void ContentInstance::ContentManagerUnsetchangelistener(const picojson::value& a
void ContentInstance::ContentManagerGetplaylists(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerGetplaylists");
// CHECK_PRIVILEGE_ACCESS(kPrivilegeContentRead, &out);
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
@@ -689,6 +691,7 @@ void ContentInstance::ContentManagerGetplaylists(const picojson::value& args,
void ContentInstance::ContentManagerCreateplaylist(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerCreateplaylist");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
CHECK_EXIST(args, "callbackId", out)
@@ -712,6 +715,7 @@ void ContentInstance::ContentManagerCreateplaylist(const picojson::value& args,
void ContentInstance::ContentManagerRemoveplaylist(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerRemoveplaylist");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
double callbackId = args.get("callbackId").get<double>();
@@ -771,6 +775,7 @@ void ContentInstance::ContentManagerCreateThumbnail(const picojson::value& args,
void ContentInstance::ContentManagerPlaylistAdd(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistAdd");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
if (ContentManager::getInstance()->isConnected()) {
@@ -789,6 +794,7 @@ void ContentInstance::ContentManagerPlaylistAdd(const picojson::value& args,
void ContentInstance::ContentManagerPlaylistAddbatch(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistAddbatch");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
double callbackId = args.get("callbackId").get<double>();
@@ -809,6 +815,7 @@ void ContentInstance::ContentManagerPlaylistAddbatch(const picojson::value& args
void ContentInstance::ContentManagerPlaylistGet(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistGet");
// CHECK_PRIVILEGE_ACCESS(kPrivilegeContentRead, &out);
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
@@ -830,6 +837,7 @@ void ContentInstance::ContentManagerPlaylistGet(const picojson::value& args,
void ContentInstance::ContentManagerPlaylistRemove(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistRemove");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
if (ContentManager::getInstance()->isConnected()) {
@@ -848,6 +856,7 @@ void ContentInstance::ContentManagerPlaylistRemove(const picojson::value& args,
void ContentInstance::ContentManagerPlaylistRemovebatch(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistRemovebatch");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
double callbackId = args.get("callbackId").get<double>();
@@ -868,6 +877,7 @@ void ContentInstance::ContentManagerPlaylistRemovebatch(const picojson::value& a
void ContentInstance::ContentManagerPlaylistSetorder(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistSetorder");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
double callbackId = args.get("callbackId").get<double>();
@@ -888,6 +898,7 @@ void ContentInstance::ContentManagerPlaylistSetorder(const picojson::value& args
void ContentInstance::ContentManagerPlaylistMove(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistMove");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
double callbackId = args.get("callbackId").get<double>();
@@ -930,6 +941,7 @@ void ContentInstance::ContentManagerAudioGetLyrics(const picojson::value& args,
void ContentInstance::PlaylistGetName(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistGetName");
int ret;
CHECK_EXIST(args, "id", out)
int id = static_cast<int>(args.get("id").get<double>());
@@ -944,6 +956,7 @@ void ContentInstance::PlaylistGetName(const picojson::value& args, picojson::obj
void ContentInstance::PlaylistSetName(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistSetName");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
int ret;
@@ -961,6 +974,7 @@ void ContentInstance::PlaylistSetName(const picojson::value& args, picojson::obj
void ContentInstance::PlaylistGetThumbnailUri(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistGetThumbnailUri");
int ret;
CHECK_EXIST(args, "id", out)
int id = static_cast<int>(args.get("id").get<double>());
@@ -975,6 +989,7 @@ void ContentInstance::PlaylistGetThumbnailUri(const picojson::value& args, picoj
void ContentInstance::PlaylistSetThumbnailUri(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistSetThumbnailUri");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
int ret;
@@ -997,6 +1012,7 @@ void ContentInstance::PlaylistSetThumbnailUri(const picojson::value& args, picoj
void ContentInstance::PlaylistGetNumberOfTracks(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistGetNumberOfTracks");
CHECK_EXIST(args, "id", out)
int id = static_cast<int>(args.get("id").get<double>());
int count = 0;
diff --git a/src/content/js/manager.js b/src/content/js/manager.js
index e3c0755c..13be2d47 100755
--- a/src/content/js/manager.js
+++ b/src/content/js/manager.js
@@ -480,6 +480,10 @@ ContentManager.prototype.unsetChangeListener = function() {
};
ContentManager.prototype.getPlaylists = function(successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'getPlaylists() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'successCallback', type: types_.FUNCTION },
{ name: 'errorCallback', type: types_.FUNCTION, optional: true, nullable: true }
@@ -513,6 +517,10 @@ ContentManager.prototype.createPlaylist = function(
errorCallback,
sourcePlaylist
) {
+ privUtils_.deprecationWarn(
+ 'createPlaylist() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'name', type: types_.STRING },
{ name: 'successCallback', type: types_.FUNCTION },
@@ -561,6 +569,10 @@ ContentManager.prototype.createPlaylist = function(
};
ContentManager.prototype.removePlaylist = function(id, successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'removePlaylist() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'id', type: types_.STRING },
{
diff --git a/src/content/js/playlist.js b/src/content/js/playlist.js
index 95e3d35f..d37f9043 100755
--- a/src/content/js/playlist.js
+++ b/src/content/js/playlist.js
@@ -20,6 +20,10 @@ function Playlist(data) {
Object.defineProperties(this, {
id: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'Playlist.id is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
return id;
},
set: function(v) {
@@ -31,6 +35,10 @@ function Playlist(data) {
},
name: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'Playlist.name is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var result = native_.callSync('PlaylistGetName', {
id: Number(id)
});
@@ -40,6 +48,10 @@ function Playlist(data) {
return native_.getResultObject(result);
},
set: function(v) {
+ privUtils_.deprecationWarn(
+ 'Playlist.name is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
if (!type_.isNull(v)) {
var name = converter_.toString(v, false);
var result = native_.callSync('PlaylistSetName', {
@@ -55,6 +67,10 @@ function Playlist(data) {
},
numberOfTracks: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'Playlist.numberOfTracks is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var result = native_.callSync('PlaylistGetNumberOfTracks', {
id: Number(id)
});
@@ -68,6 +84,10 @@ function Playlist(data) {
},
thumbnailURI: {
get: function() {
+ privUtils_.deprecationWarn(
+ 'Playlist.thumbnailURI is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var result = native_.callSync('PlaylistGetThumbnailUri', {
id: Number(id)
});
@@ -80,6 +100,10 @@ function Playlist(data) {
return res === ' ' ? null : res;
},
set: function(v) {
+ privUtils_.deprecationWarn(
+ 'Playlist.thumbnailURI is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var thumbnailURI = converter_.toString(v, true);
if (type_.isNullOrUndefined(thumbnailURI)) {
//CoreAPI not support empty thumbnail, so one space must be used
@@ -113,6 +137,10 @@ function Playlist(data) {
}
Playlist.prototype.add = function(item) {
+ privUtils_.deprecationWarn(
+ 'add() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'item', type: types_.PLATFORM_OBJECT, values: Content }
]);
@@ -129,6 +157,10 @@ Playlist.prototype.add = function(item) {
};
Playlist.prototype.addBatch = function(items, successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'addBatch() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'items', type: types_.ARRAY, values: Content },
{
@@ -161,6 +193,10 @@ Playlist.prototype.addBatch = function(items, successCallback, errorCallback) {
};
Playlist.prototype.remove = function(item) {
+ privUtils_.deprecationWarn(
+ 'remove() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'item', type: types_.PLATFORM_OBJECT, values: PlaylistItem }
]);
@@ -177,6 +213,10 @@ Playlist.prototype.remove = function(item) {
};
Playlist.prototype.removeBatch = function(items, successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'removeBatch() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'items', type: types_.ARRAY, values: PlaylistItem },
{
@@ -214,6 +254,10 @@ Playlist.prototype.removeBatch = function(items, successCallback, errorCallback)
};
Playlist.prototype.get = function(successCallback, errorCallback, count, offset) {
+ privUtils_.deprecationWarn(
+ 'get() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'successCallback', type: types_.FUNCTION },
{ name: 'errorCallback', type: types_.FUNCTION, optional: true, nullable: true },
@@ -257,6 +301,10 @@ Playlist.prototype.get = function(successCallback, errorCallback, count, offset)
};
Playlist.prototype.setOrder = function(items, successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'setOrder() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'items', type: types_.ARRAY, values: PlaylistItem },
{
@@ -301,6 +349,10 @@ Playlist.prototype.setOrder = function(items, successCallback, errorCallback) {
};
Playlist.prototype.move = function(item, delta, successCallback, errorCallback) {
+ privUtils_.deprecationWarn(
+ 'move() is deprecated since Tizen 9.0 with no replacement.',
+ '9.0'
+ );
var args = validator_.validateArgs(arguments, [
{ name: 'item', type: types_.PLATFORM_OBJECT, values: PlaylistItem },
{ name: 'delta', type: types_.LONG },