progress
Some checks failed
Build and Test / super-mario-maker (push) Failing after 10m30s
Build and Test / fast-racing-neo (push) Failing after 11m40s
Build and Test / friends (push) Failing after 11m56s
Build and Test / wii-sports-club (push) Failing after 12m9s
Build and Test / splatoon (push) Failing after 12m14s
Build and Test / puyopuyo (push) Failing after 12m23s
Build and Test / wii-u-chat (push) Failing after 12m23s
Build and Test / mario-tennis (push) Failing after 12m23s
Build and Test / sonic-transformed (push) Failing after 12m23s
Build and Test / splatoon-testfire (push) Failing after 12m30s
Build and Test / minecraft-wiiu (push) Failing after 12m37s
Some checks failed
Build and Test / super-mario-maker (push) Failing after 10m30s
Build and Test / fast-racing-neo (push) Failing after 11m40s
Build and Test / friends (push) Failing after 11m56s
Build and Test / wii-sports-club (push) Failing after 12m9s
Build and Test / splatoon (push) Failing after 12m14s
Build and Test / puyopuyo (push) Failing after 12m23s
Build and Test / wii-u-chat (push) Failing after 12m23s
Build and Test / mario-tennis (push) Failing after 12m23s
Build and Test / sonic-transformed (push) Failing after 12m23s
Build and Test / splatoon-testfire (push) Failing after 12m30s
Build and Test / minecraft-wiiu (push) Failing after 12m37s
This commit is contained in:
parent
7dd502aa7a
commit
4ff0a5efcc
187 changed files with 4526 additions and 5132 deletions
22
rnex-protocols/msg-protos/src/lib.rs
Normal file
22
rnex-protocols/msg-protos/src/lib.rs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#![allow(async_fn_in_trait)]
|
||||
|
||||
pub mod message_delivery;
|
||||
pub mod messaging;
|
||||
use message_delivery::{
|
||||
MessageDelivery, MessageDeliveryNoResponse, RawMessageDelivery, RawMessageDeliveryInfo,
|
||||
RawMessageDeliveryNoResponse, RawMessageDeliveryNoResponseInfo, RemoteMessageDelivery,
|
||||
RemoteMessageDeliveryNoResponse,
|
||||
};
|
||||
use rnex_rmc::define_rmc_proto;
|
||||
|
||||
define_rmc_proto!(
|
||||
proto MessagingProtocol{
|
||||
MessageDelivery
|
||||
}
|
||||
);
|
||||
|
||||
define_rmc_proto!(
|
||||
proto MessagingClient{
|
||||
MessageDeliveryNoResponse
|
||||
}
|
||||
);
|
||||
14
rnex-protocols/msg-protos/src/message_delivery.rs
Normal file
14
rnex-protocols/msg-protos/src/message_delivery.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use rnex_rmc::{any::Any, method_id, response::ErrorCode, rmc_proto};
|
||||
|
||||
use crate::messaging::UserMessage;
|
||||
|
||||
#[rmc_proto(27)]
|
||||
pub trait MessageDelivery {
|
||||
#[method_id(1)]
|
||||
async fn deliver_message(&self, message: Any<UserMessage>) -> Result<(), ErrorCode>;
|
||||
}
|
||||
#[rmc_proto(27, NoReturn)]
|
||||
pub trait MessageDeliveryNoResponse {
|
||||
#[method_id(1)]
|
||||
async fn deliver_message(&self, message: Any<UserMessage>);
|
||||
}
|
||||
34
rnex-protocols/msg-protos/src/messaging.rs
Normal file
34
rnex-protocols/msg-protos/src/messaging.rs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
use rnex_rmc::{RmcSerialize, data::Data, qbuffer::QBuffer, util::date_time::DateTime};
|
||||
|
||||
#[derive(RmcSerialize, Debug, Clone)]
|
||||
#[rmc_struct(0)]
|
||||
pub struct UserMessage {
|
||||
#[extends]
|
||||
pub data: Data,
|
||||
pub id: u32,
|
||||
pub recipient_id: i32,
|
||||
pub recipient_type: u32,
|
||||
pub parent_id: u32,
|
||||
pub pid_sender: u32,
|
||||
pub receptiontime: DateTime,
|
||||
pub life_time: u32,
|
||||
pub flags: u32,
|
||||
pub subject: String,
|
||||
pub sender: String,
|
||||
}
|
||||
|
||||
#[derive(RmcSerialize, Debug, Clone)]
|
||||
#[rmc_struct(0)]
|
||||
pub struct TextMessage {
|
||||
#[extends]
|
||||
pub msg: UserMessage,
|
||||
pub text_body: String,
|
||||
}
|
||||
|
||||
#[derive(RmcSerialize, Debug, Clone)]
|
||||
#[rmc_struct(0)]
|
||||
pub struct BinaryMessage {
|
||||
#[extends]
|
||||
pub msg: UserMessage,
|
||||
pub text_body: QBuffer,
|
||||
}
|
||||
Loading…
Reference in a new issue