pantalaimon/pantalaimon/thread_messages.py
2019-05-09 10:53:20 +02:00

62 lines
859 B
Python

import attr
@attr.s
class Message:
pass
@attr.s
class InfoMessage(Message):
string = attr.ib()
@attr.s
class DevicesMessage(Message):
user_id = attr.ib()
devices = attr.ib()
@attr.s
class _KeysOperation(Message):
pan_user = attr.ib()
file_path = attr.ib()
passphrase = attr.ib()
@attr.s
class ImportKeysMessage(_KeysOperation):
pass
@attr.s
class ExportKeysMessage(_KeysOperation):
pass
@attr.s
class _VerificationMessage(Message):
pan_user = attr.ib()
user_id = attr.ib()
device_id = attr.ib()
@attr.s
class DeviceVerifyMessage(_VerificationMessage):
pass
@attr.s
class DeviceUnverifyMessage(_VerificationMessage):
pass
@attr.s
class DeviceConfirmSasMessage(_VerificationMessage):
pass
@attr.s
class DeviceAuthStringMessage(_VerificationMessage):
short_string = attr.ib()