EMCallEnum.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*!
  2. * \~chinese
  3. * @header EMCallEnum.h
  4. * @abstract 枚举类型声明
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMCallEnum.h
  10. * @abstract Enum
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #ifndef EMCallEnum_h
  15. #define EMCallEnum_h
  16. /*!
  17. * \~chinese
  18. * 会话状态
  19. *
  20. * \~english
  21. * Call session status
  22. */
  23. typedef enum {
  24. EMCallSessionStatusDisconnected = 0, /*! \~chinese 通话没开始 \~english Call disconnected */
  25. EMCallSessionStatusConnecting = 2, /*! \~chinese 通话正在连接 \~english Waiting for answering */
  26. EMCallSessionStatusConnected, /*! \~chinese 通话已经准备好,等待接听 \~english Connection is established */
  27. EMCallSessionStatusAccepted, /*! \~chinese 通话双方同意协商 \~english Call accepted */
  28. } EMCallSessionStatus;
  29. typedef EMCallSessionStatus EMCallStatus;
  30. /*!
  31. * \~chinese
  32. * 通话类型
  33. *
  34. * \~english
  35. * Call type
  36. */
  37. typedef enum {
  38. EMCallTypeVoice = 0, /*! \~chinese 实时语音 \~english Voice call */
  39. EMCallTypeVideo, /*! \~chinese 实时视频 \~english Video call */
  40. } EMCallType;
  41. /*!
  42. * \~chinese
  43. * 通话结束原因
  44. *
  45. * \~english
  46. * Reasons of the ending call
  47. */
  48. typedef enum {
  49. EMCallEndReasonHangup = 0, /*! \~chinese 对方挂断 \~english Another peer hang up */
  50. EMCallEndReasonNoResponse, /*! \~chinese 对方没有响应 \~english No response */
  51. EMCallEndReasonDecline, /*! \~chinese 对方拒接 \~english Another peer declined the call */
  52. EMCallEndReasonBusy, /*! \~chinese 对方占线 \~english User is busy */
  53. EMCallEndReasonFailed, /*! \~chinese 失败 \~english Establish the call failed */
  54. EMCallEndReasonUnsupported, /*! \~chinese 功能不支持 \~english Unsupported */
  55. EMCallEndReasonRemoteOffline, /*! \~chinese 对方不在线 \~english Remote offline */
  56. EMCallEndReasonLoginOtherDevice,
  57. EMCallEndReasonDestroy,
  58. EMCallEndReasonNotEnable = 101,
  59. EMCallEndReasonServiceArrearages,
  60. EMCallEndReasonServiceForbidden
  61. } EMCallEndReason;
  62. typedef enum : NSUInteger {
  63. EMConferenceAttributeAdd = 0,
  64. EMConferenceAttributeUpdate,
  65. EMConferenceAttributeDelete
  66. } EMConferenceAttributeAction;
  67. /*!
  68. * \~chinese
  69. * 通话连接方式
  70. *
  71. * \~english
  72. * Connection type of the call
  73. */
  74. typedef enum {
  75. EMCallConnectTypeNone = 0, /*! \~chinese 无连接 \~english No connection */
  76. EMCallConnectTypeDirect, /*! \~chinese 直连 \~english Direct connect between devices */
  77. EMCallConnectTypeRelay, /*! \~chinese 转媒体服务器连接 \~english Relay connection over server */
  78. } EMCallConnectType;
  79. /*!
  80. * \~chinese
  81. * 通话数据流状态
  82. *
  83. * \~english
  84. * Call status
  85. */
  86. typedef enum {
  87. EMCallStreamStatusVoicePause = 0, /*! \~chinese 中断语音 \~english Pause voice streaming */
  88. EMCallStreamStatusVoiceResume, /*! \~chinese 继续语音 \~english Resume voice streaming */
  89. EMCallStreamStatusVideoPause, /*! \~chinese 中断视频 \~english Pause video streaming */
  90. EMCallStreamStatusVideoResume, /*! \~chinese 继续视频 \~english Resume video streaming */
  91. } EMCallStreamingStatus;
  92. /*!
  93. * \~chinese
  94. * 通话网络状态
  95. *
  96. * \~english
  97. * Network status
  98. */
  99. typedef enum {
  100. EMCallNetworkStatusNormal = 0, /*! \~chinese 正常 \~english Normal */
  101. EMCallNetworkStatusUnstable, /*! \~chinese 不稳定 \~english Unstable connection */
  102. EMCallNetworkStatusNoData, /*! \~chinese 没有数据 \~english No data */
  103. } EMCallNetworkStatus;
  104. /*!
  105. * \~chinese
  106. * 视频分辨率
  107. *
  108. * \~english
  109. * Video resolution
  110. */
  111. typedef enum {
  112. EMCallVideoResolutionDefault = 0, /*! \~chinese 自适应分辨率 \~english Adaptive resolution */
  113. EMCallVideoResolution352_288, /*! \~chinese 352 * 288 \~english 352 * 288 */
  114. EMCallVideoResolution640_480, /*! \~chinese 640 * 480 \~english 640 * 480 */
  115. EMCallVideoResolution1280_720, /*! \~chinese 1280 * 720 \~english 1280 * 720 */
  116. EMCallVideoResolutionAdaptive = EMCallVideoResolutionDefault,
  117. } EMCallVideoResolution;
  118. /*!
  119. * \~chinese
  120. * 视频格式
  121. *
  122. * \~english
  123. * Video format
  124. */
  125. typedef enum {
  126. EMCallVideoFormatNV12 = 0x3231564e, /*! \~chinese nv12 \~english nv12 */
  127. EMCallVideoFormatBGRA = 0x41524742, /*! \~chinese bgra \~english bgra */
  128. EMCallVideoFormatARGB = 0x42475241, /*! \~chinese argb \~english argb */
  129. } EMCallVideoFormat;
  130. #pragma mark - EM_DEPRECATED_IOS
  131. /*!
  132. * \~chinese
  133. * 通话数据流状态
  134. *
  135. * \~english
  136. * Stream control
  137. */
  138. typedef enum {
  139. EMCallStreamControlTypeVoicePause __deprecated_msg("Use EMCallStreamStatusVoicePause") = 0, /*! \~chinese 中断语音 \~english Pause Voice */
  140. EMCallStreamControlTypeVoiceResume __deprecated_msg("Use EMCallStreamStatusVoiceResume"), /*! \~chinese 继续语音 \~english Resume Voice */
  141. EMCallStreamControlTypeVideoPause __deprecated_msg("Use EMCallStreamStatusVideoPause"), /*! \~chinese 中断视频 \~english Pause Video */
  142. EMCallStreamControlTypeVideoResume __deprecated_msg("Use EMCallStreamStatusVideoResume"), /*! \~chinese 继续视频 \~english Resume Video */
  143. } EMCallStreamControlType __deprecated_msg("Use EMCallStreamingStatus");
  144. #endif /* EMCallEnum_h */