com.evolution.player.core.media
Class MusicProvider

java.lang.Object
  extended by com.evolution.player.core.media.MusicProvider
Direct Known Subclasses:
EncryptingMusicProvider

public abstract class MusicProvider
extends java.lang.Object

A music provider provides music to be shared in the evolution player network. A music provider must be able to verify that a given media which he can handle is provided by the provider. A music provider can be contributed through the com.evolution.player.core.musicProvider extension point defined in the com.evolution.player.core plugin.

Clients must implement.

Since:
0.5

Constructor Summary
MusicProvider()
           
 
Method Summary
abstract  boolean canHandle(LocalMediaInfo media)
          True if this music provider can verify the given media.
abstract  boolean verify(LocalMediaInfo media, IProgressMonitor monitor)
          Verify that the given media is indeed provided by this music provider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicProvider

public MusicProvider()
Method Detail

canHandle

public abstract boolean canHandle(LocalMediaInfo media)
True if this music provider can verify the given media.

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

verify

public abstract boolean verify(LocalMediaInfo media,
                               IProgressMonitor monitor)
Verify that the given media is indeed provided by this music provider. This can be a long running operation. This is only called if canHandle(LocalMediaInfo) returns true for the same media.

Parameters:
media - the media to verify
monitor - the progress monitor to report progress to
Returns:
true if the media was provided by this provider false otherwise