HyphenateChatSDK  3.8.7
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 
164 @property (nonatomic) BOOL isNeedGroupAck;
165 
173 @property (nonatomic, readonly) int groupAckCount;
174 
182 @property (nonatomic) BOOL isDeliverAcked;
183 
191 @property (nonatomic) BOOL isRead;
192 
200 @property (nonatomic) BOOL isListened;
201 
209 @property (nonatomic, strong) EMMessageBody *body;
210 
222 @property (nonatomic, copy) NSDictionary *ext;
223 
247 - (id)initWithConversationID:(NSString *)aConversationId
248  from:(NSString *)aFrom
249  to:(NSString *)aTo
250  body:(EMMessageBody *)aBody
251  ext:(NSDictionary *)aExt;
252 
253 
254 @end
Definition: EMMessageBody.h:45
Definition: EMMessage.h:66
long long localTime
Definition: EMMessage.h:128
int groupAckCount
Definition: EMMessage.h:173
BOOL isRead
Definition: EMMessage.h:191
NSString * messageId
Definition: EMMessage.h:74
NSString * conversationId
Definition: EMMessage.h:83
EMMessageBody * body
Definition: EMMessage.h:209
NSDictionary * ext
Definition: EMMessage.h:222
BOOL isReadAcked
Definition: EMMessage.h:155
long long timestamp
Definition: EMMessage.h:119
BOOL isListened
Definition: EMMessage.h:200
EMMessageDirection direction
Definition: EMMessage.h:92
BOOL isDeliverAcked
Definition: EMMessage.h:182
EMMessageStatus status
Definition: EMMessage.h:146
EMChatType chatType
Definition: EMMessage.h:137
BOOL isNeedGroupAck
Definition: EMMessage.h:164
NSString * from
Definition: EMMessage.h:101
NSString * to
Definition: EMMessage.h:110