UNPKG

react-teamspeak-remote-app-api

Version:
36 lines (35 loc) 1.73 kB
import { ILogger } from "../../utils/logger"; import { IConnection, IChannel, IClient, ITS5DataHandler } from "../../interfaces/teamspeak"; /** * Handles data received from TS5 client (list of connections, channels and clients) * Updates the states of useTSRemoteApp.tsx */ export declare class TS5DataHandler implements ITS5DataHandler { localConnections: IConnection[]; localChannels: IChannel[]; localClients: IClient[]; setConnections: React.Dispatch<React.SetStateAction<IConnection[]>>; setChannels: React.Dispatch<React.SetStateAction<IChannel[]>>; setClients: React.Dispatch<React.SetStateAction<IClient[]>>; logger: ILogger; constructor(setConnections: React.Dispatch<React.SetStateAction<IConnection[]>>, setChannels: React.Dispatch<React.SetStateAction<IChannel[]>>, setClients: React.Dispatch<React.SetStateAction<IClient[]>>, logger: ILogger); get connections(): IConnection[]; get channels(): IChannel[]; get clients(): IClient[]; private updateConnectionsState; private updateChannelsState; private updateClientsState; clearAll(): void; addConnection(connection: IConnection): void; addChannel(channel: IChannel): void; addClient(client: IClient): void; updateConnection(connection: IConnection): void; updateChannel(channel: IChannel): void; updateClient(client: IClient): void; removeConnection(connection: IConnection): void; removeChannel(channel: IChannel): void; removeClient(client: IClient): void; getConnectionById(id: number): IConnection | undefined; getChannelById(id: number, connectionId: number): IChannel | undefined; getClientById(id: number, connectionId: number): IClient | undefined; }