Friendsfix #6

Merged
RusticMaple merged 8 commits from friendsfix into v0 2026-04-12 21:33:58 +02:00
2 changed files with 36 additions and 3 deletions
Showing only changes of commit 3c651e874c - Show all commits

start work on implementing account management for friends

Maple 2026-04-12 18:05:52 +02:00

View file

@ -2,6 +2,9 @@ use std::sync::{Arc, atomic::AtomicU32};
use log::info;
use macros::rmc_struct;
use rnex_core::rmc::protocols::account_management::{
AccountManagement, RawAccountManagement, RawAccountManagementInfo, RemoteAccountManagement,
};
use rnex_core::rmc::protocols::friends::{Friends, RawFriends, RawFriendsInfo, RemoteFriends};
use rnex_core::rmc::protocols::secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure};
use rnex_core::{
@ -32,7 +35,8 @@ define_rmc_proto!(
);
define_rmc_proto!(
proto FriendsGuest{
Secure
Secure,
AccountManagement
}
);
#[rmc_struct(FriendsUser)]
@ -198,3 +202,17 @@ impl Secure for FriendsGuest {
Err(ErrorCode::Core_NotImplemented)
}
}
impl AccountManagement for FriendsGuest {
async fn nintendo_create_account(
&self,
principal_name: String,
key: String,
groups: u32,
email: String,
auth_data: Any,
) -> Result<(PID, String), ErrorCode> {
println!("{}, {}, {}, {}", principal_name, key, groups, email);
Err(ErrorCode::Core_NotImplemented)
}
}

View file

@ -1,4 +1,19 @@
use macros::rmc_proto;
use macros::{method_id, rmc_proto};
use rnex_core::{
PID,
rmc::{response::ErrorCode, structures::any::Any},
};
#[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>;
}