EMCallManagerDelegate.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*!
  2. * \~chinese
  3. * @header EMCallManagerDelegate.h
  4. * @abstract 此协议定义了实时语音/视频相关的回调
  5. * @author Hyphenate
  6. * @version 3.00
  7. *
  8. * \~english
  9. * @header EMCallManagerDelegate.h
  10. * @abstract This protocol defined the callbacks of real time voice/video
  11. * @author Hyphenate
  12. * @version 3.00
  13. */
  14. #import <Foundation/Foundation.h>
  15. #import "EMCallSession.h"
  16. @class EMError;
  17. /*!
  18. * \~chinese
  19. * 实时语音/视频相关的回调
  20. *
  21. * \~english
  22. * Callbacks of real time voice/video
  23. */
  24. @protocol EMCallManagerDelegate <NSObject>
  25. @optional
  26. /*!
  27. * \~chinese
  28. * 用户A拨打用户B,用户B会收到这个回调
  29. *
  30. * @param aSession 会话实例
  31. *
  32. * \~english
  33. * User B will receive this callback after user A dial user B
  34. *
  35. * @param aSession Session instance
  36. */
  37. - (void)callDidReceive:(EMCallSession *)aSession;
  38. /*!
  39. * \~chinese
  40. * 通话通道建立完成,用户A和用户B都会收到这个回调
  41. *
  42. * @param aSession 会话实例
  43. *
  44. * \~english
  45. * Both user A and B will receive this callback after connection is established
  46. *
  47. * @param aSession Session instance
  48. */
  49. - (void)callDidConnect:(EMCallSession *)aSession;
  50. /*!
  51. * \~chinese
  52. * 用户B同意用户A拨打的通话后,用户A和B会收到这个回调
  53. *
  54. * @param aSession 会话实例
  55. *
  56. * \~english
  57. * User A and B will receive this callback after user B accept A's call
  58. *
  59. * @param aSession
  60. */
  61. - (void)callDidAccept:(EMCallSession *)aSession;
  62. /*!
  63. * \~chinese
  64. * 1. 用户A或用户B结束通话后,双方会收到该回调
  65. * 2. 通话出现错误,双方都会收到该回调
  66. *
  67. * @param aSession 会话实例
  68. * @param aReason 结束原因
  69. * @param aError 错误
  70. *
  71. * \~english
  72. * 1.The another peer will receive this callback after user A or user B terminate the call.
  73. * 2.Both user A and B will receive this callback after error occur.
  74. *
  75. * @param aSession Session instance
  76. * @param aReason Terminate reason
  77. * @param aError Error
  78. */
  79. - (void)callDidEnd:(EMCallSession *)aSession
  80. reason:(EMCallEndReason)aReason
  81. error:(EMError *)aError;
  82. /*!
  83. * \~chinese
  84. * 用户A和用户B正在通话中,用户A中断或者继续数据流传输时,用户B会收到该回调
  85. *
  86. * @param aSession 会话实例
  87. * @param aType 改变类型
  88. *
  89. * \~english
  90. * User A and B is on the call, A pause or resume the data stream, B will receive the callback
  91. *
  92. * @param aSession Session instance
  93. * @param aType Type
  94. */
  95. - (void)callStateDidChange:(EMCallSession *)aSession
  96. type:(EMCallStreamingStatus)aType;
  97. /*!
  98. * \~chinese
  99. * 用户A和用户B正在通话中,用户A的网络状态出现不稳定,用户A会收到该回调
  100. *
  101. * @param aSession 会话实例
  102. * @param aStatus 当前状态
  103. *
  104. * \~english
  105. * User A and B is on the call, A network status is not stable, A will receive the callback
  106. *
  107. * @param aSession Session instance
  108. * @param aStatus Current status
  109. */
  110. - (void)callNetworkDidChange:(EMCallSession *)aSession
  111. status:(EMCallNetworkStatus)aStatus;
  112. /*!
  113. * \~chinese
  114. * 建立通话时,自定义语音类别
  115. *
  116. * @param aCategory 会话语音类别
  117. *
  118. * \~english
  119. * Custom audio catrgory when setting up a call
  120. *
  121. * @param aCategory Audio catrgory
  122. */
  123. - (void)callDidCustomAudioSessionCategoryOptionsWithCategory:(NSString *)aCategory;
  124. @end