HyphenateChatSDK  3.8.3.1
EMMessage.h
1 
15 #import <Foundation/Foundation.h>
16 
17 #import "EMMessageBody.h"
18 
26 typedef enum {
27  EMChatTypeChat = 0,
28  EMChatTypeGroupChat,
29  EMChatTypeChatRoom,
30 } EMChatType;
31 
39 typedef enum {
40  EMMessageStatusPending = 0,
41  EMMessageStatusDelivering,
42  EMMessageStatusSucceed,
43  EMMessageStatusFailed,
44 } EMMessageStatus;
45 
53 typedef enum {
54  EMMessageDirectionSend = 0,
55  EMMessageDirectionReceive,
56 } EMMessageDirection;
57 
65 @interface EMMessage : NSObject
66 
74 @property (nonatomic, copy) NSString *messageId;
75 
83 @property (nonatomic, copy) NSString *conversationId;
84 
92 @property (nonatomic) EMMessageDirection direction;
93 
101 @property (nonatomic, copy) NSString *from;
102 
110 @property (nonatomic, copy) NSString *to;
111 
119 @property (nonatomic) long long timestamp;
120 
128 @property (nonatomic) long long localTime;
129 
137 @property (nonatomic) EMChatType chatType;
138 
146 @property (nonatomic) EMMessageStatus status;
147 
155 @property (nonatomic) BOOL isReadAcked;
156 
157 @property (nonatomic) BOOL isNeedGroupAck;
158 
159 @property (nonatomic, readonly) int groupAckCount;
160 
168 @property (nonatomic) BOOL isDeliverAcked;
169 
177 @property (nonatomic) BOOL isRead;
178 
186 @property (nonatomic) BOOL isListened;
187 
195 @property (nonatomic, strong) EMMessageBody *body;
196 
208 @property (nonatomic, copy) NSDictionary *ext;
209 
233 - (id)initWithConversationID:(NSString *)aConversationId
234  from:(NSString *)aFrom
235  to:(NSString *)aTo
236  body:(EMMessageBody *)aBody
237  ext:(NSDictionary *)aExt;
238 
239 
240 @end
Definition: EMMessageBody.h:44
Definition: EMMessage.h:66
long long localTime
Definition: EMMessage.h:128
BOOL isRead
Definition: EMMessage.h:177
NSString * messageId
Definition: EMMessage.h:74
NSString * conversationId
Definition: EMMessage.h:83
EMMessageBody * body
Definition: EMMessage.h:195
NSDictionary * ext
Definition: EMMessage.h:208
BOOL isReadAcked
Definition: EMMessage.h:155
long long timestamp
Definition: EMMessage.h:119
BOOL isListened
Definition: EMMessage.h:186
EMMessageDirection direction
Definition: EMMessage.h:92
BOOL isDeliverAcked
Definition: EMMessage.h:168
EMMessageStatus status
Definition: EMMessage.h:146
EMChatType chatType
Definition: EMMessage.h:137
NSString * from
Definition: EMMessage.h:101
NSString * to
Definition: EMMessage.h:110