com.aelitis.azureus.core.devices.impl
Class DeviceUPnPImpl

java.lang.Object
  extended by com.aelitis.azureus.core.devices.impl.DeviceImpl
      extended by com.aelitis.azureus.core.devices.impl.DeviceUPnPImpl
All Implemented Interfaces:
Device, DeviceUPnP, TranscodeTargetListener, DownloadManagerListener
Direct Known Subclasses:
DeviceContentDirectoryImpl, DeviceInternetGatewayImpl, DeviceMediaRendererImpl, DeviceOfflineDownloaderImpl

public abstract class DeviceUPnPImpl
extends DeviceImpl
implements DeviceUPnP, TranscodeTargetListener, DownloadManagerListener


Nested Class Summary
protected static class DeviceUPnPImpl.StreamWrapper
           
 
Nested classes/interfaces inherited from class com.aelitis.azureus.core.devices.impl.DeviceImpl
DeviceImpl.browseLocationImpl
 
Nested classes/interfaces inherited from interface com.aelitis.azureus.core.devices.Device
Device.browseLocation
 
Field Summary
 
Fields inherited from class com.aelitis.azureus.core.devices.impl.DeviceImpl
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.aelitis.azureus.core.devices.Device
DT_CONTENT_DIRECTORY, DT_INTERNET, DT_INTERNET_GATEWAY, DT_MEDIA_RENDERER, DT_OFFLINE_DOWNLOADER, DT_UNKNOWN
 
Fields inherited from interface com.aelitis.azureus.core.devices.TranscodeTargetListener
CT_PROPERTY
 
Constructor Summary
protected DeviceUPnPImpl(DeviceManagerImpl _manager, int _type, java.lang.String _classification)
           
protected DeviceUPnPImpl(DeviceManagerImpl _manager, int _type, java.lang.String _uuid, java.lang.String _classification, boolean _manual)
           
protected DeviceUPnPImpl(DeviceManagerImpl _manager, int _type, java.lang.String _uuid, java.lang.String _classification, boolean _manual, java.lang.String _name)
           
protected DeviceUPnPImpl(DeviceManagerImpl _manager, java.util.Map _map)
           
protected DeviceUPnPImpl(DeviceManagerImpl _manager, UPnPDevice _device, int _type)
           
 
Method Summary
protected  void addDynamicXCode(DiskManagerFileInfo source)
           
 void associate(DeviceManager.UnassociatedDevice assoc)
           
protected  void browseReceived()
           
 boolean canAssociate()
           
 boolean canFilterFilesView()
           
 boolean canRestrictAccess()
           
protected  void destroy()
           
 void downloadAdded(Download download)
           
 void downloadRemoved(Download download)
           
 void fileAdded(TranscodeFile _transcode_file)
           
 void fileAdded(TranscodeFile _transcode_file, boolean _new_file)
           
 void fileChanged(TranscodeFile file, int type, java.lang.Object data)
           
 void fileRemoved(TranscodeFile file)
           
 void generate(IndentWriter writer)
           
 java.lang.String getAccessRestriction()
           
protected  java.lang.String getACFKey()
           
 java.net.InetAddress getAddress()
           
 Device.browseLocation[] getBrowseLocations()
           
protected static java.lang.String getDisplayName(UPnPDevice device)
           
protected  void getDisplayProperties(java.util.List<java.lang.String[]> dp)
           
 boolean getFilterFilesView()
           
 java.lang.String getImageID()
           
protected  java.net.URL getLocation()
           
protected  java.lang.String getMimeType(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file)
           
protected  java.net.URL getPresentationURL(UPnPDevice device)
           
protected  java.net.URL getStreamURL(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file)
           
protected  java.net.URL getStreamURL(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file, java.lang.String host)
           
 UPnPDevice getUPnPDevice()
           
protected  DeviceManagerUPnPImpl getUPnPDeviceManager()
           
protected  void initialise()
           
 boolean isBrowsable()
           
 boolean isLivenessDetectable()
           
