forked from spacebar/rust-nex
fix auth and make console use no response version of message delivery
This commit is contained in:
parent
defa593138
commit
31ba751142
3 changed files with 18 additions and 3 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[registries]
|
||||||
|
spbr = { index = "sparse+https://crates.spbr.net/api/v1/crates/" }
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::define_rmc_proto;
|
use crate::define_rmc_proto;
|
||||||
use crate::rmc::protocols::message_delivery::{
|
use crate::rmc::protocols::message_delivery::{
|
||||||
MessageDelivery, RawMessageDelivery, RawMessageDeliveryInfo, RemoteMessageDelivery,
|
MessageDeliveryNoResponse, RawMessageDeliveryNoResponse, RawMessageDeliveryNoResponseInfo,
|
||||||
|
RemoteMessageDeliveryNoResponse,
|
||||||
};
|
};
|
||||||
use crate::rmc::protocols::nat_traversal::{
|
use crate::rmc::protocols::nat_traversal::{
|
||||||
NatTraversalConsole, RawNatTraversalConsole, RawNatTraversalConsoleInfo,
|
NatTraversalConsole, RawNatTraversalConsole, RawNatTraversalConsoleInfo,
|
||||||
|
|
@ -14,7 +15,7 @@ define_rmc_proto!(
|
||||||
proto Console{
|
proto Console{
|
||||||
Notification,
|
Notification,
|
||||||
NatTraversalConsole,
|
NatTraversalConsole,
|
||||||
MessageDelivery
|
MessageDeliveryNoResponse
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::rmc::structures::connection_data::{ConnectionData, ConnectionDataOld};
|
use crate::rmc::structures::connection_data::{ConnectionData, ConnectionDataOld};
|
||||||
|
use crate::rmc::structures::data::Data;
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use macros::{method_id, rmc_proto};
|
use macros::{RmcSerialize, method_id, rmc_proto};
|
||||||
use rnex_core::PID;
|
use rnex_core::PID;
|
||||||
use rnex_core::rmc::response::ErrorCode;
|
use rnex_core::rmc::response::ErrorCode;
|
||||||
use rnex_core::rmc::structures::any::Any;
|
use rnex_core::rmc::structures::any::Any;
|
||||||
|
|
@ -56,3 +57,14 @@ pub trait Auth {
|
||||||
// `LoginWithContext` is left out here because we don't need it right now and versioning still
|
// `LoginWithContext` is left out here because we don't need it right now and versioning still
|
||||||
// needs to be figured out
|
// needs to be figured out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(RmcSerialize)]
|
||||||
|
#[rmc_struct(0)]
|
||||||
|
struct AuthenticationInfo {
|
||||||
|
#[extends]
|
||||||
|
pub data: Data,
|
||||||
|
pub auth_token: String,
|
||||||
|
pub ngs_version: u32,
|
||||||
|
pub auth_token_type: u8,
|
||||||
|
pub server_version: u32,
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue