No Description

MessageModel.h 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /************************************************************
  2. * * EaseMob CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2013-2014 EaseMob Technologies. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of EaseMob Technologies.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from EaseMob Technologies.
  11. */
  12. #import <Foundation/Foundation.h>
  13. #define KFIRETIME 20
  14. typedef NS_ENUM(NSInteger, AssistantMessageType) {
  15. AssistantMessageTypeDefault = -1,
  16. AssistantMessageTypeCard = 3,
  17. AssistantMessageTypeReco = 4,
  18. AssistantMessageTypeTrade = 5,
  19. };
  20. @interface MessageModel : NSObject
  21. {
  22. BOOL _isPlaying;
  23. }
  24. @property (nonatomic) EMMessageBodyType type;
  25. @property (nonatomic) EMMessageStatus status;
  26. @property (nonatomic) BOOL isSender; //是否是发送者
  27. @property (nonatomic) BOOL isRead; //是否已读
  28. @property (nonatomic) BOOL isChatGroup; //是否是群聊
  29. @property (nonatomic, strong) NSString *messageId;
  30. @property (nonatomic, strong) NSString *headPhotoURL;
  31. @property (nonatomic, strong) NSString *nickName;
  32. @property (nonatomic, strong) NSString *username;
  33. //text
  34. @property (nonatomic, strong) NSString *content;
  35. //image
  36. @property (nonatomic) CGSize size;
  37. @property (nonatomic) CGSize thumbnailSize;
  38. @property (nonatomic, strong) NSURL *imageRemoteURL;
  39. @property (nonatomic, strong) NSURL *thumbnailRemoteURL;
  40. @property (nonatomic, strong) UIImage *image;
  41. @property (nonatomic, strong) UIImage *thumbnailImage;
  42. //audio
  43. @property (nonatomic, strong) NSString *localPath;
  44. @property (nonatomic, strong) NSString *remotePath;
  45. @property (nonatomic) NSInteger time;
  46. //@property (nonatomic, strong) EMChatVoice *chatVoice;
  47. @property (nonatomic) BOOL isPlaying;
  48. @property (nonatomic) BOOL isPlayed;
  49. //location
  50. @property (nonatomic, strong) NSString *address;
  51. @property (nonatomic) double latitude;
  52. @property (nonatomic) double longitude;
  53. @property (nonatomic, strong)EMMessageBody *messageBody;
  54. @property (nonatomic, strong)EMMessage *message;
  55. /**
  56. * 判断是否是宝贝链接消息
  57. */
  58. - (BOOL)isSummaryMessage;
  59. /**
  60. * 判断是否是评分消息
  61. */
  62. - (BOOL)isEnquiryMessage;
  63. /**
  64. * 判断是否是管家服务消息
  65. */
  66. - (BOOL)isAssistantMessage;
  67. - (AssistantMessageType)getAssistantMessageType;
  68. @end