WFCCMessage.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. //
  2. // WFCCMessage.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 "WFCCConversation.h"
  10. #import "WFCCMessageContent.h"
  11. /**
  12. 消息方向
  13. - MessageDirection_Send: 发送
  14. - MessageDirection_Receive: 接收
  15. */
  16. typedef NS_ENUM(NSInteger, WFCCMessageDirection) {
  17. MessageDirection_Send,
  18. MessageDirection_Receive
  19. };
  20. /**
  21. 消息状态
  22. - Message_Status_Sending: 发送中
  23. - Message_Status_Sent: 发送成功
  24. - Message_Status_Send_Failure: 发送失败
  25. - Message_Status_Unread: 未读
  26. - Message_Status_Readed: 已读
  27. - Message_Status_Played: 已播放(媒体消息)
  28. */
  29. typedef NS_ENUM(NSInteger, WFCCMessageStatus) {
  30. Message_Status_Sending,
  31. Message_Status_Sent,
  32. Message_Status_Send_Failure,
  33. Message_Status_Mentioned,
  34. Message_Status_AllMentioned,
  35. Message_Status_Unread,
  36. Message_Status_Readed,
  37. Message_Status_Played
  38. };
  39. /**
  40. 消息实体
  41. */
  42. @interface WFCCMessage : NSObject
  43. /**
  44. 消息ID,当前用户本地唯一
  45. */
  46. @property (nonatomic, assign)long messageId;
  47. /**
  48. 消息UID,所有用户全局唯一
  49. */
  50. @property (nonatomic, assign)long long messageUid;
  51. /**
  52. 消息所属的会话
  53. */
  54. @property (nonatomic, strong)WFCCConversation *conversation;
  55. /**
  56. 消息发送者的用户ID
  57. */
  58. @property (nonatomic, strong)NSString * fromUser;
  59. /**
  60. 消息在会话中定向发送给该用户的
  61. */
  62. @property (nonatomic, strong)NSString * toUser;
  63. /**
  64. 消息内容
  65. */
  66. @property (nonatomic, strong)WFCCMessageContent *content;
  67. /**
  68. 消息方向
  69. */
  70. @property (nonatomic, assign)WFCCMessageDirection direction;
  71. /**
  72. 消息状态
  73. */
  74. @property (nonatomic, assign)WFCCMessageStatus status;
  75. /**
  76. 消息的发送时间
  77. */
  78. @property (nonatomic, assign)long long serverTime;
  79. @end