package honk.tools.anidb;

import java.util.List;

/**
 * Encapsules the connection to AniDB
 * @author honk
 */
public interface AniDBConnection {
  
    /**
     * Returns the FileInfo for the given file identified by size and ed2k hash.
     * @param size the file size
     * @param hash the file's ed2k hash
     * @return the FileInfo for the given file identified by size and ed2k hash, or null, if no such element exists.
     */
    FileInfo getFile(int size, String hash);

    /**
     * Returns the AnimeInfo for the anime specified by the given id.
     * @param aid the anime's id
     * @return the AnimeInfo for the anime specified by the given id, or null, if no such element exists.
     */
    AnimeInfo getAnime(int aid);
    

    
    /**
     * Returns a list of all locally known anime ids.
     * @return a list of all locally known anime ids.
     */
    List<Integer> getAnimes();

    /**
     * Changes the prefered name of an anime.
     * @param aid the anime's id
     * @param string the new prefered name
     */
    void changePreferedName(int aid, String string);
}
