|
||||||||||
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 |
applicationFinish()
Called when closing application |
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. |
AudioFile |
getFileIfLoaded(java.lang.String fileName)
Gets the file if is in device |
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. |
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 DeviceConnectionListener
location
- the locationpublic void deviceDisconnected(java.lang.String location)
deviceDisconnected
in interface DeviceDisconnectionListener
location
- the locationpublic void disconnectDevice()
public void applicationFinish()
applicationFinish
in interface ApplicationFinishListener
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 DeviceCopyFinishListener
public void notifyCurrentPath(java.lang.String path)
LoaderListener
notifyCurrentPath
in interface LoaderListener
path
- the pathpublic void notifyFileLoaded()
LoaderListener
notifyFileLoaded
in interface LoaderListener
public void notifyFilesInRepository(int files)
LoaderListener
notifyFilesInRepository
in interface LoaderListener
files
- the filespublic void notifyFinishRead(RepositoryLoader loader)
LoaderListener
notifyFinishRead
in interface LoaderListener
loader
- the loaderpublic void notifyFinishRefresh(RepositoryLoader loader)
LoaderListener
notifyFinishRefresh
in interface LoaderListener
loader
- the loaderpublic void notifyRemainingTime(long time)
LoaderListener
notifyRemainingTime
in interface LoaderListener
time
- the timepublic void refreshDevice()
public AudioFile getFileIfLoaded(java.lang.String fileName)
fileName
- the file name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |