Package com.biglybt.ui.swt
Class TorrentUtil
java.lang.Object
com.biglybt.ui.swt.TorrentUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
static final String
static final String
private static boolean
private static final AsyncDispatcher
private static final String[]
private static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
addCategorySubMenu
(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuCategory) static void
addEditWebseeds
(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms) protected static void
addNetworksSubMenu
(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuNetworks) protected static void
addPeerSourceSubMenu
(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuPeerSource) protected static void
addSpeedLimitsMenu
(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menu) protected static void
addTrackerTorrentMenu
(org.eclipse.swt.widgets.Menu menuTracker, DownloadManager[] dms, boolean changeUrl, boolean manualUpdate, boolean allStopped, boolean use_open_containing_folder, boolean canMove) static void
assignToCategory
(Object[] download_managers, Category category) calculateToolbarStates
(ISelectedContent[] currentContent, String viewID_unused) protected static void
changeDirSelectedTorrents
(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) protected static void
clearMOC
(DownloadManager[] dms) protected static void
exportDownloads
(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms) protected static void
exportHTTPSeeds
(DownloadManager[] dms) protected static void
exportTorrent
(DownloadManager[] dms, org.eclipse.swt.widgets.Shell parentShell) static void
exportTorrent
(String torrent_name, TOTorrent torrent, org.eclipse.swt.widgets.Shell parentShell) static void
exportTorrents
(String[] torrent_names, TOTorrent[] torrents, org.eclipse.swt.widgets.Shell parentShell) static void
fillTorrentMenu
(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms, Core core, boolean include_show_details, int selected_dl_types, TableView tv) protected static String
getMOC
(DownloadManager[] dms) static void
hostTorrents
(Object[] download_managers) static void
init()
static boolean
isFileTorrent
(String originatingLocation, File torrentFile, String torrentName, boolean warnOnError) quick check to see if a file might be a torrentstatic boolean
static void
moveDataFiles
(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, boolean batch) private static void
moveSelectedTorrentsTo
(GlobalManager gm, List<DownloadManager> all_dms, List<DownloadManager> selected_dms, int iNewPos) private static void
moveSelectedTorrentsTo
(TableView<DownloadManager> tv, DownloadManager[] selected_dms, int iNewPos) protected static void
moveTorrentFile
(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms) static void
pauseDataSources
(Object[] datasources) protected static void
pauseDownloadsFor
(DownloadManager[] dms) static void
static void
promptUserForComment
(String text, Consumer<String> consumer) static void
static void
publishTorrents
(Object[] download_managers) static void
queueDataSources
(Object[] datasources, boolean extendedAction) static void
removeDataSources
(Object[] datasources) static void
removeDownloads
(DownloadManager[] dms, AERunnable deleteFailed) static void
removeDownloads
(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) private static void
removeDownloadsPrompterClosed
(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) private static void
removeDownloadsPrompterClosedSupport
(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) private static void
removeDownloadsSupport
(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) static void
removeDownloadStubs
(DownloadStub.DownloadStubEx[] dms, AERunnable deleteFailed, boolean forcePrompt) private static void
removeDownloadStubsPrompterClosed
(DownloadStub.DownloadStubEx[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) static void
repositionManual
(TableView<DownloadManager> tv, DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell, boolean isSeedingView) static void
resumeTorrents
(Object[] download_managers) static void
runDataSources
(Object[] datasources) Runs a DownloadManager or DiskManagerFileInfoprotected static void
selectMOC
(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, Consumer<String> moc_setter) protected static void
setMOC
(DownloadManager[] dms, String path) static Boolean
shouldStopGroupTest
(Object[] datasources) static void
stopDataSources
(Object[] datasources) static void
stopDataSources
(Object[] datasources, boolean pause) static void
stopOrStartDataSources
(Object[] datasources, boolean extendedAction) private static DiskManagerFileInfo[]
private static DownloadManager[]
private static DownloadStub.DownloadStubEx[]
toDownloadStubs
(Object[] objects)
-
Field Details
-
TU_GROUP
- See Also:
-
BF_GROUP
- See Also:
-
TU_ITEM_PAUSE
- See Also:
-
TU_ITEM_RECHECK
- See Also:
-
TU_ITEM_CHECK_FILES
- See Also:
-
TU_ITEM_ALLOCATE
- See Also:
-
TU_ITEM_ARCHIVE
- See Also:
-
TU_ITEM_SHOW_SIDEBAR
- See Also:
-
BF_ITEM_BACK
- See Also:
-
BF_ITEM_FORWARD
- See Also:
-
TB_ITEMS
-
initialised
private static boolean initialised -
move_disp
-
-
Constructor Details
-
TorrentUtil
public TorrentUtil()
-
-
Method Details
-
init
public static void init() -
fillTorrentMenu
public static void fillTorrentMenu(org.eclipse.swt.widgets.Menu menu, DownloadManager[] dms, Core core, boolean include_show_details, int selected_dl_types, TableView tv) -
addNetworksSubMenu
protected static void addNetworksSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuNetworks) -
addPeerSourceSubMenu
protected static void addPeerSourceSubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuPeerSource) -
exportHTTPSeeds
-
exportTorrent
protected static void exportTorrent(DownloadManager[] dms, org.eclipse.swt.widgets.Shell parentShell) -
exportTorrent
-
exportTorrents
-
pauseDownloadsFor
-
addSpeedLimitsMenu
-
addEditWebseeds
-
addTrackerTorrentMenu
protected static void addTrackerTorrentMenu(org.eclipse.swt.widgets.Menu menuTracker, DownloadManager[] dms, boolean changeUrl, boolean manualUpdate, boolean allStopped, boolean use_open_containing_folder, boolean canMove) -
moveTorrentFile
-
moveDataFiles
public static void moveDataFiles(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, boolean batch) -
clearMOC
-
getMOC
-
setMOC
-
selectMOC
protected static void selectMOC(org.eclipse.swt.widgets.Shell shell, DownloadManager[] dms, Consumer<String> moc_setter) -
exportDownloads
-
repositionManual
public static void repositionManual(TableView<DownloadManager> tv, DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell, boolean isSeedingView) -
addCategorySubMenu
protected static void addCategorySubMenu(DownloadManager[] dms, org.eclipse.swt.widgets.Menu menuCategory) -
moveSelectedTorrentsTo
private static void moveSelectedTorrentsTo(TableView<DownloadManager> tv, DownloadManager[] selected_dms, int iNewPos) -
moveSelectedTorrentsTo
private static void moveSelectedTorrentsTo(GlobalManager gm, List<DownloadManager> all_dms, List<DownloadManager> selected_dms, int iNewPos) -
changeDirSelectedTorrents
protected static void changeDirSelectedTorrents(DownloadManager[] dms, org.eclipse.swt.widgets.Shell shell) -
runDataSources
Runs a DownloadManager or DiskManagerFileInfo -
hostTorrents
-
publishTorrents
-
removeDataSources
- Parameters:
datasources
- DownloadManager, DiskManagerFileInfo, SelectedContent
-
shouldStopGroupTest
-
stopOrStartDataSources
-
stopDataSources
-
stopDataSources
-
pauseDataSources
-
queueDataSources
-
resumeTorrents
-
assignToCategory
-
promptUserForComment
-
promptUserForComment
-
promptUserForDescription
-
toDMS
-
toDownloadStubs
-
toDMFI
-
isFileTorrent
public static boolean isFileTorrent(String originatingLocation, File torrentFile, String torrentName, boolean warnOnError) quick check to see if a file might be a torrent- Parameters:
torrentFile
-- Returns:
- Since:
- 3.0.2.3
-
calculateToolbarStates
public static Map<String,Long> calculateToolbarStates(ISelectedContent[] currentContent, String viewID_unused) -
removeDownloads
-
removeDownloads
public static void removeDownloads(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadsSupport
private static void removeDownloadsSupport(DownloadManager[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadsPrompterClosed
private static void removeDownloadsPrompterClosed(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
removeDownloadsPrompterClosedSupport
private static void removeDownloadsPrompterClosedSupport(DownloadManager[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
removeDownloadStubs
public static void removeDownloadStubs(DownloadStub.DownloadStubEx[] dms, AERunnable deleteFailed, boolean forcePrompt) -
removeDownloadStubsPrompterClosed
private static void removeDownloadStubsPrompterClosed(DownloadStub.DownloadStubEx[] dms, int index, AERunnable deleteFailed, int result, boolean doAll, boolean deleteTorrent) -
isForceStartVisible
-