How to use the pyatv.mrp.protobuf.ProtocolMessage_pb2.ProtocolMessage function in pyatv

To help you get started, we’ve selected a few pyatv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github postlund / pyatv / pyatv / mrp / protobuf / RegisterForGameControllerEventsMessage_pb2.py View on Github external
_REGISTERFORGAMECONTROLLEREVENTSMESSAGE.fields_by_name['inputModeFlags'].enum_type = _REGISTERFORGAMECONTROLLEREVENTSMESSAGE_INPUTMODEFLAGS
_REGISTERFORGAMECONTROLLEREVENTSMESSAGE_INPUTMODEFLAGS.containing_type = _REGISTERFORGAMECONTROLLEREVENTSMESSAGE
DESCRIPTOR.message_types_by_name['RegisterForGameControllerEventsMessage'] = _REGISTERFORGAMECONTROLLEREVENTSMESSAGE
DESCRIPTOR.extensions_by_name['registerForGameControllerEventsMessage'] = registerForGameControllerEventsMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

RegisterForGameControllerEventsMessage = _reflection.GeneratedProtocolMessageType('RegisterForGameControllerEventsMessage', (_message.Message,), {
  'DESCRIPTOR' : _REGISTERFORGAMECONTROLLEREVENTSMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.RegisterForGameControllerEventsMessage_pb2'
  # @@protoc_insertion_point(class_scope:RegisterForGameControllerEventsMessage)
  })
_sym_db.RegisterMessage(RegisterForGameControllerEventsMessage)

registerForGameControllerEventsMessage.message_type = _REGISTERFORGAMECONTROLLEREVENTSMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(registerForGameControllerEventsMessage)
github postlund / pyatv / pyatv / mrp / protobuf / ClientUpdatesConfigMessage_pb2.py View on Github external
serialized_end=254,
)

DESCRIPTOR.message_types_by_name['ClientUpdatesConfigMessage'] = _CLIENTUPDATESCONFIGMESSAGE
DESCRIPTOR.extensions_by_name['clientUpdatesConfigMessage'] = clientUpdatesConfigMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

ClientUpdatesConfigMessage = _reflection.GeneratedProtocolMessageType('ClientUpdatesConfigMessage', (_message.Message,), {
  'DESCRIPTOR' : _CLIENTUPDATESCONFIGMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.ClientUpdatesConfigMessage_pb2'
  # @@protoc_insertion_point(class_scope:ClientUpdatesConfigMessage)
  })
_sym_db.RegisterMessage(ClientUpdatesConfigMessage)

clientUpdatesConfigMessage.message_type = _CLIENTUPDATESCONFIGMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(clientUpdatesConfigMessage)
github postlund / pyatv / pyatv / mrp / protobuf / KeyboardMessage_pb2.py View on Github external
)

_KEYBOARDMESSAGE.fields_by_name['attributes'].message_type = pyatv_dot_mrp_dot_protobuf_dot_TextEditingAttributesMessage__pb2._TEXTEDITINGATTRIBUTES
DESCRIPTOR.message_types_by_name['KeyboardMessage'] = _KEYBOARDMESSAGE
DESCRIPTOR.extensions_by_name['keyboardMessage'] = keyboardMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

KeyboardMessage = _reflection.GeneratedProtocolMessageType('KeyboardMessage', (_message.Message,), {
  'DESCRIPTOR' : _KEYBOARDMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.KeyboardMessage_pb2'
  # @@protoc_insertion_point(class_scope:KeyboardMessage)
  })
_sym_db.RegisterMessage(KeyboardMessage)

keyboardMessage.message_type = _KEYBOARDMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(keyboardMessage)
github postlund / pyatv / pyatv / mrp / protobuf / __init__.py View on Github external
from pyatv.mrp.protobuf.TextInputMessage_pb2 import TextInputMessage
from pyatv.mrp.protobuf.TextInputTraitsMessage_pb2 import TextInputTraits
from pyatv.mrp.protobuf.TransactionKey_pb2 import TransactionKey
from pyatv.mrp.protobuf.TransactionMessage_pb2 import TransactionMessage
from pyatv.mrp.protobuf.TransactionPacket_pb2 import TransactionPacket
from pyatv.mrp.protobuf.TransactionPackets_pb2 import TransactionPackets
from pyatv.mrp.protobuf.UpdateClientMessage_pb2 import UpdateClientMessage
from pyatv.mrp.protobuf.UpdateContentItemMessage_pb2 import UpdateContentItemMessage
from pyatv.mrp.protobuf.VirtualTouchDeviceDescriptorMessage_pb2 import VirtualTouchDeviceDescriptor
from pyatv.mrp.protobuf.VoiceInputDeviceDescriptorMessage_pb2 import VoiceInputDeviceDescriptor
from pyatv.mrp.protobuf.VolumeControlAvailabilityMessage_pb2 import VolumeControlAvailabilityMessage
from pyatv.mrp.protobuf.WakeDeviceMessage_pb2 import WakeDeviceMessage


