placeholder for Friends3DS proto
Some checks failed
Build and Test / minecraft-wiiu (push) Has been cancelled
Build and Test / wii-u-chat (push) Has been cancelled
Build and Test / fast-racing-neo (push) Has been cancelled
Build and Test / mario-tennis (push) Has been cancelled
Build and Test / wii-sports-club (push) Has been cancelled
Build and Test / super-mario-maker (push) Has been cancelled
Build and Test / splatoon (push) Has been cancelled
Build and Test / sonic-transformed (push) Has been cancelled
Build and Test / friends (push) Has been cancelled
Build and Test / puyopuyo (push) Has been cancelled
Build and Test / splatoon-testfire (push) Has been cancelled

This commit is contained in:
red binder 2026-06-23 12:10:55 +02:00
commit 929516da5a
3 changed files with 120 additions and 7 deletions

10
Cargo.lock generated
View file

@ -1693,7 +1693,7 @@ dependencies = [
"libc",
"percent-encoding",
"pin-project-lite",
"socket2 0.5.10",
"socket2 0.6.3",
"tokio",
"tower-service",
"tracing",
@ -2091,9 +2091,9 @@ checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084"
[[package]]
name = "nex-account"
version = "0.2.0"
version = "0.2.1"
source = "sparse+https://crates.spbr.net/api/v1/crates/"
checksum = "10e60c4ce2c2fd11862b85dd0176e0de57b4e9057b78ee98d9b00c82fa978601"
checksum = "51215ae67dfb36017956435ee4935bd62d64b62a8dd716c4614e11c8c29f941e"
dependencies = [
"hmac 0.13.0",
"log",
@ -3595,7 +3595,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
dependencies = [
"fastrand",
"getrandom 0.4.2",
"getrandom 0.3.4",
"once_cell",
"rustix",
"windows-sys 0.61.2",
@ -4237,7 +4237,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
"windows-sys 0.48.0",
"windows-sys 0.61.2",
]
[[package]]

View file

@ -37,7 +37,7 @@ urlencoding = "2.1.3"
futures = "0.3.32"
async-trait = "0.1.89"
ctor = "1.0.7"
nex-account = { version = "0.2.0", registry = "spbr" }
nex-account = { version = "0.2.1", registry = "spbr" }
tonic = "0.14.6"
[dev-dependencies]

View file

@ -16,6 +16,9 @@ use rnex_core::rmc::protocols::account_management::{
use rnex_core::rmc::protocols::friends_wiiu::{
FriendsWiiU, RawFriendsWiiU, RawFriendsWiiUInfo, RemoteFriendsWiiU,
};
use rnex_core::rmc::protocols::friends_3ds::{
Friends3DS, RawFriends3DS, RawFriends3DSInfo, RemoteFriends3DS,
};
use rnex_core::rmc::protocols::nintendo_notification::{
NintendoNotification, RawNintendoNotification, RawNintendoNotificationInfo,
RemoteNintendoNotification,
@ -56,11 +59,13 @@ use crate::executables::common::get_db;
use nex_account::derive_pid_hmac;
use nex_account::grpc::ActCreateInfo;
use nex_account::grpc::nex_account_service_client::NexAccountServiceClient;
use crate::rmc::protocols::friends_3ds::{FriendComment, FriendMii, FriendMiiList, FriendPersistentInfo, FriendPicture, FriendPresence, FriendRelationship, Mii, MiiList, MyProfile, NintendoPresence, PlayedGame};
define_rmc_proto!(
proto FriendsUser{
Secure,
FriendsWiiU
FriendsWiiU,
Friends3DS
}
);
define_rmc_proto!(
@ -120,6 +125,114 @@ impl FriendsManager {
}
}
// ALL of this is stubbed
impl Friends3DS for FriendsUser {
async fn update_profile(&self, profile: MyProfile) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_mii(&self, profile: Mii) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_mii_list(&self, profile: MiiList) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_played_games(&self, profile: Vec<PlayedGame>) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_preference(&self, show_online_status: bool, show_current_title: bool, block_friend_requests: bool) -> Result<(), ErrorCode> {
// stubbed
Ok(())
}
async fn get_friend_mii(&self, friends: Vec<crate::rmc::protocols::friends_3ds::FriendInfo>) -> Result<Vec<FriendMii>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_mii_list(&self, friends: Vec<crate::rmc::protocols::friends_3ds::FriendInfo>) -> Result<Vec<FriendMiiList>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn is_active_game(&self, unk: Vec<u32>, game_key: crate::rmc::protocols::friends_3ds::GameKey) -> Result<Vec<u32>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_principal_id_by_local_friend_code(&self, unk1: u64, unk2: Vec<u64>) -> Result<Vec<FriendRelationship>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_relationships(&self, unk2: Vec<u32>) -> Result<Vec<FriendRelationship>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn add_friend_by_pid(&self, unk: u64, pid: PID) -> Result<FriendRelationship, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn add_friend_by_lst_pid(&self, unk: u64, pid: Vec<PID>) -> Result<Vec<FriendRelationship>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn remove_friend_by_local_code(&self, local_code: u64) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn remove_friend_by_pid(&self, pid: PID) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_all_friends(&self) -> Result<Vec<FriendRelationship>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_blacklist(&self) -> Result<(), ErrorCode> {
Ok(())
}
async fn sync_friend(&self, unk1: u64, unk2: Vec<u32>, unk3: Vec<u64>) -> Result<Vec<FriendRelationship>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn update_presence(&self, nintendo_presence: NintendoPresence, unk: bool) -> Result<(), ErrorCode> {
Ok(())
}
async fn update_favorite_game_key(&self, game_key: crate::rmc::protocols::friends_3ds::GameKey) -> Result<(), ErrorCode> {
Ok(())
}
async fn update_comment(&self, comment: String) -> Result<(), ErrorCode> {
Ok(())
}
async fn update_picture(&self, unk: u32, picture: Vec<u8>) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_presence(&self, unk: Vec<u32>) -> Result<Vec<FriendPresence>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_comment(&self, unk: Vec<crate::rmc::protocols::friends_3ds::FriendInfo>) -> Result<Vec<FriendComment>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_picture(&self, unk: Vec<u32>) -> Result<Vec<FriendPicture>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn get_friend_persistent_info(&self, unk: Vec<u32>) -> Result<Vec<FriendPersistentInfo>, ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
async fn send_invitation(&self, unk: Vec<u32>) -> Result<(), ErrorCode> {
Err(ErrorCode::Core_NotImplemented)
}
}
impl FriendsWiiU for FriendsUser {
async fn update_and_get_all_information(
&self,