コード例 #1
0
 def set_selected_files(self, files):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_selected_files(self, files)
         self.set_filepieceranges(self.tdef.get_metainfo())
     finally:
         self.dllock.release()
コード例 #2
0
 def set_selected_files(self, files):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_selected_files(self, files)
         self.set_filepieceranges(self.tdef.get_metainfo())
     finally:
         self.dllock.release()
コード例 #3
0
 def set_video_event_callback(self, usercallback, dlmode=DLMODE_VOD):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_video_event_callback(self,
                                                          usercallback,
                                                          dlmode=dlmode)
     finally:
         self.dllock.release()
コード例 #4
0
 def set_max_conns_to_initiate(self, nconns):
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_conns2init_lambda = lambda : self.sd is not None and self.sd.set_max_conns_to_initiate(nconns, None)
             self.session.lm.rawserver.add_task(set_max_conns2init_lambda, 0.0)
         DownloadConfigInterface.set_max_conns_to_initiate(self, nconns)
     finally:
         self.dllock.release()
コード例 #5
0
 def set_max_uploads(self, value):
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_uploads_lambda = lambda : self.sd is not None and self.sd.set_max_uploads(value)
             self.session.lm.rawserver.add_task(set_max_uploads_lambda, 0.0)
         DownloadConfigInterface.set_max_uploads(self, value)
     finally:
         self.dllock.release()
コード例 #6
0
 def set_max_uploads(self, value):
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_uploads_lambda = lambda: self.sd is not None and self.sd.set_max_uploads(
                 value)
             self.session.lm.rawserver.add_task(set_max_uploads_lambda, 0.0)
         DownloadConfigInterface.set_max_uploads(self, value)
     finally:
         self.dllock.release()
コード例 #7
0
 def set_max_conns_to_initiate(self, nconns):
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_conns2init_lambda = lambda: self.sd is not None and self.sd.set_max_conns_to_initiate(
                 nconns, None)
             self.session.lm.rawserver.add_task(set_max_conns2init_lambda,
                                                0.0)
         DownloadConfigInterface.set_max_conns_to_initiate(self, nconns)
     finally:
         self.dllock.release()
コード例 #8
0
 def set_max_speed(self, direct, speed, auto_limit = False):
     if DEBUG:
         log('DownloadRuntimeConfig::set_max_speed:', binascii.hexlify(self.get_hash()), direct, speed, auto_limit)
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_speed_lambda = lambda : self.sd is not None and self.sd.set_max_speed(direct, speed, auto_limit)
             self.session.lm.rawserver.add_task(set_max_speed_lambda, 0)
         DownloadConfigInterface.set_max_speed(self, direct, speed, auto_limit)
     finally:
         self.dllock.release()
コード例 #9
0
 def set_max_speed(self, direct, speed, auto_limit=False):
     if DEBUG:
         log('DownloadRuntimeConfig::set_max_speed:',
             binascii.hexlify(self.get_hash()), direct, speed, auto_limit)
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_max_speed_lambda = lambda: self.sd is not None and self.sd.set_max_speed(
                 direct, speed, auto_limit)
             self.session.lm.rawserver.add_task(set_max_speed_lambda, 0)
         DownloadConfigInterface.set_max_speed(self, direct, speed,
                                               auto_limit)
     finally:
         self.dllock.release()
コード例 #10
0
 def set_wait_sufficient_speed(self, value):
     if DEBUG:
         log('DownloadRuntimeConfig::set_wait_sufficient_speed:', binascii.hexlify(self.get_hash()), value)
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_wait_sufficient_speed_lambda = lambda : self.sd is not None and self.sd.set_wait_sufficient_speed(value)
             self.session.lm.rawserver.add_task(set_wait_sufficient_speed_lambda, 0)
         if self.dd is not None:
             set_wait_sufficient_speed_lambda = lambda : self.dd is not None and self.dd.set_wait_sufficient_speed(value)
             self.session.lm.rawserver.add_task(set_wait_sufficient_speed_lambda, 0)
         DownloadConfigInterface.set_wait_sufficient_speed(self, value)
     finally:
         self.dllock.release()
