doc: realtime
parent
28e6890e94
commit
1cf7684597
|
@ -5,7 +5,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// Chatroom
|
||||
/// LCIMChatRoom is a local representation of chatroom in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMChatRoom : LCIMConversation {
|
||||
public LCIMChatRoom(LCIMClient client) :
|
||||
|
@ -25,14 +25,29 @@ namespace LeanCloud.Realtime {
|
|||
return await Client.ConversationController.GetOnlineMembers(Id, limit);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds members to this conversation.
|
||||
/// </summary>
|
||||
/// <param name="clientIds"></param>
|
||||
/// <returns></returns>
|
||||
public override Task<LCIMPartiallySuccessResult> AddMembers(IEnumerable<string> clientIds) {
|
||||
throw new Exception("Add members is not allowed in chat room.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flags the read status of this conversation.
|
||||
/// But it's nothing to do in LCIMChatRoom.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override Task Read() {
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fetchs the recipt timestamps of this conversation.
|
||||
/// But it's nothing to do in LCIMChatRoom.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override Task FetchReciptTimestamps() {
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ using System.Collections.ObjectModel;
|
|||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// Conversation
|
||||
/// LCIMConversation is a local representation of general conversation
|
||||
/// in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMConversation {
|
||||
/// <summary>
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMConversationMemberInfo represents the member info of the conversation.
|
||||
/// </summary>
|
||||
public class LCIMConversationMemberInfo {
|
||||
public const string Owner = "Owner";
|
||||
|
||||
|
|
|
@ -3,10 +3,12 @@ using System.Collections;
|
|||
using System.Collections.ObjectModel;
|
||||
using LeanCloud.Storage.Internal.Query;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMConversationQuery is the query for conversation.
|
||||
/// </summary>
|
||||
public class LCIMConversationQuery {
|
||||
internal const int CompactFlag = 0x1;
|
||||
internal const int WithLastMessageFlag = 0x2;
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMMessageQueryEndpoint is the parameter that controls the limitation
|
||||
/// of querying messages.
|
||||
/// </summary>
|
||||
public class LCIMMessageQueryEndpoint {
|
||||
public string MessageId {
|
||||
get; set;
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMServiceConversation is a local representation of service conversation
|
||||
/// in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMServiceConversation : LCIMConversation {
|
||||
public LCIMServiceConversation(LCIMClient client) : base(client) {
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMTemporaryConversation is a local representation of temporary conversation
|
||||
/// in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMTemporaryConversation : LCIMConversation {
|
||||
public DateTime ExpiredAt {
|
||||
get;
|
||||
|
|
|
@ -29,6 +29,9 @@ namespace LeanCloud.Realtime {
|
|||
get; private set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Device Id
|
||||
/// </summary>
|
||||
public string DeviceId {
|
||||
get; private set;
|
||||
}
|
||||
|
@ -235,6 +238,13 @@ namespace LeanCloud.Realtime {
|
|||
|
||||
#region 接口
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a LCIMClient with client id.
|
||||
/// </summary>
|
||||
/// <param name="clientId"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="deviceId"></param>
|
||||
/// <param name="signatureFactory"></param>
|
||||
public LCIMClient(string clientId,
|
||||
string tag = null,
|
||||
string deviceId = null,
|
||||
|
@ -245,6 +255,13 @@ namespace LeanCloud.Realtime {
|
|||
SetUpClient(clientId, tag, deviceId, signatureFactory);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a LCIMClient with a LCUser.
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="tag"></param>
|
||||
/// <param name="deviceId"></param>
|
||||
/// <param name="signatureFactory"></param>
|
||||
public LCIMClient(LCUser user,
|
||||
string tag = null,
|
||||
string deviceId = null,
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
using LeanCloud.Realtime.Internal.Connection;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCRealtime contains static functions that handle the global connection.
|
||||
/// </summary>
|
||||
public class LCRealtime {
|
||||
/// <summary>
|
||||
/// Every application uses a connection.
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
using LeanCloud.Storage;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMAudioMessage is a local representation of audio message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMAudioMessage : LCIMFileMessage {
|
||||
public double Duration {
|
||||
get; private set;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMBinaryMessage is a local representation of binary message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMBinaryMessage : LCIMMessage {
|
||||
public byte[] Data {
|
||||
get; internal set;
|
||||
|
|
|
@ -5,6 +5,9 @@ using LeanCloud.Storage;
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMFileMessage is a local representation of file message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMFileMessage : LCIMTextMessage {
|
||||
public LCFile File {
|
||||
get; set;
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
using LeanCloud.Storage;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMImageMessage is a local representation of image message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMImageMessage : LCIMFileMessage {
|
||||
public int Width {
|
||||
get; private set;
|
||||
|
|
|
@ -3,6 +3,9 @@ using System.Collections.Generic;
|
|||
using LeanCloud.Storage;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMLocationMessage is a local representation of location message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMLocationMessage : LCIMTextMessage {
|
||||
public LCGeoPoint Location {
|
||||
get; set;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMTextMessage is a local representation of text message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMTextMessage : LCIMTypedMessage {
|
||||
public string Text {
|
||||
get; set;
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
using LeanCloud.Storage;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMVideoMessage is a local representation of video message in LeanCloud.
|
||||
/// </summary>
|
||||
public class LCIMVideoMessage : LCIMFileMessage {
|
||||
public int Width {
|
||||
get; private set;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMOperationFailure is the result that handles the operation of conversation.
|
||||
/// </summary>
|
||||
public class LCIMOperationFailure {
|
||||
public int Code {
|
||||
get; set;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMPageResult represents the results of query.
|
||||
/// </summary>
|
||||
public class LCIMPageResult {
|
||||
public ReadOnlyCollection<string> Results {
|
||||
get; internal set;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMPartiallySuccessResult is the result that handles the operation of conversation.
|
||||
/// </summary>
|
||||
public class LCIMPartiallySuccessResult {
|
||||
public List<string> SuccessfulClientIdList {
|
||||
get; internal set;
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ILCIMSignatureFactory {
|
||||
Task<LCIMSignature> CreateConnectSignature(string clientId);
|
||||
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
namespace LeanCloud.Realtime {
|
||||
/// <summary>
|
||||
/// LCIMSignature represents a LCRealtime signature.
|
||||
/// </summary>
|
||||
public class LCIMSignature {
|
||||
public string Signature {
|
||||
get; set;
|
||||
|
|
Loading…
Reference in New Issue