Merge branch 'friendsfix' into 'v0'

Friendsfix

See merge request spfn/rust-nex!6
This commit is contained in:
Maple 2026-04-12 21:33:57 +02:00
commit a09c1c3d79
6 changed files with 153 additions and 23 deletions

View file

@ -1,4 +1,30 @@
use macros::rmc_proto;
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};
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct NintendoCreateAccountData {
pub nna_info: NNAInfo,
pub nex_token: String,
pub birthday: KerberosDateTime,
pub unk: u64,
}
#[rmc_proto(25)]
pub trait AccountManagement {}
pub trait AccountManagement {
#[method_id(27)]
async fn nintendo_create_account(
&self,
principal_name: String,
key: String,
groups: u32,
email: String,
auth_data: Any,
) -> Result<(PID, String), ErrorCode>;
}

View file

@ -2,7 +2,7 @@ use macros::{RmcSerialize, method_id, rmc_proto};
use rnex_core::{kerberos::KerberosDateTime, rmc::response::ErrorCode};
#[derive(RmcSerialize)]
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct MiiV2 {
pub name: String,
@ -12,7 +12,7 @@ pub struct MiiV2 {
pub date_time: KerberosDateTime,
}
#[derive(RmcSerialize)]
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct PrincipalBasicInfo {
pub pid: u32,
@ -21,7 +21,7 @@ pub struct PrincipalBasicInfo {
pub unk: u8,
}
#[derive(RmcSerialize)]
#[derive(RmcSerialize, Debug, Clone)]
#[rmc_struct(0)]
pub struct NNAInfo {
pub principal_basic_info: PrincipalBasicInfo,
@ -143,4 +143,6 @@ pub trait Friends {
),
ErrorCode,
>;
#[method_id(19)]
async fn check_setting_status(&self) -> Result<u8, ErrorCode>;
}