EMDefines.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //
  2. // EMDefines.h
  3. // ChatDemo-UI3.0
  4. //
  5. // Created by XieYajie on 2019/2/11.
  6. // Copyright © 2019 XieYajie. All rights reserved.
  7. //
  8. #ifndef EMDefines_h
  9. #define EMDefines_h
  10. #define IS_iPhoneX (\
  11. {\
  12. BOOL isPhoneX = NO;\
  13. if (@available(iOS 11.0, *)) {\
  14. isPhoneX = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom > 0.0;\
  15. }\
  16. (isPhoneX);}\
  17. )
  18. #define EMVIEWTOPMARGIN (IS_iPhoneX ? 22.f : 0.f)
  19. #define EMVIEWBOTTOMMARGIN (IS_iPhoneX ? 34.f : 0.f)
  20. //账号状态
  21. #define ACCOUNT_LOGIN_CHANGED @"loginStateChange"
  22. #define NOTIF_PUSHVIEWCONTROLLER @"EMPushNotificationViewController"
  23. #define NOTIF_ID @"EMNotifId"
  24. #define NOTIF_NAVICONTROLLER @"EMNaviController"
  25. //聊天
  26. #define CHAT_PUSHVIEWCONTROLLER @"EMPushChatViewController"
  27. #define CHAT_CLEANMESSAGES @"EMChatCleanMessages"
  28. //消息动图
  29. #define MSG_EXT_GIF_ID @"em_expression_id"
  30. #define MSG_EXT_GIF @"em_is_big_expression"
  31. #define MSG_EXT_READ_RECEIPT @"em_read_receipt"
  32. #define MSG_EXT_UN_READ_RECEIPT @"em_read_unreceipt"
  33. //消息撤回
  34. #define MSG_EXT_RECALL @"em_recall"
  35. //多人会议邀请
  36. #define MSG_EXT_CALLOP @"em_conference_op"
  37. #define MSG_EXT_CALLID @"em_conference_id"
  38. #define MSG_EXT_CALLPSWD @"em_conference_password"
  39. //@
  40. //群组消息ext的字段,用于存放被@的环信id数组
  41. #define MSG_EXT_AT @"em_at_list"
  42. //群组消息ext字典中,kGroupMessageAtList字段的值,用于@所有人
  43. #define MSG_EXT_ATALL @"all"
  44. //Typing
  45. #define MSG_TYPING_BEGIN @"TypingBegin"
  46. #define MSG_TYPING_END @"TypingEnd"
  47. #define kHaveUnreadAtMessage @"kHaveAtMessage"
  48. #define kAtYouMessage 1
  49. #define kAtAllMessage 2
  50. //实时音视频
  51. #define CALL_CHATTER @"chatter"
  52. #define CALL_TYPE @"type"
  53. #define CALL_PUSH_VIEWCONTROLLER @"EMPushCallViewController"
  54. //实时音视频1v1呼叫
  55. #define CALL_MAKE1V1 @"EMMake1v1Call"
  56. //实时音视频多人
  57. #define CALL_MODEL @"EMCallForModel"
  58. #define CALL_MAKECONFERENCE @"EMMakeConference"
  59. #define CALL_SELECTCONFERENCECELL @"EMSelectConferenceCell"
  60. //用户黑名单
  61. #define CONTACT_BLACKLIST_UPDATE @"EMContactBlacklistUpdate"
  62. #define CONTACT_BLACKLIST_RELOAD @"EMContactReloadBlacklist"
  63. //群组
  64. #define GROUP_LIST_PUSHVIEWCONTROLLER @"EMPushGroupsViewController"
  65. #define GROUP_INFO_UPDATED @"EMGroupInfoUpdated"
  66. #define GROUP_SUBJECT_UPDATED @"EMGroupSubjectUpdated"
  67. #define GROUP_INFO_PUSHVIEWCONTROLLER @"EMPushGroupInfoViewController"
  68. #define GROUP_INFO_REFRESH @"EMGroupInfoRefresh"
  69. //聊天室
  70. #define CHATROOM_LIST_PUSHVIEWCONTROLLER @"EMPushChatroomsViewController"
  71. #define CHATROOM_INFO_UPDATED @"EMChatroomInfoUpdated"
  72. #define CHATROOM_INFO_PUSHVIEWCONTROLLER @"EMPushChatroomInfoViewController"
  73. #endif /* EMDefines_h */