_EXTENSION_LOOKUP = {
    ProtocolMessage.CLIENT_UPDATES_CONFIG_MESSAGE: ClientUpdatesConfigMessage_pb2.clientUpdatesConfigMessage,
    ProtocolMessage.CRYPTO_PAIRING_MESSAGE: CryptoPairingMessage_pb2.cryptoPairingMessage,
    ProtocolMessage.DEVICE_INFO_MESSAGE: DeviceInfoMessage_pb2.deviceInfoMessage,
    ProtocolMessage.DEVICE_INFO_UPDATE_MESSAGE: DeviceInfoMessage_pb2.deviceInfoMessage,
    ProtocolMessage.GET_KEYBOARD_SESSION_MESSAGE: GetKeyboardSessionMessage_pb2.getKeyboardSessionMessage,
    ProtocolMessage.KEYBOARD_MESSAGE: KeyboardMessage_pb2.keyboardMessage,
    ProtocolMessage.NOTIFICATION_MESSAGE: NotificationMessage_pb2.notificationMessage,
    ProtocolMessage.PLAYBACK_QUEUE_REQUEST_MESSAGE: PlaybackQueueRequestMessage_pb2.playbackQueueRequestMessage,
    ProtocolMessage.REGISTER_FOR_GAME_CONTROLLER_EVENTS_MESSAGE: RegisterForGameControllerEventsMessage_pb2.registerForGameControllerEventsMessage,
    ProtocolMessage.REGISTER_HID_DEVICE_MESSAGE: RegisterHIDDeviceMessage_pb2.registerHIDDeviceMessage,
    ProtocolMessage.REGISTER_HID_DEVICE_RESULT_MESSAGE: RegisterHIDDeviceResultMessage_pb2.registerHIDDeviceResultMessage,
    ProtocolMessage.REGISTER_VOICE_INPUT_DEVICE_MESSAGE: RegisterVoiceInputDeviceMessage_pb2.registerVoiceInputDeviceMessage,
    ProtocolMessage.REGISTER_VOICE_INPUT_DEVICE_RESPONSE_MESSAGE: RegisterVoiceInputDeviceResponseMessage_pb2.registerVoiceInputDeviceResponseMessage,
    ProtocolMessage.SEND_COMMAND_MESSAGE: SendCommandMessage_pb2.sendCommandMessage,
    ProtocolMessage.SEND_COMMAND_RESULT_MESSAGE: SendCommandResultMessage_pb2.sendCommandResultMessage,
    ProtocolMessage.SEND_HID_EVENT_MESSAGE: SendHIDEventMessage_pb2.sendHIDEventMessage,
    ProtocolMessage.SEND_PACKED_VIRTUAL_TOUCH_EVENT_MESSAGE: SendPackedVirtualTouchEventMessage_pb2.sendPackedVirtualTouchEventMessage,
github postlund / pyatv / pyatv / mrp / protobuf / SendPackedVirtualTouchEventMessage_pb2.py View on Github external
)

_SENDPACKEDVIRTUALTOUCHEVENTMESSAGE_PHASE.containing_type = _SENDPACKEDVIRTUALTOUCHEVENTMESSAGE
DESCRIPTOR.message_types_by_name['SendPackedVirtualTouchEventMessage'] = _SENDPACKEDVIRTUALTOUCHEVENTMESSAGE
DESCRIPTOR.extensions_by_name['sendPackedVirtualTouchEventMessage'] = sendPackedVirtualTouchEventMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

