|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.atunes.kernel.handlers.DeviceHandler
public class DeviceHandler
The Class DeviceHandler.
| Method Summary | |
|---|---|
void |
connectDevice()
Connect device. |
void |
copyFilesToDevice(java.util.List<AudioFile> files)
Copy files to mp3 device. |
void |
deviceConnected(java.lang.String location)
Called when a device monitor detects a device connected. |
void |
deviceDisconnected(java.lang.String location)
Called when a device monitor detects a device disconnection. |
void |
disconnectDevice()
Disconnect device. |
void |
fillWithRandomSongs(long leaveFreeLong)
Fills the device with songs until the specified memory is left. |
java.util.Map<java.lang.String,Artist> |
getDeviceArtistAndAlbumStructure()
Gets the device artist and album structure. |
java.util.Map<java.lang.String,Folder> |
getDeviceFolderStructure()
Gets the device folder structure. |
java.util.Map<java.lang.String,Genre> |
getDeviceGenreStructure()
Gets the device's genre structure |
Repository |
getDeviceRepository()
Gets the device repository. |
java.util.List<AudioFile> |
getDeviceSongs()
Gets the device songs. |
static DeviceHandler |
getInstance()
Gets the single instance of DeviceHandler. |
boolean |
isDeviceConnected()
Checks if is device connected. |
boolean |
isDevicePath(java.lang.String path)
Checks if given file is in the device path. |
void |
notifyCopyFinish()
Called when finish copy to device. |
void |
notifyCurrentPath(java.lang.String path)
Notify current path. |
void |
notifyFileLoaded()
Notify file loaded. |
void |
notifyFilesInRepository(int files)
Notify files in repository. |
void |
notifyFinishRead(RepositoryLoader loader)
Notify finish read. |
void |
notifyFinishRefresh(RepositoryLoader loader)
Notify finish refresh. |
void |
notifyRemainingTime(long time)
Notify remaining time. |
void |
refreshDevice()
Refresh device. |
void |
retrieveDevice(java.io.File path)
Retrieve device. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static DeviceHandler getInstance()
public void fillWithRandomSongs(long leaveFreeLong)
leaveFreeLong - Memory to leave freepublic void connectDevice()
public void copyFilesToDevice(java.util.List<AudioFile> files)
files - Files to be written to a mp3 devicepublic void deviceConnected(java.lang.String location)
deviceConnected in interface DeviceConnectionListenerlocation - the locationpublic void deviceDisconnected(java.lang.String location)
deviceDisconnected in interface DeviceDisconnectionListenerlocation - the locationpublic void disconnectDevice()
public java.util.Map<java.lang.String,Artist> getDeviceArtistAndAlbumStructure()
public java.util.Map<java.lang.String,Genre> getDeviceGenreStructure()
public java.util.Map<java.lang.String,Folder> getDeviceFolderStructure()
public Repository getDeviceRepository()
public java.util.List<AudioFile> getDeviceSongs()
public boolean isDeviceConnected()
public boolean isDevicePath(java.lang.String path)
path - Absolute path of the file
public void notifyCopyFinish()
notifyCopyFinish in interface DeviceCopyFinishListenerpublic void notifyCurrentPath(java.lang.String path)
LoaderListener
notifyCurrentPath in interface LoaderListenerpath - the pathpublic void notifyFileLoaded()
LoaderListener
notifyFileLoaded in interface LoaderListenerpublic void notifyFilesInRepository(int files)
LoaderListener
notifyFilesInRepository in interface LoaderListenerfiles - the filespublic void notifyFinishRead(RepositoryLoader loader)
LoaderListener
notifyFinishRead in interface LoaderListenerloader - the loaderpublic void notifyFinishRefresh(RepositoryLoader loader)
LoaderListener
notifyFinishRefresh in interface LoaderListenerloader - the loaderpublic void notifyRemainingTime(long time)
LoaderListener
notifyRemainingTime in interface LoaderListenertime - the timepublic void refreshDevice()
public void retrieveDevice(java.io.File path)
path - the path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||