make handshake CAP dance happen in one async task. move to ircv3.py
This commit is contained in:
parent
1b3c537e0a
commit
06a4d20fc8
6 changed files with 98 additions and 42 deletions
|
@ -1,10 +1,9 @@
|
|||
from typing import Awaitable
|
||||
from typing import Awaitable, Iterable, List, Optional
|
||||
from enum import IntEnum
|
||||
|
||||
from ircstates import Server
|
||||
from irctokens import Line
|
||||
|
||||
from .ircv3 import Capability
|
||||
from .matching import BaseResponse
|
||||
from .params import ConnectionParams
|
||||
|
||||
|
@ -21,6 +20,16 @@ class PriorityLine(object):
|
|||
def __lt__(self, other: "PriorityLine") -> bool:
|
||||
return self.priority < other.priority
|
||||
|
||||
class ICapability(object):
|
||||
def available(self, capabilities: Iterable[str]) -> Optional[str]:
|
||||
pass
|
||||
|
||||
def match(self, capability: str) -> Optional[str]:
|
||||
pass
|
||||
|
||||
def copy(self) -> "ICapability":
|
||||
pass
|
||||
|
||||
class IServer(Server):
|
||||
params: ConnectionParams
|
||||
|
||||
|
@ -38,8 +47,19 @@ class IServer(Server):
|
|||
async def connect(self, params: ConnectionParams):
|
||||
pass
|
||||
|
||||
async def queue_capability(self, cap: Capability):
|
||||
async def queue_capability(self, cap: ICapability):
|
||||
pass
|
||||
|
||||
async def line_written(self, line: Line):
|
||||
pass
|
||||
|
||||
def cap_agreed(self, capability: ICapability) -> bool:
|
||||
pass
|
||||
def cap_available(self, capability: ICapability) -> Optional[str]:
|
||||
pass
|
||||
|
||||
def collect_caps(self) -> List[str]:
|
||||
pass
|
||||
|
||||
async def maybe_sasl(self) -> bool:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue