native-client: test client cancel and help fixes.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Tue, 11 Mar 2014 12:08:28 +0000 (14:08 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Tue, 11 Mar 2014 12:08:28 +0000 (14:08 +0200)
src/plugins/client-api/native/test-client.c

index fe82a09..a3bb378 100644 (file)
@@ -807,9 +807,14 @@ static void execute_user_command(client_t *c, int narg, char **args)
             print(c, "  focus none|shared|exclusive  - request voice focus");
             print(c, "  add command <command>        - add new command");
             print(c, "  del command <command>        - delete a command");
-            print(c, "  tts render '<msg>' timeout subscribe");
-            print(c, "  tts cancel '<id>'");
+            print(c, "  render tts '<msg>' \\        - request TTS of <msg>");
+            print(c, "    [-voice:<voice>] \\");
+            print(c, "    [-timeout:<timeout>]\\");
+            print(c, "    [-events]");
+            print(c, "  cancel tts '<id>'            - cancel given TTS "
+                  "request");
             print(c, "  list commands                - list commands set");
+            print(c, "  list voices                  - list available voices");
             print(c, "  help                         - show this help");
             print(c, "  exit                         - exit from client");
         }
@@ -843,6 +848,8 @@ static void execute_user_command(client_t *c, int narg, char **args)
     case 2:
         if (!strcmp(cmd, "list" ) && !strcmp(args[0], "voices"))
             query_voices(c, args[1]);
+        else if (!strcmp(cmd, "cancel"))
+            cancel_tts(c, narg-1, args+1);
         else
             print(c, "Invalid command.");
         break;
@@ -859,8 +866,6 @@ static void execute_user_command(client_t *c, int narg, char **args)
         else if (!strcmp(args[0], "tts")) {
             if (!strcmp(cmd, "render"))
                 request_tts(c, narg-1, args+1);
-            else if (!strcmp(cmd, "cancel"))
-                cancel_tts(c, narg-1, args+1);
             else
                 print(c, "Invalid TTS command.");
         }