XilonenImpact/hk4e_proto/out/server_only.rs
2024-08-26 15:29:56 +03:00

132 lines
No EOL
5.8 KiB
Rust

// This file is @generated by prost-build.
#[derive(proto_gen::CmdID)]
#[cmdid(10035)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddGateserverNotify {
#[prost(uint32, tag = "1")]
pub listen_port: u32,
#[prost(uint32, tag = "2")]
pub outer_ip: u32,
#[prost(bool, tag = "3")]
pub use_domain_name: bool,
#[prost(string, tag = "4")]
pub domain_name: ::prost::alloc::string::String,
}
#[derive(proto_gen::CmdID)]
#[cmdid(1)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeepAliveNotify {}
#[derive(proto_gen::CmdID)]
#[cmdid(10198)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavePlayerDataReq {
#[prost(bytes = "vec", tag = "1")]
pub player_data: ::prost::alloc::vec::Vec<u8>,
#[prost(uint32, tag = "2")]
pub save_stat_id: u32,
}
#[derive(proto_gen::CmdID)]
#[cmdid(10112)]
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SavePlayerDataRsp {
#[prost(int32, tag = "1")]
pub retcode: i32,
#[prost(uint32, tag = "2")]
pub data_version: u32,
#[prost(uint32, tag = "3")]
pub save_stat_id: u32,
}
#[derive(proto_gen::CmdID)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ENetReason {
EnetTimeout = 0,
EnetClientClose = 1,
EnetClientRebindFail = 2,
EnetClientShutdown = 3,
EnetServerRelogin = 4,
EnetServerKick = 5,
EnetServerShutdown = 6,
EnetNotFoundSession = 7,
EnetLoginUnfinished = 8,
EnetPacketFreqTooHigh = 9,
EnetPingTimeout = 10,
EnetTranferFailed = 11,
EnetServerKillClient = 12,
EnetCheckMoveSpeed = 13,
EnetAccountPasswordChange = 14,
EnetSecurityKick = 15,
EnetLuaShellTimeout = 16,
EnetSdkfailKick = 17,
EnetPacketCostTime = 18,
EnetPacketUnionFreq = 19,
EnetWaitSndMax = 20,
EnetClientConnectKey = 1234567890,
EnetClientEditorConnectKey = 987654321,
}
impl ENetReason {
/// String value of the enum field names used in the ProtoBuf definition.
///
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
ENetReason::EnetTimeout => "ENET_TIMEOUT",
ENetReason::EnetClientClose => "ENET_CLIENT_CLOSE",
ENetReason::EnetClientRebindFail => "ENET_CLIENT_REBIND_FAIL",
ENetReason::EnetClientShutdown => "ENET_CLIENT_SHUTDOWN",
ENetReason::EnetServerRelogin => "ENET_SERVER_RELOGIN",
ENetReason::EnetServerKick => "ENET_SERVER_KICK",
ENetReason::EnetServerShutdown => "ENET_SERVER_SHUTDOWN",
ENetReason::EnetNotFoundSession => "ENET_NOT_FOUND_SESSION",
ENetReason::EnetLoginUnfinished => "ENET_LOGIN_UNFINISHED",
ENetReason::EnetPacketFreqTooHigh => "ENET_PACKET_FREQ_TOO_HIGH",
ENetReason::EnetPingTimeout => "ENET_PING_TIMEOUT",
ENetReason::EnetTranferFailed => "ENET_TRANFER_FAILED",
ENetReason::EnetServerKillClient => "ENET_SERVER_KILL_CLIENT",
ENetReason::EnetCheckMoveSpeed => "ENET_CHECK_MOVE_SPEED",
ENetReason::EnetAccountPasswordChange => "ENET_ACCOUNT_PASSWORD_CHANGE",
ENetReason::EnetSecurityKick => "ENET_SECURITY_KICK",
ENetReason::EnetLuaShellTimeout => "ENET_LUA_SHELL_TIMEOUT",
ENetReason::EnetSdkfailKick => "ENET_SDKFAIL_KICK",
ENetReason::EnetPacketCostTime => "ENET_PACKET_COST_TIME",
ENetReason::EnetPacketUnionFreq => "ENET_PACKET_UNION_FREQ",
ENetReason::EnetWaitSndMax => "ENET_WAIT_SND_MAX",
ENetReason::EnetClientConnectKey => "ENET_CLIENT_CONNECT_KEY",
ENetReason::EnetClientEditorConnectKey => "ENET_CLIENT_EDITOR_CONNECT_KEY",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"ENET_TIMEOUT" => Some(Self::EnetTimeout),
"ENET_CLIENT_CLOSE" => Some(Self::EnetClientClose),
"ENET_CLIENT_REBIND_FAIL" => Some(Self::EnetClientRebindFail),
"ENET_CLIENT_SHUTDOWN" => Some(Self::EnetClientShutdown),
"ENET_SERVER_RELOGIN" => Some(Self::EnetServerRelogin),
"ENET_SERVER_KICK" => Some(Self::EnetServerKick),
"ENET_SERVER_SHUTDOWN" => Some(Self::EnetServerShutdown),
"ENET_NOT_FOUND_SESSION" => Some(Self::EnetNotFoundSession),
"ENET_LOGIN_UNFINISHED" => Some(Self::EnetLoginUnfinished),
"ENET_PACKET_FREQ_TOO_HIGH" => Some(Self::EnetPacketFreqTooHigh),
"ENET_PING_TIMEOUT" => Some(Self::EnetPingTimeout),
"ENET_TRANFER_FAILED" => Some(Self::EnetTranferFailed),
"ENET_SERVER_KILL_CLIENT" => Some(Self::EnetServerKillClient),
"ENET_CHECK_MOVE_SPEED" => Some(Self::EnetCheckMoveSpeed),
"ENET_ACCOUNT_PASSWORD_CHANGE" => Some(Self::EnetAccountPasswordChange),
"ENET_SECURITY_KICK" => Some(Self::EnetSecurityKick),
"ENET_LUA_SHELL_TIMEOUT" => Some(Self::EnetLuaShellTimeout),
"ENET_SDKFAIL_KICK" => Some(Self::EnetSdkfailKick),
"ENET_PACKET_COST_TIME" => Some(Self::EnetPacketCostTime),
"ENET_PACKET_UNION_FREQ" => Some(Self::EnetPacketUnionFreq),
"ENET_WAIT_SND_MAX" => Some(Self::EnetWaitSndMax),
"ENET_CLIENT_CONNECT_KEY" => Some(Self::EnetClientConnectKey),
"ENET_CLIENT_EDITOR_CONNECT_KEY" => Some(Self::EnetClientEditorConnectKey),
_ => None,
}
}
}