Class TorrentOpenOptions
java.lang.Object
com.biglybt.core.torrent.impl.TorrentOpenOptions
Class to store one Torrent file's info. Used to populate table and store
user's choices.
This was copied out of the UI code, and still contains some crap code
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprivate booleanstatic final intstatic final intstatic final intprivate booleanprivate intprivate booleanprivate booleanbooleanprivate booleanprivate final CopyOnWriteList<TorrentOpenOptions.FileListener> private TorrentOpenFileOptions[]private booleanprivate intprivate intbooleanprivate Stringprivate intprivate intprivate Fileprivate static final Stringprivate static final Stringprivate static final Stringstatic final intstatic final intstatic final intprivate booleanprivate Stringprivate Stringprivate Stringstatic final intstatic final intstatic final intstatic final String[]static final intstatic final intstatic final intstatic final intstatic final int[]private TOTorrentprivate longprivate String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTorrentOpenOptions(TorrentOpenOptions toBeCloned) clones everything except files and torrentTorrentOpenOptions(String sFileName, TOTorrent torrent, boolean bDeleteFileOnCancel, Map<String, Object> options) InitTorrentOpenOptions(Map<String, Object> options) privateTorrentOpenOptions(Map<String, Object> map, boolean fake) -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic voidaddModeDuringCreate(int startMode, DownloadManager dm) static voidaddModePostCreate(int startMode, DownloadManager dm) static intaddModePreCreate(int startMode) voidaddSwarmTag(String tag) booleanbooleanbooleanvoidvoidvoidcancel()booleancanDeselectTag(Tag tag) voidvoidfileDownloadStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, boolean toDownload) voidfilePriorityStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, int priority) booleanlonggetClone()intintstatic intgetFiles()booleangetInitialLinkage(int index) intintbooleangetNetworkEnabled(String net) intbooleanprivate StringintlonggetTrackers(boolean if_updated) static TorrentOpenOptionsimportFromMap(Map<String, Object> map) voidbooleanbooleanbooleanbooleanvoidvoidvoidvoidvoidsetCancelDisabled(boolean b) voidsetCompleteAction(int ca) voidsetDeleteFileOnCancel(boolean b) voidsetDirty()voidsetDisableAutoRename(boolean b) voidsetDisplayName(String name) voidsetExplicitDataDir(String parent_dir, String sub_dir, boolean _removedTopLevel) voidsetHideErrors(boolean h) voidsetInitialTags(List<Tag> tags) voidsetManualRename(String manualRename) voidsetMaxDownloadSpeed(int kbs) voidsetMaxUploadSpeed(int kbs) voidvoidsetNetworkEnabled(String net, boolean enabled) voidsetParentDir(String parentDir) voidsetQueueLocation(int l) voidsetSequentialDownload(boolean b) voidsetStartMode(int m) voidvoidsetTorrent(TOTorrent torrent) voidsetTorrentFile(String str) voidsetTrackers(List<List<String>> trackers) voidsetUserComment(String str) voidprivate voidupdateTorrentFileName(String name)
-
Field Details
-
PARAM_DEFSAVEPATH
- See Also:
-
PARAM_MOVEWHENDONE
- See Also:
-
PARAM_QUEUEPOSITION
- See Also:
-
QUEUELOCATION_TOP
public static final int QUEUELOCATION_TOP- See Also:
-
QUEUELOCATION_BOTTOM
public static final int QUEUELOCATION_BOTTOM- See Also:
-
QUEUELOCATION_AUTO
public static final int QUEUELOCATION_AUTO- See Also:
-
STARTMODE_KEYS
-
STARTMODE_QUEUED
public static final int STARTMODE_QUEUED- See Also:
-
STARTMODE_STOPPED
public static final int STARTMODE_STOPPED- See Also:
-
STARTMODE_PAUSED
public static final int STARTMODE_PAUSED- See Also:
-
STARTMODE_FORCESTARTED
public static final int STARTMODE_FORCESTARTED- See Also:
-
STARTMODE_SEEDING
public static final int STARTMODE_SEEDING- See Also:
-
STARTMODE_ALLOCATED_AND_STOPPED
public static final int STARTMODE_ALLOCATED_AND_STOPPED- See Also:
-
STARTMODE_ALLOCATED_AND_PAUSED
public static final int STARTMODE_ALLOCATED_AND_PAUSED- See Also:
-
STARTMODE_VALUES
public static final int[] STARTMODE_VALUES -
sOriginatingLocation
-
sFileName
-
sDestDir
-
manualRename
-
sDestSubDir
-
explicitDataDir
private boolean explicitDataDir -
removedTopLevel
private boolean removedTopLevel -
disableAutoRename
private boolean disableAutoRename -
torrent
-
totalSize
private long totalSize -
iStartID
private int iStartID -
iQueueLocation
private int iQueueLocation -
bSequentialDownload
private boolean bSequentialDownload -
isValid
public boolean isValid -
cancelDisabled
private volatile boolean cancelDisabled -
bDeleteFileOnCancel
private boolean bDeleteFileOnCancel -
bDeleteFileOnCancelSet
private boolean bDeleteFileOnCancelSet -
files
-
disableIPFilter
public boolean disableIPFilter -
initial_linkage_map
-
fileListeners
-
peerSource
-
enabledNetworks
-
userComment
-
initialTags
-
autoTags
-
swarmTags
-
autoTaggingApplied
private boolean autoTaggingApplied -
initialMetadata
-
updatedTrackers
-
max_up
private int max_up -
max_down
private int max_down -
move_on_complete
-
hide_errors
private boolean hide_errors -
CA_NONE
public static final int CA_NONE- See Also:
-
CA_ACCEPT
public static final int CA_ACCEPT- See Also:
-
CA_REJECT
public static final int CA_REJECT- See Also:
-
complete_action
private int complete_action -
dirty
private boolean dirty
-
-
Constructor Details
-
TorrentOpenOptions
-
TorrentOpenOptions
-
TorrentOpenOptions
-
TorrentOpenOptions
clones everything except files and torrent- Parameters:
toBeCloned-
-
-
Method Details
-
exportToMap
-
importFromMap
-
getClone
-
getDefaultStartMode
public static int getDefaultStartMode() -
getInitialLinkage
-
getParentDir
-
setParentDir
-
setManualRename
-
getManualRename
-
setDeleteFileOnCancel
public void setDeleteFileOnCancel(boolean b) -
deleteTorrent
public void deleteTorrent() -
getDefaultSubDir
-
getSubDir
-
setSubDir
-
setExplicitDataDir
-
isExplicitDataDir
public boolean isExplicitDataDir() -
isRemovedTopLevel
public boolean isRemovedTopLevel() -
setDisableAutoRename
public void setDisableAutoRename(boolean b) -
isSimpleTorrent
public boolean isSimpleTorrent() -
getStartMode
public int getStartMode() -
setStartMode
public void setStartMode(int m) -
getDefaultQueueLocation
public int getDefaultQueueLocation() -
getQueueLocation
public int getQueueLocation() -
setQueueLocation
public void setQueueLocation(int l) -
getSequentialDownload
public boolean getSequentialDownload() -
setSequentialDownload
public void setSequentialDownload(boolean b) -
getEnabledNetworks
-
getNetworkEnabled
-
setNetworkEnabled
-
getUserComment
-
setUserComment
-
getDataDir
-
getSmartDestDir
-
getInitialTags
-
setInitialTags
-
addSwarmTag
-
getAutoQueuePositionTime
public long getAutoQueuePositionTime() -
getInitialMetadata
-
setDirty
public void setDirty() -
getAndClearDirt
public boolean getAndClearDirt() -
getTrackers
-
setTrackers
-
setMaxUploadSpeed
public void setMaxUploadSpeed(int kbs) -
getMaxUploadSpeed
public int getMaxUploadSpeed() -
setMaxDownloadSpeed
public void setMaxDownloadSpeed(int kbs) -
getMaxDownloadSpeed
public int getMaxDownloadSpeed() -
getMoveOnComplete
-
setMoveOnComplete
-
setHideErrors
public void setHideErrors(boolean h) -
getHideErrors
public boolean getHideErrors() -
getFiles
-
rebuildOriginalNames
public void rebuildOriginalNames() -
applyPriorityAndSkipConfig
public void applyPriorityAndSkipConfig() -
canDeselectTag
-
applyAutoTagging
public void applyAutoTagging() -
getTotalSize
public long getTotalSize() -
getTorrentName
-
updateTorrentFileName
-
getDisplayName
-
setDisplayName
-
allFilesMoving
public boolean allFilesMoving() -
allFilesExist
public boolean allFilesExist() -
renameDuplicates
public void renameDuplicates() -
okToDisableAll
public boolean okToDisableAll() -
getTorrentFile
-
setTorrentFile
-
getTorrent
-
setTorrent
-
addListener
-
removeListener
-
fileDownloadStateChanged
public void fileDownloadStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, boolean toDownload) -
filePriorityStateChanged
-
parentDirChanged
public void parentDirChanged() -
initialTagsChanged
public void initialTagsChanged() -
startOptionsChanged
public void startOptionsChanged() -
setCompleteAction
public void setCompleteAction(int ca) -
getCompleteAction
public int getCompleteAction() -
setCancelDisabled
public void setCancelDisabled(boolean b) -
cancel
public void cancel() -
addModePreCreate
public static int addModePreCreate(int startMode) -
addModeDuringCreate
-
addModePostCreate
-
addToDownloadManager
public boolean addToDownloadManager()
-