From 024ea28421ec5d9c88f80ac11403da6c43a40e6a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 24 Aug 2013 22:09:02 -0400 Subject: [PATCH] mpc: add more api funcs --- js/mpc.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/js/mpc.js b/js/mpc.js index dce9fe0..c12a748 100644 --- a/js/mpc.js +++ b/js/mpc.js @@ -192,3 +192,49 @@ Mpc.prototype.kill = Mpc.__make_send_void('kill'); Mpc.prototype.password = Mpc.__make_send_arg1('password'); // ping Mpc.prototype.ping = Mpc.__make_send_void('ping'); + +/* + * Audio output devices + * http://www.musicpd.org/doc/protocol/ch03s09.html + */ + +// disableoutput {ID} +Mpc.prototype.disableoutput = Mpc.__make_send_arg1('disableoutput'); +// enableoutput {ID} +Mpc.prototype.enableoutput = Mpc.__make_send_arg1('enableoutput'); +// outputs +Mpc.prototype.outputs = Mpc.__make_send_void('outputs'); + +/* + * Reflection + * http://www.musicpd.org/doc/protocol/ch03s10.html + */ + +// config +Mpc.prototype.config = Mpc.__make_send_void('config'); +// commands +Mpc.prototype.commands = Mpc.__make_send_void('commands'); +// notcommands +Mpc.prototype.notcommands = Mpc.__make_send_void('notcommands'); +// tagtypes +Mpc.prototype.tagtypes = Mpc.__make_send_void('tagtypes'); +// urlhandlers +Mpc.prototype.urlhandlers = Mpc.__make_send_void('urlhandlers'); +// decoders +Mpc.prototype.decoders = Mpc.__make_send_void('decoders'); + +/* + * Client to client + * http://www.musicpd.org/doc/protocol/ch03s11.html + */ + +// subscribe {NAME} +Mpc.prototype.subscribe = Mpc.__make_send_arg1('subscribe'); +// unsubscribe {NAME} +Mpc.prototype.unsubscribe = Mpc.__make_send_arg1('unsubscribe'); +// channels +Mpc.prototype.channels = Mpc.__make_send_void('channels'); +// readmessages +Mpc.prototype.readmessages = Mpc.__make_send_void('readmessages'); +// sendmessage {CHANNEL} {TEXT} +Mpc.prototype.sendmessage = Mpc.__make_send_arg2('sendmessage'); -- 2.39.5