From: Pawel Sikorski
Date: Wed, 22 Jul 2015 08:20:06 +0000 (+0200)
Subject: TV related code removal
X-Git-Tag: submit/tizen_tv/20150803.021740^2~2
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9bf426b77e467319e2b31780bbb3edf1121d79dd;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
TV related code removal
tizen_3.0 branch should not include TV related code
Task: http://168.219.209.56/jira/browse/XWALK-587
Change-Id: Ic1dbfac08fcd1371a85fba5d4d72be84f9f9f341
Signed-off-by: Pawel Sikorski
---
diff --git a/packaging/webapi-plugins.spec b/packaging/webapi-plugins.spec
index 5b37f23a..e4f0d500 100755
--- a/packaging/webapi-plugins.spec
+++ b/packaging/webapi-plugins.spec
@@ -111,12 +111,7 @@ Source0: %{name}-%{version}.tar.gz
# I586
%define tizen_feature_wi_fi_support 0
%endif
-%define tizen_feature_tvaudio_support 0
-%define tizen_feature_tvchannel_support 0
-%define tizen_feature_tv_display_support 0
-%define tizen_feature_tvinputdevice_support 0
%define tizen_feature_inputdevice_support 1
-%define tizen_feature_tvwindow_support 0
%if 0%{?tizen_feature_telephony_support}
%define tizen_feature_callhistory_support 1
@@ -208,12 +203,7 @@ Source0: %{name}-%{version}.tar.gz
%define tizen_feature_time_support 1
%define tizen_feature_web_setting_support 0
%define tizen_feature_wi_fi_support 1
-%define tizen_feature_tvaudio_support 0
-%define tizen_feature_tvchannel_support 0
-%define tizen_feature_tv_display_support 0
-%define tizen_feature_tvinputdevice_support 0
%define tizen_feature_inputdevice_support 1
-%define tizen_feature_tvwindow_support 0
#- telephony related APIs
# CallHistory API is optional in Tizen Wearable Profile.
@@ -275,15 +265,7 @@ Source0: %{name}-%{version}.tar.gz
%define tizen_feature_time_support 1
%define tizen_feature_web_setting_support 1
%define tizen_feature_wi_fi_support 1
-#off for tizen 3.0 (no libavoc)
-%define tizen_feature_tvaudio_support 0
-#off for tizen 3.0 (no tvs-api)
-%define tizen_feature_tvchannel_support 0
-#off for tizen 3.0 (no systeminfo definitions)
-%define tizen_feature_tv_display_support 0
-%define tizen_feature_tvinputdevice_support 1
%define tizen_feature_inputdevice_support 1
-%define tizen_feature_tvwindow_support 0
%endif # tizen_profile_tv
@@ -412,16 +394,6 @@ BuildRequires: pkgconfig(contacts-service2)
BuildRequires: pkgconfig(contacts-service2)
%endif
-%if 0%{?tizen_feature_tvchannel_support}
-BuildRequires: pkgconfig(tvs-api)
-%endif
-
-%if 0%{?tizen_feature_tvwindow_support}
-#TODO Currently, TVWindow does not have implementation yet.
-#Hence, below dependency can be disabled (there is no tvs-api on tizen 3.0 yet)
-#BuildRequires: pkgconfig(tvs-api)
-%endif
-
%if 0%{?tizen_feature_exif_support}
BuildRequires: pkgconfig(libexif)
%endif
@@ -434,11 +406,6 @@ BuildRequires: pkgconfig(capi-network-nfc)
BuildRequires: pkgconfig(capi-media-radio)
%endif
-%if 0%{?tizen_feature_tvaudio_support}
-BuildRequires: pkgconfig(libavoc)
-BuildRequires: pkgconfig(capi-media-audio-io)
-%endif
-
%if 0%{?tizen_feature_se_support}
BuildRequires: pkgconfig(smartcard-service)
BuildRequires: pkgconfig(smartcard-service-common)
@@ -526,12 +493,7 @@ GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_info_support=%{?tizen_feature_s
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_system_setting_support=%{?tizen_feature_system_setting_support}"
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_telephony_support=%{?tizen_feature_telephony_support}"
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_time_support=%{tizen_feature_time_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvaudio_support=%{?tizen_feature_tvaudio_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvchannel_support=%{?tizen_feature_tvchannel_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tv_display_support=%{?tizen_feature_tv_display_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvinputdevice_support=%{?tizen_feature_tvinputdevice_support}"
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_inputdevice_support=%{?tizen_feature_inputdevice_support}"
-GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_tvwindow_support=%{?tizen_feature_tvwindow_support}"
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_web_setting_support=%{?tizen_feature_web_setting_support}"
GYP_OPTIONS="$GYP_OPTIONS -Dtizen_feature_wi_fi_support=%{?tizen_feature_wi_fi_support}"
@@ -562,13 +524,6 @@ install -p -m 644 tools/js_minimize.py %{buildroot}%{_includedir}/%{name}/tools
cp -a tools/gyp %{buildroot}%{_includedir}/%{name}/tools/gyp
cp -a tools/slimit %{buildroot}%{_includedir}/%{name}/tools/slimit
-%if 0%{?tizen_feature_tvaudio_support}
-# tv audio beep files:
-%define ringtones_directory /opt/usr/share/settings/Ringtones/
-mkdir -p %{buildroot}%{ringtones_directory}
-cp res/tvsounds/*.pcm %{buildroot}%{ringtones_directory}
-%endif
-
# execute desc_gentool
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}/%{crosswalk_extensions} out/Default/desc_gentool %{buildroot}%{_libdir}/%{crosswalk_extensions} > plugins.json
@@ -582,11 +537,6 @@ install -p -m 644 plugins.json %{buildroot}%{_libdir}/%{crosswalk_extensions}/pl
%{_datadir}/license/%{name}
%manifest webapi-plugins.manifest
-%if 0%{?tizen_feature_tvaudio_support}
-# tv audio beep files:
-%{ringtones_directory}/*.pcm
-%endif
-
%files devel
%{_includedir}/*
%{_libdir}/pkgconfig/*
diff --git a/src/tizen-wrt.gyp b/src/tizen-wrt.gyp
index 7b0e7ef6..82fe5fb9 100755
--- a/src/tizen-wrt.gyp
+++ b/src/tizen-wrt.gyp
@@ -266,27 +266,6 @@
],
},
],
- [
- 'tizen_feature_tv_display_support==1', {
- 'dependencies': [
- 'tvdisplay/tvdisplay.gyp:*',
- ],
- },
- ],
- [
- 'tizen_feature_tvaudio_support==1', {
- 'dependencies': [
- 'tvaudio/tvaudio.gyp:*',
- ],
- },
- ],
- [
- 'tizen_feature_tvinputdevice_support==1', {
- 'dependencies': [
- 'tvinputdevice/tvinputdevice.gyp:*'
- ],
- },
- ],
[
'tizen_feature_inputdevice_support==1', {
'dependencies': [
@@ -294,20 +273,6 @@
],
},
],
- [
- 'tizen_feature_tvchannel_support==1', {
- 'dependencies': [
- 'tvchannel/tvchannel.gyp:*',
- ],
- },
- ],
- [
- 'tizen_feature_tvwindow_support==1', {
- 'dependencies': [
- 'tvwindow/tvwindow.gyp:*',
- ],
- },
- ],
[
'tizen_feature_web_setting_support==1', {
'dependencies': [
diff --git a/src/tvaudio/tvaudio.gyp b/src/tvaudio/tvaudio.gyp
deleted file mode 100644
index 2bbebfa8..00000000
--- a/src/tvaudio/tvaudio.gyp
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- 'includes':[
- '../common/common.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'tizen_tvaudio',
- 'type': 'loadable_module',
- 'dependencies': [
- '../common/common.gyp:tizen_common',
- ],
- 'sources': [
- 'tvaudio_api.js',
- 'tvaudio_extension.cc',
- 'tvaudio_extension.h',
- 'tvaudio_instance.cc',
- 'tvaudio_instance.h',
- 'tvaudio_manager.cc',
- 'tvaudio_manager.h'
- ],
- 'includes': [
- '../common/pkg-config.gypi',
- ],
- 'conditions': [
- ['tizen == 1', {
- 'variables': {
- 'packages': [
- 'glib-2.0',
- 'libavoc',
- 'capi-media-audio-io',
- 'capi-media-sound-manager',
- ]
- },
- }],
- ],
- },
- ],
-}
diff --git a/src/tvaudio/tvaudio_api.js b/src/tvaudio/tvaudio_api.js
deleted file mode 100644
index 42c76f24..00000000
--- a/src/tvaudio/tvaudio_api.js
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-var native = new xwalk.utils.NativeManager(extension);
-var validator = xwalk.utils.validator;
-var types = validator.Types;
-
-
-/**
- * @type {string}
- * @const
- */
-var VOLUME_CHANGE_LISTENER = 'VolumeChangeCallback';
-
-
-
-/**
- * This class provides access to the API functionalities through
- * the tizen.tvaudiocontrol interface.
- * @constructor
- */
-function AudioControlManager() {
- if (!(this instanceof AudioControlManager)) {
- throw new TypeError;
- }
-}
-
-
-
-/**
- * Turns on or off the silent mode.
- * @param {!boolean} mute The mute state
- * (true = turn on the silent mode, false = turn off the silent mode)
- */
-
-AudioControlManager.prototype.setMute = function(mute) {
- var args = validator.validateArgs(arguments, [
- {name: 'mute', type: types.BOOLEAN}
- ]);
-
- var ret = native.callSync('AudioControlManager_setMute', {
- mute: args.mute
- });
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-};
-
-
-/**
- * Gets the mute state.
- * @return {boolean} 'true' if sound is muted else 'false'
- */
-AudioControlManager.prototype.isMute = function() {
- var ret = native.callSync('AudioControlManager_isMute');
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-
- return native.getResultObject(ret);
-};
-
-
-/**
- * Changes the volume level.
- * @param {!number} volume The value of volume
- * (the available volume range is 0 ~ 100)
- */
-AudioControlManager.prototype.setVolume = function(volume) {
-
- var args = validator.validateArgs(arguments, [
- {name: 'volume', type: types.UNSIGNED_LONG}
- ]);
-
- if (args.volume < 0 || args.volume > 100) {
- throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR,
- 'Volume is out of range: ' + args.volume, 'InvalidValuesError');
- }
-
- if (arguments.length < 1) {
- throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR,
- 'no volume argument: ' + arguments.length, 'InvalidValuesError');
- }
-
- var ret = native.callSync('AudioControlManager_setVolume', {
- volume: args.volume
- });
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-};
-
-
-/**
- * Increases the volume by 1 level.
- */
-AudioControlManager.prototype.setVolumeUp = function() {
- var ret = native.callSync('AudioControlManager_setVolumeUp');
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-};
-
-
-/**
- * Decreases the volume by 1 level.
- */
-AudioControlManager.prototype.setVolumeDown = function() {
- var ret = native.callSync('AudioControlManager_setVolumeDown');
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-};
-
-
-/**
- * Gets the current volume level.
- * @return {number} The current volume (the volume range is 0 ~ 100)
- */
-AudioControlManager.prototype.getVolume = function() {
- var ret = native.callSync('AudioControlManager_getVolume');
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
- return native.getResultObject(ret);
-};
-
-
-/**
- * Registers a volume change callback for getting notified
- * when TV volume has been changed.
- *
- * @param {!function} listener The method to invoke
- * when the volume has been changed.
- */
-AudioControlManager.prototype.setVolumeChangeListener = function(listener) {
- var args = validator.validateArgs(arguments, [
- {name: 'listener', type: types.FUNCTION}
- ]);
-
- native.removeListener(VOLUME_CHANGE_LISTENER);
-
- var ret = native.callSync('AudioControlManager_setVolumeChangeListener');
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-
- native.addListener(VOLUME_CHANGE_LISTENER, function(msg) {
- args.listener(msg.volume);
- });
-};
-
-
-/**
- * Unregisters the volume change callback for detecting the volume changes.
- */
-AudioControlManager.prototype.unsetVolumeChangeListener = function() {
- var ret = native.callSync('AudioControlManager_unsetVolumeChangeListener');
-
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
-
- native.removeListener(VOLUME_CHANGE_LISTENER);
-};
-
-
-/**
- * Gets the current audio output mode.
- * @return {AudioOutputMode} The current audio output mode
- */
-AudioControlManager.prototype.getOutputMode = function() {
- var ret = native.callSync('AudioControlManager_getOutputMode');
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
- return native.getResultObject(ret);
-};
-
-
-/**
- * Allowed types of sound
- * They should correspond to values in native layer and .pcm files
- */
-var AudioBeepType = [
- 'MOVE', // indented use the same sound
- 'UP',
- 'DOWN',
- 'LEFT',
- 'RIGHT',
- 'PAGE_LEFT',
- 'PAGE_RIGHT',
- 'BACK',
- 'SELECT',
- 'CANCEL',
- 'WARNING',
- 'KEYPAD',
- 'KEYPAD_ENTER',
- 'KEYPAD_DEL',
- 'PREPARING'
-];
-Object.freeze(AudioBeepType);
-
-
-/**
- * Plays one of specific sounds.
- * @param {!AudioBeepType} beep The Sound to play.
- */
-AudioControlManager.prototype.playSound = function(beep) {
- var args = validator.validateArgs(arguments, [{
- name: 'type',
- type: validator.Types.ENUM,
- values: AudioBeepType // AudioBeepType
- }]);
-
- var ret = native.callSync('AudioControlManager_playSound',
- {type: args.type});
- if (native.isFailure(ret)) {
- throw native.getErrorObject(ret);
- }
- return;
-};
-
-// Exports
-exports = new AudioControlManager();
diff --git a/src/tvaudio/tvaudio_extension.cc b/src/tvaudio/tvaudio_extension.cc
deleted file mode 100644
index 1cf303bd..00000000
--- a/src/tvaudio/tvaudio_extension.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "tvaudio/tvaudio_extension.h"
-#include "tvaudio/tvaudio_instance.h"
-
-// This will be generated from tvaudio_api.js
-extern const char kSource_tvaudio_api[];
-
-namespace extension {
-namespace tvaudio {
-
-TVAudioExtension::TVAudioExtension() {
- SetExtensionName("tizen.tvaudiocontrol");
- SetJavaScriptAPI(kSource_tvaudio_api);
-}
-
-TVAudioExtension::~TVAudioExtension() {}
-
-AudioControlManager& TVAudioExtension::manager() {
- // Initialize API on first request
- return AudioControlManager::getInstance();
-}
-
-common::Instance* TVAudioExtension::CreateInstance() {
- return new TVAudioInstance;
-}
-
-} // namespace tvaudio
-} // namespace extension
-
-common::Extension* CreateExtension() {
- return new extension::tvaudio::TVAudioExtension;
-}
diff --git a/src/tvaudio/tvaudio_extension.h b/src/tvaudio/tvaudio_extension.h
deleted file mode 100644
index a53e2dc7..00000000
--- a/src/tvaudio/tvaudio_extension.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef SRC_TVAUDIO_TVAUDIO_EXTENSION_H_
-#define SRC_TVAUDIO_TVAUDIO_EXTENSION_H_
-
-#include "common/extension.h"
-#include "tvaudio/tvaudio_manager.h"
-
-namespace extension {
-namespace tvaudio {
-
-class TVAudioExtension : public common::Extension {
- public:
- TVAudioExtension();
- virtual ~TVAudioExtension();
-
- AudioControlManager& manager();
-
- private:
- virtual common::Instance* CreateInstance();
-};
-
-} // namespace tvaudio
-} // namespace extension
-
-#endif // SRC_TVAUDIO_TVAUDIO_EXTENSION_H_
-
diff --git a/src/tvaudio/tvaudio_instance.cc b/src/tvaudio/tvaudio_instance.cc
deleted file mode 100644
index bcf1b061..00000000
--- a/src/tvaudio/tvaudio_instance.cc
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include
-#include