summaryrefslogtreecommitdiff
path: root/src/components/HMI/app/controller/sdl/RPCController.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/HMI/app/controller/sdl/RPCController.js')
-rw-r--r--src/components/HMI/app/controller/sdl/RPCController.js108
1 files changed, 6 insertions, 102 deletions
diff --git a/src/components/HMI/app/controller/sdl/RPCController.js b/src/components/HMI/app/controller/sdl/RPCController.js
index d7ab4b2d0..27dd2ec08 100644
--- a/src/components/HMI/app/controller/sdl/RPCController.js
+++ b/src/components/HMI/app/controller/sdl/RPCController.js
@@ -72,41 +72,21 @@ SDL.RPCController = Em.Object
capabilitiesCheck: function(key, value) {
if (key == "imageType" && value == "STATIC") {
- SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
+ SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
}
if (key == "type" && value == "PRE_RECORDED") {
- SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
+ SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
}
if (key == "type" && value == "SAPI_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
+ SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
}
if (key == "type" && value == "LHPLUS_PHONEMES") {
- SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
+ SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
}
if (key == "type" && value == "SILENCE") {
- SDL.RPCController.capabilityCheckResult = 'UNSUPPORTED_RESOURCE';
+ SDL.RPCController.capabilityCheckResult = {code: SDL.SDLModel.resultCode['UNSUPPORTED_RESOURCE'], type: value};
}
- },
-
- /**
- * Method to check supported image type in request
- *
- * @param {Object}
- * array
- */
- checkImagesArray: function(array) {
-
- var error = false;
- if (array instanceof Array) {
- for ( var i = 0; i < array.length; i++) {
- if (array[i].image &&
- ((array[i].image.imageType !== "DYNAMIC") &&
- (array[i].image.imageType !== "STATIC"))) {
-
- }
- }
- }
- return error;
+ return value;
},
/**
@@ -1093,17 +1073,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if ("turnIcon" in params
&& ((params.turnIcon.imageType !== "DYNAMIC") && (params.turnIcon.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1183,17 +1152,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if ("turnList" in params) {
for ( var i = 0; i < params.turnList.length; i++) {
@@ -1277,17 +1235,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if (params.alertStrings == null) {
this.resultStruct = {
@@ -1422,17 +1369,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if ("graphic" in params
&& ((params.graphic.imageType !== "DYNAMIC") && (params.graphic.imageType !== "STATIC"))) {
this.resultStruct = {
@@ -1934,16 +1870,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("vrHelp" in params) {
- if (SDL.RPCController.checkImagesArray(params.vrHelp)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if (params.appID == null) {
this.resultStruct = {
@@ -2278,17 +2204,6 @@ SDL.RPCController = Em.Object
return this.resultStruct;
}
- if ("softButtons" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.softButtons)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if (params.messageText == null) {
this.resultStruct = {
@@ -2434,17 +2349,6 @@ SDL.RPCController = Em.Object
ShowVrHelp: function(params) {
if (params) {
- if ("vrHelp" in params) {
- if (SDL.RPCController
- .checkImagesArray(params.vrHelp)) {
- this.resultStruct = {
- "resultCode": SDL.SDLModel.resultCode["INVALID_DATA"],
- "resultMessage": "Unsupported image type!"
- };
-
- return this.resultStruct;
- }
- }
if ("appID" in params) {
if (typeof params.appID != 'number') {