add more enums so we can remove some of the constants

rename some of the packet classes

patch bump
This commit is contained in:
2026-03-07 00:03:46 +00:00
parent 3cde874a3c
commit 9f43ee18d3
7 changed files with 250 additions and 231 deletions

View File

@@ -1,6 +1,36 @@
from enum import Flag
class SubProtocols(Flag):
"""Sub Protocols - Bit flags that can be combined"""
AUDIO = 0x00
SERIAL = 0x20
TEXT = 0x40
SERVICE = 0x60
MASK = 0xE0
class ServiceTypes(Flag):
"""Service Types - Bit flags that can be combined"""
PING = 0
PONG = 0
CHATUTF8 = 1
RTPACKETREGISTER = 32
RTPACKET = 33
REQUESTREPLY = 0x02 # A Matrix reply
FNCT_REPLY = 0x80 # An RTPacket reply
class StreamTypes(Flag):
"""Stream Types - Bit flags that can be combined"""
ASCII = 0x00
UTF8 = 0x10
WCHAR = 0x20
class ChannelModes(Flag):
"""Channel Modes - Bit flags that can be combined"""