org.gudy.azureus2.core3.torrent.impl
Class TorrentOpenOptions

java.lang.Object
  extended by org.gudy.azureus2.core3.torrent.impl.TorrentOpenOptions

public class TorrentOpenOptions
extends java.lang.Object

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
static interface TorrentOpenOptions.FileListener
           
 
Field Summary
 boolean bDeleteFileOnCancel
           
static int CA_ACCEPT
           
static int CA_NONE
           
static int CA_REJECT
           
 boolean disableIPFilter
           
 int iQueueLocation
           
 boolean isValid
           
 java.util.Map<java.lang.String,java.lang.Boolean> peerSource
           
static int QUEUELOCATION_BOTTOM
           
static int QUEUELOCATION_TOP
           
 java.lang.String sFileName
           
 java.lang.String sOriginatingLocation
           
static int STARTMODE_FORCESTARTED
           
static int STARTMODE_QUEUED
           
static int STARTMODE_SEEDING
           
static int STARTMODE_STOPPED
           
 
Constructor Summary
TorrentOpenOptions()
           
TorrentOpenOptions(java.lang.String sFileName, TOTorrent torrent, boolean bDeleteFileOnCancel)
          Init
TorrentOpenOptions(TorrentOpenOptions toBeCloned)
          clones everything except files and torrent
 
Method Summary
 void addListener(TorrentOpenOptions.FileListener l)
           
 boolean allFilesExist()
           
 boolean allFilesMoving()
           
 void fileDownloadStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, boolean toDownload)
           
 void filePriorityStateChanged(TorrentOpenFileOptions torrentOpenFileOptions, int priority)
           
 boolean getAndClearDirt()
           
 int getCompleteAction()
           
 java.lang.String getDataDir()
           
