Package com.biglybt.core.devices.impl
Class DeviceUPnPImpl
- java.lang.Object
-
- com.biglybt.core.devices.impl.DeviceImpl
-
- com.biglybt.core.devices.impl.DeviceUPnPImpl
-
- All Implemented Interfaces:
Device
,DeviceUPnP
,TranscodeTargetListener
- Direct Known Subclasses:
DeviceContentDirectoryImpl
,DeviceInternetGatewayImpl
,DeviceMediaRendererImpl
public abstract class DeviceUPnPImpl extends DeviceImpl implements DeviceUPnP, TranscodeTargetListener
-
-
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 static java.util.Map<java.lang.String,ContentFile>
acf_map
private UPnPDevice
device_may_be_null
private TranscodeProfile
dynamic_transcode_profile
private java.util.Map<java.lang.String,ContentFile>
dynamic_xcode_map
(package private) java.lang.String
MY_ACF_KEY
(package private) DeviceManagerUPnPImpl
upnp_manager
private static java.lang.Object
UPNPAV_FILE_KEY
private IPCInterface
upnpav_ipc
-
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.TranscodeTargetListener
CT_PROPERTY
-
-
Constructor Summary
Constructors Modifier Constructor Description 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, UPnPDevice _device, int _type)
protected
DeviceUPnPImpl(DeviceManagerImpl _manager, java.util.Map _map)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
associate(DeviceManager.UnassociatedDevice assoc)
protected void
browseReceived()
boolean
canAssociate()
boolean
canFilterFilesView()
boolean
canRestrictAccess()
protected void
destroy()
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()
java.util.List<java.lang.String>
getImageIDs()
protected java.net.URL
getLocation()
protected java.lang.String
getMimeType(TranscodeFileImpl file)
protected java.net.URL
getPresentationURL(UPnPDevice device)
protected java.net.URL
getStreamURL(TranscodeFileImpl file)
protected java.net.URL
getStreamURL(TranscodeFileImpl file, java.lang.String host)
UPnPDevice
getUPnPDevice()
protected DeviceManagerUPnPImpl
getUPnPDeviceManager()
protected void
initialise()
boolean
isBrowsable()
boolean
isLivenessDetectable()
protected boolean
isVisible(ContentDownload file)
protected boolean
isVisible(ContentFile file)
protected void
resetUPNPAV()
void
setAccessRestriction(java.lang.String str)
void
setAddress(java.net.InetAddress address)
protected void
setCategories(TranscodeFileImpl tf, Download dl)
void
setFilterFilesView(boolean filter)
protected void
setTags(TranscodeFileImpl tf, Download dl)
protected void
setUPnPDevice(UPnPDevice device)
protected boolean
setupStreamXCode(TranscodeFileImpl transcode_file)
protected void
syncCategoriesAndTags(TranscodeFileImpl tf, boolean inherit_from_download)
protected boolean
updateFrom(DeviceImpl _other, boolean _is_alive)
protected void
UPnPInitialised()
-
Methods inherited from class com.biglybt.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.biglybt.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
-
-
-
-
Field Detail
-
UPNPAV_FILE_KEY
private static final java.lang.Object UPNPAV_FILE_KEY
-
acf_map
private static final java.util.Map<java.lang.String,ContentFile> acf_map
-
MY_ACF_KEY
final java.lang.String MY_ACF_KEY
-
upnp_manager
final DeviceManagerUPnPImpl upnp_manager
-
device_may_be_null
private volatile UPnPDevice device_may_be_null
-
upnpav_ipc
private IPCInterface upnpav_ipc
-
dynamic_transcode_profile
private TranscodeProfile dynamic_transcode_profile
-
dynamic_xcode_map
private java.util.Map<java.lang.String,ContentFile> dynamic_xcode_map
-
-
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 classDeviceImpl
-
initialise
protected void initialise()
- Overrides:
initialise
in classDeviceImpl
-
UPnPInitialised
protected void UPnPInitialised()
-
destroy
protected void destroy()
- Overrides:
destroy
in classDeviceImpl
-
getUPnPDeviceManager
protected DeviceManagerUPnPImpl getUPnPDeviceManager()
-
getUPnPDevice
public UPnPDevice getUPnPDevice()
- Specified by:
getUPnPDevice
in interfaceDeviceUPnP
-
setUPnPDevice
protected void setUPnPDevice(UPnPDevice device)
-
isBrowsable
public boolean isBrowsable()
- Specified by:
isBrowsable
in interfaceDevice
-
getBrowseLocations
public Device.browseLocation[] getBrowseLocations()
- Specified by:
getBrowseLocations
in interfaceDevice
-
canFilterFilesView
public boolean canFilterFilesView()
-
setFilterFilesView
public void setFilterFilesView(boolean filter)
-
getFilterFilesView
public boolean getFilterFilesView()
-
isLivenessDetectable
public boolean isLivenessDetectable()
- Specified by:
isLivenessDetectable
in interfaceDevice
- Overrides:
isLivenessDetectable
in classDeviceImpl
-
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 interfaceDevice
-
setAddress
public void setAddress(java.net.InetAddress address)
- Specified by:
setAddress
in interfaceDevice
-
canRestrictAccess
public boolean canRestrictAccess()
-
getAccessRestriction
public java.lang.String getAccessRestriction()
-
setAccessRestriction
public void setAccessRestriction(java.lang.String str)
-
getStreamURL
protected java.net.URL getStreamURL(TranscodeFileImpl file)
-
getStreamURL
protected java.net.URL getStreamURL(TranscodeFileImpl file, java.lang.String host)
- Overrides:
getStreamURL
in classDeviceImpl
-
getMimeType
protected java.lang.String getMimeType(TranscodeFileImpl file)
- Overrides:
getMimeType
in classDeviceImpl
-
browseReceived
protected void browseReceived()
-
resetUPNPAV
protected void resetUPNPAV()
-
setupStreamXCode
protected boolean setupStreamXCode(TranscodeFileImpl transcode_file)
-
isVisible
protected boolean isVisible(ContentDownload file)
-
isVisible
protected boolean isVisible(ContentFile file)
-
fileAdded
public void fileAdded(TranscodeFile _transcode_file)
- Specified by:
fileAdded
in interfaceTranscodeTargetListener
-
fileAdded
public void fileAdded(TranscodeFile _transcode_file, boolean _new_file)
-
syncCategoriesAndTags
protected void syncCategoriesAndTags(TranscodeFileImpl tf, boolean inherit_from_download)
-
setCategories
protected void setCategories(TranscodeFileImpl tf, Download dl)
-
setTags
protected void setTags(TranscodeFileImpl tf, Download dl)
-
fileChanged
public void fileChanged(TranscodeFile file, int type, java.lang.Object data)
- Specified by:
fileChanged
in interfaceTranscodeTargetListener
-
fileRemoved
public void fileRemoved(TranscodeFile file)
- Specified by:
fileRemoved
in interfaceTranscodeTargetListener
-
getPresentationURL
protected java.net.URL getPresentationURL(UPnPDevice device)
-
getDisplayProperties
protected void getDisplayProperties(java.util.List<java.lang.String[]> dp)
- Overrides:
getDisplayProperties
in classDeviceImpl
-
generate
public void generate(IndentWriter writer)
- Overrides:
generate
in classDeviceImpl
-
getImageID
public java.lang.String getImageID()
- Specified by:
getImageID
in interfaceDevice
- Overrides:
getImageID
in classDeviceImpl
-
getImageIDs
public java.util.List<java.lang.String> getImageIDs()
- Specified by:
getImageIDs
in interfaceDevice
- Overrides:
getImageIDs
in classDeviceImpl
-
-