diff options
| author | Fuwn <[email protected]> | 2021-06-02 20:18:12 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-06-02 20:18:12 +0000 |
| commit | 95fb0f956fd5cfacec3f7c69d6a10fcec3c95236 (patch) | |
| tree | b84950ef38d21b20058bd6e0d700f2da842f90fe /crates/whirl_server/src/cmd/constants.rs | |
| parent | Merge pull request #38 from Whirlsplash/renovate/tokio-1.x (diff) | |
| download | whirl-95fb0f956fd5cfacec3f7c69d6a10fcec3c95236.tar.xz whirl-95fb0f956fd5cfacec3f7c69d6a10fcec3c95236.zip | |
refactor(server): use enum for command types
Diffstat (limited to 'crates/whirl_server/src/cmd/constants.rs')
| -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; |