diff options
Diffstat (limited to 'mumlib/src/command.rs')
| -rw-r--r-- | mumlib/src/command.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs new file mode 100644 index 0000000..b2ac321 --- /dev/null +++ b/mumlib/src/command.rs @@ -0,0 +1,31 @@ +use crate::state::{Channel, Server}; + +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +#[derive(Clone, Debug, Deserialize, Serialize)] +pub enum Command { + ChannelJoin { + channel_id: u32, + }, + ChannelList, + ServerConnect { + host: String, + port: u16, + username: String, + accept_invalid_cert: bool, + }, + ServerDisconnect, + Status, +} + +#[derive(Debug, Deserialize, Serialize)] +pub enum CommandResponse { + ChannelList { + channels: HashMap<u32, Channel>, + }, + Status { + username: Option<String>, + server_state: Server, + }, +} |
