diff options
| author | Fuwn <[email protected]> | 2021-06-02 20:18:12 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-02 20:18:12 -0700 |
| commit | 870ce2d24033596439e33702b41a00bb9a547645 (patch) | |
| tree | c749ced1dad9de3e3c86f0e6f2334977ecba9317 /crates/whirl_server/src/cmd | |
| parent | Merge pull request #38 from Whirlsplash/renovate/tokio-1.x (diff) | |
| download | whirl-870ce2d24033596439e33702b41a00bb9a547645.tar.xz whirl-870ce2d24033596439e33702b41a00bb9a547645.zip | |
refactor(server): use enum for command types
Diffstat (limited to 'crates/whirl_server/src/cmd')
| -rw-r--r-- | crates/whirl_server/src/cmd/constants.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/crates/whirl_server/src/cmd/constants.rs b/crates/whirl_server/src/cmd/constants.rs index 1271a9a..ac17798 100644 --- a/crates/whirl_server/src/cmd/constants.rs +++ b/crates/whirl_server/src/cmd/constants.rs @@ -3,6 +3,39 @@ #![allow(dead_code)] +#[derive(num_derive::FromPrimitive)] +pub enum Command { + LongLoc = 1, + State, + Prop, + ShortLoc, + RoomChng, + SessInit, + SessExit, + AppInit, + PropReq = 10, + Disappr, + ApprActr, + RegObjId, + Text, + PropSet, + PropUpd, + Whisper, + Teleport, + RoomIdRq = 20, + RoomId, + Subscrib, + Unsubscr, + SubDist, + Redirect, + RedirId, + FingReq, + FingRep, + BuddyListUpdate, + BuddyListNotify, + Channel, +} + pub const LONGLOC: i32 = 1; pub const STATE: i32 = 2; pub const PROP: i32 = 3; |