Examples of TRHostTorrent


Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

  }

  public void
  refresh(TableCell cell)
  {
    TRHostTorrent item = (TRHostTorrent)cell.getDataSource();
    long value = 0;
    if (item != null) {
      Long longObject = (Long)item.getData("GUI_BadNATCount");
      if (longObject != null)
        value = longObject.longValue();
    }

    if( !cell.setSortValue( value ) && cell.isValid() ) {
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    super("name", POSITION_LAST, 250, TableManager.TABLE_MYTRACKER);
    setType(TableColumn.TYPE_TEXT);
  }

  public void refresh(TableCell cell) {
    TRHostTorrent item = (TRHostTorrent) cell.getDataSource();
    String name = (item == null) ? ""
        : TorrentUtils.getLocalisedName(item.getTorrent());
    //setText returns true only if the text is updated

    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
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

      }
    }
  }

  public String getObfusticatedText(TableCell cell) {
    TRHostTorrent item = (TRHostTorrent) cell.getDataSource();
    String name = null;
   
    try {
      name = ByteFormatter.nicePrint(item.getTorrent().getHash(), true);
    } catch (TOTorrentException e) {
    }

    if (name == null)
      name = "";
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    TOTorrent torrent = dm.getTorrent();
        if (torrent != null) {
          try {
              TRHost  host = ci.azureus_core.getTrackerHost();
             
              TRHostTorrent  existing = host.getHostTorrent( torrent );
             
              if ( existing == null ){
               
                 ci.azureus_core.getTrackerHost().hostTorrent(torrent,true, false);
                
              }else{
                try{
                  existing.remove();
                 
                }catch( Throwable e ){
                 
                  e.printStackTrace();
                }
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

               
                TRHostTorrent[] h_torrents = host.getTorrents();
               
                for (int i=0;i<h_torrents.length;i++){
                 
                  TRHostTorrent ht = h_torrents[i];
                 
                  if (hash.equals(TorrentUtils.nicePrintTorrentHash(ht.getTorrent(), true))) {
                   
                    name = TorrentUtils.getLocalisedName( ht.getTorrent());
                   
                    // FIXME: check user permission here and fix it to take torrent hash instead of subcommand
                   
                    performCommandIfAllowed(ci, args, ht, hash, name);
                    foundit = true;
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

    throws IOException
  {
    try{

      TRHostTorrent  host_torrent = ((TrackerTorrentImpl)tracker_torrent).getHostTorrent();

      TOTorrent  torrent = host_torrent.getTorrent();

      // make a copy of the torrent

      TOTorrent  torrent_to_send = TOTorrentFactory.deserialiseFromMap(torrent.serialiseToMap());

      // remove any non-standard stuff (e.g. resume data)

      torrent_to_send.removeAdditionalProperties();

      if ( !TorrentUtils.isDecentralised( torrent_to_send )){

        URL[][]  url_sets = TRTrackerUtils.getAnnounceURLs();

          // if tracker ip not set then assume they know what they're doing

        if ( host_torrent.getStatus() != TRHostTorrent.TS_PUBLISHED && url_sets.length > 0 ){

            // if the user has disabled the mangling of urls when hosting then don't do it here
            // either

          if ( COConfigurationManager.getBooleanParameter("Tracker Host Add Our Announce URLs")){
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

        if (datasource instanceof org.gudy.azureus2.pluginsimpl.local.disk.DiskManagerFileInfoImpl) {
          return datasource;
        }

        if (datasource instanceof TRHostTorrent) {
          TRHostTorrent item = (TRHostTorrent) datasource;
          return new TrackerTorrentImpl(item);
        }
        if (datasource instanceof TrackerTorrentImpl) {
          return datasource;
        }
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

        }
      }
    }

    if (coreDataSource instanceof TRHostTorrent) {
      TRHostTorrent item = (TRHostTorrent) coreDataSource;
      if (item != null) {
        pluginDataSource = new TrackerTorrentImpl(item);
      }
    }
   
View Full Code Here

Examples of org.gudy.azureus2.core3.tracker.host.TRHostTorrent

      }
    }

    DownloadManager dm = (DownloadManager) cell.getDataSource();
    int health;
    TRHostTorrent ht;

    if (dm == null) {
      health = 0;
      ht = null;
    } else {
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.