more module mess
This commit is contained in:
parent
9f88a81c2a
commit
8ce9152aa8
|
|
@ -1,7 +1,6 @@
|
|||
// pub mod chat_manager;
|
||||
pub mod client;
|
||||
pub mod client_manager;
|
||||
mod event;
|
||||
mod lua;
|
||||
pub mod messages;
|
||||
pub mod network_manager;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
use crate::event::Event;
|
||||
use crate::event::EventResult;
|
||||
use crate::plugin::plugin_interface::IPluginInterface;
|
||||
use crate::plugin::PluginInterface;
|
||||
use foundation::event::Event;
|
||||
use foundation::event::EventResult;
|
||||
use foundation::event::IResponder;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::Weak;
|
||||
|
||||
use futures::channel::oneshot::Receiver;
|
||||
|
||||
|
|
@ -135,3 +137,12 @@ impl IPluginInterface for PluginEntry {
|
|||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl IResponder for PluginEntry {
|
||||
fn on_event(&self, _: foundation::event::Event) {
|
||||
todo!()
|
||||
}
|
||||
fn get_next(&self) -> Option<Weak<dyn IResponder>> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
use crate::event::Event;
|
||||
use crate::event::EventResult;
|
||||
use foundation::event::Event;
|
||||
use foundation::event::EventResult;
|
||||
use foundation::event::IResponder;
|
||||
use std::fmt::Debug;
|
||||
use std::sync::Arc;
|
||||
use std::sync::Weak;
|
||||
|
|
@ -9,6 +10,6 @@ use futures::channel::oneshot::Receiver;
|
|||
pub type WeakPluginInterface = Weak<dyn IPluginInterface>;
|
||||
pub(crate) type PluginInterface = Arc<dyn IPluginInterface>;
|
||||
|
||||
pub trait IPluginInterface: Send + Sync + Debug {
|
||||
pub trait IPluginInterface: IResponder + Send + Sync + Debug {
|
||||
fn send_event(&self, event: Event) -> Receiver<EventResult>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue