V0 #1
2 changed files with 36 additions and 3 deletions
start work on implementing account management for friends
commit
3c651e874c
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue