agora-rdc-core
Version:
85 lines (84 loc) • 2.39 kB
TypeScript
import { RDCOptions, RDCThresholdOptions } from '../core/interfaces';
import { RDCEventCallback, RDCKeyboardEvent, RDCMouseEvent, RDCClipboardContentType } from './interfaces';
export declare class RDCAddonAdapter {
private static instance;
static create(): RDCAddonAdapter;
private addon;
constructor();
initialize(appId: string, options: Partial<RDCOptions & RDCThresholdOptions>): void;
/**
* join RTM with userId
* @param userId
* @param rtmToken
*/
join(userId: string, rtmToken: string): void;
/**
* leave RTM channel
*/
leave(): void;
/**
*
* @param name emit keyboard event
* @param event emit mouse event
*/
emit(name: 'keyboard-event', event: RDCKeyboardEvent): void;
emit(name: 'mouse-event', event: RDCMouseEvent): void;
/**
* listen events from native engine
* @param callback
*/
onEvent(callback: RDCEventCallback): void;
/**
* send message
* @param userId
* @param message
*/
sendMessage<T>(userId: string, message: T): void;
/**
* request control for specific user.
* @param userId
*/
requestControl(userId: string): void;
/**
* Authorize to take control or not.
* @param userId
* @param authorized
*/
authorizeControl(userId: string, authorized: boolean): void;
/**
* quit control for specific user
*/
quitControl(userId: string): void;
/**
* Allow to quit control
* @param userId
* @param authorized
*/
authorizeQuitControl(userId: string, authorized: boolean): void;
/**
* update control area rect size.
* @param width
* @param height
*/
updateControlRect(width: number, height: number): void;
/**
* Get focus, the focused end is the controlled end which will receive keyboard and mouse events by default.
* @param isFocus
*/
focus(isFocus: boolean): void;
/**
* Paste content to remote end
*/
pasteRemotely(withPath?: boolean, filePath?: string): void;
/**
* get clipboard content type
*/
getClipboardContentType(): RDCClipboardContentType;
requestRemoteEndInfo(userId: string): void;
joinChannel(channel: string): void;
leaveChannel(): void;
/**
* Destroy RemoteDesktopControlEngine
*/
dispose(): void;
}