Ejemplo n.º 1
0
 def __init__(self):
     # Create and establish the Netflix session
     self.nfsession = NFSessionOperations()
     # Initialize correlated features
     self.directory_builder = DirectoryBuilder(self.nfsession)
     # Register the functions to IPC
     slots = self.nfsession.slots + self.directory_builder.slots + [
         self.library_auto_update
     ]
     for slot in slots:
         func_name = slot.__name__
         enveloped_func = common.EnvelopeIPCReturnCall(slot).call
         # For HTTP IPC (http_server.py)
         self.http_ipc_slots[func_name] = enveloped_func
         # For AddonSignals IPC
         common.register_slot(enveloped_func, func_name)
Ejemplo n.º 2
0
 def __init__(self):
     self._events_handler_thread = None
     self._init_msl_handler()
     common.register_slot(signal=common.Signals.RELEASE_LICENSE,
                          callback=self.release_license)
     common.register_slot(signal=common.Signals.CLEAR_USER_ID_TOKENS,
                          callback=self.clear_user_id_tokens)
     common.register_slot(signal=common.Signals.REINITIALIZE_MSL_HANDLER,
                          callback=self.reinitialize_msl_handler)
     common.register_slot(signal=common.Signals.SWITCH_EVENTS_HANDLER,
                          callback=self.switch_events_handler)
     # Register slot perform_key_handshake to IPC
     func_name = self.msl_requests.perform_key_handshake.__name__
     enveloped_func = common.EnvelopeIPCReturnCall(
         self.msl_requests.perform_key_handshake).call
     self.http_ipc_slots[
         func_name] = enveloped_func  # HTTP IPC (http_server.py)
     common.register_slot(enveloped_func, func_name)  # AddonSignals IPC