rust-nex/rnex-core/src/rmc/protocols/nintendo_notification.rs
2026-04-25 16:56:55 +02:00

39 lines
924 B
Rust

use macros::{RmcSerialize, method_id, rmc_proto};
use rnex_core::PID;
use rnex_core::rmc::structures::any::Any;
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoNotificationEvent {
pub event_type: u32,
pub sender: PID,
pub data: Any,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoNotificationEventGeneral {
pub param1: u32,
pub param2: u64,
pub param3: u64,
pub str_param: String,
}
#[derive(RmcSerialize)]
#[rmc_struct(0)]
pub struct NintendoNotificationEventProfile {
pub region: u8,
pub country: u8,
pub area: u8,
pub language: u8,
pub platform: u8,
}
#[rmc_proto(100, NoReturn)]
pub trait NintendoNotification {
#[method_id(1)]
async fn process_nintendo_notification_event_1(&self, notif: NintendoNotificationEvent);
#[method_id(2)]
async fn process_nintendo_notification_event_2(&self, notif: NintendoNotificationEvent);
}