KSChatroomMessageCenter.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // KSChatroomMessageCenter.h
  3. // KulexiuForTeacher
  4. //
  5. // Created by Kyle on 2022/3/30.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <RongIMLibCore/RongIMLibCore.h>
  9. #import "KSLiveChatroomLike.h"
  10. #import "KSLiveChatroomDownSeat.h"
  11. #import "KSLiveChatroomEnter.h"
  12. #import "KSLiveChatroomLeave.h"
  13. #import "KSLiveChatroomUserQuit.h"
  14. #import "KSLiveChatroomWelcome.h"
  15. #import "KSLiveChatroomSeatApply.h"
  16. #import "KSLiveChatroomSeatResponse.h"
  17. #import "KSLiveChatroomClose.h"
  18. #import "KSLiveChatroomKickOut.h"
  19. typedef void(^RCChatroomMessageSuccess)(long messageId);
  20. typedef void(^RCChatroomMessageError)(RCErrorCode errorCode, long messageId);
  21. NS_ASSUME_NONNULL_BEGIN
  22. @protocol RCChatroomLocalMessageDelegate <NSObject>
  23. - (void)didReceiveLocalChatroomMessage:(RCMessageContent *)content;
  24. @end
  25. @interface KSChatroomMessageCenter : NSObject
  26. ///注册消息类
  27. + (void)registerMessageTypes;
  28. ///发送消息
  29. ///@param roomId 房间id
  30. ///@param content 消息,对应自定义消息类型
  31. + (void)sendChatMessage:(NSString *)roomId
  32. content:(RCMessageContent *)content
  33. success:(RCChatroomMessageSuccess)success
  34. error:(RCChatroomMessageError)error;
  35. ///发送消息
  36. ///@param roomId 房间id
  37. ///@param content 消息,对应自定义消息类型
  38. ///@param queue 回调线程
  39. + (void)sendChatMessage:(NSString *)roomId
  40. content:(RCMessageContent *)content
  41. queue:(dispatch_queue_t)queue
  42. success:(RCChatroomMessageSuccess)success
  43. error:(RCChatroomMessageError)error;
  44. @end
  45. NS_ASSUME_NONNULL_END