add utility protocol
This commit is contained in:
parent
28670c09ef
commit
5972833136
3 changed files with 26 additions and 0 deletions
|
|
@ -11,6 +11,9 @@ use rnex_core::prudp::station_url::UrlOptions::{
|
||||||
use rnex_core::rmc::protocols::matchmake::{
|
use rnex_core::rmc::protocols::matchmake::{
|
||||||
Matchmake, RawMatchmake, RawMatchmakeInfo, RemoteMatchmake,
|
Matchmake, RawMatchmake, RawMatchmakeInfo, RemoteMatchmake,
|
||||||
};
|
};
|
||||||
|
use rnex_core::rmc::protocols::util::{
|
||||||
|
Utility, RawUtility, RawUtilityInfo, RemoteUtility,
|
||||||
|
};
|
||||||
use rnex_core::rmc::protocols::matchmake_ext::{
|
use rnex_core::rmc::protocols::matchmake_ext::{
|
||||||
MatchmakeExt, RawMatchmakeExt, RawMatchmakeExtInfo, RemoteMatchmakeExt,
|
MatchmakeExt, RawMatchmakeExt, RawMatchmakeExtInfo, RemoteMatchmakeExt,
|
||||||
};
|
};
|
||||||
|
|
@ -65,6 +68,7 @@ cfg_if! {
|
||||||
Matchmake,
|
Matchmake,
|
||||||
NatTraversal,
|
NatTraversal,
|
||||||
Ranking,
|
Ranking,
|
||||||
|
Utility,
|
||||||
DataStore
|
DataStore
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -76,6 +80,7 @@ cfg_if! {
|
||||||
MatchmakeExt,
|
MatchmakeExt,
|
||||||
Matchmake,
|
Matchmake,
|
||||||
NatTraversal,
|
NatTraversal,
|
||||||
|
Utility,
|
||||||
Ranking
|
Ranking
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
@ -767,6 +772,12 @@ fn fetch_team_votes(fest_id: u32) -> Result<Vec<u32>, ErrorCode> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Utility for User{
|
||||||
|
async fn acquire_nex_unique_id(&self) -> Result<u64, ErrorCode>{
|
||||||
|
return Ok(rand::random())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Ranking for User {
|
impl Ranking for User {
|
||||||
async fn competition_ranking_get_param(
|
async fn competition_ranking_get_param(
|
||||||
&self,
|
&self,
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ pub mod nintendo_notification;
|
||||||
pub mod notifications;
|
pub mod notifications;
|
||||||
pub mod ranking;
|
pub mod ranking;
|
||||||
pub mod secure;
|
pub mod secure;
|
||||||
|
pub mod util;
|
||||||
|
|
||||||
use crate::result::ResultExtension;
|
use crate::result::ResultExtension;
|
||||||
use crate::rmc::message::RMCMessage;
|
use crate::rmc::message::RMCMessage;
|
||||||
|
|
|
||||||
14
rnex-core/src/rmc/protocols/util.rs
Normal file
14
rnex-core/src/rmc/protocols/util.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
use macros::{RmcSerialize, method_id, rmc_proto};
|
||||||
|
|
||||||
|
use rnex_core::{
|
||||||
|
PID,
|
||||||
|
rmc::{response::ErrorCode, structures::any::Any},
|
||||||
|
};
|
||||||
|
|
||||||
|
use crate::{kerberos::KerberosDateTime, rmc::protocols::friends::NNAInfo};
|
||||||
|
|
||||||
|
#[rmc_proto(110)]
|
||||||
|
pub trait Utility {
|
||||||
|
#[method_id(1)]
|
||||||
|
async fn acquire_nex_unique_id(&self) -> Result<u64, ErrorCode>;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue