diff options
| author | Eskil Queseth <eskilq@kth.se> | 2020-11-02 20:31:50 +0100 |
|---|---|---|
| committer | Eskil Queseth <eskilq@kth.se> | 2020-11-02 20:31:50 +0100 |
| commit | 46861ce465d6f1d86e80007742a850fd1cfa9bad (patch) | |
| tree | dd57d0237227a6de2c34512a0aee3b51d48f009e /mumlib/src | |
| parent | 8fb4edd72dfcb2b71e91eedc5861360101374967 (diff) | |
| download | mum-46861ce465d6f1d86e80007742a850fd1cfa9bad.tar.gz | |
add mumd support for volume adjustment
Diffstat (limited to 'mumlib/src')
| -rw-r--r-- | mumlib/src/command.rs | 2 | ||||
| -rw-r--r-- | mumlib/src/error.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index e404056..d2d5d53 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -10,6 +10,8 @@ pub enum Command { ChannelList, ConfigReload, InputVolumeSet(f32), + OutputVolumeSet(f32), + UserVolumeSet(String, f32), ServerConnect { host: String, port: u16, diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index c6d9255..eaf517c 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -10,6 +10,7 @@ pub enum Error { AlreadyConnectedError, ChannelIdentifierError(String, ChannelIdentifierError), InvalidServerAddrError(String, u16), + InvalidUsernameError(String), } impl Display for Error { @@ -18,9 +19,8 @@ impl Display for Error { Error::DisconnectedError => write!(f, "Not connected to a server"), Error::AlreadyConnectedError => write!(f, "Already connected to a server"), Error::ChannelIdentifierError(id, kind) => write!(f, "{}: {}", kind, id), - Error::InvalidServerAddrError(addr, port) => { - write!(f, "Invalid server address: {}: {}", addr, port) - } + Error::InvalidServerAddrError(addr, port) => write!(f, "Invalid server address: {}: {}", addr, port), + Error::InvalidUsernameError(username) => write!(f, "Invalid username: {}", username), } } } |
