def __init__(self, data_handler, secure_overlay, session, buddycast_interval_function, log='', dnsindb=None): """ Returns an instance of this class """ #Keep reference to interval-function of BuddycastFactory self.interval = buddycast_interval_function self.data_handler = data_handler self.dnsindb = dnsindb self.log = log self.secure_overlay = secure_overlay self.channelcastdb = ChannelCastDBHandler.getInstance() self.rtorrent_handler = RemoteTorrentHandler.getInstance() self.my_permid = self.channelcastdb.my_permid self.session = session self.network_delay = 30 #Reference to buddycast-core, set by the buddycast-core (as it is created by the #buddycast-factory after calling this constructor). self.buddycast_core = None #Extend logging with ChannelCast-messages and status if self.log: self.overlay_log = OverlayLogger.getInstance(self.log) self.dnsindb = self.data_handler.get_dns_from_peerdb self.hits = []
def __init__(self, data_handler, overlay_bridge, session, buddycast_interval_function, log = '', dnsindb = None): """ Returns an instance of this class """ #Keep reference to interval-function of BuddycastFactory self.interval = buddycast_interval_function self.data_handler = data_handler self.dnsindb = dnsindb self.log = log self.overlay_bridge = overlay_bridge self.channelcastdb = ChannelCastDBHandler.getInstance() self.votecastdb = VoteCastDBHandler.getInstance() self.rtorrent_handler = RemoteTorrentHandler.getInstance() self.my_permid = self.channelcastdb.my_permid self.session = session self.network_delay = 30 #Reference to buddycast-core, set by the buddycast-core (as it is created by the #buddycast-factory after calling this constructor). self.buddycast_core = None #Extend logging with ChannelCast-messages and status if self.log: self.overlay_log = OverlayLogger.getInstance(self.log) self.dnsindb = self.data_handler.get_dns_from_peerdb self.hits = [] self.notifier = Notifier.getInstance() self.metadataDbHandler = MetadataDBHandler.getInstance() #subtitlesHandler = SubtitlesHandler.getInstance() subtitleSupport = SubtitlesSupport.getInstance() # better if an instance of RMDInterceptor was provided from the # outside self.peersHaveManger = PeersHaveManager.getInstance() if not self.peersHaveManger.isRegistered(): self.peersHaveManger.register(self.metadataDbHandler, self.overlay_bridge) self.richMetadataInterceptor = RichMetadataInterceptor(self.metadataDbHandler,self.votecastdb, self.my_permid, subtitleSupport, self.peersHaveManger, self.notifier)
def __init__(self, data_handler, secure_overlay, session, buddycast_interval_function, log = '', dnsindb = None): """ Returns an instance of this class """ #Keep reference to interval-function of BuddycastFactory self.interval = buddycast_interval_function self.data_handler = data_handler self.dnsindb = dnsindb self.log = log self.secure_overlay = secure_overlay self.channelcastdb = ChannelCastDBHandler.getInstance() self.rtorrent_handler = RemoteTorrentHandler.getInstance() self.my_permid = self.channelcastdb.my_permid self.session = session self.network_delay = 30 #Reference to buddycast-core, set by the buddycast-core (as it is created by the #buddycast-factory after calling this constructor). self.buddycast_core = None #Extend logging with ChannelCast-messages and status if self.log: self.overlay_log = OverlayLogger.getInstance(self.log) self.dnsindb = self.data_handler.get_dns_from_peerdb self.hits = []