RtcClient.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ALIBABACLOUD_RTC_RTCCLIENT_H_
  17. #define ALIBABACLOUD_RTC_RTCCLIENT_H_
  18. #include <future>
  19. #include <alibabacloud/core/AsyncCallerContext.h>
  20. #include <alibabacloud/core/EndpointProvider.h>
  21. #include <alibabacloud/core/RpcServiceClient.h>
  22. #include "RtcExport.h"
  23. #include "model/CreateChannelRequest.h"
  24. #include "model/CreateChannelResult.h"
  25. #include "model/CreateConferenceRequest.h"
  26. #include "model/CreateConferenceResult.h"
  27. #include "model/CreateMAURuleRequest.h"
  28. #include "model/CreateMAURuleResult.h"
  29. #include "model/CreateTemplateRequest.h"
  30. #include "model/CreateTemplateResult.h"
  31. #include "model/DeleteChannelRequest.h"
  32. #include "model/DeleteChannelResult.h"
  33. #include "model/DeleteConferenceRequest.h"
  34. #include "model/DeleteConferenceResult.h"
  35. #include "model/DeleteMAURuleRequest.h"
  36. #include "model/DeleteMAURuleResult.h"
  37. #include "model/DeleteTemplateRequest.h"
  38. #include "model/DeleteTemplateResult.h"
  39. #include "model/DescribeAppsRequest.h"
  40. #include "model/DescribeAppsResult.h"
  41. #include "model/DescribeChannelParticipantsRequest.h"
  42. #include "model/DescribeChannelParticipantsResult.h"
  43. #include "model/DescribeChannelUsersRequest.h"
  44. #include "model/DescribeChannelUsersResult.h"
  45. #include "model/DescribeConferenceAuthInfoRequest.h"
  46. #include "model/DescribeConferenceAuthInfoResult.h"
  47. #include "model/DescribeMAURuleRequest.h"
  48. #include "model/DescribeMAURuleResult.h"
  49. #include "model/DescribeRTCAppKeyRequest.h"
  50. #include "model/DescribeRTCAppKeyResult.h"
  51. #include "model/DescribeRtcChannelCntDataRequest.h"
  52. #include "model/DescribeRtcChannelCntDataResult.h"
  53. #include "model/DescribeRtcChannelListRequest.h"
  54. #include "model/DescribeRtcChannelListResult.h"
  55. #include "model/DescribeRtcChannelMetricRequest.h"
  56. #include "model/DescribeRtcChannelMetricResult.h"
  57. #include "model/DescribeRtcChannelUserListRequest.h"
  58. #include "model/DescribeRtcChannelUserListResult.h"
  59. #include "model/DescribeRtcDurationDataRequest.h"
  60. #include "model/DescribeRtcDurationDataResult.h"
  61. #include "model/DescribeRtcPeakChannelCntDataRequest.h"
  62. #include "model/DescribeRtcPeakChannelCntDataResult.h"
  63. #include "model/DescribeRtcPeakUserCntDataRequest.h"
  64. #include "model/DescribeRtcPeakUserCntDataResult.h"
  65. #include "model/DescribeRtcQualityMetricRequest.h"
  66. #include "model/DescribeRtcQualityMetricResult.h"
  67. #include "model/DescribeRtcUserCntDataRequest.h"
  68. #include "model/DescribeRtcUserCntDataResult.h"
  69. #include "model/DescribeRtcUserListRequest.h"
  70. #include "model/DescribeRtcUserListResult.h"
  71. #include "model/DescribeUserInfoInChannelRequest.h"
  72. #include "model/DescribeUserInfoInChannelResult.h"
  73. #include "model/DisableMAURuleRequest.h"
  74. #include "model/DisableMAURuleResult.h"
  75. #include "model/EnableMAURuleRequest.h"
  76. #include "model/EnableMAURuleResult.h"
  77. #include "model/GetMPUTaskStatusRequest.h"
  78. #include "model/GetMPUTaskStatusResult.h"
  79. #include "model/GetTaskStatusRequest.h"
  80. #include "model/GetTaskStatusResult.h"
  81. #include "model/ModifyAppRequest.h"
  82. #include "model/ModifyAppResult.h"
  83. #include "model/ModifyConferenceRequest.h"
  84. #include "model/ModifyConferenceResult.h"
  85. #include "model/MuteAudioRequest.h"
  86. #include "model/MuteAudioResult.h"
  87. #include "model/MuteAudioAllRequest.h"
  88. #include "model/MuteAudioAllResult.h"
  89. #include "model/ReceiveNotifyRequest.h"
  90. #include "model/ReceiveNotifyResult.h"
  91. #include "model/RemoveParticipantsRequest.h"
  92. #include "model/RemoveParticipantsResult.h"
  93. #include "model/RemoveTerminalsRequest.h"
  94. #include "model/RemoveTerminalsResult.h"
  95. #include "model/SetChannelPropertyRequest.h"
  96. #include "model/SetChannelPropertyResult.h"
  97. #include "model/StartMPUTaskRequest.h"
  98. #include "model/StartMPUTaskResult.h"
  99. #include "model/StartTaskRequest.h"
  100. #include "model/StartTaskResult.h"
  101. #include "model/StopMPUTaskRequest.h"
  102. #include "model/StopMPUTaskResult.h"
  103. #include "model/StopTaskRequest.h"
  104. #include "model/StopTaskResult.h"
  105. #include "model/UnmuteAudioRequest.h"
  106. #include "model/UnmuteAudioResult.h"
  107. #include "model/UnmuteAudioAllRequest.h"
  108. #include "model/UnmuteAudioAllResult.h"
  109. #include "model/UpdateChannelRequest.h"
  110. #include "model/UpdateChannelResult.h"
  111. #include "model/UpdateMPULayoutRequest.h"
  112. #include "model/UpdateMPULayoutResult.h"
  113. namespace AlibabaCloud
  114. {
  115. namespace Rtc
  116. {
  117. class ALIBABACLOUD_RTC_EXPORT RtcClient : public RpcServiceClient
  118. {
  119. public:
  120. typedef Outcome<Error, Model::CreateChannelResult> CreateChannelOutcome;
  121. typedef std::future<CreateChannelOutcome> CreateChannelOutcomeCallable;
  122. typedef std::function<void(const RtcClient*, const Model::CreateChannelRequest&, const CreateChannelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateChannelAsyncHandler;
  123. typedef Outcome<Error, Model::CreateConferenceResult> CreateConferenceOutcome;
  124. typedef std::future<CreateConferenceOutcome> CreateConferenceOutcomeCallable;
  125. typedef std::function<void(const RtcClient*, const Model::CreateConferenceRequest&, const CreateConferenceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateConferenceAsyncHandler;
  126. typedef Outcome<Error, Model::CreateMAURuleResult> CreateMAURuleOutcome;
  127. typedef std::future<CreateMAURuleOutcome> CreateMAURuleOutcomeCallable;
  128. typedef std::function<void(const RtcClient*, const Model::CreateMAURuleRequest&, const CreateMAURuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateMAURuleAsyncHandler;
  129. typedef Outcome<Error, Model::CreateTemplateResult> CreateTemplateOutcome;
  130. typedef std::future<CreateTemplateOutcome> CreateTemplateOutcomeCallable;
  131. typedef std::function<void(const RtcClient*, const Model::CreateTemplateRequest&, const CreateTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateTemplateAsyncHandler;
  132. typedef Outcome<Error, Model::DeleteChannelResult> DeleteChannelOutcome;
  133. typedef std::future<DeleteChannelOutcome> DeleteChannelOutcomeCallable;
  134. typedef std::function<void(const RtcClient*, const Model::DeleteChannelRequest&, const DeleteChannelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteChannelAsyncHandler;
  135. typedef Outcome<Error, Model::DeleteConferenceResult> DeleteConferenceOutcome;
  136. typedef std::future<DeleteConferenceOutcome> DeleteConferenceOutcomeCallable;
  137. typedef std::function<void(const RtcClient*, const Model::DeleteConferenceRequest&, const DeleteConferenceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteConferenceAsyncHandler;
  138. typedef Outcome<Error, Model::DeleteMAURuleResult> DeleteMAURuleOutcome;
  139. typedef std::future<DeleteMAURuleOutcome> DeleteMAURuleOutcomeCallable;
  140. typedef std::function<void(const RtcClient*, const Model::DeleteMAURuleRequest&, const DeleteMAURuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteMAURuleAsyncHandler;
  141. typedef Outcome<Error, Model::DeleteTemplateResult> DeleteTemplateOutcome;
  142. typedef std::future<DeleteTemplateOutcome> DeleteTemplateOutcomeCallable;
  143. typedef std::function<void(const RtcClient*, const Model::DeleteTemplateRequest&, const DeleteTemplateOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteTemplateAsyncHandler;
  144. typedef Outcome<Error, Model::DescribeAppsResult> DescribeAppsOutcome;
  145. typedef std::future<DescribeAppsOutcome> DescribeAppsOutcomeCallable;
  146. typedef std::function<void(const RtcClient*, const Model::DescribeAppsRequest&, const DescribeAppsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeAppsAsyncHandler;
  147. typedef Outcome<Error, Model::DescribeChannelParticipantsResult> DescribeChannelParticipantsOutcome;
  148. typedef std::future<DescribeChannelParticipantsOutcome> DescribeChannelParticipantsOutcomeCallable;
  149. typedef std::function<void(const RtcClient*, const Model::DescribeChannelParticipantsRequest&, const DescribeChannelParticipantsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeChannelParticipantsAsyncHandler;
  150. typedef Outcome<Error, Model::DescribeChannelUsersResult> DescribeChannelUsersOutcome;
  151. typedef std::future<DescribeChannelUsersOutcome> DescribeChannelUsersOutcomeCallable;
  152. typedef std::function<void(const RtcClient*, const Model::DescribeChannelUsersRequest&, const DescribeChannelUsersOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeChannelUsersAsyncHandler;
  153. typedef Outcome<Error, Model::DescribeConferenceAuthInfoResult> DescribeConferenceAuthInfoOutcome;
  154. typedef std::future<DescribeConferenceAuthInfoOutcome> DescribeConferenceAuthInfoOutcomeCallable;
  155. typedef std::function<void(const RtcClient*, const Model::DescribeConferenceAuthInfoRequest&, const DescribeConferenceAuthInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeConferenceAuthInfoAsyncHandler;
  156. typedef Outcome<Error, Model::DescribeMAURuleResult> DescribeMAURuleOutcome;
  157. typedef std::future<DescribeMAURuleOutcome> DescribeMAURuleOutcomeCallable;
  158. typedef std::function<void(const RtcClient*, const Model::DescribeMAURuleRequest&, const DescribeMAURuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeMAURuleAsyncHandler;
  159. typedef Outcome<Error, Model::DescribeRTCAppKeyResult> DescribeRTCAppKeyOutcome;
  160. typedef std::future<DescribeRTCAppKeyOutcome> DescribeRTCAppKeyOutcomeCallable;
  161. typedef std::function<void(const RtcClient*, const Model::DescribeRTCAppKeyRequest&, const DescribeRTCAppKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRTCAppKeyAsyncHandler;
  162. typedef Outcome<Error, Model::DescribeRtcChannelCntDataResult> DescribeRtcChannelCntDataOutcome;
  163. typedef std::future<DescribeRtcChannelCntDataOutcome> DescribeRtcChannelCntDataOutcomeCallable;
  164. typedef std::function<void(const RtcClient*, const Model::DescribeRtcChannelCntDataRequest&, const DescribeRtcChannelCntDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcChannelCntDataAsyncHandler;
  165. typedef Outcome<Error, Model::DescribeRtcChannelListResult> DescribeRtcChannelListOutcome;
  166. typedef std::future<DescribeRtcChannelListOutcome> DescribeRtcChannelListOutcomeCallable;
  167. typedef std::function<void(const RtcClient*, const Model::DescribeRtcChannelListRequest&, const DescribeRtcChannelListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcChannelListAsyncHandler;
  168. typedef Outcome<Error, Model::DescribeRtcChannelMetricResult> DescribeRtcChannelMetricOutcome;
  169. typedef std::future<DescribeRtcChannelMetricOutcome> DescribeRtcChannelMetricOutcomeCallable;
  170. typedef std::function<void(const RtcClient*, const Model::DescribeRtcChannelMetricRequest&, const DescribeRtcChannelMetricOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcChannelMetricAsyncHandler;
  171. typedef Outcome<Error, Model::DescribeRtcChannelUserListResult> DescribeRtcChannelUserListOutcome;
  172. typedef std::future<DescribeRtcChannelUserListOutcome> DescribeRtcChannelUserListOutcomeCallable;
  173. typedef std::function<void(const RtcClient*, const Model::DescribeRtcChannelUserListRequest&, const DescribeRtcChannelUserListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcChannelUserListAsyncHandler;
  174. typedef Outcome<Error, Model::DescribeRtcDurationDataResult> DescribeRtcDurationDataOutcome;
  175. typedef std::future<DescribeRtcDurationDataOutcome> DescribeRtcDurationDataOutcomeCallable;
  176. typedef std::function<void(const RtcClient*, const Model::DescribeRtcDurationDataRequest&, const DescribeRtcDurationDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcDurationDataAsyncHandler;
  177. typedef Outcome<Error, Model::DescribeRtcPeakChannelCntDataResult> DescribeRtcPeakChannelCntDataOutcome;
  178. typedef std::future<DescribeRtcPeakChannelCntDataOutcome> DescribeRtcPeakChannelCntDataOutcomeCallable;
  179. typedef std::function<void(const RtcClient*, const Model::DescribeRtcPeakChannelCntDataRequest&, const DescribeRtcPeakChannelCntDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcPeakChannelCntDataAsyncHandler;
  180. typedef Outcome<Error, Model::DescribeRtcPeakUserCntDataResult> DescribeRtcPeakUserCntDataOutcome;
  181. typedef std::future<DescribeRtcPeakUserCntDataOutcome> DescribeRtcPeakUserCntDataOutcomeCallable;
  182. typedef std::function<void(const RtcClient*, const Model::DescribeRtcPeakUserCntDataRequest&, const DescribeRtcPeakUserCntDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcPeakUserCntDataAsyncHandler;
  183. typedef Outcome<Error, Model::DescribeRtcQualityMetricResult> DescribeRtcQualityMetricOutcome;
  184. typedef std::future<DescribeRtcQualityMetricOutcome> DescribeRtcQualityMetricOutcomeCallable;
  185. typedef std::function<void(const RtcClient*, const Model::DescribeRtcQualityMetricRequest&, const DescribeRtcQualityMetricOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcQualityMetricAsyncHandler;
  186. typedef Outcome<Error, Model::DescribeRtcUserCntDataResult> DescribeRtcUserCntDataOutcome;
  187. typedef std::future<DescribeRtcUserCntDataOutcome> DescribeRtcUserCntDataOutcomeCallable;
  188. typedef std::function<void(const RtcClient*, const Model::DescribeRtcUserCntDataRequest&, const DescribeRtcUserCntDataOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcUserCntDataAsyncHandler;
  189. typedef Outcome<Error, Model::DescribeRtcUserListResult> DescribeRtcUserListOutcome;
  190. typedef std::future<DescribeRtcUserListOutcome> DescribeRtcUserListOutcomeCallable;
  191. typedef std::function<void(const RtcClient*, const Model::DescribeRtcUserListRequest&, const DescribeRtcUserListOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRtcUserListAsyncHandler;
  192. typedef Outcome<Error, Model::DescribeUserInfoInChannelResult> DescribeUserInfoInChannelOutcome;
  193. typedef std::future<DescribeUserInfoInChannelOutcome> DescribeUserInfoInChannelOutcomeCallable;
  194. typedef std::function<void(const RtcClient*, const Model::DescribeUserInfoInChannelRequest&, const DescribeUserInfoInChannelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeUserInfoInChannelAsyncHandler;
  195. typedef Outcome<Error, Model::DisableMAURuleResult> DisableMAURuleOutcome;
  196. typedef std::future<DisableMAURuleOutcome> DisableMAURuleOutcomeCallable;
  197. typedef std::function<void(const RtcClient*, const Model::DisableMAURuleRequest&, const DisableMAURuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DisableMAURuleAsyncHandler;
  198. typedef Outcome<Error, Model::EnableMAURuleResult> EnableMAURuleOutcome;
  199. typedef std::future<EnableMAURuleOutcome> EnableMAURuleOutcomeCallable;
  200. typedef std::function<void(const RtcClient*, const Model::EnableMAURuleRequest&, const EnableMAURuleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> EnableMAURuleAsyncHandler;
  201. typedef Outcome<Error, Model::GetMPUTaskStatusResult> GetMPUTaskStatusOutcome;
  202. typedef std::future<GetMPUTaskStatusOutcome> GetMPUTaskStatusOutcomeCallable;
  203. typedef std::function<void(const RtcClient*, const Model::GetMPUTaskStatusRequest&, const GetMPUTaskStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMPUTaskStatusAsyncHandler;
  204. typedef Outcome<Error, Model::GetTaskStatusResult> GetTaskStatusOutcome;
  205. typedef std::future<GetTaskStatusOutcome> GetTaskStatusOutcomeCallable;
  206. typedef std::function<void(const RtcClient*, const Model::GetTaskStatusRequest&, const GetTaskStatusOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTaskStatusAsyncHandler;
  207. typedef Outcome<Error, Model::ModifyAppResult> ModifyAppOutcome;
  208. typedef std::future<ModifyAppOutcome> ModifyAppOutcomeCallable;
  209. typedef std::function<void(const RtcClient*, const Model::ModifyAppRequest&, const ModifyAppOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyAppAsyncHandler;
  210. typedef Outcome<Error, Model::ModifyConferenceResult> ModifyConferenceOutcome;
  211. typedef std::future<ModifyConferenceOutcome> ModifyConferenceOutcomeCallable;
  212. typedef std::function<void(const RtcClient*, const Model::ModifyConferenceRequest&, const ModifyConferenceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ModifyConferenceAsyncHandler;
  213. typedef Outcome<Error, Model::MuteAudioResult> MuteAudioOutcome;
  214. typedef std::future<MuteAudioOutcome> MuteAudioOutcomeCallable;
  215. typedef std::function<void(const RtcClient*, const Model::MuteAudioRequest&, const MuteAudioOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MuteAudioAsyncHandler;
  216. typedef Outcome<Error, Model::MuteAudioAllResult> MuteAudioAllOutcome;
  217. typedef std::future<MuteAudioAllOutcome> MuteAudioAllOutcomeCallable;
  218. typedef std::function<void(const RtcClient*, const Model::MuteAudioAllRequest&, const MuteAudioAllOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> MuteAudioAllAsyncHandler;
  219. typedef Outcome<Error, Model::ReceiveNotifyResult> ReceiveNotifyOutcome;
  220. typedef std::future<ReceiveNotifyOutcome> ReceiveNotifyOutcomeCallable;
  221. typedef std::function<void(const RtcClient*, const Model::ReceiveNotifyRequest&, const ReceiveNotifyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ReceiveNotifyAsyncHandler;
  222. typedef Outcome<Error, Model::RemoveParticipantsResult> RemoveParticipantsOutcome;
  223. typedef std::future<RemoveParticipantsOutcome> RemoveParticipantsOutcomeCallable;
  224. typedef std::function<void(const RtcClient*, const Model::RemoveParticipantsRequest&, const RemoveParticipantsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RemoveParticipantsAsyncHandler;
  225. typedef Outcome<Error, Model::RemoveTerminalsResult> RemoveTerminalsOutcome;
  226. typedef std::future<RemoveTerminalsOutcome> RemoveTerminalsOutcomeCallable;
  227. typedef std::function<void(const RtcClient*, const Model::RemoveTerminalsRequest&, const RemoveTerminalsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RemoveTerminalsAsyncHandler;
  228. typedef Outcome<Error, Model::SetChannelPropertyResult> SetChannelPropertyOutcome;
  229. typedef std::future<SetChannelPropertyOutcome> SetChannelPropertyOutcomeCallable;
  230. typedef std::function<void(const RtcClient*, const Model::SetChannelPropertyRequest&, const SetChannelPropertyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetChannelPropertyAsyncHandler;
  231. typedef Outcome<Error, Model::StartMPUTaskResult> StartMPUTaskOutcome;
  232. typedef std::future<StartMPUTaskOutcome> StartMPUTaskOutcomeCallable;
  233. typedef std::function<void(const RtcClient*, const Model::StartMPUTaskRequest&, const StartMPUTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartMPUTaskAsyncHandler;
  234. typedef Outcome<Error, Model::StartTaskResult> StartTaskOutcome;
  235. typedef std::future<StartTaskOutcome> StartTaskOutcomeCallable;
  236. typedef std::function<void(const RtcClient*, const Model::StartTaskRequest&, const StartTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StartTaskAsyncHandler;
  237. typedef Outcome<Error, Model::StopMPUTaskResult> StopMPUTaskOutcome;
  238. typedef std::future<StopMPUTaskOutcome> StopMPUTaskOutcomeCallable;
  239. typedef std::function<void(const RtcClient*, const Model::StopMPUTaskRequest&, const StopMPUTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopMPUTaskAsyncHandler;
  240. typedef Outcome<Error, Model::StopTaskResult> StopTaskOutcome;
  241. typedef std::future<StopTaskOutcome> StopTaskOutcomeCallable;
  242. typedef std::function<void(const RtcClient*, const Model::StopTaskRequest&, const StopTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> StopTaskAsyncHandler;
  243. typedef Outcome<Error, Model::UnmuteAudioResult> UnmuteAudioOutcome;
  244. typedef std::future<UnmuteAudioOutcome> UnmuteAudioOutcomeCallable;
  245. typedef std::function<void(const RtcClient*, const Model::UnmuteAudioRequest&, const UnmuteAudioOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnmuteAudioAsyncHandler;
  246. typedef Outcome<Error, Model::UnmuteAudioAllResult> UnmuteAudioAllOutcome;
  247. typedef std::future<UnmuteAudioAllOutcome> UnmuteAudioAllOutcomeCallable;
  248. typedef std::function<void(const RtcClient*, const Model::UnmuteAudioAllRequest&, const UnmuteAudioAllOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnmuteAudioAllAsyncHandler;
  249. typedef Outcome<Error, Model::UpdateChannelResult> UpdateChannelOutcome;
  250. typedef std::future<UpdateChannelOutcome> UpdateChannelOutcomeCallable;
  251. typedef std::function<void(const RtcClient*, const Model::UpdateChannelRequest&, const UpdateChannelOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateChannelAsyncHandler;
  252. typedef Outcome<Error, Model::UpdateMPULayoutResult> UpdateMPULayoutOutcome;
  253. typedef std::future<UpdateMPULayoutOutcome> UpdateMPULayoutOutcomeCallable;
  254. typedef std::function<void(const RtcClient*, const Model::UpdateMPULayoutRequest&, const UpdateMPULayoutOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateMPULayoutAsyncHandler;
  255. RtcClient(const Credentials &credentials, const ClientConfiguration &configuration);
  256. RtcClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
  257. RtcClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
  258. ~RtcClient();
  259. CreateChannelOutcome createChannel(const Model::CreateChannelRequest &request)const;
  260. void createChannelAsync(const Model::CreateChannelRequest& request, const CreateChannelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  261. CreateChannelOutcomeCallable createChannelCallable(const Model::CreateChannelRequest& request) const;
  262. CreateConferenceOutcome createConference(const Model::CreateConferenceRequest &request)const;
  263. void createConferenceAsync(const Model::CreateConferenceRequest& request, const CreateConferenceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  264. CreateConferenceOutcomeCallable createConferenceCallable(const Model::CreateConferenceRequest& request) const;
  265. CreateMAURuleOutcome createMAURule(const Model::CreateMAURuleRequest &request)const;
  266. void createMAURuleAsync(const Model::CreateMAURuleRequest& request, const CreateMAURuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  267. CreateMAURuleOutcomeCallable createMAURuleCallable(const Model::CreateMAURuleRequest& request) const;
  268. CreateTemplateOutcome createTemplate(const Model::CreateTemplateRequest &request)const;
  269. void createTemplateAsync(const Model::CreateTemplateRequest& request, const CreateTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  270. CreateTemplateOutcomeCallable createTemplateCallable(const Model::CreateTemplateRequest& request) const;
  271. DeleteChannelOutcome deleteChannel(const Model::DeleteChannelRequest &request)const;
  272. void deleteChannelAsync(const Model::DeleteChannelRequest& request, const DeleteChannelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  273. DeleteChannelOutcomeCallable deleteChannelCallable(const Model::DeleteChannelRequest& request) const;
  274. DeleteConferenceOutcome deleteConference(const Model::DeleteConferenceRequest &request)const;
  275. void deleteConferenceAsync(const Model::DeleteConferenceRequest& request, const DeleteConferenceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  276. DeleteConferenceOutcomeCallable deleteConferenceCallable(const Model::DeleteConferenceRequest& request) const;
  277. DeleteMAURuleOutcome deleteMAURule(const Model::DeleteMAURuleRequest &request)const;
  278. void deleteMAURuleAsync(const Model::DeleteMAURuleRequest& request, const DeleteMAURuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  279. DeleteMAURuleOutcomeCallable deleteMAURuleCallable(const Model::DeleteMAURuleRequest& request) const;
  280. DeleteTemplateOutcome deleteTemplate(const Model::DeleteTemplateRequest &request)const;
  281. void deleteTemplateAsync(const Model::DeleteTemplateRequest& request, const DeleteTemplateAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  282. DeleteTemplateOutcomeCallable deleteTemplateCallable(const Model::DeleteTemplateRequest& request) const;
  283. DescribeAppsOutcome describeApps(const Model::DescribeAppsRequest &request)const;
  284. void describeAppsAsync(const Model::DescribeAppsRequest& request, const DescribeAppsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  285. DescribeAppsOutcomeCallable describeAppsCallable(const Model::DescribeAppsRequest& request) const;
  286. DescribeChannelParticipantsOutcome describeChannelParticipants(const Model::DescribeChannelParticipantsRequest &request)const;
  287. void describeChannelParticipantsAsync(const Model::DescribeChannelParticipantsRequest& request, const DescribeChannelParticipantsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  288. DescribeChannelParticipantsOutcomeCallable describeChannelParticipantsCallable(const Model::DescribeChannelParticipantsRequest& request) const;
  289. DescribeChannelUsersOutcome describeChannelUsers(const Model::DescribeChannelUsersRequest &request)const;
  290. void describeChannelUsersAsync(const Model::DescribeChannelUsersRequest& request, const DescribeChannelUsersAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  291. DescribeChannelUsersOutcomeCallable describeChannelUsersCallable(const Model::DescribeChannelUsersRequest& request) const;
  292. DescribeConferenceAuthInfoOutcome describeConferenceAuthInfo(const Model::DescribeConferenceAuthInfoRequest &request)const;
  293. void describeConferenceAuthInfoAsync(const Model::DescribeConferenceAuthInfoRequest& request, const DescribeConferenceAuthInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  294. DescribeConferenceAuthInfoOutcomeCallable describeConferenceAuthInfoCallable(const Model::DescribeConferenceAuthInfoRequest& request) const;
  295. DescribeMAURuleOutcome describeMAURule(const Model::DescribeMAURuleRequest &request)const;
  296. void describeMAURuleAsync(const Model::DescribeMAURuleRequest& request, const DescribeMAURuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  297. DescribeMAURuleOutcomeCallable describeMAURuleCallable(const Model::DescribeMAURuleRequest& request) const;
  298. DescribeRTCAppKeyOutcome describeRTCAppKey(const Model::DescribeRTCAppKeyRequest &request)const;
  299. void describeRTCAppKeyAsync(const Model::DescribeRTCAppKeyRequest& request, const DescribeRTCAppKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  300. DescribeRTCAppKeyOutcomeCallable describeRTCAppKeyCallable(const Model::DescribeRTCAppKeyRequest& request) const;
  301. DescribeRtcChannelCntDataOutcome describeRtcChannelCntData(const Model::DescribeRtcChannelCntDataRequest &request)const;
  302. void describeRtcChannelCntDataAsync(const Model::DescribeRtcChannelCntDataRequest& request, const DescribeRtcChannelCntDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  303. DescribeRtcChannelCntDataOutcomeCallable describeRtcChannelCntDataCallable(const Model::DescribeRtcChannelCntDataRequest& request) const;
  304. DescribeRtcChannelListOutcome describeRtcChannelList(const Model::DescribeRtcChannelListRequest &request)const;
  305. void describeRtcChannelListAsync(const Model::DescribeRtcChannelListRequest& request, const DescribeRtcChannelListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  306. DescribeRtcChannelListOutcomeCallable describeRtcChannelListCallable(const Model::DescribeRtcChannelListRequest& request) const;
  307. DescribeRtcChannelMetricOutcome describeRtcChannelMetric(const Model::DescribeRtcChannelMetricRequest &request)const;
  308. void describeRtcChannelMetricAsync(const Model::DescribeRtcChannelMetricRequest& request, const DescribeRtcChannelMetricAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  309. DescribeRtcChannelMetricOutcomeCallable describeRtcChannelMetricCallable(const Model::DescribeRtcChannelMetricRequest& request) const;
  310. DescribeRtcChannelUserListOutcome describeRtcChannelUserList(const Model::DescribeRtcChannelUserListRequest &request)const;
  311. void describeRtcChannelUserListAsync(const Model::DescribeRtcChannelUserListRequest& request, const DescribeRtcChannelUserListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  312. DescribeRtcChannelUserListOutcomeCallable describeRtcChannelUserListCallable(const Model::DescribeRtcChannelUserListRequest& request) const;
  313. DescribeRtcDurationDataOutcome describeRtcDurationData(const Model::DescribeRtcDurationDataRequest &request)const;
  314. void describeRtcDurationDataAsync(const Model::DescribeRtcDurationDataRequest& request, const DescribeRtcDurationDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  315. DescribeRtcDurationDataOutcomeCallable describeRtcDurationDataCallable(const Model::DescribeRtcDurationDataRequest& request) const;
  316. DescribeRtcPeakChannelCntDataOutcome describeRtcPeakChannelCntData(const Model::DescribeRtcPeakChannelCntDataRequest &request)const;
  317. void describeRtcPeakChannelCntDataAsync(const Model::DescribeRtcPeakChannelCntDataRequest& request, const DescribeRtcPeakChannelCntDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  318. DescribeRtcPeakChannelCntDataOutcomeCallable describeRtcPeakChannelCntDataCallable(const Model::DescribeRtcPeakChannelCntDataRequest& request) const;
  319. DescribeRtcPeakUserCntDataOutcome describeRtcPeakUserCntData(const Model::DescribeRtcPeakUserCntDataRequest &request)const;
  320. void describeRtcPeakUserCntDataAsync(const Model::DescribeRtcPeakUserCntDataRequest& request, const DescribeRtcPeakUserCntDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  321. DescribeRtcPeakUserCntDataOutcomeCallable describeRtcPeakUserCntDataCallable(const Model::DescribeRtcPeakUserCntDataRequest& request) const;
  322. DescribeRtcQualityMetricOutcome describeRtcQualityMetric(const Model::DescribeRtcQualityMetricRequest &request)const;
  323. void describeRtcQualityMetricAsync(const Model::DescribeRtcQualityMetricRequest& request, const DescribeRtcQualityMetricAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  324. DescribeRtcQualityMetricOutcomeCallable describeRtcQualityMetricCallable(const Model::DescribeRtcQualityMetricRequest& request) const;
  325. DescribeRtcUserCntDataOutcome describeRtcUserCntData(const Model::DescribeRtcUserCntDataRequest &request)const;
  326. void describeRtcUserCntDataAsync(const Model::DescribeRtcUserCntDataRequest& request, const DescribeRtcUserCntDataAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  327. DescribeRtcUserCntDataOutcomeCallable describeRtcUserCntDataCallable(const Model::DescribeRtcUserCntDataRequest& request) const;
  328. DescribeRtcUserListOutcome describeRtcUserList(const Model::DescribeRtcUserListRequest &request)const;
  329. void describeRtcUserListAsync(const Model::DescribeRtcUserListRequest& request, const DescribeRtcUserListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  330. DescribeRtcUserListOutcomeCallable describeRtcUserListCallable(const Model::DescribeRtcUserListRequest& request) const;
  331. DescribeUserInfoInChannelOutcome describeUserInfoInChannel(const Model::DescribeUserInfoInChannelRequest &request)const;
  332. void describeUserInfoInChannelAsync(const Model::DescribeUserInfoInChannelRequest& request, const DescribeUserInfoInChannelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  333. DescribeUserInfoInChannelOutcomeCallable describeUserInfoInChannelCallable(const Model::DescribeUserInfoInChannelRequest& request) const;
  334. DisableMAURuleOutcome disableMAURule(const Model::DisableMAURuleRequest &request)const;
  335. void disableMAURuleAsync(const Model::DisableMAURuleRequest& request, const DisableMAURuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  336. DisableMAURuleOutcomeCallable disableMAURuleCallable(const Model::DisableMAURuleRequest& request) const;
  337. EnableMAURuleOutcome enableMAURule(const Model::EnableMAURuleRequest &request)const;
  338. void enableMAURuleAsync(const Model::EnableMAURuleRequest& request, const EnableMAURuleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  339. EnableMAURuleOutcomeCallable enableMAURuleCallable(const Model::EnableMAURuleRequest& request) const;
  340. GetMPUTaskStatusOutcome getMPUTaskStatus(const Model::GetMPUTaskStatusRequest &request)const;
  341. void getMPUTaskStatusAsync(const Model::GetMPUTaskStatusRequest& request, const GetMPUTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  342. GetMPUTaskStatusOutcomeCallable getMPUTaskStatusCallable(const Model::GetMPUTaskStatusRequest& request) const;
  343. GetTaskStatusOutcome getTaskStatus(const Model::GetTaskStatusRequest &request)const;
  344. void getTaskStatusAsync(const Model::GetTaskStatusRequest& request, const GetTaskStatusAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  345. GetTaskStatusOutcomeCallable getTaskStatusCallable(const Model::GetTaskStatusRequest& request) const;
  346. ModifyAppOutcome modifyApp(const Model::ModifyAppRequest &request)const;
  347. void modifyAppAsync(const Model::ModifyAppRequest& request, const ModifyAppAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  348. ModifyAppOutcomeCallable modifyAppCallable(const Model::ModifyAppRequest& request) const;
  349. ModifyConferenceOutcome modifyConference(const Model::ModifyConferenceRequest &request)const;
  350. void modifyConferenceAsync(const Model::ModifyConferenceRequest& request, const ModifyConferenceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  351. ModifyConferenceOutcomeCallable modifyConferenceCallable(const Model::ModifyConferenceRequest& request) const;
  352. MuteAudioOutcome muteAudio(const Model::MuteAudioRequest &request)const;
  353. void muteAudioAsync(const Model::MuteAudioRequest& request, const MuteAudioAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  354. MuteAudioOutcomeCallable muteAudioCallable(const Model::MuteAudioRequest& request) const;
  355. MuteAudioAllOutcome muteAudioAll(const Model::MuteAudioAllRequest &request)const;
  356. void muteAudioAllAsync(const Model::MuteAudioAllRequest& request, const MuteAudioAllAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  357. MuteAudioAllOutcomeCallable muteAudioAllCallable(const Model::MuteAudioAllRequest& request) const;
  358. ReceiveNotifyOutcome receiveNotify(const Model::ReceiveNotifyRequest &request)const;
  359. void receiveNotifyAsync(const Model::ReceiveNotifyRequest& request, const ReceiveNotifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  360. ReceiveNotifyOutcomeCallable receiveNotifyCallable(const Model::ReceiveNotifyRequest& request) const;
  361. RemoveParticipantsOutcome removeParticipants(const Model::RemoveParticipantsRequest &request)const;
  362. void removeParticipantsAsync(const Model::RemoveParticipantsRequest& request, const RemoveParticipantsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  363. RemoveParticipantsOutcomeCallable removeParticipantsCallable(const Model::RemoveParticipantsRequest& request) const;
  364. RemoveTerminalsOutcome removeTerminals(const Model::RemoveTerminalsRequest &request)const;
  365. void removeTerminalsAsync(const Model::RemoveTerminalsRequest& request, const RemoveTerminalsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  366. RemoveTerminalsOutcomeCallable removeTerminalsCallable(const Model::RemoveTerminalsRequest& request) const;
  367. SetChannelPropertyOutcome setChannelProperty(const Model::SetChannelPropertyRequest &request)const;
  368. void setChannelPropertyAsync(const Model::SetChannelPropertyRequest& request, const SetChannelPropertyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  369. SetChannelPropertyOutcomeCallable setChannelPropertyCallable(const Model::SetChannelPropertyRequest& request) const;
  370. StartMPUTaskOutcome startMPUTask(const Model::StartMPUTaskRequest &request)const;
  371. void startMPUTaskAsync(const Model::StartMPUTaskRequest& request, const StartMPUTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  372. StartMPUTaskOutcomeCallable startMPUTaskCallable(const Model::StartMPUTaskRequest& request) const;
  373. StartTaskOutcome startTask(const Model::StartTaskRequest &request)const;
  374. void startTaskAsync(const Model::StartTaskRequest& request, const StartTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  375. StartTaskOutcomeCallable startTaskCallable(const Model::StartTaskRequest& request) const;
  376. StopMPUTaskOutcome stopMPUTask(const Model::StopMPUTaskRequest &request)const;
  377. void stopMPUTaskAsync(const Model::StopMPUTaskRequest& request, const StopMPUTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  378. StopMPUTaskOutcomeCallable stopMPUTaskCallable(const Model::StopMPUTaskRequest& request) const;
  379. StopTaskOutcome stopTask(const Model::StopTaskRequest &request)const;
  380. void stopTaskAsync(const Model::StopTaskRequest& request, const StopTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  381. StopTaskOutcomeCallable stopTaskCallable(const Model::StopTaskRequest& request) const;
  382. UnmuteAudioOutcome unmuteAudio(const Model::UnmuteAudioRequest &request)const;
  383. void unmuteAudioAsync(const Model::UnmuteAudioRequest& request, const UnmuteAudioAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  384. UnmuteAudioOutcomeCallable unmuteAudioCallable(const Model::UnmuteAudioRequest& request) const;
  385. UnmuteAudioAllOutcome unmuteAudioAll(const Model::UnmuteAudioAllRequest &request)const;
  386. void unmuteAudioAllAsync(const Model::UnmuteAudioAllRequest& request, const UnmuteAudioAllAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  387. UnmuteAudioAllOutcomeCallable unmuteAudioAllCallable(const Model::UnmuteAudioAllRequest& request) const;
  388. UpdateChannelOutcome updateChannel(const Model::UpdateChannelRequest &request)const;
  389. void updateChannelAsync(const Model::UpdateChannelRequest& request, const UpdateChannelAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  390. UpdateChannelOutcomeCallable updateChannelCallable(const Model::UpdateChannelRequest& request) const;
  391. UpdateMPULayoutOutcome updateMPULayout(const Model::UpdateMPULayoutRequest &request)const;
  392. void updateMPULayoutAsync(const Model::UpdateMPULayoutRequest& request, const UpdateMPULayoutAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
  393. UpdateMPULayoutOutcomeCallable updateMPULayoutCallable(const Model::UpdateMPULayoutRequest& request) const;
  394. private:
  395. std::shared_ptr<EndpointProvider> endpointProvider_;
  396. };
  397. }
  398. }
  399. #endif // !ALIBABACLOUD_RTC_RTCCLIENT_H_