123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // XYChatRTMManager.h
- // Timi
- //
- // Created by 翟玉磊 on 2021/3/25.
- // 聊天室RTM管理
- #import <Foundation/Foundation.h>
- NS_ASSUME_NONNULL_BEGIN
- @protocol XYChatRTMManagerDelegate <NSObject>
- - (void)im_onReceivedChatRoomMessage:(NSDictionary *)message;
- - (void)im_onReceivedChatRoomMessages:(NSArray *)messages offline:(BOOL)offline;
- @end
- @interface XYChatRTMManager : NSObject
- @property (nonatomic, weak) id<XYChatRTMManagerDelegate>delegate;
- /// 本地头条历史消息
- @property (nonatomic, strong) NSMutableArray *headlineTextMessages;
- + (instancetype)sharedInstance;
- - (void)im_joinChatRoom:(NSString *)roomId timestamp:(NSString *)timestamp complete:(void(^)(BOOL success))block;
- - (void)im_quitChatRoom:(NSString *)roomId complete:(void(^)(BOOL success))block;
- - (void)im_sendMessageWithRoomId:(NSString *)roomId content:(NSDictionary *)msgDict complete:(void(^)(BOOL success, NSInteger errorCode, NSString *msg))block;
- - (void)im_onReceived:(id)message left:(int)nLeft;
- - (void)im_reset;
- /// 获取聊天室属性
- - (void)getAllChatRoomEntriesWithRoomId:(NSString *)roomId block:(void(^)(NSDictionary *entry))block;
- - (void )pkClear;
- @end
- NS_ASSUME_NONNULL_END
|