HyphenateSDK  3.6.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 
164 @property (nonatomic) BOOL isDeliverAcked;
165 
173 @property (nonatomic) BOOL isRead;
174 
182 @property (nonatomic, strong) EMMessageBody *body;
183 
195 @property (nonatomic, copy) NSDictionary *ext;
196 
220 - (id)initWithConversationID:(NSString *)aConversationId
221  from:(NSString *)aFrom
222  to:(NSString *)aTo
223  body:(EMMessageBody *)aBody
224  ext:(NSDictionary *)aExt;
225 
226 
227 @end
BOOL isReadAcked
Definition: EMMessage.h:155
NSString * to
Definition: EMMessage.h:110
BOOL isDeliverAcked
Definition: EMMessage.h:164
EMMessageBody * body
Definition: EMMessage.h:182
long long timestamp
Definition: EMMessage.h:119
Definition: EMMessageBody.h:42
NSString * from
Definition: EMMessage.h:101
long long localTime
Definition: EMMessage.h:128
NSString * conversationId
Definition: EMMessage.h:83
EMMessageDirection direction
Definition: EMMessage.h:92
BOOL isRead
Definition: EMMessage.h:173
NSDictionary * ext
Definition: EMMessage.h:195
NSString * messageId
Definition: EMMessage.h:74
Definition: EMMessage.h:65
EMChatType chatType
Definition: EMMessage.h:137
EMMessageStatus status
Definition: EMMessage.h:146