use samplic::{
    Curve, DeviceDescription, DirectoryListing, Icon, MeasurementMetadata,
    MeasurementResults, ProfileDescription, SampleMetadata,
    SamplingDescription, Translation, UnitDescription,
};
use {Result, Uuid};

pub trait LoadableDevice {
    fn load_unit_index(&self) -> Result<DirectoryListing>;

    fn load_unit(&self, unit_id: &str) -> Result<UnitDescription>;

    fn load_translation_index(&self) -> Result<DirectoryListing>;

    fn load_translation(
        &self,
        translation_id: &str,
    ) -> Result<Translation>;

    fn load_sample_metadata(
        &self,
        sample_id: &Uuid,
    ) -> Result<SampleMetadata>;

    fn load_measurement_metadata(
        &self,
        sample_id: &Uuid,
        measurement_index: usize,
    ) -> Result<MeasurementMetadata>;

    fn load_curve(
        &self,
        sample_id: &Uuid,
        measurement_index: usize,
        curve_id: &str,
    ) -> Result<Curve>;

    fn load_curve_index(
        &self,
        sample_id: &Uuid,
        measurement_index: usize,
    ) -> Result<DirectoryListing>;

    fn load_results(
        &self,
        sample_id: &Uuid,
        measurement_index: usize,
    ) -> Result<MeasurementResults>;

    fn load_sampling_index(&self) -> Result<DirectoryListing>;

    fn load_measurement_index(
        &self,
        sample_id: &Uuid,
    ) -> Result<DirectoryListing>;

    fn load_sample_index(&self) -> Result<DirectoryListing>;

    fn load_device_description(&self) -> Result<DeviceDescription>;

    fn load_profile(
        &self,
        profile_id: &Uuid,
    ) -> Result<ProfileDescription>;

    fn load_profile_index(&self) -> Result<DirectoryListing>;

    fn load_sampling(
        &self,
        sampling_id: &str,
    ) -> Result<SamplingDescription>;

    fn load_icon(&self, icon_id: &str) -> Result<Icon>;

    fn load_icon_index(&self) -> Result<DirectoryListing>;
}
