use crate::{
core::{
entities::{
network_interface::NetworkInterface, system_information::SystemInformation,
system_version::SystemVersion,
},
error::Result,
},
memory::{readable::Readable, virtual_address::VirtualAddress},
};
use std::{any::Any, sync::Arc};
pub trait OperatingSystem: Send + Sync + Any {
fn get_os_version(&self) -> Result<SystemVersion>;
fn get_system_information(&self) -> Result<SystemInformation>;
fn iter_network_interfaces(
&self,
) -> Result<Box<dyn Iterator<Item = Result<NetworkInterface>> + '_>>;
fn get_file_reader(&self, file: VirtualAddress) -> Result<Arc<dyn Readable>>;
fn as_any_arc(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;
}