|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILibrary
The library knows about all available medias. Roots can be added to the library. A background job scans all roots for medias. Clients can subscribe a library listener to be notified about changes in the library.
Clients must not implement.
EvolutionPlayerCore.getLibrary()
Nested Class Summary | |
---|---|
static class |
ILibrary.LibraryListener
A library listener can listen to changed to the library. |
Method Summary | |
---|---|
void |
addLibraryListener(ILibrary.LibraryListener listener)
Add the given listener as a library listener. |
void |
addMedia(MediaInfo media)
Adds the given media to the library. |
void |
addRoot(java.io.File file)
Add the given file to the roots and index it. |
MediaInfo |
getMedia(MediaId id)
Returns the media with the given id, if any. |
LocalMediaInfo[] |
getMedias()
Returns all found local medias. |
java.io.File[] |
getRoots()
All persisted roots. |
void |
indexRoot(java.io.File file)
Index the given file as a root, but do not add it to the roots. |
boolean |
isEmpty()
Returns true if the library is empty. |
void |
removeLibraryListener(ILibrary.LibraryListener listener)
Remove the given listener. |
void |
removeRoot(java.io.File file)
Remove the given file from the roots. |
Method Detail |
---|
boolean isEmpty()
LocalMediaInfo[] getMedias()
MediaInfo getMedia(MediaId id)
id
- the id of the media
void addMedia(MediaInfo media)
media
- the media to addjava.io.File[] getRoots()
void addRoot(java.io.File file)
This call returns immediately and the indexing happens in a background thread.
All added roots are persisted. If you want to index a
folder without adding it as a root see indexRoot(File)
.
file
- the file to add to rootvoid indexRoot(java.io.File file)
file
- the file to index as a rootvoid removeRoot(java.io.File file)
This call returns immediately and the removing happens in a background thread.
file
- the file to remove from the roots.void addLibraryListener(ILibrary.LibraryListener listener)
listener
- the listener to addvoid removeLibraryListener(ILibrary.LibraryListener listener)
listener
- the listener to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |