Package com.biglybt.core.devices.impl
Class DeviceiTunes
- java.lang.Object
-
- com.biglybt.core.devices.impl.DeviceImpl
-
- com.biglybt.core.devices.impl.DeviceUPnPImpl
-
- com.biglybt.core.devices.impl.DeviceMediaRendererImpl
-
- com.biglybt.core.devices.impl.DeviceiTunes
-
- All Implemented Interfaces:
Device
,DeviceMediaRenderer
,DeviceUPnP
,TranscodeTarget
,TranscodeTargetListener
public class DeviceiTunes extends DeviceMediaRendererImpl implements DeviceMediaRenderer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.biglybt.core.devices.impl.DeviceImpl
DeviceImpl.browseLocationImpl
-
Nested classes/interfaces inherited from interface com.biglybt.core.devices.Device
Device.browseLocation
-
-
Field Summary
Fields Modifier and Type Field Description private AsyncDispatcher
async_dispatcher
private int
consec_fails
(package private) static java.lang.Object
COPY_ERROR_KEY
private boolean
copy_outstanding
private boolean
copy_outstanding_set
private static java.lang.Object
COPY_PENDING_KEY
(package private) AESemaphore
copy_sem
private AEThread2
copy_thread
private static int
DEVICE_CHECK_PERIOD
private static int
DEVICE_CHECK_TICKS
private static java.lang.Object
ERRROR_KEY_ITUNES
private static int
INSTALL_CHECK_PERIOD
private static int
INSTALL_CHECK_TICKS
private boolean
is_installed
private boolean
is_running
private PluginInterface
itunes
private long
last_update_fail
private boolean
manual_copy_activated
private static int
RUNNING_CHECK_PERIOD
private static int
RUNNING_CHECK_TICKS
private static java.lang.String
UID
-
Fields inherited from class com.biglybt.core.devices.impl.DeviceMediaRendererImpl
share_requests, share_ta
-
Fields inherited from class com.biglybt.core.devices.impl.DeviceUPnPImpl
MY_ACF_KEY, upnp_manager
-
Fields inherited from class com.biglybt.core.devices.impl.DeviceImpl
device_files, device_files_dirty, device_files_last_mod, PP_AUTO_COPY, PP_AUTO_COPY_DEFAULT, PP_AUTO_START, PP_COPY_OUTSTANDING, PP_COPY_TO_FOLDER, PP_DONT_AUTO_HIDE, PP_EXPORTABLE, PP_FILTER_FILES, PP_IP_ADDRESS, PP_LIVENESS_DETECTABLE, PP_OD_ENABLED, PP_OD_MANUFACTURER, PP_OD_SHOWN_FTUX, PP_OD_STATE_CACHE, PP_OD_UPNP_DISC_CACHE, PP_OD_XFER_CACHE, PP_REND_CLASSIFICATION, PP_REND_SHOW_CAT, PP_RESTRICT_ACCESS, PP_TIVO_MACHINE, PR_AUTO_START_DEFAULT, TP_IP_ADDRESS
-
Fields inherited from interface com.biglybt.core.devices.Device
DT_CONTENT_DIRECTORY, DT_DISK_OPS, DT_INTERNET, DT_INTERNET_GATEWAY, DT_MEDIA_RENDERER, DT_UNKNOWN
-
Fields inherited from interface com.biglybt.core.devices.DeviceMediaRenderer
RS_BROWSER, RS_ITUNES, RS_OTHER, RS_PS3, RS_WII, RS_XBOX
-
Fields inherited from interface com.biglybt.core.devices.TranscodeTarget
TRANSCODE_ALWAYS, TRANSCODE_NEVER, TRANSCODE_UNKNOWN, TRANSCODE_WHEN_REQUIRED
-
Fields inherited from interface com.biglybt.core.devices.TranscodeTargetListener
CT_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DeviceiTunes(DeviceManagerImpl _manager, PluginInterface _itunes)
protected
DeviceiTunes(DeviceManagerImpl _manager, java.util.Map _map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
associate(DeviceManager.UnassociatedDevice assoc)
boolean
canAssociate()
boolean
canAutoStartDevice()
boolean
canCopyToDevice()
boolean
canRemove()
boolean
canRestrictAccess()
protected void
destroy()
void
generate(IndentWriter writer)
java.net.InetAddress
getAddress()
boolean
getAutoCopyToDevice()
boolean
getAutoStartDevice()
Device.browseLocation[]
getBrowseLocations()
int
getCopyToDevicePending()
protected java.lang.String
getDeviceClassification()
protected void
getDisplayProperties(java.util.List<java.lang.String[]> dp)
int
getRendererSpecies()
THIS WILL CHANGE!!!java.lang.String
getStatus()
java.net.URL
getWikiURL()
protected void
initialise()
boolean
isBrowsable()
boolean
isLivenessDetectable()
void
manualCopy()
protected void
performCopy()
void
setAutoCopyToDevice(boolean auto)
void
setAutoStartDevice(boolean auto)
protected void
setCopyOutstanding()
protected boolean
updateFrom(DeviceImpl _other, boolean _is_alive)
protected void
updateiTunesStatus()
protected void
updateStatus(int tick_count)
protected void
updateStatusSupport(int tick_count)
-
Methods inherited from class com.biglybt.core.devices.impl.DeviceMediaRendererImpl
canCopyToFolder, canShowCategories, getAutoCopyToFolder, getCopyToFolder, getCopyToFolderPending, getShowCategories, getShowCategoriesDefault, setAddress, setAutoCopyToFolder, setCanCopyToFolder, setCopyToFolder, setShowCategories
-
Methods inherited from class com.biglybt.core.devices.impl.DeviceUPnPImpl
browseReceived, canFilterFilesView, fileAdded, fileAdded, fileChanged, fileRemoved, getAccessRestriction, getACFKey, getDisplayName, getFilterFilesView, getImageID, getImageIDs, getLocation, getMimeType, getPresentationURL, getStreamURL, getStreamURL, getUPnPDevice, getUPnPDeviceManager, isVisible, isVisible, resetUPNPAV, setAccessRestriction, setCategories, setFilterFilesView, setTags, setUPnPDevice, setupStreamXCode, syncCategoriesAndTags, UPnPInitialised
-
Methods inherited from class com.biglybt.core.devices.impl.DeviceImpl
addDP, addDP, addDP, addDP, addDP, addDP, addListener, addListener, alive, allocateFile, allocateUniqueFileName, close, dead, deleteFile, exportToBEncodedMap, fileDirty, fireChanged, generateTT, getAlwaysCacheFiles, getAutoShareToTagID, getBlankProfile, getClassification, getDefaultTranscodeProfile, getDevice, getDeviceFile, getDevicesDir, getDirectTranscodeProfiles, getDisplayProperties, getError, getFileCount, getFiles, getID, getInfo, getLastSeen, getManager, getName, getPersistentBooleanProperty, getPersistentIntProperty, getPersistentLongProperty, getPersistentMapProperty, getPersistentStringListProperty, getPersistentStringProperty, getPersistentStringProperty, getSecondaryID, getShortDescription, getString, getTranscodeFile, getTranscodeProfiles, getTranscodeProfiles, getTranscodeRequirement, getTransientProperty, getTransientProperty, getTTDisplayProperties, getType, getVuzeFile, getWorkingDirectory, getWorkingDirectory, importFromBEncodedMapStatic, isAlive, isAudioCompatible, isAutoHidden, isBusy, isExportable, isGenericUSB, isHidden, isManual, isNameAutomatic, isNonSimple, isRSSPublishEnabled, isTagged, isTranscoding, loadDeviceFile, log, log, lookupFile, remove, removeListener, removeListener, removePersistentProperty, requestAttention, resetWorkingDirectory, revertFileName, saveDeviceFile, setAlwaysCacheFiles, setAutoHidden, setAutoShareToTagID, setBusy, setCanRemove, setDefaultTranscodeProfile, setDirty, setDirty, setError, setExportable, setGenericUSB, setHidden, setImageID, setInfo, setName, setPersistentBooleanProperty, setPersistentIntProperty, setPersistentLongProperty, setPersistentMapProperty, setPersistentStringListProperty, setPersistentStringProperty, setRSSPublishEnabled, setSecondaryID, setTagged, setTranscodeRequirement, setTranscoding, setTransientProperty, setTransientProperty, setWorkingDirectory
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.biglybt.core.devices.Device
addListener, alive, getClassification, getDirectTranscodeProfiles, getDisplayProperties, getError, getID, getImageID, getImageIDs, getInfo, getName, getShortDescription, getString, getTransientProperty, getType, getVuzeFile, isAlive, isBusy, isExportable, isGenericUSB, isHidden, isManual, isNameAutomatic, isTagged, remove, removeListener, requestAttention, setAddress, setCanRemove, setExportable, setGenericUSB, setHidden, setImageID, setName, setTagged, setTransientProperty
-
Methods inherited from interface com.biglybt.core.devices.DeviceMediaRenderer
canCopyToFolder, canFilterFilesView, canShowCategories, getAccessRestriction, getAutoCopyToFolder, getAutoShareToTagID, getCopyToFolder, getCopyToFolderPending, getFilterFilesView, getShowCategories, isRSSPublishEnabled, setAccessRestriction, setAutoCopyToFolder, setAutoShareToTagID, setCanCopyToFolder, setCopyToFolder, setFilterFilesView, setRSSPublishEnabled, setShowCategories
-
Methods inherited from interface com.biglybt.core.devices.TranscodeTarget
addListener, getAlwaysCacheFiles, getBlankProfile, getDefaultTranscodeProfile, getDevice, getFiles, getID, getTranscodeProfiles, getTranscodeRequirement, getWorkingDirectory, isAudioCompatible, isNonSimple, isTranscoding, removeListener, setAlwaysCacheFiles, setDefaultTranscodeProfile, setTranscodeRequirement, setWorkingDirectory
-
-
-
-
Field Detail
-
UID
private static final java.lang.String UID
- See Also:
- Constant Field Values
-
ERRROR_KEY_ITUNES
private static final java.lang.Object ERRROR_KEY_ITUNES
-
COPY_PENDING_KEY
private static final java.lang.Object COPY_PENDING_KEY
-
INSTALL_CHECK_PERIOD
private static final int INSTALL_CHECK_PERIOD
- See Also:
- Constant Field Values
-
RUNNING_CHECK_PERIOD
private static final int RUNNING_CHECK_PERIOD
- See Also:
- Constant Field Values
-
DEVICE_CHECK_PERIOD
private static final int DEVICE_CHECK_PERIOD
- See Also:
- Constant Field Values
-
INSTALL_CHECK_TICKS
private static final int INSTALL_CHECK_TICKS
- See Also:
- Constant Field Values
-
RUNNING_CHECK_TICKS
private static final int RUNNING_CHECK_TICKS
- See Also:
- Constant Field Values
-
DEVICE_CHECK_TICKS
private static final int DEVICE_CHECK_TICKS
- See Also:
- Constant Field Values
-
COPY_ERROR_KEY
static final java.lang.Object COPY_ERROR_KEY
-
itunes
private PluginInterface itunes
-
is_installed
private volatile boolean is_installed
-
is_running
private volatile boolean is_running
-
copy_outstanding
private boolean copy_outstanding
-
copy_outstanding_set
private boolean copy_outstanding_set
-
copy_thread
private AEThread2 copy_thread
-
copy_sem
AESemaphore copy_sem
-
async_dispatcher
private AsyncDispatcher async_dispatcher
-
last_update_fail
private long last_update_fail
-
consec_fails
private int consec_fails
-
manual_copy_activated
private volatile boolean manual_copy_activated
-
-
Constructor Detail
-
DeviceiTunes
protected DeviceiTunes(DeviceManagerImpl _manager, PluginInterface _itunes)
-
DeviceiTunes
protected DeviceiTunes(DeviceManagerImpl _manager, java.util.Map _map) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
updateFrom
protected boolean updateFrom(DeviceImpl _other, boolean _is_alive)
- Overrides:
updateFrom
in classDeviceMediaRendererImpl
-
initialise
protected void initialise()
- Overrides:
initialise
in classDeviceMediaRendererImpl
-
getDeviceClassification
protected java.lang.String getDeviceClassification()
- Overrides:
getDeviceClassification
in classDeviceImpl
-
getRendererSpecies
public int getRendererSpecies()
Description copied from interface:DeviceMediaRenderer
THIS WILL CHANGE!!!- Specified by:
getRendererSpecies
in interfaceDeviceMediaRenderer
- Overrides:
getRendererSpecies
in classDeviceImpl
- Returns:
- RS_
-
getAddress
public java.net.InetAddress getAddress()
- Specified by:
getAddress
in interfaceDevice
- Specified by:
getAddress
in interfaceDeviceMediaRenderer
- Overrides:
getAddress
in classDeviceUPnPImpl
-
canRemove
public boolean canRemove()
- Specified by:
canRemove
in interfaceDevice
- Overrides:
canRemove
in classDeviceImpl
-
isLivenessDetectable
public boolean isLivenessDetectable()
- Specified by:
isLivenessDetectable
in interfaceDevice
- Overrides:
isLivenessDetectable
in classDeviceUPnPImpl
-
getWikiURL
public java.net.URL getWikiURL()
- Specified by:
getWikiURL
in interfaceDevice
- Overrides:
getWikiURL
in classDeviceImpl
-
destroy
protected void destroy()
- Overrides:
destroy
in classDeviceMediaRendererImpl
-
updateStatus
protected void updateStatus(int tick_count)
- Overrides:
updateStatus
in classDeviceMediaRendererImpl
-
updateStatusSupport
protected void updateStatusSupport(int tick_count)
-
updateiTunesStatus
protected void updateiTunesStatus()
-
canCopyToDevice
public boolean canCopyToDevice()
- Specified by:
canCopyToDevice
in interfaceDeviceMediaRenderer
- Overrides:
canCopyToDevice
in classDeviceMediaRendererImpl
-
getAutoCopyToDevice
public boolean getAutoCopyToDevice()
- Specified by:
getAutoCopyToDevice
in interfaceDeviceMediaRenderer
- Overrides:
getAutoCopyToDevice
in classDeviceMediaRendererImpl
-
setAutoCopyToDevice
public void setAutoCopyToDevice(boolean auto)
- Specified by:
setAutoCopyToDevice
in interfaceDeviceMediaRenderer
- Overrides:
setAutoCopyToDevice
in classDeviceMediaRendererImpl
-
getCopyToDevicePending
public int getCopyToDevicePending()
- Specified by:
getCopyToDevicePending
in interfaceDeviceMediaRenderer
- Overrides:
getCopyToDevicePending
in classDeviceMediaRendererImpl
-
manualCopy
public void manualCopy() throws DeviceManagerException
- Specified by:
manualCopy
in interfaceDeviceMediaRenderer
- Overrides:
manualCopy
in classDeviceMediaRendererImpl
- Throws:
DeviceManagerException
-
setCopyOutstanding
protected void setCopyOutstanding()
-
canAutoStartDevice
public boolean canAutoStartDevice()
- Specified by:
canAutoStartDevice
in interfaceDeviceMediaRenderer
- Overrides:
canAutoStartDevice
in classDeviceMediaRendererImpl
-
getAutoStartDevice
public boolean getAutoStartDevice()
- Specified by:
getAutoStartDevice
in interfaceDeviceMediaRenderer
- Overrides:
getAutoStartDevice
in classDeviceMediaRendererImpl
-
setAutoStartDevice
public void setAutoStartDevice(boolean auto)
- Specified by:
setAutoStartDevice
in interfaceDeviceMediaRenderer
- Overrides:
setAutoStartDevice
in classDeviceMediaRendererImpl
-
canAssociate
public boolean canAssociate()
- Specified by:
canAssociate
in interfaceDeviceMediaRenderer
- Overrides:
canAssociate
in classDeviceUPnPImpl
-
canRestrictAccess
public boolean canRestrictAccess()
- Specified by:
canRestrictAccess
in interfaceDeviceMediaRenderer
- Overrides:
canRestrictAccess
in classDeviceUPnPImpl
-
associate
public void associate(DeviceManager.UnassociatedDevice assoc)
- Specified by:
associate
in interfaceDeviceMediaRenderer
- Overrides:
associate
in classDeviceUPnPImpl
-
performCopy
protected void performCopy()
-
isBrowsable
public boolean isBrowsable()
- Specified by:
isBrowsable
in interfaceDevice
- Overrides:
isBrowsable
in classDeviceUPnPImpl
-
getBrowseLocations
public Device.browseLocation[] getBrowseLocations()
- Specified by:
getBrowseLocations
in interfaceDevice
- Overrides:
getBrowseLocations
in classDeviceUPnPImpl
-
getDisplayProperties
protected void getDisplayProperties(java.util.List<java.lang.String[]> dp)
- Overrides:
getDisplayProperties
in classDeviceMediaRendererImpl
-
getStatus
public java.lang.String getStatus()
- Specified by:
getStatus
in interfaceDevice
- Overrides:
getStatus
in classDeviceImpl
-
generate
public void generate(IndentWriter writer)
- Overrides:
generate
in classDeviceMediaRendererImpl
-
-