use crate::common::error::Result;
use crate::common::protocol::Frame;
use crate::common::protocol::flare::core::commands::notification_command::Type as NotifType;
use crate::common::protocol::flare::core::commands::payload_command::Type as PayloadType;
use crate::common::protocol::flare::core::commands::system_command::Type as SysType;
use crate::transport::events::ConnectionEvent;
#[async_trait::async_trait]
pub trait ClientEventHandler: Send + Sync {
async fn handle_system_command(
&self,
command_type: SysType,
frame: &Frame,
) -> Result<Option<Frame>> {
let _ = (command_type, frame);
Ok(None)
}
async fn handle_message_command(
&self,
command_type: PayloadType,
frame: &Frame,
) -> Result<Option<Frame>> {
let _ = (command_type, frame);
Ok(None)
}
async fn handle_notification_command(
&self,
command_type: NotifType,
frame: &Frame,
) -> Result<Option<Frame>> {
let _ = (command_type, frame);
Ok(None)
}
async fn handle_connection_event(&self, event: &ConnectionEvent) -> Result<()> {
let _ = event;
Ok(())
}
}