EMCallEnum.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. EMCallEndReasonBeenkicked,
  59. EMCallEndReasonNotEnable = 101,
  60. EMCallEndReasonServiceArrearages,
  61. EMCallEndReasonServiceForbidden
  62. } EMCallEndReason;
  63. typedef enum : NSUInteger {
  64. EMConferenceAttributeAdd = 0,
  65. EMConferenceAttributeUpdate,
  66. EMConferenceAttributeDelete
  67. } EMConferenceAttributeAction;
  68. /*!
  69. * \~chinese
  70. * 通话连接方式
  71. *
  72. * \~english
  73. * Connection type of the call
  74. */
  75. typedef enum {
  76. EMCallConnectTypeNone = 0, /*! \~chinese 无连接 \~english No connection */
  77. EMCallConnectTypeDirect, /*! \~chinese 直连 \~english Direct connect between devices */
  78. EMCallConnectTypeRelay, /*! \~chinese 转媒体服务器连接 \~english Relay connection over server */
  79. } EMCallConnectType;
  80. /*!
  81. * \~chinese
  82. * 通话数据流状态
  83. *
  84. * \~english
  85. * Call status
  86. */
  87. typedef enum {
  88. EMCallStreamStatusVoicePause = 0, /*! \~chinese 中断语音 \~english Pause voice streaming */
  89. EMCallStreamStatusVoiceResume, /*! \~chinese 继续语音 \~english Resume voice streaming */
  90. EMCallStreamStatusVideoPause, /*! \~chinese 中断视频 \~english Pause video streaming */
  91. EMCallStreamStatusVideoResume, /*! \~chinese 继续视频 \~english Resume video streaming */
  92. } EMCallStreamingStatus;
  93. /*!
  94. * \~chinese
  95. * 通话网络状态
  96. *
  97. * \~english
  98. * Network status
  99. */
  100. typedef enum {
  101. EMCallNetworkStatusNormal = 0, /*! \~chinese 正常 \~english Normal */
  102. EMCallNetworkStatusUnstable, /*! \~chinese 不稳定 \~english Unstable connection */
  103. EMCallNetworkStatusNoData, /*! \~chinese 没有数据 \~english No data */
  104. } EMCallNetworkStatus;
  105. /*!
  106. * \~chinese
  107. * 视频分辨率
  108. *
  109. * \~english
  110. * Video resolution
  111. */
  112. typedef enum {
  113. EMCallVideoResolutionDefault = 0, /*! \~chinese 自适应分辨率 \~english Adaptive resolution */
  114. EMCallVideoResolution352_288, /*! \~chinese 352 * 288 \~english 352 * 288 */
  115. EMCallVideoResolution640_480, /*! \~chinese 640 * 480 \~english 640 * 480 */
  116. EMCallVideoResolution1280_720, /*! \~chinese 1280 * 720 \~english 1280 * 720 */
  117. EMCallVideoResolution_Custom, /*! \~chinese 自定义分辨率\~english custom resolution */
  118. EMCallVideoResolutionAdaptive = EMCallVideoResolutionDefault,
  119. } EMCallVideoResolution;
  120. /*!
  121. * \~chinese
  122. * 视频格式
  123. *
  124. * \~english
  125. * Video format
  126. */
  127. typedef enum {
  128. EMCallVideoFormatNV12 = 0x3231564e, /*! \~chinese nv12 \~english nv12 */
  129. EMCallVideoFormatBGRA = 0x41524742, /*! \~chinese bgra \~english bgra */
  130. EMCallVideoFormatARGB = 0x42475241, /*! \~chinese argb \~english argb */
  131. } EMCallVideoFormat;
  132. #pragma mark - EM_DEPRECATED_IOS
  133. /*!
  134. * \~chinese
  135. * 通话数据流状态
  136. *
  137. * \~english
  138. * Stream control
  139. */
  140. typedef enum {
  141. EMCallStreamControlTypeVoicePause __deprecated_msg("Use EMCallStreamStatusVoicePause") = 0, /*! \~chinese 中断语音 \~english Pause Voice */
  142. EMCallStreamControlTypeVoiceResume __deprecated_msg("Use EMCallStreamStatusVoiceResume"), /*! \~chinese 继续语音 \~english Resume Voice */
  143. EMCallStreamControlTypeVideoPause __deprecated_msg("Use EMCallStreamStatusVideoPause"), /*! \~chinese 中断视频 \~english Pause Video */
  144. EMCallStreamControlTypeVideoResume __deprecated_msg("Use EMCallStreamStatusVideoResume"), /*! \~chinese 继续视频 \~english Resume Video */
  145. } EMCallStreamControlType __deprecated_msg("Use EMCallStreamingStatus");
  146. #endif /* EMCallEnum_h */