All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.bjoernpetersen.musicbot.spi.loader.SongLoader.kt Maven / Gradle / Ivy

There is a newer version: 0.25.0
Show newest version
package net.bjoernpetersen.musicbot.spi.loader

import net.bjoernpetersen.musicbot.api.player.Song
import net.bjoernpetersen.musicbot.spi.plugin.Provider

/**
 * Responsible for loading songs by calling [Provider.loadSong].
 */
interface SongLoader {

    /**
     * Loads the specified [song] using the specified [provider].
     *
     * @param provider a provider capable of loading [song]
     * @param song a song to be loaded
     * @return a future eventually yielding the result of [Provider.loadSong]
     */
    suspend fun load(provider: Provider, song: Song): Resource

    suspend fun close()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy