WFCCConversation.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // WFCCConversation.h
  3. // WFChatClient
  4. //
  5. // Created by heavyrain on 2017/8/16.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "WFCCJsonSerializer.h"
  10. #import "WFCCProtocol.h"
  11. /**
  12. 会话类型
  13. - Single_Type: 单聊
  14. - Group_Type: 群组
  15. - Chatroom_Type: 聊天室
  16. - Channel_Type: 频道
  17. - Things_Type: 物联网
  18. - SecretChat_Type: 密聊
  19. */
  20. typedef NS_ENUM(NSInteger, WFCCConversationType) {
  21. Single_Type,
  22. Group_Type,
  23. Chatroom_Type,
  24. Channel_Type,
  25. Things_Type,
  26. SecretChat_Type,
  27. };
  28. /**
  29. 会话
  30. */
  31. @interface WFCCConversation : WFCCJsonSerializer <NSCopying, WFCCDuplicatable>
  32. /**
  33. 构造方法
  34. @param type 会话类型
  35. @param target 目标会话ID
  36. @param line 默认传0
  37. @return 会话
  38. */
  39. +(instancetype)conversationWithType:(WFCCConversationType)type
  40. target:(NSString *)target
  41. line:(int)line;
  42. /**
  43. 构造方法
  44. @param target 目标会话ID
  45. @return 单聊会话
  46. */
  47. +(instancetype)singleConversation:(NSString *)target;
  48. /**
  49. 构造方法
  50. @param target 目标会话ID
  51. @return 群组会话
  52. */
  53. +(instancetype)groupConversation:(NSString *)target;
  54. /**
  55. 会话类型
  56. */
  57. @property (nonatomic, assign)WFCCConversationType type;
  58. /**
  59. 目标会话ID,单聊为对方用户ID,群聊为群ID
  60. */
  61. @property (nonatomic, strong)NSString *target;
  62. /**
  63. 默认为0
  64. */
  65. @property (nonatomic, assign)int line;
  66. @end