massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / paramiko / paramiko / server.pyi
1 import threading
2 from typing import Tuple
3
4 from paramiko.channel import Channel
5 from paramiko.message import Message
6 from paramiko.pkey import PKey
7 from paramiko.transport import Transport
8
9 class ServerInterface:
10     def check_channel_request(self, kind: str, chanid: int) -> int: ...
11     def get_allowed_auths(self, username: str) -> str: ...
12     def check_auth_none(self, username: str) -> int: ...
13     def check_auth_password(self, username: str, password: str) -> int: ...
14     def check_auth_publickey(self, username: str, key: PKey) -> int: ...
15     def check_auth_interactive(self, username: str, submethods: str) -> int | InteractiveQuery: ...
16     def check_auth_interactive_response(self, responses: list[str]) -> int | InteractiveQuery: ...
17     def check_auth_gssapi_with_mic(self, username: str, gss_authenticated: int = ..., cc_file: str | None = ...) -> int: ...
18     def check_auth_gssapi_keyex(self, username: str, gss_authenticated: int = ..., cc_file: str | None = ...) -> int: ...
19     def enable_auth_gssapi(self) -> bool: ...
20     def check_port_forward_request(self, address: str, port: int) -> int: ...
21     def cancel_port_forward_request(self, address: str, port: int) -> None: ...
22     def check_global_request(self, kind: str, msg: Message) -> bool | Tuple[bool | int | str, ...]: ...
23     def check_channel_pty_request(
24         self, channel: Channel, term: bytes, width: int, height: int, pixelwidth: int, pixelheight: int, modes: bytes
25     ) -> bool: ...
26     def check_channel_shell_request(self, channel: Channel) -> bool: ...
27     def check_channel_exec_request(self, channel: Channel, command: bytes) -> bool: ...
28     def check_channel_subsystem_request(self, channel: Channel, name: str) -> bool: ...
29     def check_channel_window_change_request(
30         self, channel: Channel, width: int, height: int, pixelwidth: int, pixelheight: int
31     ) -> bool: ...
32     def check_channel_x11_request(
33         self, channel: Channel, single_connection: bool, auth_protocol: str, auth_cookie: bytes, screen_number: int
34     ) -> bool: ...
35     def check_channel_forward_agent_request(self, channel: Channel) -> bool: ...
36     def check_channel_direct_tcpip_request(self, chanid: int, origin: tuple[str, int], destination: tuple[str, int]) -> int: ...
37     def check_channel_env_request(self, channel: Channel, name: bytes, value: bytes) -> bool: ...
38     def get_banner(self) -> tuple[str | None, str | None]: ...
39
40 class InteractiveQuery:
41     name: str
42     instructions: str
43     prompts: list[tuple[str, bool]]
44     def __init__(self, name: str = ..., instructions: str = ..., *prompts: str | tuple[str, bool]) -> None: ...
45     def add_prompt(self, prompt: str, echo: bool = ...) -> None: ...
46
47 class SubsystemHandler(threading.Thread):
48     def __init__(self, channel: Channel, name: str, server: ServerInterface) -> None: ...
49     def get_server(self) -> ServerInterface: ...
50     def start_subsystem(self, name: str, transport: Transport, channel: Channel) -> None: ...
51     def finish_subsystem(self) -> None: ...