com.evolution.player.core.media.loader
Class MusicLoader

java.lang.Object
  extended by com.evolution.player.core.media.loader.MusicLoader
Direct Known Subclasses:
UIMusicLoader

public abstract class MusicLoader
extends java.lang.Object

A music loader can download medias from some remote source.

Clients must implement.

Since:
0.6
See Also:
SearchProvider

Constructor Summary
MusicLoader()
           
 
Method Summary
abstract  boolean canHandle(DownloadableMedia media)
          Can this music provider handle the given media?
abstract  Download[] dowload(DownloadableMedia[] medias)
          Create a download for each of the given medias.
abstract  java.lang.String getName()
          A human readable name for this music loader.
abstract  boolean isFreeDownload(DownloadableMedia media)
          Is downloading the given media free of any charge? This is only called if canHandle(DownloadableMedia) returns true for the same media.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicLoader

public MusicLoader()
Method Detail

getName

public abstract java.lang.String getName()
A human readable name for this music loader.

Returns:
the name

canHandle

public abstract boolean canHandle(DownloadableMedia media)
Can this music provider handle the given media?

Parameters:
media - the media to inspect
Returns:
true if this can handle the given media

isFreeDownload

public abstract boolean isFreeDownload(DownloadableMedia media)
Is downloading the given media free of any charge? This is only called if canHandle(DownloadableMedia) returns true for the same media.

Parameters:
media - the media to inspect
Returns:
true if the given media downloadable free of charge

dowload

public abstract Download[] dowload(DownloadableMedia[] medias)
Create a download for each of the given medias. The caller is allowed to open a dialog if necessary. For each media in the set canHandle(DownloadableMedia) returns true for the same media.

Parameters:
medias - all medias to download.
Returns:
the downloads for the medias