SendPackedVirtualTouchEventMessage = _reflection.GeneratedProtocolMessageType('SendPackedVirtualTouchEventMessage', (_message.Message,), {
  'DESCRIPTOR' : _SENDPACKEDVIRTUALTOUCHEVENTMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.SendPackedVirtualTouchEventMessage_pb2'
  # @@protoc_insertion_point(class_scope:SendPackedVirtualTouchEventMessage)
  })
_sym_db.RegisterMessage(SendPackedVirtualTouchEventMessage)

sendPackedVirtualTouchEventMessage.message_type = _SENDPACKEDVIRTUALTOUCHEVENTMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(sendPackedVirtualTouchEventMessage)
github postlund / pyatv / pyatv / mrp / protobuf / RegisterVoiceInputDeviceResponseMessage_pb2.py View on Github external
serialized_end=188,
)

DESCRIPTOR.message_types_by_name['RegisterVoiceInputDeviceResponseMessage'] = _REGISTERVOICEINPUTDEVICERESPONSEMESSAGE
DESCRIPTOR.extensions_by_name['registerVoiceInputDeviceResponseMessage'] = registerVoiceInputDeviceResponseMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

RegisterVoiceInputDeviceResponseMessage = _reflection.GeneratedProtocolMessageType('RegisterVoiceInputDeviceResponseMessage', (_message.Message,), {
  'DESCRIPTOR' : _REGISTERVOICEINPUTDEVICERESPONSEMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.RegisterVoiceInputDeviceResponseMessage_pb2'
  # @@protoc_insertion_point(class_scope:RegisterVoiceInputDeviceResponseMessage)
  })
_sym_db.RegisterMessage(RegisterVoiceInputDeviceResponseMessage)

registerVoiceInputDeviceResponseMessage.message_type = _REGISTERVOICEINPUTDEVICERESPONSEMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(registerVoiceInputDeviceResponseMessage)
github postlund / pyatv / pyatv / mrp / protobuf / __init__.py View on Github external
ProtocolMessage.TEXT_INPUT_MESSAGE: TextInputMessage_pb2.textInputMessage,
    ProtocolMessage.TRANSACTION_MESSAGE: TransactionMessage_pb2.transactionMessage,
    ProtocolMessage.UPDATE_CLIENT_MESSAGE: UpdateClientMessage_pb2.updateClientMessage,
    ProtocolMessage.UPDATE_CONTENT_ITEM_MESSAGE: UpdateContentItemMessage_pb2.updateContentItemMessage,
    ProtocolMessage.VOLUME_CONTROL_AVAILABILITY_MESSAGE: VolumeControlAvailabilityMessage_pb2.volumeControlAvailabilityMessage,
    ProtocolMessage.WAKE_DEVICE_MESSAGE: WakeDeviceMessage_pb2.wakeDeviceMessage,
}


CLIENT_UPDATES_CONFIG_MESSAGE = ProtocolMessage.CLIENT_UPDATES_CONFIG_MESSAGE
CRYPTO_PAIRING_MESSAGE = ProtocolMessage.CRYPTO_PAIRING_MESSAGE
DEVICE_INFO_MESSAGE = ProtocolMessage.DEVICE_INFO_MESSAGE
GET_KEYBOARD_SESSION_MESSAGE = ProtocolMessage.GET_KEYBOARD_SESSION_MESSAGE
KEYBOARD_MESSAGE = ProtocolMessage.KEYBOARD_MESSAGE
NOTIFICATION_MESSAGE = ProtocolMessage.NOTIFICATION_MESSAGE
PLAYBACK_QUEUE_REQUEST_MESSAGE = ProtocolMessage.PLAYBACK_QUEUE_REQUEST_MESSAGE
REGISTER_FOR_GAME_CONTROLLER_EVENTS_MESSAGE = ProtocolMessage.REGISTER_FOR_GAME_CONTROLLER_EVENTS_MESSAGE
REGISTER_HID_DEVICE_MESSAGE = ProtocolMessage.REGISTER_HID_DEVICE_MESSAGE
REGISTER_HID_DEVICE_RESULT_MESSAGE = ProtocolMessage.REGISTER_HID_DEVICE_RESULT_MESSAGE
REGISTER_VOICE_INPUT_DEVICE_MESSAGE = ProtocolMessage.REGISTER_VOICE_INPUT_DEVICE_MESSAGE
REGISTER_VOICE_INPUT_DEVICE_RESPONSE_MESSAGE = ProtocolMessage.REGISTER_VOICE_INPUT_DEVICE_RESPONSE_MESSAGE
SEND_COMMAND_MESSAGE = ProtocolMessage.SEND_COMMAND_MESSAGE
SEND_COMMAND_RESULT_MESSAGE = ProtocolMessage.SEND_COMMAND_RESULT_MESSAGE
SEND_HID_EVENT_MESSAGE = ProtocolMessage.SEND_HID_EVENT_MESSAGE
SEND_PACKED_VIRTUAL_TOUCH_EVENT_MESSAGE = ProtocolMessage.SEND_PACKED_VIRTUAL_TOUCH_EVENT_MESSAGE
SET_ARTWORK_MESSAGE = ProtocolMessage.SET_ARTWORK_MESSAGE
SET_CONNECTION_STATE_MESSAGE = ProtocolMessage.SET_CONNECTION_STATE_MESSAGE
SET_HILITE_MODE_MESSAGE = ProtocolMessage.SET_HILITE_MODE_MESSAGE
SET_NOW_PLAYING_CLIENT_MESSAGE = ProtocolMessage.SET_NOW_PLAYING_CLIENT_MESSAGE
SET_STATE_MESSAGE = ProtocolMessage.SET_STATE_MESSAGE
TEXT_INPUT_MESSAGE = ProtocolMessage.TEXT_INPUT_MESSAGE
TRANSACTION_MESSAGE = ProtocolMessage.TRANSACTION_MESSAGE
github postlund / pyatv / pyatv / mrp / protobuf / TransactionMessage_pb2.py View on Github external
)

