def restart(self, initialdlstatus=None): """ Restarts the stopped Download. @param initialdlstatus An optional parameter to restart the Download in a specific state. """ # Called by any thread DownloadImpl.restart(self, initialdlstatus)
def restart(self,initialdlstatus=None): """ Restarts the stopped Download. @param initialdlstatus An optional parameter to restart the Download in a specific state. """ # Called by any thread DownloadImpl.restart(self, initialdlstatus)
def set_state_callback(self,usercallback,getpeerlist=True): """ Set a callback for retrieving the state of the download. This callback will be called immediately with a DownloadState object as first parameter. The callback method must return a tuple (when,getpeerlist) where "when" indicates whether the callback should be called again and represents a number of seconds from now. If "when" <= 0.0 the callback will not be called again. "getpeerlist" is a boolean that indicates whether the DownloadState passed to the callback on the next invocation should contain info about the set of current peers. The callback will be called by a popup thread which can be used indefinitely (within reason) by the higher level code. @param usercallback Function that accepts DownloadState as parameter and returns a (float,boolean) tuple. """ DownloadImpl.set_state_callback(self,usercallback,getpeerlist=getpeerlist)
def set_state_callback(self, usercallback, getpeerlist=False, delay=0.0): """ Set a callback for retrieving the state of the download. This callback will be called immediately with a DownloadState object as first parameter. The callback method must return a tuple (when,getpeerlist) where "when" indicates whether the callback should be called again and represents a number of seconds from now. If "when" <= 0.0 the callback will not be called again. "getpeerlist" is a boolean that indicates whether the DownloadState passed to the callback on the next invocation should contain info about the set of current peers. The callback will be called by a popup thread which can be used indefinitely (within reason) by the higher level code. @param usercallback Function that accepts DownloadState as parameter and returns a (float,boolean) tuple. """ DownloadImpl.set_state_callback(self, usercallback, getpeerlist=getpeerlist, delay=delay)
def __init__(self, session, tdef): """ Internal constructor @param session Session @param tdef TorrentDef """ DownloadImpl.__init__(self, session, tdef)
def get_dest_files(self, exts=None): """ Returns the filenames on disk to which this Download saves @return A list of (filename-in-torrent, disk filename) tuples. """ return DownloadImpl.get_dest_files(self, exts)
def set_server_ip(self, ipAddr): # Called by any thread DownloadImpl.set_server_ip(self, ipAddr)
def get_num_msgs(self): # Called by any thread return DownloadImpl.get_num_msgs(self)
def get_packet_loss(self): # Called by any thread return DownloadImpl.get_packet_loss(self)
def set_max_desired_speed(self,direct,speed): """ Sets the maximum desired upload/download speed for this Download. @param direct The direction (UPLOAD/DOWNLOAD) @param speed The speed in KB/s. """ DownloadImpl.set_max_desired_speed(self,direct,speed)
def stop(self): """ Stops the Download, i.e. closes all connections to other peers. """ # Called by any thread DownloadImpl.stop(self)
def get_def(self): """ Return the read-only torrent definition (TorrentDef) for this Download. @return A TorrentDef object. """ return DownloadImpl.get_def(self)
def __init__(self,session,tdef): """ Internal constructor @param session Session @param tdef TorrentDef """ DownloadImpl.__init__(self,session,tdef)
def get_dest_files(self, exts = None): """ Returns the filenames on disk to which this Download saves @return A list of (filename-in-torrent, disk filename) tuples. """ return DownloadImpl.get_dest_files(self, exts)
def get_max_desired_speed(self,direct): """ Returns the maximum desired upload/download speed for this Download. @return The previously set speed in KB/s """ return DownloadImpl.get_max_desired_speed(self,direct)
def set_max_desired_speed(self, direct, speed): """ Sets the maximum desired upload/download speed for this Download. @param direct The direction (UPLOAD/DOWNLOAD) @param speed The speed in KB/s. """ DownloadImpl.set_max_desired_speed(self, direct, speed)
def get_server_ip(self): # Called by any thread return DownloadImpl.get_server_ip(self)
def restart(self): """ Restarts the stopped Download. """ # Called by any thread DownloadImpl.restart(self)
def set_flag(self, ipAddr): return DownloadImpl.set_flag(self, ipAddr)
def get_max_desired_speed(self, direct): """ Returns the maximum desired upload/download speed for this Download. @return The previously set speed in KB/s """ return DownloadImpl.get_max_desired_speed(self, direct)
def update_peerlist(self, highpeers, lowpeers): """ Updates peerlist. """ # Called by any thread return DownloadImpl.update_peerlist(self, highpeers, lowpeers)