Examples of TOTorrent


Examples of org.gudy.azureus2.core3.torrent.TOTorrent

      }
    });

    itemEdit.addListener(SWT.Selection, new Listener() {
      public void handleEvent(Event e) {
        final TOTorrent torrent = manager.getTorrent();

        if (torrent == null) {
          return;
        }

        List group = TorrentUtils.announceGroupsToList(torrent);

        new MultiTrackerEditor(null, group, new TrackerEditorListener() {
          public void trackersChanged(String str, String str2, List _group) {
            TorrentUtils.listToAnnounceGroups(_group, torrent);

            try {
              TorrentUtils.writeToFile(torrent);
            } catch (Throwable e2) {

              Debug.printStackTrace(e2);
            }

            TRTrackerAnnouncer tc = manager.getTrackerClient();

            if (tc != null) {

              tc.resetTrackerUrl(true);
            }
          }
        }, true);
      }
    });

    final Listener menuListener = new Listener() {
      public void handleEvent(Event e) {
        if (e.widget instanceof MenuItem) {

          String text = ((MenuItem) e.widget).getText();

          TOTorrent torrent = manager.getTorrent();

          TorrentUtils.announceGroupsSetFirst(torrent, text);

          try {
            TorrentUtils.writeToFile(torrent);
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

      }
    }

    if (trackerURL == null) {

      TOTorrent torrent = manager.getTorrent();

      if (torrent != null) {

        trackerURL = torrent.getAnnounceURL().toString();
      }
    }

    if (trackerURL != null) {
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

    if (cell.setText(name) || !cell.isValid()) {
      if (item != null && item.getTorrent() != null && bShowIcon
          && (cell instanceof TableCellSWT)) {
        try {
          TOTorrent torrent = item.getTorrent();
          String path = torrent.getFiles()[0].getRelativePath();
         
          if (path != null) {
            // Don't ever dispose of PathIcon, it's cached and may be used elsewhere
            Image icon = ImageRepository.getPathIcon(path, false, torrent != null
                && !torrent.isSimpleTorrent());
            ((TableCellSWT) cell).setIcon(icon);
          }
        } catch (Exception e) {
        }
      }
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

    
    DownloadManager dm = fileInfo.getDownloadManager();

     File dl_save_path_file = dm.getAbsoluteSaveLocation();
    
     TOTorrent torrent = dm.getTorrent();
    
     if ( torrent != null && torrent.isSimpleTorrent()){
      
       dl_save_path_file = dl_save_path_file.getParentFile();
     }
    
     String dl_save_path = dl_save_path_file.getPath();
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

  {
    super("host", null, "Hosting");
  }

  protected boolean performCommand(ConsoleInput ci, DownloadManager dm, List args) {
    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
              TRHost  host = ci.azureus_core.getTrackerHost();
             
              TRHostTorrent  existing = host.getHostTorrent( torrent );
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

     
      DownloadManager  man = (DownloadManager)dls.get(i);
     
        // torrent can be null if download manager torrent file read fails
     
      TOTorrent  torrent = man.getTorrent();
     
      if ( torrent != null ){
       
        try{
          if ( Arrays.equals( torrent.getHash(), hash )){
       
            return( getDownload( torrent ));
          }
        }catch( DownloadException e ){
         
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

  DownloadManager dm,
  Composite     panel)
  {
    if(dm == null)
      return;
    TOTorrent torrent = dm.getTorrent();
    if (torrent != null) {
      try {
        azureus_core.getTrackerHost().hostTorrent(torrent, true, false );
      } catch (TRHostException e) {
        MessageBox mb = new MessageBox(panel.getShell(), SWT.ICON_ERROR | SWT.OK);
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

    DownloadManager dm,
    Composite     panel)
  {
    if(dm == null)
     return;
    TOTorrent torrent = dm.getTorrent();
    if (torrent != null) {
      try {
        azureus_core.getTrackerHost().publishTorrent(torrent);
      } catch (TRHostException e) {
        MessageBox mb = new MessageBox(panel.getShell(), SWT.ICON_ERROR | SWT.OK);
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

           
            Tracker  tracker = pi.getTracker();
           
            ShareResource[] shares = sm.getShares();
           
            TOTorrent torrent = dm.getTorrent();
           
            byte[] target_hash = torrent.getHash();
           
            for ( ShareResource share: shares ){
             
              int type = share.getType();
             
View Full Code Here

Examples of org.gudy.azureus2.core3.torrent.TOTorrent

 
  public static void
  setTorrentResumeDataComplete(
    DownloadManagerState  download_manager_state )
  {
    TOTorrent  torrent = download_manager_state.getTorrent();
   
    int  piece_count = torrent.getNumberOfPieces();
   
    byte[] resume_pieces = new byte[piece_count];
   
    Arrays.fill( resume_pieces, PIECE_DONE );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.