static int getDefaultStartMode()
           
 java.util.Map<java.lang.String,java.lang.Boolean> getEnabledNetworks()
           
 TorrentOpenFileOptions[] getFiles()
           
 boolean getHideErrors()
           
 java.io.File getInitialLinkage(int index)
           
 java.util.List<Tag> getInitialTags()
           
 java.lang.String getManualRename()
           
 int getMaxDownloadSpeed()
           
 int getMaxUploadSpeed()
           
 java.lang.String getParentDir()
           
 int getStartMode()
           
 java.lang.String getSubDir()
           
 TOTorrent getTorrent()
           
 java.lang.String getTorrentName()
           
 long getTotalSize()
           
 java.util.List<java.util.List<java.lang.String>> getTrackers(boolean if_updated)
           
 boolean isExplicitDataDir()
           
 boolean isSimpleTorrent()
           
 boolean okToDisableAll()
           
 void parentDirChanged()
           
 void removeListener(TorrentOpenOptions.FileListener l)
           
 void renameDuplicates()
           
 void setCompleteAction(int ca)
           
 void setDirty()
           
 void setExplicitDataDir(java.lang.String parent_dir, java.lang.String sub_dir)
           
 void setHideErrors(boolean h)
           
 void setInitialTags(java.util.List<Tag> tags)
           
 void setManualRename(java.lang.String manualRename)
           
 void setMaxDownloadSpeed(int kbs)
           
 void setMaxUploadSpeed(int kbs)
           
 void setNetworkEnabled(java.lang.String net, boolean enabled)
           
 void setParentDir(java.lang.String parentDir)
           
 void setStartMode(int m)
           
 void setTorrent(TOTorrent torrent)
           
 void setTrackers(java.util.List<java.util.List<java.lang.String>> trackers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUEUELOCATION_BOTTOM

public static final int QUEUELOCATION_BOTTOM
See Also:
Constant Field Values

QUEUELOCATION_TOP

public static final int QUEUELOCATION_TOP
See Also:
Constant Field Values

STARTMODE_FORCESTARTED

public static final int STARTMODE_FORCESTARTED
See Also:
Constant Field Values

STARTMODE_QUEUED

public static final int STARTMODE_QUEUED
See Also:
Constant Field Values

STARTMODE_SEEDING

public static final int STARTMODE_SEEDING
See Also:
Constant Field Values

STARTMODE_STOPPED

public static final int STARTMODE_STOPPED
See Also:
Constant Field Values

sOriginatingLocation

public java.lang.String sOriginatingLocation

sFileName

public java.lang.String sFileName

iQueueLocation

public int iQueueLocation

isValid

public boolean isValid

bDeleteFileOnCancel

public boolean bDeleteFileOnCancel

disableIPFilter

public boolean disableIPFilter

peerSource

public java.util.Map<java.lang.String,java.lang.Boolean> peerSource

CA_NONE

public static final int CA_NONE
See Also:
Constant Field Values

CA_ACCEPT

public static final int CA_ACCEPT
See Also:
Constant Field Values

CA_REJECT

public static final int CA_REJECT
See Also:
Constant Field Values
Constructor Detail

TorrentOpenOptions

public TorrentOpenOptions(java.lang.String sFileName,
                          TOTorrent torrent,
                          boolean bDeleteFileOnCancel)
Init

Parameters:
sFileName -
torrent -
bDeleteFileOnCancel -

TorrentOpenOptions

public TorrentOpenOptions()

TorrentOpenOptions

public TorrentOpenOptions(TorrentOpenOptions toBeCloned)
clones everything except files and torrent

Parameters:
toBeCloned -
Method Detail

getDefaultStartMode

public static int getDefaultStartMode()

getInitialLinkage

public java.io.File getInitialLinkage(int index)

getParentDir

public java.lang.String getParentDir()

setParentDir

public void setParentDir(java.lang.String parentDir)

setManualRename

public void setManualRename(java.lang.String manualRename)

getManualRename

public java.lang.String getManualRename()

getSubDir

public java.lang.String getSubDir()

setExplicitDataDir

public void setExplicitDataDir(java.lang.String parent_dir,
                               java.lang.String sub_dir)

isExplicitDataDir

public boolean isExplicitDataDir()

isSimpleTorrent

public boolean isSimpleTorrent()

getStartMode

public int getStartMode()

setStartMode

public void setStartMode(int m)

getEnabledNetworks

public java.util.Map<java.lang.String,java.lang.Boolean> getEnabledNetworks()

setNetworkEnabled

public void setNetworkEnabled(java.lang.String net,
                              boolean enabled)

getDataDir

public java.lang.String getDataDir()

getInitialTags

public java.util.List<Tag> getInitialTags()

setInitialTags

public void setInitialTags(java.util.List<Tag> tags)

setDirty

public void setDirty()

getAndClearDirt

public boolean getAndClearDirt()

getTrackers

public java.util.List<java.util.List<java.lang.String>> getTrackers(boolean if_updated)

setTrackers

public void setTrackers(java.util.List<java.util.List<java.lang.String>> trackers)

setMaxUploadSpeed

public void setMaxUploadSpeed(int kbs)

getMaxUploadSpeed

public int getMaxUploadSpeed()

setMaxDownloadSpeed

public void setMaxDownloadSpeed(int kbs)

getMaxDownloadSpeed

public int getMaxDownloadSpeed()

setHideErrors

public void setHideErrors(boolean h)

getHideErrors

public boolean getHideErrors()

getFiles

public TorrentOpenFileOptions[] getFiles()

getTotalSize

public long getTotalSize()

getTorrentName

public java.lang.String getTorrentName()

allFilesMoving

public boolean allFilesMoving()

allFilesExist

public boolean allFilesExist()

renameDuplicates

public void renameDuplicates()

okToDisableAll

public boolean okToDisableAll()

getTorrent

public TOTorrent getTorrent()

setTorrent

public void setTorrent(TOTorrent torrent)

addListener

public void addListener(TorrentOpenOptions.FileListener l)

removeListener

public void removeListener(TorrentOpenOptions.FileListener l)

fileDownloadStateChanged

public void fileDownloadStateChanged(TorrentOpenFileOptions torrentOpenFileOptions,
                                     boolean toDownload)

filePriorityStateChanged

public void filePriorityStateChanged(TorrentOpenFileOptions torrentOpenFileOptions,
                                     int priority)

parentDirChanged

public void parentDirChanged()

setCompleteAction

public void setCompleteAction(int ca)

getCompleteAction

public int getCompleteAction()