protected  boolean isVisible(AzureusContentDownload file)
           
protected  boolean isVisible(AzureusContentFile file)
           
protected  void removeDynamicXCode(DiskManagerFileInfo source)
           
protected  void resetUPNPAV()
           
 void setAccessRestriction(java.lang.String str)
           
 void setAddress(java.net.InetAddress address)
           
protected  void setCategories(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf, Download dl)
           
 void setFilterFilesView(boolean filter)
           
protected  void setTags(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf, Download dl)
           
protected  void setUPnPDevice(UPnPDevice device)
           
protected  boolean setupStreamXCode(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl transcode_file)
           
protected  void syncCategoriesAndTags(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf, boolean inherit_from_download)
           
protected  boolean updateFrom(DeviceImpl _other, boolean _is_alive)
           
protected  void UPnPInitialised()
           
 
Methods inherited from class com.aelitis.azureus.core.devices.impl.DeviceImpl
addDP, addDP, addDP, addDP, addDP, addDP, addListener, addListener, alive, allocateFile, allocateUniqueFileName, canRemove, close, dead, deleteFile, exportToBEncodedMap, fileDirty, fireChanged, generateTT, getAlwaysCacheFiles, getAutoShareToTagID, getBlankProfile, getClassification, getDefaultTranscodeProfile, getDevice, getDeviceClassification, getDeviceFile, getDevicesDir, getDirectTranscodeProfiles, getDisplayProperties, getError, getFileCount, getFiles, getID, getInfo, getLastSeen, getManager, getName, getPersistentBooleanProperty, getPersistentIntProperty, getPersistentLongProperty, getPersistentMapProperty, getPersistentStringListProperty, getPersistentStringProperty, getPersistentStringProperty, getRendererSpecies, getSecondaryID, getShortDescription, getStatus, getString, getTranscodeFile, getTranscodeProfiles, getTranscodeProfiles, getTranscodeRequirement, getTransientProperty, getTransientProperty, getTTDisplayProperties, getType, getVuzeFile, getWikiURL, 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, updateStatus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.aelitis.azureus.core.devices.Device
addListener, alive, canRemove, getClassification, getDirectTranscodeProfiles, getDisplayProperties, getError, getID, getInfo, getName, getShortDescription, getStatus, getString, getTransientProperty, getType, getVuzeFile, getWikiURL, isAlive, isBusy, isExportable, isGenericUSB, isHidden, isManual, isNameAutomatic, isTagged, remove, removeListener, requestAttention, setCanRemove, setExportable, setGenericUSB, setHidden, setImageID, setName, setTagged, setTransientProperty
 

Constructor Detail

DeviceUPnPImpl

protected DeviceUPnPImpl(DeviceManagerImpl _manager,
                         UPnPDevice _device,
                         int _type)

DeviceUPnPImpl

protected DeviceUPnPImpl(DeviceManagerImpl _manager,
                         int _type,
                         java.lang.String _classification)

DeviceUPnPImpl

protected DeviceUPnPImpl(DeviceManagerImpl _manager,
                         int _type,
                         java.lang.String _uuid,
                         java.lang.String _classification,
                         boolean _manual,
                         java.lang.String _name)

DeviceUPnPImpl

protected DeviceUPnPImpl(DeviceManagerImpl _manager,
                         int _type,
                         java.lang.String _uuid,
                         java.lang.String _classification,
                         boolean _manual)

DeviceUPnPImpl

protected DeviceUPnPImpl(DeviceManagerImpl _manager,
                         java.util.Map _map)
                  throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getDisplayName

protected static java.lang.String getDisplayName(UPnPDevice device)

getACFKey

protected java.lang.String getACFKey()

updateFrom

protected boolean updateFrom(DeviceImpl _other,
                             boolean _is_alive)
Overrides:
updateFrom in class DeviceImpl

initialise

protected void initialise()
Overrides:
initialise in class DeviceImpl

UPnPInitialised

