2024-08-15 22:38:05 -07:00

56 lines
1.0 KiB
Rust

#![allow(dead_code)]
pub mod code; pub use code::*;
pub mod packet; pub use packet::*;
#[derive(Clone)]
pub enum QRPacketData {
None,
QConn(LocalPacketConnect),
RConn,
QDisconn,
QRegister(PacketRegister),
RRegister(PacketRegisterResponse),
QAuth(PacketAuth),
RAuth(PacketAuthResponse),
QAuthResume(PacketAuthResume),
RAuthResume(PacketAuthResumeResponse),
QAuthRevoke,
QSessionList(PacketSessionList),
RSessionList(PacketSessionListResponse),
QSessionCreate(PacketSessionCreate),
RSessionCreate(PacketSessionCreateResponse),
QSessionJoin(PacketSessionJoin),
RSessionJoin(PacketSessionJoinResponse),
QSessionRetire(PacketSessionRetire),
QSessionLeave,
QGameState(PacketGameState),
RGameState(PacketGameStateResponse),
QGamePlay(PacketGamePlay),
}
#[derive(Clone)]
pub struct QRPacket {
pub id:u32,
pub data:QRPacketData,
}
impl QRPacket {
pub fn new(id:u32, data:QRPacketData) -> Self
{
Self { id, data }
}
}