EMMessageBody.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /**
  2. * \~chinese
  3. * @header EMMessageBody.h
  4. * @abstract 消息体类型的基类
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMMessageBody.h
  10. * @abstract Base class of message body
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. #import <CoreGraphics/CGGeometry.h>
  16. /**
  17. * \~chinese
  18. * 消息体类型。
  19. *
  20. * \~english
  21. * The enum of message body types.
  22. */
  23. typedef NS_ENUM(NSInteger, EMMessageBodyType) {
  24. EMMessageBodyTypeText = 1, /** \~chinese 文本消息。 \~english A text message.*/
  25. EMMessageBodyTypeImage, /** \~chinese 图片消息。 \~english An image message.*/
  26. EMMessageBodyTypeVideo, /** \~chinese 视频消息。 \~english A video message.*/
  27. EMMessageBodyTypeLocation, /** \~chinese 位置消息。 \~english A location message.*/
  28. EMMessageBodyTypeVoice, /** \~chinese 语音消息。 \~english A voice message.*/
  29. EMMessageBodyTypeFile, /** \~chinese 文件消息。 \~english A file message.*/
  30. EMMessageBodyTypeCmd, /** \~chinese 指令消息。 \~english A command message.*/
  31. EMMessageBodyTypeCustom, /** \~chinese 自定义消息。\~english A custom message.*/
  32. };
  33. /**
  34. * \~chinese
  35. * 消息体。
  36. * 不直接使用,由子类继承实现。
  37. *
  38. * \~english
  39. * The message body.
  40. */
  41. @interface EMMessageBody : NSObject
  42. /**
  43. * \~chinese
  44. * 消息体类型。
  45. *
  46. * \~english
  47. * The message body type.
  48. */
  49. @property (nonatomic, readonly) EMMessageBodyType type;
  50. @end