Permalink
Browse files

jsonrpc: cleanup JSON schema after b23adb3

  • Loading branch information...
1 parent e20df1c commit db763c414e7330c68e9f223971490f299cc8e02d @Montellese Montellese committed Oct 13, 2012
Showing with 2 additions and 8 deletions.
  1. +1 −7 xbmc/interfaces/json-rpc/InputOperations.cpp
  2. +1 −1 xbmc/interfaces/json-rpc/methods.json
@@ -94,18 +94,12 @@ JSONRPC_STATUS CInputOperations::activateWindow(int windowID)
JSONRPC_STATUS CInputOperations::SendText(const CStdString &method, ITransportLayer *transport, IClient *client, const CVariant &parameterObject, CVariant &result)
{
- const CVariant& textvar = parameterObject["text"];
- if (!textvar.isString())
- return InvalidParams;
-
- std::string textstr = textvar.asString();
-
CGUIWindow *window = g_windowManager.GetWindow(g_windowManager.GetFocusedWindow());
if (!window)
return InternalError;
CGUIMessage msg(GUI_MSG_SET_TEXT, 0, 0);
- msg.SetLabel(textstr);
+ msg.SetLabel(parameterObject["text"].asString());
msg.SetParam1(parameterObject["done"].asBoolean() ? 1 : 0);
CApplicationMessenger::Get().SendGUIMessage(msg, window->GetID());
return ACK;
@@ -1597,7 +1597,7 @@
"transport": "Response",
"permission": "Navigate",
"params": [
- { "name": "text", "type": "string", "minLength": 1, "required": true, "description": "Unicode text" },
+ { "name": "text", "type": "string", "required": true, "description": "Unicode text" },
{ "name": "done", "type": "boolean", "default": true, "description": "Whether this is the whole input or not (closes an open input dialog if true)." }
],
"returns": "string"

0 comments on commit db763c4

Please sign in to comment.