import { AgoraRtmClientObserver } from './type'; import { AgoraRtmChannelClient } from './channel'; /** * Abstract class for the Agora Real-Time Messaging Client. */ export declare abstract class AgoraRtmClient { /** * Gets the session ID. */ abstract get sessionId(): string; /** * Gets the version of the Agora RTM SDK. */ abstract get version(): string; /** * Logs in to the Agora RTM system. * @param token The token for authentication. * @returns A promise that resolves when the login is successful. */ abstract login(token: string): Promise; /** * Logs out of the Agora RTM system. * @returns A promise that resolves when the logout is successful. */ abstract logout(): Promise; /** * Creates a channel client. * @param channelId The ID of the channel. * @returns The channel client. */ abstract createChannelClient(channelId: string): AgoraRtmChannelClient; /** * Adds an observer to be notified of RTM client events. * @param observer The observer to add. */ abstract addObserver(observer: AgoraRtmClientObserver): void; /** * Removes an observer from the RTM client. * @param observer The observer to remove. */ abstract removeObserver(observer: AgoraRtmClientObserver): void; /** * Sends a peer message. * @param message The message to send. * @param guaranteedDelivery Whether the message should be guaranteed to be delivered * @param receiverId The ID of the peer to send the message to. * @returns A promise that resolves when the message has been sent. */ abstract sendPeerMessage(message: string, guaranteedDelivery: boolean, receiverId: string): Promise; /** * Renews the user token. * @param token The token to renew. * @returns A promise that resolves when the token has been renewed. */ abstract renewToken(token: string): Promise; /** * Sets the parameters for the RTM client. * @param parameters The parameters to set. */ abstract setParameters(parameters: string): void; /** * release rtm client */ abstract release(): void; }