use netconnection::NetConnectionCommand;
use netstream::NetStreamCommand;
use on_status::OnStatus;
use scuffle_amf0::Amf0Value;
use scuffle_bytes_util::StringCow;
use serde_derive::Serialize;
pub mod error;
pub mod netconnection;
pub mod netstream;
pub mod on_status;
pub mod reader;
pub mod writer;
#[derive(Debug, Clone)]
pub struct Command<'a> {
pub transaction_id: f64,
pub command_type: CommandType<'a>,
}
#[derive(Debug, Clone)]
pub enum CommandType<'a> {
NetConnection(NetConnectionCommand<'a>),
NetStream(NetStreamCommand<'a>),
OnStatus(OnStatus<'a>),
Unknown(UnknownCommand<'a>),
}
#[derive(Debug, Clone)]
pub struct UnknownCommand<'a> {
pub command_name: StringCow<'a>,
pub values: Vec<Amf0Value<'static>>,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub enum CommandResultLevel {
Warning,
Status,
Error,
#[serde(untagged)]
Unknown(String),
}