#include "content/content_manager.h"
using namespace common;
+using common::tools::PrintDeprecationWarningFor;
namespace extension {
namespace content {
void ContentInstance::ContentManagerGetplaylists(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerGetplaylists");
// CHECK_PRIVILEGE_ACCESS(kPrivilegeContentRead, &out);
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
void ContentInstance::ContentManagerCreateplaylist(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerCreateplaylist");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
CHECK_EXIST(args, "callbackId", out)
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>();
void ContentInstance::ContentManagerPlaylistAdd(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistAdd");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
if (ContentManager::getInstance()->isConnected()) {
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>();
void ContentInstance::ContentManagerPlaylistGet(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistGet");
// CHECK_PRIVILEGE_ACCESS(kPrivilegeContentRead, &out);
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
void ContentInstance::ContentManagerPlaylistRemove(const picojson::value& args,
picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("ContentManagerPlaylistRemove");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
if (ContentManager::getInstance()->isConnected()) {
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>();
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>();
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>();
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>());
void ContentInstance::PlaylistSetName(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistSetName");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
int ret;
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>());
void ContentInstance::PlaylistSetThumbnailUri(const picojson::value& args, picojson::object& out) {
ScopeLogger();
+ PrintDeprecationWarningFor("PlaylistSetThumbnailUri");
CHECK_PRIVILEGE_ACCESS(kPrivilegeContentWrite, &out);
int ret;
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;
};
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 }
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 },
};
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 },
{
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) {
},
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)
});
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', {
},
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)
});
},
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)
});
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
}
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 }
]);
};
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 },
{
};
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 }
]);
};
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 },
{
};
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 },
};
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 },
{
};
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 },