org.gudy.azureus2.ui.swt.mainwindow
Class TorrentOpener

java.lang.Object
  extended by org.gudy.azureus2.ui.swt.mainwindow.TorrentOpener

public class TorrentOpener
extends java.lang.Object

Bunch of Torrent Opening functions.

Author:
Olivier Chalouhi, TuxPaper (openTorrentWindow)

Constructor Summary
TorrentOpener()
           
 
Method Summary
static boolean addTorrent(TorrentOpenOptions torrentOptions)
           
static boolean doesDropHaveTorrents(org.eclipse.swt.dnd.DropTargetEvent event)
           
static java.lang.String getFilterPathData()
           
static java.lang.String getFilterPathTorrent()
           
static boolean mergeFileIntoTorrentInfo(java.lang.String sFileName, java.lang.String sOriginatingLocation, TorrentOpenOptions torrentOptions)
          Creates a TorrentInfo from a file.
static void openDroppedTorrents(org.eclipse.swt.dnd.DropTargetEvent event, boolean deprecated_sharing_param)
           
static void openTorrent(java.lang.String torrentFile)
          Open a torrent.
static void openTorrent(java.lang.String torrentFile, java.util.Map<java.lang.String,java.lang.Object> options)
           
protected static void openTorrentsForTracking(java.lang.String path, java.lang.String[] fileNames)
           
static void openTorrentsFromStrings(TorrentOpenOptions optionsToClone, org.eclipse.swt.widgets.Shell parent, java.lang.String pathPrefix, java.lang.String[] torrents, java.lang.String referrer, TorrentDownloaderCallBackInterface listener, boolean forceTorrentOptionsWindow)
          Adds torrents that are listed in torrents array.
static void openTorrentSimple()
           
static void openTorrentTrackingOnly()
           
static java.lang.String setFilterPathData(java.lang.String path)
           
static java.lang.String setFilterPathTorrent(java.lang.String path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorrentOpener

public TorrentOpener()
Method Detail

openTorrent

public static void openTorrent(java.lang.String torrentFile)
Open a torrent. Possibly display a window if the user config says so

Parameters:
torrentFile - Torrent to open (file, url, etc)

openTorrent

public static void openTorrent(java.lang.String torrentFile,
                               java.util.Map<java.lang.String,java.lang.Object> options)

openTorrentsForTracking

protected static void openTorrentsForTracking(java.lang.String path,
                                              java.lang.String[] fileNames)

openTorrentTrackingOnly

public static void openTorrentTrackingOnly()

openTorrentSimple

public static void openTorrentSimple()

openDroppedTorrents

public static void openDroppedTorrents(org.eclipse.swt.dnd.DropTargetEvent event,
                                       boolean deprecated_sharing_param)

getFilterPathData

public static java.lang.String getFilterPathData()

getFilterPathTorrent

public static java.lang.String getFilterPathTorrent()

setFilterPathData

public static java.lang.String setFilterPathData(java.lang.String path)

setFilterPathTorrent

public static java.lang.String setFilterPathTorrent(java.lang.String path)

doesDropHaveTorrents

public static boolean doesDropHaveTorrents(org.eclipse.swt.dnd.DropTargetEvent event)

addTorrent

public static final boolean addTorrent(TorrentOpenOptions torrentOptions)
Parameters:
torrentOptions -
Returns:
Since:
5.0.0.1

mergeFileIntoTorrentInfo

public static boolean mergeFileIntoTorrentInfo(java.lang.String sFileName,
                                               java.lang.String sOriginatingLocation,
                                               TorrentOpenOptions torrentOptions)
Creates a TorrentInfo from a file. Prompts user if the file is invalid, torrent already exists

Parameters:
sFileName -
sOriginatingLocation -
Returns:
Since:
5.0.0.1

openTorrentsFromStrings

public static void openTorrentsFromStrings(TorrentOpenOptions optionsToClone,
                                           org.eclipse.swt.widgets.Shell parent,
                                           java.lang.String pathPrefix,
                                           java.lang.String[] torrents,
                                           java.lang.String referrer,
                                           TorrentDownloaderCallBackInterface listener,
                                           boolean forceTorrentOptionsWindow)
Adds torrents that are listed in torrents array. torrent array can can contain urls or file names. File names get pathPrefix appended.

will open url download dialog, or warning dialogs

Since:
5.0.0.1