use crate::prelude::*;

pub unsafe extern "C" fn read(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    data: *mut u8,
    data_length: u32,
    read: *mut u32,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn read_async(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    callback_data: *mut c_void,
    callback: Option<
        unsafe extern "C" fn(
            callback_data: *mut c_void,
            result: sys::EDiscordResult,
            data: *mut u8,
            data_length: u32,
        ),
    >,
) {
    prevent_unwind!();
}

pub unsafe extern "C" fn read_async_partial(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    offset: u64,
    length: u64,
    callback_data: *mut c_void,
    callback: Option<
        unsafe extern "C" fn(
            callback_data: *mut c_void,
            result: sys::EDiscordResult,
            data: *mut u8,
            data_length: u32,
        ),
    >,
) {
    prevent_unwind!();
}

pub unsafe extern "C" fn write(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    data: *mut u8,
    data_length: u32,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn write_async(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    data: *mut u8,
    data_length: u32,
    callback_data: *mut c_void,
    callback: Option<unsafe extern "C" fn(callback_data: *mut c_void, result: sys::EDiscordResult)>,
) {
    prevent_unwind!();
}

pub unsafe extern "C" fn delete_(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn exists(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    exists: *mut bool,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn count(manager: *mut sys::IDiscordStorageManager, count: *mut i32) {}

pub unsafe extern "C" fn stat(
    manager: *mut sys::IDiscordStorageManager,
    name: *const i8,
    stat: *mut sys::DiscordFileStat,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn stat_at(
    manager: *mut sys::IDiscordStorageManager,
    index: i32,
    stat: *mut sys::DiscordFileStat,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}

pub unsafe extern "C" fn get_path(
    manager: *mut sys::IDiscordStorageManager,
    path: *mut sys::DiscordPath,
) -> sys::EDiscordResult {
    prevent_unwind!();
    sys::DiscordResult_Ok
}
