-
Notifications
You must be signed in to change notification settings - Fork 3
/
Output.pm6
42 lines (35 loc) · 796 Bytes
/
Output.pm6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /usr/bin/env false
use v6.c;
use MPD::Client::Util;
unit module MPD::Client::Output;
#| Turns an output off.
sub mpd-disableoutput (
Int $id,
IO::Socket::INET $socket
--> Bool
) is export {
mpd-response-ok(mpd-send("disableoutput", $id, $socket));
}
#| Turns an output on.
sub mpd-enableoutput (
Int $id,
IO::Socket::INET $socket
--> Bool
) is export {
mpd-response-ok(mpd-send("enableoutput", $id, $socket));
}
#| Turns an output on or off, depending on the current state.
sub mpd-toggleoutput (
Int $id,
IO::Socket::INET $socket
--> Bool
) is export {
mpd-response-ok(mpd-send("toggleoutput", $id, $socket));
}
#| Shows information about all outputs.
sub mpd-outputs (
IO::Socket::INET $socket
--> Array
) is export {
mpd-responses(mpd-send-raw("outputs", $socket));
}