use crate::methods::*;
use crate::prelude::*;

pub struct Interfaces {
    pub core: sys::IDiscordCore,
    pub applications: sys::IDiscordApplicationManager,
    pub users: sys::IDiscordUserManager,
    pub images: sys::IDiscordImageManager,
    pub activities: sys::IDiscordActivityManager,
    pub relationships: sys::IDiscordRelationshipManager,
    pub lobbies: sys::IDiscordLobbyManager,
    pub networking: sys::IDiscordNetworkManager,
    pub overlay: sys::IDiscordOverlayManager,
    pub storage: sys::IDiscordStorageManager,
    pub store: sys::IDiscordStoreManager,
    pub voice: sys::IDiscordVoiceManager,
    pub achievements: sys::IDiscordAchievementManager,
}

pub const INTERFACES: Interfaces = Interfaces {
    core: sys::IDiscordCore {
        destroy: Some(core::destroy),
        run_callbacks: Some(core::run_callbacks),
        set_log_hook: Some(core::set_log_hook),
        get_application_manager: Some(core::get_application_manager),
        get_user_manager: Some(core::get_user_manager),
        get_image_manager: Some(core::get_image_manager),
        get_activity_manager: Some(core::get_activity_manager),
        get_relationship_manager: Some(core::get_relationship_manager),
        get_lobby_manager: Some(core::get_lobby_manager),
        get_network_manager: Some(core::get_network_manager),
        get_overlay_manager: Some(core::get_overlay_manager),
        get_storage_manager: Some(core::get_storage_manager),
        get_store_manager: Some(core::get_store_manager),
        get_voice_manager: Some(core::get_voice_manager),
        get_achievement_manager: Some(core::get_achievement_manager),
    },

    applications: sys::IDiscordApplicationManager {
        validate_or_exit: Some(applications::validate_or_exit),
        get_current_locale: Some(applications::get_current_locale),
        get_current_branch: Some(applications::get_current_branch),
        get_oauth2_token: Some(applications::get_oauth2_token),
        get_ticket: Some(applications::get_ticket),
    },

    users: sys::IDiscordUserManager {
        get_current_user: Some(users::get_current_user),
        get_user: Some(users::get_user),
        get_current_user_premium_type: Some(users::get_current_user_premium_type),
        current_user_has_flag: Some(users::current_user_has_flag),
    },

    images: sys::IDiscordImageManager {
        fetch: Some(images::fetch),
        get_dimensions: Some(images::get_dimensions),
        get_data: Some(images::get_data),
    },

    activities: sys::IDiscordActivityManager {
        register_command: Some(activities::register_command),
        register_steam: Some(activities::register_steam),
        update_activity: Some(activities::update_activity),
        clear_activity: Some(activities::clear_activity),
        send_request_reply: Some(activities::send_request_reply),
        send_invite: Some(activities::send_invite),
        accept_invite: Some(activities::accept_invite),
    },

    relationships: sys::IDiscordRelationshipManager {
        filter: Some(relationships::filter),
        count: Some(relationships::count),
        get: Some(relationships::get),
        get_at: Some(relationships::get_at),
    },

    lobbies: sys::IDiscordLobbyManager {
        get_lobby_create_transaction: Some(lobbies::get_lobby_create_transaction),
        get_lobby_update_transaction: Some(lobbies::get_lobby_update_transaction),
        get_member_update_transaction: Some(lobbies::get_member_update_transaction),
        create_lobby: Some(lobbies::create_lobby),
        update_lobby: Some(lobbies::update_lobby),
        delete_lobby: Some(lobbies::delete_lobby),
        connect_lobby: Some(lobbies::connect_lobby),
        connect_lobby_with_activity_secret: Some(lobbies::connect_lobby_with_activity_secret),
        disconnect_lobby: Some(lobbies::disconnect_lobby),
        get_lobby: Some(lobbies::get_lobby),
        get_lobby_activity_secret: Some(lobbies::get_lobby_activity_secret),
        get_lobby_metadata_value: Some(lobbies::get_lobby_metadata_value),
        get_lobby_metadata_key: Some(lobbies::get_lobby_metadata_key),
        lobby_metadata_count: Some(lobbies::lobby_metadata_count),
        member_count: Some(lobbies::member_count),
        get_member_user_id: Some(lobbies::get_member_user_id),
        get_member_user: Some(lobbies::get_member_user),
        get_member_metadata_value: Some(lobbies::get_member_metadata_value),
        get_member_metadata_key: Some(lobbies::get_member_metadata_key),
        member_metadata_count: Some(lobbies::member_metadata_count),
        update_member: Some(lobbies::update_member),
        send_lobby_message: Some(lobbies::send_lobby_message),
        get_search_query: Some(lobbies::get_search_query),
        search: Some(lobbies::search),
        lobby_count: Some(lobbies::lobby_count),
        get_lobby_id: Some(lobbies::get_lobby_id),
        connect_voice: Some(lobbies::connect_voice),
        disconnect_voice: Some(lobbies::disconnect_voice),
        connect_network: Some(lobbies::connect_network),
        disconnect_network: Some(lobbies::disconnect_network),
        flush_network: Some(lobbies::flush_network),
        open_network_channel: Some(lobbies::open_network_channel),
        send_network_message: Some(lobbies::send_network_message),
    },

    networking: sys::IDiscordNetworkManager {
        get_peer_id: Some(networking::get_peer_id),
        flush: Some(networking::flush),
        open_peer: Some(networking::open_peer),
        update_peer: Some(networking::update_peer),
        close_peer: Some(networking::close_peer),
        open_channel: Some(networking::open_channel),
        close_channel: Some(networking::close_channel),
        send_message: Some(networking::send_message),
    },

    overlay: sys::IDiscordOverlayManager {
        is_enabled: Some(overlay::is_enabled),
        is_locked: Some(overlay::is_locked),
        set_locked: Some(overlay::set_locked),
        open_activity_invite: Some(overlay::open_activity_invite),
        open_guild_invite: Some(overlay::open_guild_invite),
        open_voice_settings: Some(overlay::open_voice_settings),
    },

    storage: sys::IDiscordStorageManager {
        read: Some(storage::read),
        read_async: Some(storage::read_async),
        read_async_partial: Some(storage::read_async_partial),
        write: Some(storage::write),
        write_async: Some(storage::write_async),
        delete_: Some(storage::delete_),
        exists: Some(storage::exists),
        count: Some(storage::count),
        stat: Some(storage::stat),
        stat_at: Some(storage::stat_at),
        get_path: Some(storage::get_path),
    },

    store: sys::IDiscordStoreManager {
        fetch_skus: Some(store::fetch_skus),
        count_skus: Some(store::count_skus),
        get_sku: Some(store::get_sku),
        get_sku_at: Some(store::get_sku_at),
        fetch_entitlements: Some(store::fetch_entitlements),
        count_entitlements: Some(store::count_entitlements),
        get_entitlement: Some(store::get_entitlement),
        get_entitlement_at: Some(store::get_entitlement_at),
        has_sku_entitlement: Some(store::has_sku_entitlement),
        start_purchase: Some(store::start_purchase),
    },

    voice: sys::IDiscordVoiceManager {
        get_input_mode: Some(voice::get_input_mode),
        set_input_mode: Some(voice::set_input_mode),
        is_self_mute: Some(voice::is_self_mute),
        set_self_mute: Some(voice::set_self_mute),
        is_self_deaf: Some(voice::is_self_deaf),
        set_self_deaf: Some(voice::set_self_deaf),
        is_local_mute: Some(voice::is_local_mute),
        set_local_mute: Some(voice::set_local_mute),
        get_local_volume: Some(voice::get_local_volume),
        set_local_volume: Some(voice::set_local_volume),
    },

    achievements: sys::IDiscordAchievementManager {
        set_user_achievement: Some(achievements::set_user_achievement),
        fetch_user_achievements: Some(achievements::fetch_user_achievements),
        count_user_achievements: Some(achievements::count_user_achievements),
        get_user_achievement: Some(achievements::get_user_achievement),
        get_user_achievement_at: Some(achievements::get_user_achievement_at),
    },
};
