XYIMBaseManager.h 994 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // XYIMBaseManager.h
  3. // Timi
  4. //
  5. // Created by 翟玉磊 on 2021/3/25.
  6. // IM基础类
  7. #import <Foundation/Foundation.h>
  8. #import "XYIMUnReadCountManager.h"
  9. #import "XYIMConfigHeader.h"
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface XYIMBaseManager : NSObject
  12. + (instancetype)sharedInstance;
  13. - (void)im_setupAppId:(NSString *)appId;
  14. - (void)im_loginWithToken:(NSString *)token complete:(void(^)(BOOL success))block;
  15. - (void)im_logoutComplete:(void(^)(BOOL success))block;
  16. /// 获取单聊会话列表
  17. - (NSArray *)getConversationList;
  18. /// 删除指定的单聊会话
  19. - (BOOL)removeConversation:(NSString *)conId;
  20. /// 更新im缓存的用户信息
  21. - (void)refreshUserInfoWithUserId:(NSString *)userId name:(NSString *)name portrait:(NSString *)portrait;
  22. /// 清除某个会话中的未读消息数
  23. - (BOOL)clearMessagesUnreadStatusWithConversationId:(NSString *)convId;
  24. /// 根据融云code返回对应文本
  25. + (NSString *)getErrorTextWithCode:(NSInteger)errorCode;
  26. @end
  27. NS_ASSUME_NONNULL_END