agora-react-native-rtm
Version:
React Native around the Agora RTM SDKs for Android and iOS agora
398 lines (326 loc) • 7.21 kB
JavaScript
import { RtmAreaCode, RtmProtocolType } from './AgoraRtmBase';
/// Generated by terra, DO NOT MODIFY BY HAND.
/**
* Configurations for RTM Client.
*/
export class RtmConfig {
/**
* The App ID of your project.
*/
/**
* The ID of the user.
*/
/**
* The region for connection. This advanced feature applies to scenarios that
* have regional restrictions.
*
* For the regions that Agora supports, see #AREA_CODE.
*
* After specifying the region, the SDK connects to the Agora servers within
* that region.
*/
areaCode = RtmAreaCode.glob;
/**
* The protocol used for connecting to the Agora RTM service.
*/
protocolType = RtmProtocolType.tcpUdp;
/**
* Presence timeout in seconds, specify the timeout value when you lost connection between sdk
* and rtm service.
*/
/**
* Heartbeat interval in seconds, specify the interval value of sending heartbeat between sdk
* and rtm service.
*/
/**
* Reconnection timeout in seconds, specify the timeout value for login and reconnection operations.
*
* Timeout behavior and callbacks:
* - Login timeout: Triggers onLoginResult and onLinkStateChanged
* - Reconnection timeout: Triggers onLinkStateChanged
*
* Default: 0 seconds, never timeout, keep retrying.
* Range: [15, 3600]
*/
/**
* - For Android, it is the context of Activity or Application.
* - For Windows, it is the window handle of app. Once set, this parameter enables you to plug
* or unplug the video devices while they are powered.
*/
/**
* Whether to use String user IDs, if you are using RTC products with Int user IDs,
* set this value as 'false'. Otherwise errors might occur.
*/
useStringUserId = true;
/**
* Whether to enable multipath, introduced from 2.2.0, for now , only effect on stream channel.
*/
multipath = false;
/**
* iot devices may be restricted by isp, need to enable this feature to connect to server by domain.
* -true: connect to servers restricted by isp
* -false: (Default) connect to servers with no limit
*/
ispPolicyEnabled = false;
/**
* The callbacks handler
*/
/**
* The config for customer set log path, log size and log level.
*/
/**
* The config for proxy setting
*/
/**
* The config for encryption setting
*/
/**
* The config for private setting
*/
constructor(props) {
Object.assign(this, props);
}
}
export class LinkStateEvent {
/**
* The current link state
*/
/**
* The previous link state
*/
/**
* The service type
*/
/**
* The operation which trigger this event
*/
/**
* The reason code of this state change event
*/
/**
* The reason of this state change event
*/
/**
* The affected channels
*/
/**
* The affected channel count
*/
/**
* The unrestored channels
*/
/**
* The unrestored channel count
*/
/**
* Is resumed from disconnected state
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class MessageEvent {
/**
* Which channel type, RTM_CHANNEL_TYPE_STREAM or RTM_CHANNEL_TYPE_MESSAGE
*/
/**
* Message type
*/
/**
* The channel which the message was published
*/
/**
* If the channelType is RTM_CHANNEL_TYPE_STREAM, which topic the message came from. only for RTM_CHANNEL_TYPE_STREAM
*/
/**
* The payload
*/
/**
* The payload length
*/
/**
* The publisher
*/
/**
* The custom type of the message
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class IntervalInfo {
/**
* Joined users during this interval
*/
/**
* Left users during this interval
*/
/**
* Timeout users during this interval
*/
/**
* The user state changed during this interval
*/
/**
* The user count
*/
constructor(props) {
Object.assign(this, props);
}
}
export class TopicEvent {
/**
* Indicate topic event type
*/
/**
* The channel which the topic event was triggered
*/
/**
* The user who triggered this event.
*/
/**
* Topic information array.
*/
/**
* The count of topicInfos.
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class SnapshotInfo {
/**
* The user state in this snapshot event
*/
/**
* The user count
*/
constructor(props) {
Object.assign(this, props);
}
}
export class PresenceEvent {
/**
* Indicate presence event type
*/
/**
* Which channel type, RTM_CHANNEL_TYPE_STREAM or RTM_CHANNEL_TYPE_MESSAGE
*/
/**
* The channel which the presence event was triggered
*/
/**
* The user who triggered this event.
*/
/**
* The user states
*/
/**
* The states count
*/
/**
* Only valid when in interval mode
*/
/**
* Only valid when receive snapshot event
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class LockEvent {
/**
* Which channel type, RTM_CHANNEL_TYPE_STREAM or RTM_CHANNEL_TYPE_MESSAGE
*/
/**
* Lock event type, indicate lock states
*/
/**
* The channel which the lock event was triggered
*/
/**
* The detail information of locks
*/
/**
* The count of locks
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class StorageEvent {
/**
* Which channel type, RTM_CHANNEL_TYPE_STREAM or RTM_CHANNEL_TYPE_MESSAGE
*/
/**
* Storage type, RTM_STORAGE_TYPE_USER or RTM_STORAGE_TYPE_CHANNEL
*/
/**
* Indicate storage event type
*/
/**
* The target name of user or channel, depends on the RTM_STORAGE_TYPE
*/
/**
* The metadata information
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
export class TokenEvent {
/**
* The type of token event
*/
/**
* The reason of the token event, description of token event type
*/
/**
* The affected resources
*/
/**
* RTM server UTC time
*/
constructor(props) {
Object.assign(this, props);
}
}
/**
* The IRtmEventHandler class.
*
* The SDK uses this class to send callback event notifications to the app, and the app inherits
* the methods in this class to retrieve these event notifications.
*
* All methods in this class have their default (empty) implementations, and the app can inherit
* only some of the required events instead of all. In the callback methods, the app should avoid
* time-consuming tasks or calling blocking APIs, otherwise the SDK may not work properly.
*/
/**
* The IRtmClient class.
*
* This class provides the main methods that can be invoked by your app.
*
* IRtmClient is the basic interface class of the Agora RTM SDK.
* Creating an IRtmClient object and then calling the methods of
* this object enables you to use Agora RTM SDK's functionality.
*/
export class IRtmClient {}
//# sourceMappingURL=IAgoraRtmClient.js.map