1 # Written by Arno Bakker
2 # see LICENSE.txt for license information
4 from __future__ import with_statement
6 from traceback import print_exc
8 from BaseLib.Core.exceptions import *
9 from BaseLib.Core.SessionConfig import SessionConfigInterface
10 from BaseLib.Core.Subtitles.SubtitlesHandler import SubtitlesHandler
12 # 10/02/10 Boudewijn: pylint points out that member variables used in
13 # SessionRuntimeConfig do not exist. This is because they are set in
14 # BaseLib.Core.Session which is a subclass of SessionRuntimeConfig.
16 # We disable this error
17 # pylint: disable-msg=E1101
19 class SessionRuntimeConfig(SessionConfigInterface):
21 Implements the BaseLib.Core.API.SessionConfigInterface
23 Use these to change the session config at runtime.
25 def set_state_dir(self,statedir):
26 raise OperationNotPossibleAtRuntimeException()
28 def get_state_dir(self):
29 self.sesslock.acquire()
31 return SessionConfigInterface.get_state_dir(self)
33 self.sesslock.release()
35 def set_install_dir(self,statedir):
36 raise OperationNotPossibleAtRuntimeException()
38 def get_install_dir(self):
39 self.sesslock.acquire()
41 return SessionConfigInterface.get_install_dir(self)
43 self.sesslock.release()
45 def set_permid_keypair_filename(self,keypair):
46 raise OperationNotPossibleAtRuntimeException()
48 def get_permid_keypair_filename(self):
49 self.sesslock.acquire()
51 return SessionConfigInterface.get_permid_keypair_filename(self)
53 self.sesslock.release()
55 def set_listen_port(self,port):
56 raise OperationNotPossibleAtRuntimeException()
58 def get_listen_port(self):
59 # To protect self.sessconfig
60 self.sesslock.acquire()
62 return SessionConfigInterface.get_listen_port(self)
64 self.sesslock.release()
66 def get_video_analyser_path(self):
67 # To protect self.sessconfig
68 self.sesslock.acquire()
70 return SessionConfigInterface.get_video_analyser_path(self)
72 self.sesslock.release()
74 def set_tracker_ip(self,value):
75 raise OperationNotPossibleAtRuntimeException()
77 def get_tracker_ip(self):
78 self.sesslock.acquire()
80 return SessionConfigInterface.get_tracker_ip(self)
82 self.sesslock.release()
84 def set_bind_to_addresses(self,value):
85 raise OperationNotPossibleAtRuntimeException()
87 def get_bind_to_addresses(self):
88 self.sesslock.acquire()
90 return SessionConfigInterface.get_bind_to_addresses(self)
92 self.sesslock.release()
94 def set_upnp_mode(self,value):
95 raise OperationNotPossibleAtRuntimeException()
97 def get_upnp_mode(self):
98 self.sesslock.acquire()
100 return SessionConfigInterface.get_upnp_mode(self)
102 self.sesslock.release()
104 def set_autoclose_timeout(self,value):
105 raise OperationNotPossibleAtRuntimeException()
107 def get_autoclose_timeout(self):
108 self.sesslock.acquire()
110 return SessionConfigInterface.get_autoclose_timeout(self)
112 self.sesslock.release()
114 def set_autoclose_check_interval(self,value):
115 raise OperationNotPossibleAtRuntimeException()
117 def get_autoclose_check_interval(self):
118 self.sesslock.acquire()
120 return SessionConfigInterface.get_autoclose_check_interval(self)
122 self.sesslock.release()
124 def set_megacache(self,value):
125 raise OperationNotPossibleAtRuntimeException()
127 def get_megacache(self):
128 self.sesslock.acquire()
130 return SessionConfigInterface.get_megacache(self)
132 self.sesslock.release()
134 def set_overlay(self,value):
135 raise OperationNotPossibleAtRuntimeException()
137 def get_overlay(self):
138 self.sesslock.acquire()
140 return SessionConfigInterface.get_overlay(self)
142 self.sesslock.release()
144 def set_buddycast(self,value):
145 raise OperationNotPossibleAtRuntimeException()
147 def get_buddycast(self):
148 self.sesslock.acquire()
150 return SessionConfigInterface.get_buddycast(self)
152 self.sesslock.release()
154 def set_start_recommender(self,value):
155 self.sesslock.acquire()
157 from BaseLib.Core.Overlay.OverlayThreadingBridge import OverlayThreadingBridge
159 SessionConfigInterface.set_start_recommender(self,value)
160 olbridge = OverlayThreadingBridge.getInstance()
161 task = lambda:self.olthread_set_start_recommender(value)
162 olbridge.add_task(task,0)
164 self.sesslock.release()
166 def olthread_set_start_recommender(self,value):
167 from BaseLib.Core.BuddyCast.buddycast import BuddyCastFactory
168 bcfac = BuddyCastFactory.getInstance()
170 bcfac.restartBuddyCast()
172 bcfac.pauseBuddyCast()
174 def get_start_recommender(self):
175 self.sesslock.acquire()
177 return SessionConfigInterface.get_start_recommender(self)
179 self.sesslock.release()
184 def set_download_help(self,value):
185 raise OperationNotPossibleAtRuntimeException()
187 def get_download_help(self):
188 self.sesslock.acquire()
190 return SessionConfigInterface.get_download_help(self)
192 self.sesslock.release()
194 def set_proxyservice_status(self,value):
195 """ Set the status of the proxyservice (on or off).
197 ProxyService off means the current node could not be used as a proxy. ProxyService on means other nodes will be able to use it as a proxy.
199 @param value: one of the possible two values: PROXYSERVICE_OFF, PROXYSERVICE_ON
201 self.sesslock.acquire()
203 SessionConfigInterface.set_proxyservice_status(self, value)
205 self.sesslock.release()
207 def get_proxyservice_status(self):
208 """ Returns the status of the proxyservice (on or off).
209 @return: one of the possible two values: PROXYSERVICE_OFF, PROXYSERVICE_ON
211 self.sesslock.acquire()
213 return SessionConfigInterface.get_proxyservice_status(self)
215 self.sesslock.release()
222 def set_torrent_collecting(self,value):
223 raise OperationNotPossibleAtRuntimeException()
225 def get_torrent_collecting(self):
226 self.sesslock.acquire()
228 return SessionConfigInterface.get_torrent_collecting(self)
230 self.sesslock.release()
233 def set_torrent_collecting_dir(self,value):
234 raise OperationNotPossibleAtRuntimeException()
236 def get_torrent_collecting_dir(self):
237 self.sesslock.acquire()
239 return SessionConfigInterface.get_torrent_collecting_dir(self)
241 self.sesslock.release()
243 def get_subtitles_collecting_dir(self):
245 return SessionConfigInterface.get_subtitles_collecting_dir(self)
247 def set_subtitles_upload_rate(self, value):
249 SubtitlesHandler.getInstance().setUploadRate(value)
250 SessionConfigInterface.set_subtitles_uploade_rate(self, value)
252 def get_subtitles_upload_rate(self):
254 return SessionConfigInterface.get_subtitles_upload_rate(self)
258 def set_superpeer(self,value):
259 raise OperationNotPossibleAtRuntimeException()
261 def get_superpeer(self):
262 self.sesslock.acquire()
264 return SessionConfigInterface.get_superpeer(self)
266 self.sesslock.release()
268 def set_overlay_log(self,value):
269 raise OperationNotPossibleAtRuntimeException()
271 def get_overlay_log(self):
272 self.sesslock.acquire()
274 return SessionConfigInterface.get_overlay_log(self)
276 self.sesslock.release()
278 def set_buddycast_interval(self,value):
279 raise OperationNotPossibleAtRuntimeException()
281 def get_buddycast_interval(self):
282 self.sesslock.acquire()
284 return SessionConfigInterface.get_buddycast_interval(self)
286 self.sesslock.release()
288 def set_torrent_collecting_max_torrents(self,value):
289 self.sesslock.acquire()
291 from BaseLib.Core.Overlay.OverlayThreadingBridge import OverlayThreadingBridge
293 SessionConfigInterface.set_torrent_collecting_max_torrents(self,value)
294 olbridge = OverlayThreadingBridge.getInstance()
295 task = lambda:self.olthread_set_torrent_collecting_max_torrents(value)
296 olbridge.add_task(task,0)
298 self.sesslock.release()
300 def olthread_set_torrent_collecting_max_torrents(self,value):
301 from BaseLib.Core.Overlay.MetadataHandler import MetadataHandler
302 mh = MetadataHandler.getInstance()
303 mh.set_overflow(value)
304 mh.delayed_check_overflow(2)
307 def get_torrent_collecting_max_torrents(self):
308 self.sesslock.acquire()
310 return SessionConfigInterface.get_torrent_collecting_max_torrents(self)
312 self.sesslock.release()
314 def set_buddycast_max_peers(self,value):
315 raise OperationNotPossibleAtRuntimeException()
317 def get_buddycast_max_peers(self):
318 self.sesslock.acquire()
320 return SessionConfigInterface.get_buddycast_max_peers(self)
322 self.sesslock.release()
324 def set_torrent_collecting_rate(self,value):
325 self.sesslock.acquire()
327 from BaseLib.Core.Overlay.OverlayThreadingBridge import OverlayThreadingBridge
329 SessionConfigInterface.set_torrent_collecting_rate(self,value)
330 olbridge = OverlayThreadingBridge.getInstance()
331 task = lambda:self.olthread_set_torrent_collecting_rate(value)
332 olbridge.add_task(task,0)
334 self.sesslock.release()
336 def olthread_set_torrent_collecting_rate(self,value):
337 from BaseLib.Core.Overlay.MetadataHandler import MetadataHandler
338 mh = MetadataHandler.getInstance()
341 def get_torrent_collecting_rate(self):
342 self.sesslock.acquire()
344 return SessionConfigInterface.get_torrent_collecting_rate(self)
346 self.sesslock.release()
348 def set_torrent_checking(self,value):
349 raise OperationNotPossibleAtRuntimeException()
351 def get_torrent_checking(self):
352 self.sesslock.acquire()
354 return SessionConfigInterface.get_torrent_checking(self)
356 self.sesslock.release()
358 def set_torrent_checking_period(self,value):
359 raise OperationNotPossibleAtRuntimeException()
361 def get_torrent_checking_period(self):
362 self.sesslock.acquire()
364 return SessionConfigInterface.get_torrent_checking_period(self)
366 self.sesslock.release()
368 def set_dialback(self,value):
369 raise OperationNotPossibleAtRuntimeException()
371 def get_dialback(self):
372 self.sesslock.acquire()
374 return SessionConfigInterface.get_dialback(self)
376 self.sesslock.release()
378 def set_social_networking(self,value):
379 raise OperationNotPossibleAtRuntimeException()
381 def get_social_networking(self):
382 self.sesslock.acquire()
384 return SessionConfigInterface.get_social_networking(self)
386 self.sesslock.release()
388 def set_remote_query(self,value):
389 raise OperationNotPossibleAtRuntimeException()
391 def get_remote_query(self):
392 self.sesslock.acquire()
394 return SessionConfigInterface.get_remote_query(self)
396 self.sesslock.release()
398 def set_stop_collecting_threshold(self,value):
399 self.sesslock.acquire()
401 from BaseLib.Core.Overlay.OverlayThreadingBridge import OverlayThreadingBridge
403 SessionConfigInterface.set_stop_collecting_threshold(self,value)
404 olbridge = OverlayThreadingBridge.getInstance()
405 task = lambda:self.olthread_set_stop_collecting_threshold(value)
406 olbridge.add_task(task,0)
408 self.sesslock.release()
410 def olthread_set_stop_collecting_threshold(self,value):
411 from BaseLib.Core.Overlay.MetadataHandler import MetadataHandler
412 mh = MetadataHandler.getInstance()
413 mh.set_min_free_space(value)
414 mh.delayed_check_free_space(2)
416 def get_stop_collecting_threshold(self):
417 self.sesslock.acquire()
419 return SessionConfigInterface.get_stop_collecting_threshold(self)
421 self.sesslock.release()
423 def set_internal_tracker(self,value):
424 raise OperationNotPossibleAtRuntimeException()
426 def get_internal_tracker(self):
427 self.sesslock.acquire()
429 return SessionConfigInterface.get_internal_tracker(self)
431 self.sesslock.release()
433 def set_internal_tracker_url(self,value):
434 raise OperationNotPossibleAtRuntimeException()
436 #def get_internal_tracker_url(self):
437 """ Implemented in Session.py """
439 def set_mainline_dht(self,value):
440 raise OperationNotPossibleAtRuntimeException()
442 def get_mainline_dht(self):
443 self.sesslock.acquire()
445 return SessionConfigInterface.get_mainline_dht(self)
447 self.sesslock.release()
449 def set_nickname(self,value):
450 self.sesslock.acquire()
452 return SessionConfigInterface.set_nickname(self, value)
454 self.sesslock.release()
456 def get_nickname(self):
457 self.sesslock.acquire()
459 return SessionConfigInterface.get_nickname(self)
461 self.sesslock.release()
463 def set_mugshot(self,value, mime='image/jpeg'):
464 self.sesslock.acquire()
466 return SessionConfigInterface.set_mugshot(self, value, mime)
468 self.sesslock.release()
470 def get_mugshot(self):
471 self.sesslock.acquire()
473 return SessionConfigInterface.get_mugshot(self)
475 self.sesslock.release()
478 def set_tracker_dfile(self,value):
479 raise OperationNotPossibleAtRuntimeException()
481 def get_tracker_dfile(self):
482 self.sesslock.acquire()
484 return SessionConfigInterface.get_tracker_dfile(self)
486 self.sesslock.release()
488 def set_tracker_dfile_format(self,value):
489 raise OperationNotPossibleAtRuntimeException()
491 def get_tracker_dfile_format(self):
492 self.sesslock.acquire()
494 return SessionConfigInterface.get_tracker_dfile_format(self)
496 self.sesslock.release()
498 def set_tracker_socket_timeout(self,value):
499 raise OperationNotPossibleAtRuntimeException()
501 def get_tracker_socket_timeout(self):
502 self.sesslock.acquire()
504 return SessionConfigInterface.get_tracker_socket_timeout(self)
506 self.sesslock.release()
508 def set_tracker_save_dfile_interval(self,value):
509 raise OperationNotPossibleAtRuntimeException()
511 def get_tracker_save_dfile_interval(self):
512 self.sesslock.acquire()
514 return SessionConfigInterface.get_tracker_save_dfile_interval(self)
516 self.sesslock.release()
518 def set_tracker_timeout_downloaders_interval(self,value):
519 raise OperationNotPossibleAtRuntimeException()
521 def get_tracker_timeout_downloaders_interval(self):
522 self.sesslock.acquire()
524 return SessionConfigInterface.get_tracker_timeout_downloaders_interval(self)
526 self.sesslock.release()
528 def set_tracker_reannounce_interval(self,value):
529 raise OperationNotPossibleAtRuntimeException()
531 def get_tracker_reannounce_interval(self):
532 self.sesslock.acquire()
534 return SessionConfigInterface.get_tracker_reannounce_interval(self)
536 self.sesslock.release()
538 def set_tracker_response_size(self,value):
539 raise OperationNotPossibleAtRuntimeException()
541 def get_tracker_response_size(self):
542 self.sesslock.acquire()
544 return SessionConfigInterface.get_tracker_response_size(self)
546 self.sesslock.release()
548 def set_tracker_timeout_check_interval(self,value):
549 raise OperationNotPossibleAtRuntimeException()
551 def get_tracker_timeout_check_interval(self):
552 self.sesslock.acquire()
554 return SessionConfigInterface.get_tracker_timeout_check_interval(self)
556 self.sesslock.release()
558 def set_tracker_nat_check(self,value):
559 raise OperationNotPossibleAtRuntimeException()
561 def get_tracker_nat_check(self):
562 self.sesslock.acquire()
564 return SessionConfigInterface.get_tracker_nat_check(self)
566 self.sesslock.release()
568 def set_tracker_log_nat_checks(self,value):
569 raise OperationNotPossibleAtRuntimeException()
571 def get_tracker_log_nat_checks(self):
572 self.sesslock.acquire()
574 return SessionConfigInterface.get_tracker_log_nat_checks(self)
576 self.sesslock.release()
578 def set_tracker_min_time_between_log_flushes(self,value):
579 raise OperationNotPossibleAtRuntimeException()
581 def get_tracker_min_time_between_log_flushes(self):
582 self.sesslock.acquire()
584 return SessionConfigInterface.get_tracker_min_time_between_log_flushes(self)
586 self.sesslock.release()
588 def set_tracker_min_time_between_cache_refreshes(self,value):
589 raise OperationNotPossibleAtRuntimeException()
591 def get_tracker_min_time_between_cache_refreshes(self):
592 self.sesslock.acquire()
594 return SessionConfigInterface.get_tracker_min_time_between_cache_refreshes(self)
596 self.sesslock.release()
598 def set_tracker_allowed_dir(self,value):
599 raise OperationNotPossibleAtRuntimeException()
601 def get_tracker_allowed_dir(self):
602 self.sesslock.acquire()
604 return SessionConfigInterface.get_tracker_allowed_dir(self)
606 self.sesslock.release()
608 def set_tracker_allowed_list(self,value):
609 raise OperationNotPossibleAtRuntimeException()
611 def get_tracker_allowed_list(self):
612 self.sesslock.acquire()
614 return SessionConfigInterface.get_tracker_allowed_list(self)
616 self.sesslock.release()
618 def set_tracker_allowed_controls(self,value):
619 raise OperationNotPossibleAtRuntimeException()
621 def get_tracker_allowed_controls(self):
622 self.sesslock.acquire()
624 return SessionConfigInterface.get_tracker_allowed_controls(self)
626 self.sesslock.release()
628 def set_tracker_multitracker_enabled(self,value):
629 raise OperationNotPossibleAtRuntimeException()
631 def get_tracker_multitracker_enabled(self):
632 self.sesslock.acquire()
634 return SessionConfigInterface.get_tracker_multitracker_enabled(self)
636 self.sesslock.release()
638 def set_tracker_multitracker_allowed(self,value):
639 raise OperationNotPossibleAtRuntimeException()
641 def get_tracker_multitracker_allowed(self):
642 self.sesslock.acquire()
644 return SessionConfigInterface.get_tracker_multitracker_allowed(self)
646 self.sesslock.release()
648 def set_tracker_multitracker_reannounce_interval(self,value):
649 raise OperationNotPossibleAtRuntimeException()
651 def get_tracker_multitracker_reannounce_interval(self):
652 self.sesslock.acquire()
654 return SessionConfigInterface.get_tracker_multitracker_reannounce_interval(self)
656 self.sesslock.release()
658 def set_tracker_multitracker_maxpeers(self,value):
659 raise OperationNotPossibleAtRuntimeException()
661 def get_tracker_multitracker_maxpeers(self):
662 self.sesslock.acquire()
664 return SessionConfigInterface.get_tracker_multitracker_maxpeers(self)
666 self.sesslock.release()
668 def set_tracker_aggregate_forward(self,value):
669 raise OperationNotPossibleAtRuntimeException()
671 def get_tracker_aggregate_forward(self):
672 self.sesslock.acquire()
674 return SessionConfigInterface.get_tracker_aggregate_forward(self)
676 self.sesslock.release()
678 def set_tracker_aggregator(self,value):
679 raise OperationNotPossibleAtRuntimeException()
681 def get_tracker_aggregator(self):
682 self.sesslock.acquire()
684 return SessionConfigInterface.get_tracker_aggregator(self)
686 self.sesslock.release()
688 def set_tracker_hupmonitor(self,value):
689 raise OperationNotPossibleAtRuntimeException()
691 def get_tracker_hupmonitor(self):
692 self.sesslock.acquire()
694 return SessionConfigInterface.get_tracker_hupmonitor(self)
696 self.sesslock.release()
698 def set_tracker_multitracker_http_timeout(self,value):
699 raise OperationNotPossibleAtRuntimeException()
701 def get_tracker_multitracker_http_timeout(self):
702 self.sesslock.acquire()
704 return SessionConfigInterface.get_tracker_multitracker_http_timeout(self)
706 self.sesslock.release()
708 def set_tracker_parse_dir_interval(self,value):
709 raise OperationNotPossibleAtRuntimeException()
711 def get_tracker_parse_dir_interval(self):
712 self.sesslock.acquire()
714 return SessionConfigInterface.get_tracker_parse_dir_interval(self)
716 self.sesslock.release()
718 def set_tracker_show_infopage(self,value):
719 raise OperationNotPossibleAtRuntimeException()
721 def get_tracker_show_infopage(self):
722 self.sesslock.acquire()
724 return SessionConfigInterface.get_tracker_show_infopage(self)
726 self.sesslock.release()
728 def set_tracker_infopage_redirect(self,value):
729 raise OperationNotPossibleAtRuntimeException()
731 def get_tracker_infopage_redirect(self):
732 self.sesslock.acquire()
734 return SessionConfigInterface.get_tracker_infopage_redirect(self)
736 self.sesslock.release()
738 def set_tracker_show_names(self,value):
739 raise OperationNotPossibleAtRuntimeException()
741 def get_tracker_show_names(self):
742 self.sesslock.acquire()
744 return SessionConfigInterface.get_tracker_show_names(self)
746 self.sesslock.release()
748 def set_tracker_favicon(self,value):
749 raise OperationNotPossibleAtRuntimeException()
751 def get_tracker_favicon(self):
752 self.sesslock.acquire()
754 return SessionConfigInterface.get_tracker_favicon(self)
756 self.sesslock.release()
758 def set_tracker_allowed_ips(self,value):
759 raise OperationNotPossibleAtRuntimeException()
761 def get_tracker_allowed_ips(self):
762 self.sesslock.acquire()
764 return SessionConfigInterface.get_tracker_allowed_ips(self)
766 self.sesslock.release()
768 def set_tracker_banned_ips(self,value):
769 raise OperationNotPossibleAtRuntimeException()
771 def get_tracker_banned_ips(self):
772 self.sesslock.acquire()
774 return SessionConfigInterface.get_tracker_banned_ips(self)
776 self.sesslock.release()
778 def set_tracker_only_local_override_ip(self,value):
779 raise OperationNotPossibleAtRuntimeException()
781 def get_tracker_only_local_override_ip(self):
782 self.sesslock.acquire()
784 return SessionConfigInterface.get_tracker_only_local_override_ip(self)
786 self.sesslock.release()
788 def set_tracker_logfile(self,value):
789 raise OperationNotPossibleAtRuntimeException()
791 def get_tracker_logfile(self):
792 self.sesslock.acquire()
794 return SessionConfigInterface.get_tracker_logfile(self)
796 self.sesslock.release()
798 def set_tracker_allow_get(self,value):
799 raise OperationNotPossibleAtRuntimeException()
801 def get_tracker_allow_get(self):
802 self.sesslock.acquire()
804 return SessionConfigInterface.get_tracker_allow_get(self)
806 self.sesslock.release()
808 def set_tracker_keep_dead(self,value):
809 raise OperationNotPossibleAtRuntimeException()
811 def get_tracker_keep_dead(self):
812 self.sesslock.acquire()
814 return SessionConfigInterface.get_tracker_keep_dead(self)
816 self.sesslock.release()
818 def set_tracker_scrape_allowed(self,value):
819 raise OperationNotPossibleAtRuntimeException()
821 def get_tracker_scrape_allowed(self):
822 self.sesslock.acquire()
824 return SessionConfigInterface.get_tracker_scrape_allowed(self)
826 self.sesslock.release()
828 def set_overlay_max_message_length(self,value):
829 raise OperationNotPossibleAtRuntimeException()
831 def get_overlay_max_message_length(self):
832 self.sesslock.acquire()
834 return SessionConfigInterface.get_overlay_max_message_length(self)
836 self.sesslock.release()
838 def set_download_help_dir(self,value):
839 raise OperationNotPossibleAtRuntimeException()
841 def get_download_help_dir(self):
842 self.sesslock.acquire()
844 return SessionConfigInterface.get_download_help_dir(self)
846 self.sesslock.release()
848 def set_bartercast(self,value):
849 raise OperationNotPossibleAtRuntimeException()
851 def get_bartercast(self):
852 self.sesslock.acquire()
854 return SessionConfigInterface.get_bartercast(self)
856 self.sesslock.release()
858 def set_superpeer_file(self,value):
859 raise OperationNotPossibleAtRuntimeException()
861 def get_superpeer_file(self):
862 self.sesslock.acquire()
864 return SessionConfigInterface.get_superpeer_file(self)
866 self.sesslock.release()
868 def set_buddycast_collecting_solution(self,value):
869 raise OperationNotPossibleAtRuntimeException()
871 def get_buddycast_collecting_solution(self):
872 self.sesslock.acquire()
874 return SessionConfigInterface.get_buddycast_collecting_solution(self)
876 self.sesslock.release()
878 def set_peer_icon_path(self,value):
879 raise OperationNotPossibleAtRuntimeException()
881 def get_peer_icon_path(self):
882 self.sesslock.acquire()
884 return SessionConfigInterface.get_peer_icon_path(self)
886 self.sesslock.release()
889 # NAT Puncturing servers information setting/retrieval
891 def set_nat_detect(self,value):
892 raise OperationNotPossibleAtRuntimeException()
894 def set_puncturing_private_port(self, puncturing_private_port):
895 raise OperationNotPossibleAtRuntimeException()
897 def set_stun_servers(self, stun_servers):
898 raise OperationNotPossibleAtRuntimeException()
900 def set_pingback_servers(self, pingback_servers):
901 raise OperationNotPossibleAtRuntimeException()
903 def set_puncturing_coordinators(self, puncturing_coordinators):
904 raise OperationNotPossibleAtRuntimeException()
906 def get_nat_detect(self):
907 self.sesslock.acquire()
909 return SessionConfigInterface.get_nat_detect(self)
911 self.sesslock.release()
913 def get_puncturing_internal_port(self):
914 self.sesslock.acquire()
916 return SessionConfigInterface.get_puncturing_internal_port(self)
918 self.sesslock.release()
920 def get_stun_servers(self):
921 self.sesslock.acquire()
923 return SessionConfigInterface.get_stun_servers(self)
925 self.sesslock.release()
927 def get_pingback_servers(self):
928 self.sesslock.acquire()
930 return SessionConfigInterface.get_pingback_servers(self)
932 self.sesslock.release()
937 def set_crawler(self, value):
938 raise OperationNotPossibleAtRuntimeException()
940 def get_crawler(self):
941 self.sesslock.acquire()
943 return SessionConfigInterface.get_crawler(self)
945 self.sesslock.release()
948 # Local Peer Discovery using IP Multicast
950 def set_multicast_local_peer_discovery(self,value):
951 raise OperationNotPossibleAtRuntimeException()
953 def get_multicast_local_peer_discovery(self):
954 self.sesslock.acquire()
956 return SessionConfigInterface.get_multicast_local_peer_discovery(self)
958 self.sesslock.release()