PARA_ERROR(PERM, "permission denied"), \
PARA_ERROR(PLAYLIST_EMPTY, "attempted to load empty playlist"), \
PARA_ERROR(PLAYLIST_LOADED, ""), /* not really an error */ \
- PARA_ERROR(PLAY_SYNTAX, "para_play: syntax error"), \
PARA_ERROR(PREBUFFER_SUCCESS, "prebuffering complete"), \
PARA_ERROR(PRIVATE_KEY, "can not read private key"), \
PARA_ERROR(PUBLIC_KEY, "can not read public key"), \
[description]
Mainly useful for debugging.
[/description]
+
+[subcommand quit]
+ purpose = exit para_play
+ [description]
+ Pressing CTRL+D causes EOF on stdin which also exits
+ para_play.
+ [/description]
#include "play.command_list.h"
typedef int play_command_handler_t(struct play_task *, int, char**);
-static play_command_handler_t PLAY_COMMAND_HANDLERS;
/* defines one command of para_play */
struct pp_command {
btr_remove_node(&pt->btrn);
}
-static int com_quit(struct play_task *pt, int argc, __a_unused char **argv)
+static int com_quit(struct play_task *pt,
+ __a_unused struct lls_parse_result *lpr)
{
- if (argc != 1)
- return -E_PLAY_SYNTAX;
pt->rq = CRT_TERM_RQ;
return 0;
}
+EXPORT_PLAY_CMD_HANDLER(quit);
static int com_help(struct play_task *pt, struct lls_parse_result *lpr)
{
BN: play
SF: play.c
SN: list of commands
----
-N: quit
-D: Exit para_play.
-U: quit
-H: Pressing CTRL+D causes EOF on stdin which also exits para_play.