add utility protocol
Some checks failed
Build and Test / friends (push) Successful in 4m54s
Build and Test / super-mario-maker (push) Failing after 14m33s
Build and Test / splatoon (push) Failing after 5m11s
Build and Test / wii-u-chat (push) Successful in 4m24s

This commit is contained in:
Maple Nebel 2026-04-28 22:56:36 +02:00
commit 5972833136
3 changed files with 26 additions and 0 deletions

View file

@ -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,

View file

@ -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;

View 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>;
}