Class DeviceImpl
java.lang.Object
com.biglybt.core.devices.impl.DeviceImpl
- All Implemented Interfaces:
Device
- Direct Known Subclasses:
DeviceUPnPImpl
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Device
Device.browseLocation -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final TranscodeProfileprivate intprivate booleanprivate String(package private) boolean(package private) longprivate WeakReference<Map<String, Map<String, ?>>> private CopyOnWriteList<DeviceListener> private static final Stringprivate booleanprivate Stringprivate booleanprivate booleanprivate static final Objectprivate longprivate CopyOnWriteList<TranscodeTargetListener> private DeviceManagerImplprivate booleanprivate static final Stringprivate Stringprivate booleanprotected static final Stringprotected static final booleanprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprivate static final Stringprivate static final Stringprotected static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprivate static final Stringprotected static final Stringprotected static final Stringprotected static final booleanprivate Stringprivate booleanprotected static final Stringprivate booleanprivate intprivate StringFields inherited from interface Device
DT_CONTENT_DIRECTORY, DT_DISK_OPS, DT_INTERNET, DT_INTERNET_GATEWAY, DT_MEDIA_RENDERER, DT_UNKNOWN -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeviceImpl(DeviceManagerImpl _manager, int _type, String _uid, String _classification, boolean _manual) protectedDeviceImpl(DeviceManagerImpl _manager, int _type, String _uid, String _classification, boolean _manual, String _name) protectedDeviceImpl(DeviceManagerImpl _manager, Map map) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddDP(List<String[]> dp, String name, TranscodeProfile value) protected voidaddDP(List<String[]> dp, String name, TranscodeProfile[] values) protected voidprotected voidprotected voidvoidaddListener(DeviceListener listener) voidaddListener(TranscodeTargetListener listener) voidalive()allocateFile(TranscodeProfile profile, boolean no_xcode, DiskManagerFileInfo file, boolean for_job) protected Stringbooleanprotected voidclose()protected voiddead()protected voiddeleteFile(TranscodeFileImpl file, boolean delete_contents, boolean remove) protected voiddestroy()protected voidexportToBEncodedMap(Map map, boolean for_export) protected voidfileDirty(TranscodeFileImpl file, int type, Object data) protected voidvoidgenerate(IndentWriter writer) voidgenerateTT(IndentWriter writer) booleanlongprotected Stringprotected Fileprotected FileString[][]Array of resource strings and their associated valuesprotected voidgetDisplayProperties(List<String[]> dp) getError()intgetFiles()getID()getInfo()longprotected DeviceManagerImplprotected StringgetMimeType(TranscodeFileImpl file) getName()booleangetPersistentBooleanProperty(String prop, boolean def) intgetPersistentIntProperty(String prop, int def) longgetPersistentLongProperty(String prop, long def) getPersistentMapProperty(String prop, Map<String, T> def) String[]getPersistentStringProperty(String prop, String def) intprotected Stringprotected URLgetStreamURL(TranscodeFileImpl file, String host) protected TranscodeFileImplgetTranscodeFile(String key) getTranscodeProfiles(boolean walkup) private TranscodeProfile[]getTranscodeProfiles(String classification) intgetTransientProperty(Object key1, Object key2) protected voidgetTTDisplayProperties(List<String[]> dp) intgetType()getWorkingDirectory(boolean persist) protected static DeviceImplimportFromBEncodedMapStatic(DeviceManagerImpl manager, Map map) protected voidbooleanisAlive()booleanbooleanbooleanisBusy()booleanbooleanbooleanisHidden()booleanbooleanisManual()booleanbooleanbooleanbooleanisTagged()booleanprotected voidprotected voidprotected voidlookupFile(TranscodeProfile profile, DiskManagerFileInfo file) private static Stringvoidremove()voidremoveListener(DeviceListener listener) voidremoveListener(TranscodeTargetListener listener) voidvoidprotected voidprotected voidprotected voidvoidsetAlwaysCacheFiles(boolean always_cache) voidsetAutoHidden(boolean h) voidsetAutoShareToTagID(long id) protected voidsetBusy(boolean busy) voidsetCanRemove(boolean can) voidprotected voidsetDirty()protected voidsetDirty(boolean save_changes) protected voidvoidsetExportable(boolean b) voidsetGenericUSB(boolean is) voidsetHidden(boolean h) voidsetImageID(String id) protected voidvoidvoidsetPersistentBooleanProperty(String prop, boolean value) voidsetPersistentIntProperty(String prop, int value) voidsetPersistentLongProperty(String prop, long value) <T> voidsetPersistentMapProperty(String prop, Map<String, T> value) voidsetPersistentStringListProperty(String prop, String[] values) voidsetPersistentStringProperty(String prop, String value) voidsetRSSPublishEnabled(boolean enabled) protected voidsetSecondaryID(String str) voidsetTagged(boolean t) voidsetTranscodeRequirement(int req) protected voidsetTranscoding(boolean _transcoding) voidsetTransientProperty(Object key, Object value) voidsetTransientProperty(Object key1, Object key2, Object value) voidsetWorkingDirectory(File directory) protected booleanupdateFrom(DeviceImpl other, boolean is_alive) protected voidupdateStatus(int tick_count) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Device
getAddress, getBrowseLocations, isBrowsable, setAddress
-
Field Details
-
MY_PACKAGE
- See Also:
-
blank_profile
-
device_renames
-
PP_REND_WORK_DIR
- See Also:
-
PP_REND_DEF_TRANS_PROF
- See Also:
-
PP_REND_TRANS_REQ
- See Also:
-
PP_REND_TRANS_CACHE
- See Also:
-
PP_REND_RSS_PUB
- See Also:
-
PP_REND_TAG_SHARE
- See Also:
-
PP_REND_SHOW_CAT
- See Also:
-
PP_REND_CLASSIFICATION
- See Also:
-
PP_IP_ADDRESS
- See Also:
-
PP_DONT_AUTO_HIDE
- See Also:
-
TP_IP_ADDRESS
- See Also:
-
PP_FILTER_FILES
- See Also:
-
PP_RESTRICT_ACCESS
- See Also:
-
PP_COPY_OUTSTANDING
- See Also:
-
PP_AUTO_START
- See Also:
-
PP_COPY_TO_FOLDER
- See Also:
-
PP_AUTO_COPY
- See Also:
-
PP_EXPORTABLE
- See Also:
-
PP_LIVENESS_DETECTABLE
- See Also:
-
PP_TIVO_MACHINE
- See Also:
-
PP_OD_ENABLED
- See Also:
-
PP_OD_SHOWN_FTUX
- See Also:
-
PP_OD_MANUFACTURER
- See Also:
-
PP_OD_STATE_CACHE
- See Also:
-
PP_OD_XFER_CACHE
- See Also:
-
PP_OD_UPNP_DISC_CACHE
- See Also:
-
PR_AUTO_START_DEFAULT
protected static final boolean PR_AUTO_START_DEFAULT- See Also:
-
PP_AUTO_COPY_DEFAULT
protected static final boolean PP_AUTO_COPY_DEFAULT- See Also:
-
GENERIC
- See Also:
-
KEY_FILE_ALLOC_ERROR
-
manager
-
type
private int type -
uid
-
secondary_uid
-
classification
-
name
-
manual
private boolean manual -
isGenericUSB
private boolean isGenericUSB -
last_seen
private long last_seen -
can_remove
private boolean can_remove -
tagged
private boolean tagged -
busy_count
private int busy_count -
online
private boolean online -
transcoding
private boolean transcoding -
persistent_properties
-
transient_properties
-
device_files_last_mod
long device_files_last_mod -
device_files_dirty
boolean device_files_dirty -
device_files
-
device_files_ref
-
listeners
-
errors
-
infos
-
device_listeners
-
image_id
-
isNameAutomatic
private boolean isNameAutomatic
-
-
Constructor Details
-
DeviceImpl
protected DeviceImpl(DeviceManagerImpl _manager, int _type, String _uid, String _classification, boolean _manual) -
DeviceImpl
protected DeviceImpl(DeviceManagerImpl _manager, int _type, String _uid, String _classification, boolean _manual, String _name) -
DeviceImpl
- Throws:
IOException
-
-
Method Details
-
importFromBEncodedMapStatic
protected static DeviceImpl importFromBEncodedMapStatic(DeviceManagerImpl manager, Map map) throws IOException - Throws:
IOException
-
modifyDeviceDisplayName
-
exportToBEncodedMap
- Throws:
IOException
-
updateFrom
-
setExportable
public void setExportable(boolean b) - Specified by:
setExportablein interfaceDevice
-
isExportable
public boolean isExportable()- Specified by:
isExportablein interfaceDevice
-
getVuzeFile
- Specified by:
getVuzeFilein interfaceDevice- Throws:
IOException
-
initialise
protected void initialise() -
destroy
protected void destroy() -
getType
-
getID
-
setSecondaryID
-
getSecondaryID
-
getImageID
- Specified by:
getImageIDin interfaceDevice
-
getImageIDs
- Specified by:
getImageIDsin interfaceDevice
-
setImageID
- Specified by:
setImageIDin interfaceDevice
-
getDevice
-
getName
-
setName
-
isNameAutomatic
public boolean isNameAutomatic()- Specified by:
isNameAutomaticin interfaceDevice
-
getClassification
- Specified by:
getClassificationin interfaceDevice
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceDevice
-
getRendererSpecies
public int getRendererSpecies() -
getDeviceClassification
-
isNonSimple
public boolean isNonSimple() -
isManual
-
isHidden
-
setHidden
-
isAutoHidden
public boolean isAutoHidden() -
setAutoHidden
public void setAutoHidden(boolean h) -
isTagged
-
setTagged
-
isGenericUSB
public boolean isGenericUSB()- Specified by:
isGenericUSBin interfaceDevice
-
setGenericUSB
public void setGenericUSB(boolean is) - Specified by:
setGenericUSBin interfaceDevice
-
getLastSeen
public long getLastSeen() -
alive
-
isLivenessDetectable
public boolean isLivenessDetectable()- Specified by:
isLivenessDetectablein interfaceDevice
-
isAlive
-
dead
protected void dead() -
getWikiURL
- Specified by:
getWikiURLin interfaceDevice
-
setDirty
protected void setDirty() -
setDirty
protected void setDirty(boolean save_changes) -
updateStatus
protected void updateStatus(int tick_count) -
requestAttention
public void requestAttention()- Specified by:
requestAttentionin interfaceDevice
-
getFileCount
public int getFileCount() -
getFiles
-
allocateFile
public TranscodeFileImpl allocateFile(TranscodeProfile profile, boolean no_xcode, DiskManagerFileInfo file, boolean for_job) throws TranscodeException - Throws:
TranscodeException
-
allocateUniqueFileName
-
revertFileName
- Throws:
TranscodeException
-
lookupFile
-
getTranscodeFile
-
getWorkingDirectory
-
getWorkingDirectory
-
setWorkingDirectory
-
resetWorkingDirectory
protected void resetWorkingDirectory() -
getTranscodeProfiles
-
getDirectTranscodeProfiles
- Specified by:
getDirectTranscodeProfilesin interfaceDevice
-
getTranscodeProfiles
-
getTranscodeProfiles
-
getDefaultTranscodeProfile
-
setDefaultTranscodeProfile
-
getBlankProfile
-
setTranscoding
protected void setTranscoding(boolean _transcoding) -
isTranscoding
public boolean isTranscoding() -
getTranscodeRequirement
public int getTranscodeRequirement() -
setTranscodeRequirement
public void setTranscodeRequirement(int req) -
isAudioCompatible
-
getAlwaysCacheFiles
public boolean getAlwaysCacheFiles() -
setAlwaysCacheFiles
public void setAlwaysCacheFiles(boolean always_cache) -
isRSSPublishEnabled
public boolean isRSSPublishEnabled() -
setRSSPublishEnabled
public void setRSSPublishEnabled(boolean enabled) -
getDisplayProperties
Description copied from interface:DeviceArray of resource strings and their associated values- Specified by:
getDisplayPropertiesin interfaceDevice- Returns:
-
getDisplayProperties
-
getTTDisplayProperties
-
addDP
-
addDP
-
addDP
-
addDP
-
addDP
-
addDP
-
setCanRemove
public void setCanRemove(boolean can) - Specified by:
setCanRemovein interfaceDevice
-
canRemove
-
isBusy
-
setBusy
protected void setBusy(boolean busy) -
remove
-
getPersistentStringProperty
-
getPersistentStringProperty
-
setPersistentStringProperty
-
getPersistentMapProperty
-
setPersistentMapProperty
-
removePersistentProperty
-
getError
-
setError
-
getInfo
-
setInfo
-
getStatus
-
getPersistentBooleanProperty
-
setPersistentBooleanProperty
-
getPersistentLongProperty
-
setPersistentLongProperty
-
getPersistentIntProperty
-
setPersistentIntProperty
-
getPersistentStringListProperty
-
setPersistentStringListProperty
-
setTransientProperty
- Specified by:
setTransientPropertyin interfaceDevice
-
getTransientProperty
- Specified by:
getTransientPropertyin interfaceDevice
-
setTransientProperty
-
getTransientProperty
-
close
protected void close() -
loadDeviceFile
- Throws:
IOException
-
getStreamURL
-
getMimeType
-
deleteFile
protected void deleteFile(TranscodeFileImpl file, boolean delete_contents, boolean remove) throws TranscodeException - Throws:
TranscodeException
-
fileDirty
-
saveDeviceFile
protected void saveDeviceFile() -
getDeviceFile
- Throws:
IOException
-
getDevicesDir
- Throws:
IOException
-
getManager
-
addListener
-
removeListener
-
fireChanged
protected void fireChanged() -
addListener
- Specified by:
addListenerin interfaceDevice
-
removeListener
- Specified by:
removeListenerin interfaceDevice
-
log
-
log
-
getString
-
generate
-
generateTT
-