def handle_subscribe_timeline_squeak_displays(self, request, stopped):
     logger.info("Handle subscribe timeline squeak displays")
     squeak_display_stream = self.squeak_controller.subscribe_timeline_squeak_entries(
         stopped, )
     for squeak_display in squeak_display_stream:
         display_message = optional_squeak_entry_to_message(squeak_display)
         yield squeak_admin_pb2.GetSqueakDisplayReply(
             squeak_display_entry=display_message)
 def handle_get_squeak_display_entry(self, request):
     squeak_hash_str = request.squeak_hash
     squeak_hash = bytes.fromhex(squeak_hash_str)
     logger.info("Handle get squeak display entry for hash: {}".format(
         squeak_hash_str))
     squeak_entry = (self.squeak_controller.get_squeak_entry(squeak_hash))
     display_message = optional_squeak_entry_to_message(squeak_entry)
     return squeak_admin_pb2.GetSqueakDisplayReply(
         squeak_display_entry=display_message)
 def handle_subscribe_address_squeak_displays(self, request, stopped):
     squeak_address = request.address
     logger.info(
         "Handle subscribe address squeak displays for address: {}".format(
             squeak_address))
     squeak_display_stream = self.squeak_controller.subscribe_squeak_address_entries(
         squeak_address,
         stopped,
     )
     for squeak_display in squeak_display_stream:
         display_message = optional_squeak_entry_to_message(squeak_display)
         yield squeak_admin_pb2.GetSqueakDisplayReply(
             squeak_display_entry=display_message)
 def handle_subscribe_squeak_display(self, request, stopped):
     squeak_hash_str = request.squeak_hash
     squeak_hash = bytes.fromhex(squeak_hash_str)
     logger.info("Handle subscribe squeak display for hash: {}".format(
         squeak_hash_str))
     squeak_display_stream = self.squeak_controller.subscribe_squeak_entry(
         squeak_hash,
         stopped,
     )
     for squeak_display in squeak_display_stream:
         display_message = optional_squeak_entry_to_message(squeak_display)
         yield squeak_admin_pb2.GetSqueakDisplayReply(
             squeak_display_entry=display_message)