コード例 #11
0
 def get_rarest_first_priority_cutoff(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_rarest_first_priority_cutoff(
             self)
     finally:
         self.dllock.release()
コード例 #12
0
 def set_wait_sufficient_speed(self, value):
     if DEBUG:
         log('DownloadRuntimeConfig::set_wait_sufficient_speed:',
             binascii.hexlify(self.get_hash()), value)
     self.dllock.acquire()
     try:
         if self.sd is not None:
             set_wait_sufficient_speed_lambda = lambda: self.sd is not None and self.sd.set_wait_sufficient_speed(
                 value)
             self.session.lm.rawserver.add_task(
                 set_wait_sufficient_speed_lambda, 0)
         if self.dd is not None:
             set_wait_sufficient_speed_lambda = lambda: self.dd is not None and self.dd.set_wait_sufficient_speed(
                 value)
             self.session.lm.rawserver.add_task(
                 set_wait_sufficient_speed_lambda, 0)
         DownloadConfigInterface.set_wait_sufficient_speed(self, value)
     finally:
         self.dllock.release()
コード例 #13
0
 def get_round_robin_period(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_round_robin_period(self)
     finally:
         self.dllock.release()
コード例 #14
0
 def get_breakup_seed_bitfield(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_breakup_seed_bitfield(self)
     finally:
         self.dllock.release()
コード例 #15
0
 def get_min_uploads(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_min_uploads(self)
     finally:
         self.dllock.release()
コード例 #16
0
 def get_min_uploads(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_min_uploads(self)
     finally:
         self.dllock.release()
コード例 #17
0
 def get_rerequest_interval(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_rerequest_interval(self)
     finally:
         self.dllock.release()
コード例 #18
0
 def set_poa(self, poa):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_poa(self, poa)
     finally:
         self.dllock.release()
コード例 #19
0
 def get_no_helpers(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_no_helpers(self)
     finally:
         self.dllock.release()
コード例 #20
0
 def get_ut_pex_max_addrs_from_peer(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_ut_pex_max_addrs_from_peer(self)
     finally:
         self.dllock.release()
コード例 #21
0
 def set_poa(self, poa):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_poa(self, poa)
     finally:
         self.dllock.release()
コード例 #22
0
 def get_auto_flush(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_auto_flush(self)
     finally:
         self.dllock.release()
コード例 #23
0
 def get_exclude_ips(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_exclude_ips(self)
     finally:
         self.dllock.release()
コード例 #24
0
 def get_lock_while_reading(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_lock_while_reading(self)
     finally:
         self.dllock.release()
コード例 #25
0
 def get_triple_check_writes(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_triple_check_writes(self)
     finally:
         self.dllock.release()
コード例 #26
0
 def get_security(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_security(self)
     finally:
         self.dllock.release()
コード例 #27
0
 def get_triple_check_writes(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_triple_check_writes(self)
     finally:
         self.dllock.release()
コード例 #28
0
 def get_poa(self, poa):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_poa(self)
     finally:
         self.dllock.release()
コード例 #29
0
 def get_exclude_ips(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_exclude_ips(self)
     finally:
         self.dllock.release()
コード例 #30
0
 def get_same_nat_try_internal(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_same_nat_try_internal(self)
     finally:
         self.dllock.release()
コード例 #31
0
 def get_round_robin_period(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_round_robin_period(self)
     finally:
         self.dllock.release()
コード例 #32
0
 def get_unchoke_bias_for_internal(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_unchoke_bias_for_internal(self)
     finally:
         self.dllock.release()
コード例 #33
0
 def get_wait_sufficient_speed(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_wait_sufficient_speed(self)
     finally:
         self.dllock.release()
コード例 #34
0
 def set_proxy_mode(self, value):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_proxy_mode(self, value)
     finally:
         self.dllock.release()
コード例 #35
0
 def get_tcp_ack_fudge(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_tcp_ack_fudge(self)
     finally:
         self.dllock.release()
コード例 #36
0
 def get_proxy_mode(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_proxy_mode(self)
     finally:
         self.dllock.release()
コード例 #37
0
 def get_http_timeout(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_http_timeout(self)
     finally:
         self.dllock.release()
コード例 #38
0
 def set_no_helpers(self, value):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.set_no_helpers(self, value)
     finally:
         self.dllock.release()
コード例 #39
0
 def get_rarest_first_priority_cutoff(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_rarest_first_priority_cutoff(self)
     finally:
         self.dllock.release()
コード例 #40
0
 def get_no_helpers(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_no_helpers(self)
     finally:
         self.dllock.release()
コード例 #41
0
 def get_max_files_open(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_max_files_open(self)
     finally:
         self.dllock.release()
コード例 #42
0
 def get_live_buffer_time(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_live_buffer_time(self)
     finally:
         self.dllock.release()
コード例 #43
0
 def get_security(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_security(self)
     finally:
         self.dllock.release()
コード例 #44
0
 def get_same_nat_try_internal(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_same_nat_try_internal(self)
     finally:
         self.dllock.release()
コード例 #45
0
 def get_lock_while_reading(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_lock_while_reading(self)
     finally:
         self.dllock.release()
コード例 #46
0
 def get_live_buffer_time(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_live_buffer_time(self)
     finally:
         self.dllock.release()
コード例 #47
0
 def get_ut_pex_max_addrs_from_peer(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_ut_pex_max_addrs_from_peer(self)
     finally:
         self.dllock.release()
コード例 #48
0
 def get_proxy_mode(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_proxy_mode(self)
     finally:
         self.dllock.release()
コード例 #49
0
 def get_poa(self, poa):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_poa(self)
     finally:
         self.dllock.release()
コード例 #50
0
 def get_max_files_open(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_max_files_open(self)
     finally:
         self.dllock.release()
コード例 #51
0
 def get_unchoke_bias_for_internal(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_unchoke_bias_for_internal(self)
     finally:
         self.dllock.release()
コード例 #52
0
 def get_http_timeout(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_http_timeout(self)
     finally:
         self.dllock.release()
コード例 #53
0
 def set_proxy_mode(self, value):
     self.dllock.acquire()
     try:
         DownloadConfigInterface.set_proxy_mode(self, value)
     finally:
         self.dllock.release()
コード例 #54
0
 def get_rerequest_interval(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_rerequest_interval(self)
     finally:
         self.dllock.release()
コード例 #55
0
 def set_no_helpers(self, value):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.set_no_helpers(self, value)
     finally:
         self.dllock.release()
コード例 #56
0
 def get_tcp_ack_fudge(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_tcp_ack_fudge(self)
     finally:
         self.dllock.release()
コード例 #57
0
 def get_max_slice_length(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_max_slice_length(self)
     finally:
         self.dllock.release()
コード例 #58
0
 def get_max_slice_length(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_max_slice_length(self)
     finally:
         self.dllock.release()
コード例 #59
0
 def get_auto_download_limit(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_auto_download_limit(self)
     finally:
         self.dllock.release()
コード例 #60
0
 def get_breakup_seed_bitfield(self):
     self.dllock.acquire()
     try:
         return DownloadConfigInterface.get_breakup_seed_bitfield(self)
     finally:
         self.dllock.release()