"""Protocol constants for Cthulhu Remote.

The wire protocol is intentionally compatible with NVDA Remote protocol
version 2 so relay servers can be shared.
"""

from enum import Enum


PROTOCOL_VERSION = 2
SERVER_PORT = 6837
URL_PREFIX = "cthulhuremote://"


class RemoteMessageType(Enum):
    """Message types used by the remote relay protocol."""

    protocol_version = "protocol_version"
    join = "join"
    channel_joined = "channel_joined"
    client_joined = "client_joined"
    client_left = "client_left"
    generate_key = "generate_key"
    key = "key"
    speak = "speak"
    cancel = "cancel"
    pause_speech = "pause_speech"
    tone = "tone"
    wave = "wave"
    send_SAS = "send_SAS"
    index = "index"
    display = "display"
    braille_input = "braille_input"
    set_braille_info = "set_braille_info"
    set_display_size = "set_display_size"
    set_clipboard_text = "set_clipboard_text"
    motd = "motd"
    version_mismatch = "version_mismatch"
    ping = "ping"
    error = "error"
    nvda_not_connected = "nvda_not_connected"
