124 lines
5.2 KiB
TypeScript
124 lines
5.2 KiB
TypeScript
import { ChannelTree } from "./ChannelTree";
|
|
import * as contextmenu from "../ui/elements/ContextMenu";
|
|
import { Registry } from "../events";
|
|
import { ChannelTreeEntry, ChannelTreeEntryEvents } from "./ChannelTreeEntry";
|
|
export declare class ServerProperties {
|
|
virtualserver_host: string;
|
|
virtualserver_port: number;
|
|
virtualserver_name: string;
|
|
virtualserver_name_phonetic: string;
|
|
virtualserver_icon_id: number;
|
|
virtualserver_version: string;
|
|
virtualserver_platform: string;
|
|
virtualserver_unique_identifier: string;
|
|
virtualserver_clientsonline: number;
|
|
virtualserver_queryclientsonline: number;
|
|
virtualserver_channelsonline: number;
|
|
virtualserver_uptime: number;
|
|
virtualserver_created: number;
|
|
virtualserver_maxclients: number;
|
|
virtualserver_reserved_slots: number;
|
|
virtualserver_password: string;
|
|
virtualserver_flag_password: boolean;
|
|
virtualserver_ask_for_privilegekey: boolean;
|
|
virtualserver_welcomemessage: string;
|
|
virtualserver_hostmessage: string;
|
|
virtualserver_hostmessage_mode: number;
|
|
virtualserver_hostbanner_url: string;
|
|
virtualserver_hostbanner_gfx_url: string;
|
|
virtualserver_hostbanner_gfx_interval: number;
|
|
virtualserver_hostbanner_mode: number;
|
|
virtualserver_hostbutton_tooltip: string;
|
|
virtualserver_hostbutton_url: string;
|
|
virtualserver_hostbutton_gfx_url: string;
|
|
virtualserver_codec_encryption_mode: number;
|
|
virtualserver_default_music_group: number;
|
|
virtualserver_default_server_group: number;
|
|
virtualserver_default_channel_group: number;
|
|
virtualserver_default_channel_admin_group: number;
|
|
virtualserver_default_client_description: string;
|
|
virtualserver_default_channel_description: string;
|
|
virtualserver_default_channel_topic: string;
|
|
virtualserver_antiflood_points_tick_reduce: number;
|
|
virtualserver_antiflood_points_needed_command_block: number;
|
|
virtualserver_antiflood_points_needed_ip_block: number;
|
|
virtualserver_country_code: string;
|
|
virtualserver_complain_autoban_count: number;
|
|
virtualserver_complain_autoban_time: number;
|
|
virtualserver_complain_remove_time: number;
|
|
virtualserver_needed_identity_security_level: number;
|
|
virtualserver_weblist_enabled: boolean;
|
|
virtualserver_min_clients_in_channel_before_forced_silence: number;
|
|
virtualserver_channel_temp_delete_delay_default: number;
|
|
virtualserver_priority_speaker_dimm_modificator: number;
|
|
virtualserver_max_upload_total_bandwidth: number;
|
|
virtualserver_upload_quota: number;
|
|
virtualserver_max_download_total_bandwidth: number;
|
|
virtualserver_download_quota: number;
|
|
virtualserver_month_bytes_downloaded: number;
|
|
virtualserver_month_bytes_uploaded: number;
|
|
virtualserver_total_bytes_downloaded: number;
|
|
virtualserver_total_bytes_uploaded: number;
|
|
}
|
|
export interface ServerConnectionInfo {
|
|
connection_filetransfer_bandwidth_sent: number;
|
|
connection_filetransfer_bandwidth_received: number;
|
|
connection_filetransfer_bytes_sent_total: number;
|
|
connection_filetransfer_bytes_received_total: number;
|
|
connection_filetransfer_bytes_sent_month: number;
|
|
connection_filetransfer_bytes_received_month: number;
|
|
connection_packets_sent_total: number;
|
|
connection_bytes_sent_total: number;
|
|
connection_packets_received_total: number;
|
|
connection_bytes_received_total: number;
|
|
connection_bandwidth_sent_last_second_total: number;
|
|
connection_bandwidth_sent_last_minute_total: number;
|
|
connection_bandwidth_received_last_second_total: number;
|
|
connection_bandwidth_received_last_minute_total: number;
|
|
connection_connected_time: number;
|
|
connection_packetloss_total: number;
|
|
connection_ping: number;
|
|
}
|
|
export interface ServerAddress {
|
|
host: string;
|
|
port: number;
|
|
}
|
|
export declare function parseServerAddress(address: string): ServerAddress | undefined;
|
|
export declare function stringifyServerAddress(address: ServerAddress): string;
|
|
export interface ServerEvents extends ChannelTreeEntryEvents {
|
|
notify_properties_updated: {
|
|
updated_properties: Partial<ServerProperties>;
|
|
server_properties: ServerProperties;
|
|
};
|
|
}
|
|
export declare class ServerEntry extends ChannelTreeEntry<ServerEvents> {
|
|
remote_address: ServerAddress;
|
|
channelTree: ChannelTree;
|
|
properties: ServerProperties;
|
|
readonly events: Registry<ServerEvents>;
|
|
private info_request_promise;
|
|
private info_request_promise_resolve;
|
|
private info_request_promise_reject;
|
|
private _info_connection_promise;
|
|
private _info_connection_promise_timestamp;
|
|
private _info_connection_promise_resolve;
|
|
private _info_connection_promise_reject;
|
|
lastInfoRequest: number;
|
|
nextInfoRequest: number;
|
|
private _destroyed;
|
|
constructor(tree: any, name: any, address: ServerAddress);
|
|
destroy(): void;
|
|
contextMenuItems(): contextmenu.MenuEntry[];
|
|
showContextMenu(x: number, y: number, on_close?: () => void): void;
|
|
updateVariables(is_self_notify: boolean, ...variables: {
|
|
key: string;
|
|
value: string;
|
|
}[]): void;
|
|
updateProperties(): Promise<void>;
|
|
request_connection_info(): Promise<ServerConnectionInfo>;
|
|
set_connection_info(info: ServerConnectionInfo): void;
|
|
shouldUpdateProperties(): boolean;
|
|
calculateUptime(): number;
|
|
reset(): void;
|
|
}
|