declare module lib_comm { } declare module lib_comm { /** * @author fenris */ interface interface_client { /** * @desc prepare the client to a point where sending messages can be done without any more preparation * @author fenris */ setup(): lib_call.type_promise; /** * @desc send a message * @author fenris */ send(message: type_message_out): lib_call.type_promise; } } declare module lib_comm { /** * @author fenris */ type type_response_client_http = { code: int; text: string; }; /** * @author fenris */ type type_parameters_client_http = { protocol?: string; host?: string; port?: int; path?: string; omit_protocol?: boolean; content_type?: string; with_credentials?: boolean; }; /** * @author fenris */ var default_parameters_client_http: type_parameters_client_http; } declare module lib_comm { /** * @author fenris */ type type_client_http = { parameters: type_parameters_client_http; method: string; headers: { [key: string]: string; }; }; /** * @author fenris */ function client_http_construct(parameters?: type_parameters_client_http, method?: string, headers?: { [key: string]: string; }): type_client_http; /** * @author fenris */ function client_http_setup(subject: type_client_http): lib_call.type_promise; /** * @author fenris */ function client_http_send(subject: type_client_http, message: string): lib_call.type_promise; /** * @author Martin Springwald * @author Christian Neubauer * @author Christian Fraß */ function http_get_blob({ "url": url, "mime": type }: { url: string; mime: string; }): lib_call.type_promise; } declare module lib_comm { } declare module lib_comm { /** * @author fenris */ class class_client_http implements interface_client { /** * @author fenris */ protected subject: type_client_http; /** * @author fenris */ constructor(parameters?: type_parameters_client_http, method?: string, headers?: { [key: string]: string; }); /** * @author fenris * @implementation */ setup(): lib_call.type_promise; /** * @author fenris * @implementation */ send(message: string): lib_call.type_promise; } } declare module lib_comm { /** * @author fenris */ class class_client_mhttp implements interface_client { /** * @author fenris */ protected core: class_client_http; /** * @author fenris */ constructor(parameters?: type_parameters_client_http); /** * @author fenris * @implementation */ setup(): lib_call.type_promise; /** * @author fenris * @implementation */ send(message: string): lib_call.type_promise; } } declare module lib_comm { /** * @desc wrapper for string-based clients * @author fenris */ class class_client_complex implements interface_client { /** * @author fenris */ protected core: interface_client; /** * @author fenris */ protected code: lib_code.interface_code; /** * @author fenris */ constructor(core: interface_client, code?: lib_code.interface_code); /** * @author fenris * @implementation */ setup(): lib_call.type_promise; /** * @author fenris * @implementation */ send(message: any): lib_call.type_promise; } }