_TRANSACTIONMESSAGE.fields_by_name['packets'].message_type = pyatv_dot_mrp_dot_protobuf_dot_TransactionPackets__pb2._TRANSACTIONPACKETS
DESCRIPTOR.message_types_by_name['TransactionMessage'] = _TRANSACTIONMESSAGE
DESCRIPTOR.extensions_by_name['transactionMessage'] = transactionMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

TransactionMessage = _reflection.GeneratedProtocolMessageType('TransactionMessage', (_message.Message,), {
  'DESCRIPTOR' : _TRANSACTIONMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.TransactionMessage_pb2'
  # @@protoc_insertion_point(class_scope:TransactionMessage)
  })
_sym_db.RegisterMessage(TransactionMessage)

transactionMessage.message_type = _TRANSACTIONMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(transactionMessage)
github postlund / pyatv / pyatv / mrp / protobuf / SendCommandMessage_pb2.py View on Github external
_SENDCOMMANDMESSAGE.fields_by_name['command'].enum_type = pyatv_dot_mrp_dot_protobuf_dot_CommandInfo__pb2._COMMAND
_SENDCOMMANDMESSAGE.fields_by_name['options'].message_type = pyatv_dot_mrp_dot_protobuf_dot_CommandOptions__pb2._COMMANDOPTIONS
_SENDCOMMANDMESSAGE.fields_by_name['playerPath'].message_type = pyatv_dot_mrp_dot_protobuf_dot_PlayerPath__pb2._PLAYERPATH
DESCRIPTOR.message_types_by_name['SendCommandMessage'] = _SENDCOMMANDMESSAGE
DESCRIPTOR.extensions_by_name['sendCommandMessage'] = sendCommandMessage
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

SendCommandMessage = _reflection.GeneratedProtocolMessageType('SendCommandMessage', (_message.Message,), {
  'DESCRIPTOR' : _SENDCOMMANDMESSAGE,
  '__module__' : 'pyatv.mrp.protobuf.SendCommandMessage_pb2'
  # @@protoc_insertion_point(class_scope:SendCommandMessage)
  })
_sym_db.RegisterMessage(SendCommandMessage)

sendCommandMessage.message_type = _SENDCOMMANDMESSAGE
pyatv_dot_mrp_dot_protobuf_dot_ProtocolMessage__pb2.ProtocolMessage.RegisterExtension(sendCommandMessage)
github postlund / pyatv / scripts / print_protobuf.py View on Github external
#!/usr/bin/env python3
"""Decode and print a protobuf message from hex."""

import sys
import binascii

from pyatv.mrp.protobuf import ProtocolMessage_pb2 as PB


if __name__ == '__main__':
    data = binascii.unhexlify(sys.argv[1])
    parsed = PB.ProtocolMessage()
    parsed.ParseFromString(data)
    print(parsed)