From: Mike Frysinger Date: Sun, 25 Aug 2013 02:09:02 +0000 (-0400) Subject: mpc: add more api funcs X-Git-Tag: v3.0~20 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=024ea28421ec5d9c88f80ac11403da6c43a40e6a;p=chrome-ext%2Fmusic-player-client.git mpc: add more api funcs --- 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');