EMChatMessageStatistics.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /**
  2. * \~chinese
  3. * @header EMChatMessageStatistics.h
  4. * @abstract 消息流量统计模型类。
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMChatMessageStatistics.h
  10. * @abstract The message traffic statistics model.
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. #import "EMChatMessage.h"
  16. NS_ASSUME_NONNULL_BEGIN
  17. /**
  18. * \~chinese
  19. * 消息流量信息。
  20. *
  21. * \~english
  22. * The message traffic statistics.
  23. */
  24. @interface EMChatMessageStatistics : NSObject
  25. /**
  26. * \~chinese
  27. * 消息 ID,即消息的唯一标识。
  28. *
  29. * \~english
  30. * The message ID, which is the unique identifier of the message.
  31. */
  32. @property (nonatomic,strong,readonly) NSString* messageId;
  33. /**
  34. * \~chinese
  35. * 消息的接收方。
  36. *
  37. * \~english
  38. * The user ID of the message recipient.
  39. */
  40. @property (nonatomic,strong,readonly) NSString* to;
  41. /**
  42. * \~chinese
  43. * 消息的发送方。
  44. *
  45. * \~english
  46. * The user ID of the message sender.
  47. */
  48. @property (nonatomic,strong,readonly) NSString* from;
  49. /**
  50. * \~chinese
  51. * 消息体类型。
  52. *
  53. * \~english
  54. * The message body type.
  55. */
  56. @property (nonatomic,readonly) EMMessageBodyType type;
  57. /**
  58. * \~chinese
  59. * 聊天类型。
  60. *
  61. * \~english
  62. * The chat type.
  63. */
  64. @property (nonatomic,readonly) EMChatType chatType;
  65. /**
  66. * \~chinese
  67. * 消息方向:
  68. * - `Send`:该消息是当前用户发送出去的;
  69. * - `Receive`:该消息是当前用户接收到的。
  70. *
  71. * \~english
  72. * The message direction:
  73. * - `Send`: Messages sent by the current user;
  74. * - `Receive`: Messages received by the current user.
  75. */
  76. @property (nonatomic,readonly) EMMessageDirection direction;
  77. /**
  78. * \~chinese
  79. * 消息体流量大小。
  80. *
  81. * 流量单位为字节。
  82. *
  83. * \~english
  84. * The amount of traffic for the message body.
  85. *
  86. * The traffic is measured in bytes.
  87. */
  88. @property (nonatomic,readonly) NSUInteger messageSize;
  89. /**
  90. * \~chinese
  91. * 消息附件流量大小。
  92. *
  93. * 流量单位为字节。
  94. *
  95. * \~english
  96. * The amount of traffic for the message attachment.
  97. *
  98. * The traffic is measured in bytes.
  99. */
  100. @property (nonatomic,readonly) NSUInteger attachmentSize;
  101. /**
  102. * \~chinese
  103. * 缩略图流量大小。
  104. *
  105. * 流量单位为字节。
  106. *
  107. * \~english
  108. * The amount of traffic for the thumbnail.
  109. *
  110. * The traffic is measured in bytes.
  111. */
  112. @property (nonatomic,readonly) NSUInteger thumbnailSize;
  113. /**
  114. * \~chinese
  115. * 服务器收到该消息的 Unix 时间戳。
  116. *
  117. * 时间戳的单位为毫秒。
  118. *
  119. * \~english
  120. * The Unix timestamp for the Chat server receiving the message.
  121. *
  122. * The Unix timestamp is in the unit of millisecond.
  123. */
  124. @property (nonatomic,readonly) NSUInteger timestamp;
  125. @end
  126. NS_ASSUME_NONNULL_END