diff --git a/rnex-core/src/nex/datastore.rs b/rnex-core/src/nex/datastore.rs index e6b532e..30a6ff7 100644 --- a/rnex-core/src/nex/datastore.rs +++ b/rnex-core/src/nex/datastore.rs @@ -5,24 +5,12 @@ use std::sync::{Weak}; use rnex_core::PID; use rnex_core::nex::remote_console::RemoteConsole; use rnex_core::rmc::response::ErrorCode; +use rnex_core::rmc::protocols::secure::{Secure, RawSecure, RawSecureInfo, RemoteSecure}; use rnex_core::rmc::protocols::datastore::{GetMetaInfo, GetMetaParam}; use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore}; +use crate::nex::user::User; -define_rmc_proto!( - proto DataStoreUser { - DataStore - } -); - -#[rmc_struct(DataStoreUser)] -pub struct DataStoreUser { - pub pid: PID, - pub ip: PRUDPSockAddr, - pub this: Weak, - pub remote: RemoteConsole, -} - -impl DataStore for DataStoreUser { +impl DataStore for User { async fn get_meta(&self, metaparam: GetMetaParam) -> Result { // // bogus // let info: GetMetaInfo = GetMetaInfo { diff --git a/rnex-core/src/nex/user.rs b/rnex-core/src/nex/user.rs index c86ae73..f271355 100644 --- a/rnex-core/src/nex/user.rs +++ b/rnex-core/src/nex/user.rs @@ -26,6 +26,7 @@ use rnex_core::rmc::protocols::matchmake_extension::{ }; use rnex_core::rmc::protocols::ranking::{Ranking, RawRanking, RawRankingInfo, RemoteRanking}; use rnex_core::rmc::protocols::secure::{RawSecure, RawSecureInfo, RemoteSecure, Secure}; +use rnex_core::rmc::protocols::datastore::{DataStore, RawDataStore, RawDataStoreInfo, RemoteDataStore}; use rnex_core::rmc::response::ErrorCode; use rnex_core::rmc::structures::any::Any; use rnex_core::rmc::structures::matchmake::{ @@ -51,7 +52,8 @@ define_rmc_proto!( MatchmakeExt, Matchmake, NatTraversal, - Ranking + Ranking, + DataStore } );