use crate::impl_thread_safety;

#[cxx::bridge(namespace = "livekit")]
pub mod ffi {

    #[derive(Debug)]
    #[repr(i32)]
    pub enum MediaType {
        Audio,
        Video,
        Data,
        Unsupported,
    }

    #[derive(Debug)]
    #[repr(i32)]
    pub enum Priority {
        VeryLow,
        Low,
        Medium,
        High,
    }

    #[derive(Debug)]
    #[repr(i32)]
    pub enum RtpTransceiverDirection {
        SendRecv,
        SendOnly,
        RecvOnly,
        Inactive,
        Stopped,
    }

    unsafe extern "C++" {
        include!("livekit/webrtc.h");
        type RTCRuntime;

        fn create_random_uuid() -> String;

        fn create_rtc_runtime() -> SharedPtr<RTCRuntime>;
    }
}

impl_thread_safety!(ffi::RTCRuntime, Send + Sync);
