Package com.biglybt.core.torrent.impl
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 interface
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private boolean
private boolean
private boolean
static final int
static final int
static final int
private boolean
private int
private boolean
private boolean
boolean
private boolean
private final CopyOnWriteList<TorrentOpenOptions.FileListener>
private TorrentOpenFileOptions[]
private boolean
private int
private int
boolean
private String
private int
private int
private File
private static final String
private static final String
private static final String
static final int
static final int
static final int
private boolean
private String
private String
private String
static final int
static final int
static final int
static final String[]
static final int
static final int
static final int
static final int
static final int[]
private TOTorrent
private long
private String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
TorrentOpenOptions
(TorrentOpenOptions toBeCloned) clones everything except files and torrentTorrentOpenOptions
(String sFileName, TOTorrent torrent, boolean bDeleteFileOnCancel, Map<String, Object> options) InitTorrentOpenOptions
(Map<String, Object> options) private
TorrentOpenOptions
(Map<String, Object> map, boolean fake) -
Method Summary
Modifier and TypeMethodDescriptionvoid
static void
addModeDuringCreate
(int startMode, DownloadManager dm) static void
addModePostCreate
(int startMode, DownloadManager dm) static int
addModePreCreate
(int startMode) void
addSwarmTag
(String tag) boolean
boolean
boolean
void
void
void
cancel()
boolean
canDeselectTag
(Tag tag) void
void
fileDownloadStateChanged
(TorrentOpenFileOptions torrentOpenFileOptions, boolean toDownload) void
filePriorityStateChanged
(TorrentOpenFileOptions torrentOpenFileOptions, int priority) boolean
long
getClone()
int
int
static int
getFiles()
boolean
getInitialLinkage
(int index) int
int
boolean
getNetworkEnabled
(String net) int
boolean
private String
int
long
getTrackers
(boolean if_updated) static TorrentOpenOptions
importFromMap
(Map<String, Object> map) void
boolean
boolean
boolean
boolean
void
void
void
void
void
setCancelDisabled
(boolean b) void
setCompleteAction
(int ca) void
setDeleteFileOnCancel
(boolean b) void
setDirty()
void
setDisableAutoRename
(boolean b) void
setDisplayName
(String name) void
setExplicitDataDir
(String parent_dir, String sub_dir, boolean _removedTopLevel) void
setHideErrors
(boolean h) void
setInitialTags
(List<Tag> tags) void
setManualRename
(String manualRename) void
setMaxDownloadSpeed
(int kbs) void
setMaxUploadSpeed
(int kbs) void
void
setNetworkEnabled
(String net, boolean enabled) void
setParentDir
(String parentDir) void
setQueueLocation
(int l) void
setSequentialDownload
(boolean b) void
setStartMode
(int m) void
void
setTorrent
(TOTorrent torrent) void
setTorrentFile
(String str) void
setTrackers
(List<List<String>> trackers) void
setUserComment
(String str) void
private void
updateTorrentFileName
(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
public TorrentOpenOptions(String sFileName, TOTorrent torrent, boolean bDeleteFileOnCancel, Map<String, Object> options) Init- Parameters:
sFileName
-torrent
-bDeleteFileOnCancel
-
-
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()
-