2019-04-12 18:33:09 +10:00
|
|
|
# Copyright 2019 miruka
|
|
|
|
# This file is part of harmonyqml, licensed under GPLv3.
|
|
|
|
|
2019-04-15 06:12:07 +10:00
|
|
|
from typing import Dict, List, NamedTuple, Optional
|
2019-04-12 18:33:09 +10:00
|
|
|
|
|
|
|
from PyQt5.QtCore import QDateTime
|
|
|
|
|
2019-04-19 16:07:01 +10:00
|
|
|
from ..pyqt_future import PyQtFuture
|
|
|
|
|
2019-04-12 18:33:09 +10:00
|
|
|
|
|
|
|
class User(NamedTuple):
|
|
|
|
user_id: str
|
2019-04-19 16:07:01 +10:00
|
|
|
display_name: PyQtFuture
|
2019-04-12 18:33:09 +10:00
|
|
|
avatar_url: Optional[str] = None
|
|
|
|
status_message: Optional[str] = None
|
|
|
|
|
|
|
|
|
|
|
|
class Room(NamedTuple):
|
2019-04-15 06:12:07 +10:00
|
|
|
room_id: str
|
|
|
|
display_name: Optional[str]
|
|
|
|
description: str = ""
|
|
|
|
typing_users: List[str] = []
|
2019-04-12 18:33:09 +10:00
|
|
|
|
|
|
|
|
2019-04-15 02:56:30 +10:00
|
|
|
class RoomEvent(NamedTuple):
|
2019-04-19 03:46:39 +10:00
|
|
|
type: str
|
|
|
|
date_time: QDateTime
|
|
|
|
dict: Dict[str, str]
|
|
|
|
is_local_echo: bool = False
|