protected void UPnPInitialised()

destroy

protected void destroy()
Overrides:
destroy in class DeviceImpl

getUPnPDeviceManager

protected DeviceManagerUPnPImpl getUPnPDeviceManager()

getUPnPDevice

public UPnPDevice getUPnPDevice()
Specified by:
getUPnPDevice in interface DeviceUPnP

setUPnPDevice

protected void setUPnPDevice(UPnPDevice device)

isBrowsable

public boolean isBrowsable()
Specified by:
isBrowsable in interface Device

getBrowseLocations

public Device.browseLocation[] getBrowseLocations()
Specified by:
getBrowseLocations in interface Device

canFilterFilesView

public boolean canFilterFilesView()

setFilterFilesView

public void setFilterFilesView(boolean filter)

getFilterFilesView

public boolean getFilterFilesView()

isLivenessDetectable

public boolean isLivenessDetectable()
Specified by:
isLivenessDetectable in interface Device
Overrides:
isLivenessDetectable in class DeviceImpl

getLocation

protected java.net.URL getLocation()

canAssociate

public boolean canAssociate()

associate

public void associate(DeviceManager.UnassociatedDevice assoc)

getAddress

public java.net.InetAddress getAddress()
Specified by:
getAddress in interface Device

setAddress

public void setAddress(java.net.InetAddress address)
Specified by:
setAddress in interface Device

canRestrictAccess

public boolean canRestrictAccess()

getAccessRestriction

public java.lang.String getAccessRestriction()

setAccessRestriction

public void setAccessRestriction(java.lang.String str)

getStreamURL

protected java.net.URL getStreamURL(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file)

getStreamURL

protected java.net.URL getStreamURL(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file,
                                    java.lang.String host)
Overrides:
getStreamURL in class DeviceImpl

getMimeType

protected java.lang.String getMimeType(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl file)
Overrides:
getMimeType in class DeviceImpl

browseReceived

protected void browseReceived()

resetUPNPAV

protected void resetUPNPAV()

downloadAdded

public void downloadAdded(Download download)
Specified by:
downloadAdded in interface DownloadManagerListener

downloadRemoved

public void downloadRemoved(Download download)
Specified by:
downloadRemoved in interface DownloadManagerListener

addDynamicXCode

protected void addDynamicXCode(DiskManagerFileInfo source)

removeDynamicXCode

protected void removeDynamicXCode(DiskManagerFileInfo source)

setupStreamXCode

protected boolean setupStreamXCode(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl transcode_file)

isVisible

protected boolean isVisible(AzureusContentDownload file)

isVisible

protected boolean isVisible(AzureusContentFile file)

fileAdded

public void fileAdded(TranscodeFile _transcode_file)
Specified by:
fileAdded in interface TranscodeTargetListener

fileAdded

public void fileAdded(TranscodeFile _transcode_file,
                      boolean _new_file)

syncCategoriesAndTags

protected void syncCategoriesAndTags(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf,
                                     boolean inherit_from_download)

setCategories

protected void setCategories(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf,
                             Download dl)

setTags

protected void setTags(com.aelitis.azureus.core.devices.impl.TranscodeFileImpl tf,
                       Download dl)

fileChanged

public void fileChanged(TranscodeFile file,
                        int type,
                        java.lang.Object data)
Specified by:
fileChanged in interface TranscodeTargetListener

fileRemoved

public void fileRemoved(TranscodeFile file)
Specified by:
fileRemoved in interface TranscodeTargetListener

getPresentationURL

protected java.net.URL getPresentationURL(UPnPDevice device)

getDisplayProperties

protected void getDisplayProperties(java.util.List<java.lang.String[]> dp)
Overrides:
getDisplayProperties in class DeviceImpl

generate

public void generate(IndentWriter writer)
Overrides:
generate in class DeviceImpl

getImageID

public java.lang.String getImageID()
Specified by:
getImageID in interface Device
Overrides:
getImageID in class DeviceImpl