com.limegroup.gnutella.downloader
Class AutoDownloadDetails

java.lang.Object
  extended bycom.limegroup.gnutella.downloader.AutoDownloadDetails
All Implemented Interfaces:
java.io.Serializable

public class AutoDownloadDetails
extends java.lang.Object
implements java.io.Serializable

Encapsulates important details about a auto download. Serializable for downloads.dat file; be careful when modifying!

See Also:
Serialized Form

Field Summary
static int MAX_DOWNLOADS
           
 
Constructor Summary
AutoDownloadDetails(java.lang.String inQuery, java.lang.String inRichQuery, byte[] inGuid, MediaType inType)
           
 
Method Summary
 boolean addDownload(RemoteFileDesc toAdd)
           
 void commitDownload(RemoteFileDesc toCommit)
          Call this when the DL was 'successful'.
 boolean expired()
           
 MediaType getMediaType()
           
 java.lang.String getQuery()
           
 java.lang.String getRichQuery()
           
 void removeDownload(RemoteFileDesc toRemove)
          Removes the input RFD from the list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_DOWNLOADS

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

AutoDownloadDetails

public AutoDownloadDetails(java.lang.String inQuery,
                           java.lang.String inRichQuery,
                           byte[] inGuid,
                           MediaType inType)
Parameters:
inQuery - the standard query string associated with this query.
inRichQuery - the rich query associated with this string.
inType - the mediatype associated with this string.....
Method Detail

getQuery

public java.lang.String getQuery()

getRichQuery

public java.lang.String getRichQuery()

getMediaType

public MediaType getMediaType()

addDownload

public boolean addDownload(RemoteFileDesc toAdd)
Parameters:
toAdd - The RFD you are TRYING to add.
Returns:
Whether or not the add was successful.

removeDownload

public void removeDownload(RemoteFileDesc toRemove)
Removes the input RFD from the list. Use this if the DL failed and you want to back it out....


commitDownload

public void commitDownload(RemoteFileDesc toCommit)
Call this when the DL was 'successful'.


expired

public boolean expired()
Returns:
true when the AutoDownload process is complete.