using System;
using System.Collections;
using System.Collections.Generic;
namespace LeanCloud.Realtime
{
///
///
///
public class AVIMEventArgs : EventArgs
{
public AVIMEventArgs()
{
}
public AVIMException.ErrorCode ErrorCode { get; internal set; }
///
/// LeanCloud 服务端发往客户端消息通知
///
public string Message { get; set; }
}
public class AVIMDisconnectEventArgs : EventArgs
{
public int Code { get; private set; }
public string Reason { get; private set; }
public string Detail { get; private set; }
public AVIMDisconnectEventArgs()
{
}
public AVIMDisconnectEventArgs(int _code, string _reason, string _detail)
{
this.Code = _code;
this.Reason = _reason;
this.Detail = _detail;
}
}
///
/// 开始重连之后触发正在重连的事件通知,提供给监听者的事件参数
///
public class AVIMReconnectingEventArgs : EventArgs
{
///
/// 是否由 SDK 内部机制启动的自动重连
///
public bool IsAuto { get; set; }
///
/// 重连的 client Id
///
public string ClientId { get; set; }
///
/// 重连时使用的 SessionToken
///
public string SessionToken { get; set; }
}
///
/// 重连成功之后的事件回调
///
public class AVIMReconnectedEventArgs : EventArgs
{
///
/// 是否由 SDK 内部机制启动的自动重连
///
public bool IsAuto { get; set; }
///
/// 重连的 client Id
///
public string ClientId { get; set; }
///
/// 重连时使用的 SessionToken
///
public string SessionToken { get; set; }
}
///
/// 重连失败之后的事件回调参数
///
public class AVIMReconnectFailedArgs : EventArgs
{
///
/// 是否由 SDK 内部机制启动的自动重连
///
public bool IsAuto { get; set; }
///
/// 重连的 client Id
///
public string ClientId { get; set; }
///
/// 重连时使用的 SessionToken
///
public string SessionToken { get; set; }
///
/// 失败的原因
/// 0. 客户端网络断开
/// 1. sessionToken 错误或者失效,需要重新创建 client
///
public int FailedCode { get; set; }
}
///
/// AVIMM essage event arguments.
///
public class AVIMMessageEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// I message.
public AVIMMessageEventArgs(IAVIMMessage iMessage)
{
Message = iMessage;
}
///
/// Gets or sets the message.
///
/// The message.
public IAVIMMessage Message { get; internal set; }
}
///
/// AVIMMessage event arguments.
///
public class AVIMMessagePatchEventArgs : EventArgs
{
public AVIMMessagePatchEventArgs(IAVIMMessage message)
{
Message = message;
}
///
/// Gets or sets the message.
///
/// The message.
public IAVIMMessage Message { get; internal set; }
}
///
/// AVIMT ext message event arguments.
///
public class AVIMTextMessageEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// Raw.
public AVIMTextMessageEventArgs(AVIMTextMessage raw)
{
TextMessage = raw;
}
///
/// Gets or sets the text message.
///
/// The text message.
public AVIMTextMessage TextMessage { get; internal set; }
}
///
/// 当对话中有人加入时,触发 时所携带的事件参数
///
public class AVIMOnMembersJoinedEventArgs : EventArgs
{
///
/// 加入到对话的 Client Id(s)
///
public IEnumerable JoinedMembers { get; internal set; }
///
/// 邀请的操作人
///
public string InvitedBy { get; internal set; }
///
/// 此次操作针对的对话 Id
///
public string ConversationId { get; internal set; }
}
///
/// 当对话中有人加入时,触发 AVIMMembersJoinListener 时所携带的事件参数
///
public class AVIMOnMembersLeftEventArgs : EventArgs
{
///
/// 离开对话的 Client Id(s)
///
public IEnumerable LeftMembers { get; internal set; }
///
/// 踢出的操作人
///
public string KickedBy { get; internal set; }
///
/// 此次操作针对的对话 Id
///
public string ConversationId { get; internal set; }
}
///
/// 当前用户被邀请加入到对话
///
public class AVIMOnInvitedEventArgs : EventArgs
{
///
/// 邀请的操作人
///
public string InvitedBy { get; internal set; }
///
/// 此次操作针对的对话 Id
///
public string ConversationId { get; internal set; }
}
///
/// 当前用户被他人从对话中踢出
///
public class AVIMOnKickedEventArgs : EventArgs
{
///
/// 踢出的操作人
///
public string KickedBy { get; internal set; }
///
/// 此次操作针对的对话 Id
///
public string ConversationId { get; internal set; }
}
public class AVIMSessionClosedEventArgs : EventArgs
{
public int Code { get; internal set; }
public string Reason { get; internal set; }
public string Detail { get; internal set; }
}
}