IConsultation.cs 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. using System;
  2. using System.Collections.Generic;
  3. using Vinno.IUS.Common.Args;
  4. using Vinno.vCloud.Common.FIS.FLYINSONOLogin;
  5. using Vinno.vCloud.FIS.CrossPlatform.Common.LiveVideo;
  6. using Vinno.vCloud.Protocol.Infrastructures;
  7. using Vinno.vCloud.Protocol.Messages.Live;
  8. namespace Vinno.vCloud.Common.FIS.Consultation
  9. {
  10. public interface IConsultation : IFeature, IDisposable
  11. {
  12. /// <summary>
  13. /// Raised when the flyinsono user status is changed.
  14. /// </summary>
  15. event EventHandler<FLYINSONOUserLoginStatusArgs> UserStatusChanged;
  16. /// <summary>
  17. /// Flyinsono user login
  18. /// </summary>
  19. /// <param name="userName">The flyinsono user name.</param>
  20. /// <param name="password">The password</param>
  21. /// <param name="isScanLogin">isScanLogin</param>
  22. void Login(string userName, string password, bool isScanLogin);
  23. /// <summary>
  24. /// Flyinsono user log off.
  25. /// </summary>
  26. void LogOff();
  27. /// <summary>
  28. /// Get QRCode Info For Scan Login
  29. /// </summary>
  30. /// <returns></returns>
  31. string GetQRCodeInfoForScanLogin();
  32. /// <summary>
  33. /// Gets the hospital info of the flyinsono user.
  34. /// </summary>
  35. /// <returns></returns>
  36. OrganizationInfo GetHospitalInfo();
  37. /// <summary>
  38. /// Gets the experts list by hospital id.
  39. /// </summary>
  40. /// <param name="hospitalId">The hospital id.</param>
  41. /// <returns>The experts of the hospital.</returns>
  42. IEnumerable<DoctorInfo> GetExperts(string hospitalId);
  43. /// <summary>
  44. /// Remote device ultrasound image frame arrived
  45. /// </summary>
  46. event EventHandler<CPVideoFrameData> UltrasoundImageFrameArrived;
  47. /// <summary>
  48. /// Remote device ultrasound camera frame arrived
  49. /// </summary>
  50. event EventHandler<CPVideoFrameData> UltrasoundCameraFrameArrived;
  51. /// <summary>
  52. /// Local camera video frame arrived only for consultation
  53. /// </summary>
  54. event EventHandler<ConsultationVideoFrameData> ConsultationLocalVideoFrameArrived;
  55. /// <summary>
  56. /// Remote camera frame arrived only for consultation
  57. /// </summary>
  58. event EventHandler<ConsultationVideoFrameData> ConsultationRemoteVideoFrameArrived;
  59. /// <summary>
  60. /// Raised when receive a consultation request from server.
  61. /// </summary>
  62. event EventHandler<ConsultationInfo> ConsultationRequestArrived;
  63. /// <summary>
  64. /// Other one join the consultation notification Arrived from server
  65. /// </summary>
  66. event EventHandler<ConsultationInfo> JoinConsultationNotifyArrived;
  67. /// <summary>
  68. /// other reject notify arrived from server
  69. /// </summary>
  70. event EventHandler<ConsultationSubscriberInfo> RejectConsultationNotifyArrived;
  71. /// <summary>
  72. /// Raised when the consultation is disconnect.
  73. /// </summary>
  74. event EventHandler<ConsultationDisconnectedType> ConsultationDisconnected;
  75. /// <summary>
  76. /// Raised when consultation records collection changed.
  77. /// </summary>
  78. event EventHandler<CollectionChangedArgs<ConsultationRecord>> ConsultationRecordsChanged;
  79. /// <summary>
  80. /// Raised when a consultation record updated.
  81. /// </summary>
  82. event EventHandler<ConsultationRecord> ConsultationRecordUpdated;
  83. /// <summary>
  84. /// Raised when consultation Member Changed
  85. /// </summary>
  86. event EventHandler<ConsultationMemberNotificaiton> ConsultationMemberChangedNotificationArrived;
  87. /// <summary>
  88. /// 接收到其他用户的白板信息
  89. /// </summary>
  90. event EventHandler<InteractiveBoardInfo> InteractiveBoardInfoArrived;
  91. /// <summary>
  92. /// 接收到清除白板信息
  93. /// </summary>
  94. event EventHandler<string> ClearInteractiveBoardArrived;
  95. /// <summary>
  96. /// 收到即时会诊的通知
  97. /// </summary>
  98. event EventHandler<DoctorInfo> EmergencyConsultationRequestArrived;
  99. /// <summary>
  100. /// Accept the consultation request.
  101. /// </summary>
  102. /// <param name="videoHardwareId">The camera id.</param>
  103. /// <param name="micHardwareId">The micphone id.</param>
  104. /// <param name="speakerHardwareId">The speakder id.</param>
  105. /// <returns>The chat live states.</returns>
  106. LiveStates AcceptConsultation(string videoHardwareId, string micHardwareId, string speakerHardwareId);
  107. /// <summary>
  108. /// Reject consultation request.
  109. /// </summary>
  110. LiveStates RejectConsultation();
  111. /// <summary>
  112. /// Hang up a consultation.
  113. /// </summary>
  114. LiveStates HangupConsultation();
  115. /// <summary>
  116. /// Start a consultation request.
  117. /// </summary>
  118. /// <param name="recipients">The recipients.</param>
  119. /// <returns>The chat live status</returns>
  120. LiveStates RequestConsultation(List<RecipientInfo> recipients, string cameraHardwareId, string micHardwareId, string speakerHardwareId);
  121. /// <summary>
  122. /// Cancel consultation request
  123. /// </summary>
  124. LiveStates CancelConsultationRequest(bool forceClosed);
  125. /// <summary>
  126. /// Gets the live states of the current consultation.
  127. /// </summary>
  128. /// <returns>The current consultation live states</returns>
  129. LiveStates GetCurrentConsultationLiveStates();
  130. /// <summary>
  131. /// Doctor apply consultation.
  132. /// </summary>
  133. /// <param name="consultationRecord">The consultation record info to apply.</param>
  134. /// <returns>True: success. False: falied./returns>
  135. bool ApplyConsultationRecord(ConsultationRecord consultationRecord);
  136. /// <summary>
  137. /// Doctor delete consultation(The consultation record can be deleted only if the state is withdrawn.)
  138. /// </summary>
  139. /// <param name="consultationId"></param>
  140. /// <returns></returns>
  141. bool DeleteConsultationRecord(string consultationId);
  142. /// <summary>
  143. /// Doctor withdraw consultation.
  144. /// </summary>
  145. /// <param name="consultationId">The consultation id.</param>
  146. /// <returns>True: success. False: falied./returns>
  147. bool WithDrawConsultationRecord(string consultationId);
  148. /// <summary>
  149. /// Doctor update consultation.
  150. /// </summary>
  151. /// <param name="consultationRecord">The consultation record info to update.</param>
  152. /// <returns>True: success. False: falied./returns>
  153. bool UpdateConsultationRecord(ConsultationRecord consultationRecord);
  154. /// <summary>
  155. /// Expert arrange consultation.
  156. /// </summary>
  157. /// <param name="consultationRecord">The consultation to be arranged.</param>
  158. /// <returns>True: success. False: falied./returns>
  159. bool ArrangeConsultationRecord(ConsultationRecord consultationRecord);
  160. /// <summary>
  161. /// Set current consultation record.
  162. /// </summary>
  163. /// <param name="consultationId">The current consultation record id.</param>
  164. void SetCurrentConsultationRecord(string consultationId);
  165. /// <summary>
  166. /// 发送画板数据
  167. /// </summary>
  168. /// <param name="jsonData"></param>
  169. /// <returns></returns>
  170. bool SendInteractiveBoardData(string jsonData);
  171. /// <summary>
  172. /// 清除画板数据
  173. /// </summary>
  174. /// <returns></returns>
  175. bool ClearInteractiveBoardData();
  176. /// <summary>
  177. /// 获取当前会诊记录的报告
  178. /// </summary>
  179. /// <returns></returns>
  180. IEnumerable<byte[]> GetCurrentConsultationRecordReportImage();
  181. /// <summary>
  182. /// GetConsultationRecordList
  183. /// </summary>
  184. /// <param name="startIndex">Start Index</param>
  185. /// <param name="pageSize">page Size</param>
  186. /// <param name="consultationRecordFilter">Filter</param>
  187. bool GetConsultationRecordList(int startIndex, int pageSize, ConsultationRecordFilter consultationRecordFilter);
  188. /// <summary>
  189. /// 开始即时呼叫
  190. /// </summary>
  191. /// <param name="cameraId"></param>
  192. /// <param name="micId"></param>
  193. /// <param name="speakerId"></param>
  194. /// <returns></returns>
  195. EnumEmergencyConsultationResult RequestEmergencyConsultation(string cameraId, string micId, string speakerId);
  196. /// <summary>
  197. /// 发起者取消即时呼叫
  198. /// </summary>
  199. LiveStates CancelEmergencyConsultation();
  200. /// <summary>
  201. /// 接受即时呼叫
  202. /// </summary>
  203. /// <param name = "cameraId" ></ param >
  204. /// < param name="micId"></param>
  205. /// <param name = "speakerId" ></ param >
  206. /// < returns ></ returns >
  207. LiveStates AcceptEmergencyConsultation(string cameraId, string micId, string speakerId);
  208. /// <summary>
  209. /// 拒绝即时呼叫
  210. /// </summary>
  211. LiveStates RejectEmergencyConsultation();
  212. /// <summary>
  213. /// 收到关闭摄像头用户清单的通知
  214. /// </summary>
  215. event EventHandler<List<string>> MuteVideoUserListNotifyArrived;
  216. }
  217. }