use crate::croc::Relay;
#[derive(Debug, Clone)]
pub struct Progress {
pub file_name: String,
pub percentage: u8,
pub bytes_sent: Option<u64>,
pub bytes_total: Option<u64>,
pub speed: Option<f64>,
}
#[derive(Debug, Clone)]
pub struct FileInfo {
pub name: String,
pub size: u64,
}
#[derive(Debug, Clone)]
pub enum CrocEvent {
Hashing(Progress),
SendingInfo(FileInfo),
ReceivingInfo(FileInfo),
CodeGenerated(String),
SendingTo(Relay),
ReceivingFrom(Relay),
Sending(Progress),
Receiving(Progress),
Done,
Unknown(String),
EOF,
}