15 #import <Foundation/Foundation.h> 17 #import "EMMessageBody.h" 27 EMConversationTypeChat = 0,
28 EMConversationTypeGroupChat,
29 EMConversationTypeChatRoom
40 EMMessageSearchDirectionUp = 0,
41 EMMessageSearchDirectionDown
42 } EMMessageSearchDirection;
80 @property (nonatomic, assign, readonly) EMConversationType
type;
98 @property (nonatomic, copy) NSDictionary *
ext;
139 - (void)insertMessage:(
EMMessage *)aMessage
156 - (void)appendMessage:(
EMMessage *)aMessage
173 - (void)deleteMessageWithId:(NSString *)aMessageId
187 - (void)deleteAllMessages:(
EMError **)pError;
204 - (void)updateMessageChange:(
EMMessage *)aMessage
221 - (void)markMessageAsReadWithId:(NSString *)aMessageId
236 - (void)markAllMessagesAsRead:(
EMError **)pError;
239 #pragma mark - Load Messages Methods 255 - (
EMMessage *)loadMessageWithId:(NSString *)aMessageId
278 - (void)loadMessagesStartFromId:(NSString *)aMessageId
280 searchDirection:(EMMessageSearchDirection)aDirection
281 completion:(
void (^)(NSArray *aMessages,
EMError *aError))aCompletionBlock;
307 - (void)loadMessagesWithType:(EMMessageBodyType)aType
308 timestamp:(
long long)aTimestamp
310 fromUser:(NSString*)aUsername
311 searchDirection:(EMMessageSearchDirection)aDirection
312 completion:(
void (^)(NSArray *aMessages,
EMError *aError))aCompletionBlock;
338 - (void)loadMessagesWithKeyword:(NSString*)aKeyword
339 timestamp:(
long long)aTimestamp
341 fromUser:(NSString*)aSender
342 searchDirection:(EMMessageSearchDirection)aDirection
343 completion:(
void (^)(NSArray *aMessages,
EMError *aError))aCompletionBlock;
363 - (void)loadMessagesFrom:(
long long)aStartTimestamp
364 to:(
long long)aEndTimestamp
366 completion:(
void (^)(NSArray *aMessages,
EMError *aError))aCompletionBlock;
369 #pragma mark - Deprecated methods 386 - (BOOL)insertMessage:(
EMMessage *)aMessage __deprecated_msg("Use -insertMessage:error:");
403 - (BOOL)appendMessage:(
EMMessage *)aMessage __deprecated_msg("Use -appendMessage:error:");
420 - (BOOL)deleteMessageWithId:(NSString *)aMessageId __deprecated_msg("Use -deleteMessageWithId:error:");
450 - (BOOL)updateMessage:(
EMMessage *)aMessage __deprecated_msg("Use -updateMessageChange:error:");
467 - (BOOL)markMessageAsReadWithId:(NSString *)aMessageId __deprecated_msg("Use -markMessageAsReadWithId:error:");
480 - (BOOL)markAllMessagesAsRead
__deprecated_msg("Use -markAllMessagesAsRead:");
493 - (BOOL)updateConversationExtToDB
__deprecated_msg("setExt: will update extend properties to DB");
510 - (
EMMessage *)loadMessageWithId:(NSString *)aMessageId __deprecated_msg("Use -loadMessageWithId:error:");
531 - (NSArray *)loadMoreMessagesFromId:(NSString *)aMessageId
533 direction:(EMMessageSearchDirection)aDirection __deprecated_msg("Use -loadMessagesStartFromId:count:searchDirection:completion:");
558 - (NSArray *)loadMoreMessagesWithType:(EMMessageBodyType)aType
559 before:(
long long)aTimestamp
561 from:(NSString*)aSender
562 direction:(EMMessageSearchDirection)aDirection __deprecated_msg("Use -loadMessagesWithType:timestamp:count:fromUser:searchDirection:completion:");
587 - (NSArray *)loadMoreMessagesContain:(NSString*)aKeywords
588 before:(
long long)aTimestamp
590 from:(NSString*)aSender
591 direction:(EMMessageSearchDirection)aDirection __deprecated_msg("Use -loadMessagesContainKeywords:timestamp:count:fromUser:searchDirection:completion:");
612 - (NSArray *)loadMoreMessagesFrom:(
long long)aStartTimestamp
613 to:(
long long)aEndTimestamp
614 maxCount:(
int)aMaxCount __deprecated_msg("Use -loadMessagesFrom:to:count:completion:");
NSString * conversationId
Definition: EMConversation.h:71
Definition: EMConversation.h:54
EMMessage * lastReceivedMessage()
int unreadMessagesCount
Definition: EMConversation.h:89
EMConversationType type
Definition: EMConversation.h:80
NSDictionary * ext
Definition: EMConversation.h:98
Definition: EMMessage.h:65
"Use -deleteAllMessages:" __deprecated_msg()
EMMessage * latestMessage
Definition: EMConversation.h:107