From 6c1391eb82cd1a6132032f42faf4a78536ea4b12 Mon Sep 17 00:00:00 2001 From: "yixiong.jxy" Date: Thu, 13 Sep 2018 19:39:14 +0800 Subject: [PATCH] =?UTF-8?q?RTC=20SDK=20Auto=20Released=20By=20renrang.yl,V?= =?UTF-8?q?ersion=EF=BC=9A1.25.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yixiong.jxy --- CHANGELOG | 4 + VERSION | 2 +- rtc/CMakeLists.txt | 8 +- rtc/include/alibabacloud/rtc/RtcClient.h | 8 + .../rtc/model/CreateChannelTokenRequest.h | 123 +++++++ .../rtc/model/CreateChannelTokenResult.h | 51 +++ .../rtc/model/CreateConferenceRequest.h | 3 + .../rtc/model/DeleteConferenceRequest.h | 6 +- .../rtc/model/DescribeAppsRequest.h | 3 + rtc/src/RtcClient.cc | 36 ++ rtc/src/model/CreateChannelTokenRequest.cc | 313 ++++++++++++++++++ rtc/src/model/CreateChannelTokenResult.cc | 52 +++ rtc/src/model/CreateConferenceRequest.cc | 11 + rtc/src/model/DeleteConferenceRequest.cc | 10 +- rtc/src/model/DescribeAppsRequest.cc | 11 + 15 files changed, 630 insertions(+), 11 deletions(-) create mode 100644 rtc/include/alibabacloud/rtc/model/CreateChannelTokenRequest.h create mode 100644 rtc/include/alibabacloud/rtc/model/CreateChannelTokenResult.h create mode 100644 rtc/src/model/CreateChannelTokenRequest.cc create mode 100644 rtc/src/model/CreateChannelTokenResult.cc diff --git a/CHANGELOG b/CHANGELOG index e1f614ba1..fd11ee004 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2018-09-13 Version: 1.25.3 +1, Add CreateChannelToken. + + 2018-09-06 Version: 1.25.2 1, AutoScaling support launchTemplate. diff --git a/VERSION b/VERSION index 2aa7a9648..69aab37db 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.25.2 \ No newline at end of file +1.25.3 \ No newline at end of file diff --git a/rtc/CMakeLists.txt b/rtc/CMakeLists.txt index 2c0808d64..c1844d0ca 100644 --- a/rtc/CMakeLists.txt +++ b/rtc/CMakeLists.txt @@ -64,7 +64,9 @@ set(rtc_public_header_model include/alibabacloud/rtc/model/UnmuteAudioAllRequest.h include/alibabacloud/rtc/model/UnmuteAudioAllResult.h include/alibabacloud/rtc/model/DescribeRecordDetailRequest.h - include/alibabacloud/rtc/model/DescribeRecordDetailResult.h ) + include/alibabacloud/rtc/model/DescribeRecordDetailResult.h + include/alibabacloud/rtc/model/CreateChannelTokenRequest.h + include/alibabacloud/rtc/model/CreateChannelTokenResult.h ) set(rtc_src src/RtcClient.cc @@ -111,7 +113,9 @@ set(rtc_src src/model/UnmuteAudioAllRequest.cc src/model/UnmuteAudioAllResult.cc src/model/DescribeRecordDetailRequest.cc - src/model/DescribeRecordDetailResult.cc ) + src/model/DescribeRecordDetailResult.cc + src/model/CreateChannelTokenRequest.cc + src/model/CreateChannelTokenResult.cc ) add_library(rtc ${LIB_TYPE} ${rtc_public_header} diff --git a/rtc/include/alibabacloud/rtc/RtcClient.h b/rtc/include/alibabacloud/rtc/RtcClient.h index 92450d178..7903fc8e5 100644 --- a/rtc/include/alibabacloud/rtc/RtcClient.h +++ b/rtc/include/alibabacloud/rtc/RtcClient.h @@ -66,6 +66,8 @@ #include "model/UnmuteAudioAllResult.h" #include "model/DescribeRecordDetailRequest.h" #include "model/DescribeRecordDetailResult.h" +#include "model/CreateChannelTokenRequest.h" +#include "model/CreateChannelTokenResult.h" namespace AlibabaCloud @@ -141,6 +143,9 @@ namespace AlibabaCloud typedef Outcome DescribeRecordDetailOutcome; typedef std::future DescribeRecordDetailOutcomeCallable; typedef std::function&)> DescribeRecordDetailAsyncHandler; + typedef Outcome CreateChannelTokenOutcome; + typedef std::future CreateChannelTokenOutcomeCallable; + typedef std::function&)> CreateChannelTokenAsyncHandler; RtcClient(const Credentials &credentials, const ClientConfiguration &configuration); RtcClient(const std::shared_ptr &credentialsProvider, const ClientConfiguration &configuration); @@ -212,6 +217,9 @@ namespace AlibabaCloud DescribeRecordDetailOutcome describeRecordDetail(const Model::DescribeRecordDetailRequest &request)const; void describeRecordDetailAsync(const Model::DescribeRecordDetailRequest& request, const DescribeRecordDetailAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; DescribeRecordDetailOutcomeCallable describeRecordDetailCallable(const Model::DescribeRecordDetailRequest& request) const; + CreateChannelTokenOutcome createChannelToken(const Model::CreateChannelTokenRequest &request)const; + void createChannelTokenAsync(const Model::CreateChannelTokenRequest& request, const CreateChannelTokenAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CreateChannelTokenOutcomeCallable createChannelTokenCallable(const Model::CreateChannelTokenRequest& request) const; private: std::shared_ptr endpointProvider_; diff --git a/rtc/include/alibabacloud/rtc/model/CreateChannelTokenRequest.h b/rtc/include/alibabacloud/rtc/model/CreateChannelTokenRequest.h new file mode 100644 index 000000000..d57503a6b --- /dev/null +++ b/rtc/include/alibabacloud/rtc/model/CreateChannelTokenRequest.h @@ -0,0 +1,123 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENREQUEST_H_ +#define ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Rtc + { + namespace Model + { + class ALIBABACLOUD_RTC_EXPORT CreateChannelTokenRequest : public RpcServiceRequest + { + + public: + CreateChannelTokenRequest(); + ~CreateChannelTokenRequest(); + + long getCallerParentId()const; + void setCallerParentId(long callerParentId); + bool getProxy_original_security_transport()const; + void setProxy_original_security_transport(bool proxy_original_security_transport); + std::string getSessionId()const; + void setSessionId(const std::string& sessionId); + std::string getProxy_original_source_ip()const; + void setProxy_original_source_ip(const std::string& proxy_original_source_ip); + std::string getOwnerIdLoginEmail()const; + void setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail); + std::string getCallerType()const; + void setCallerType(const std::string& callerType); + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + std::string getUId()const; + void setUId(const std::string& uId); + std::string getSecurityToken()const; + void setSecurityToken(const std::string& securityToken); + std::string getRequestContent()const; + void setRequestContent(const std::string& requestContent); + std::string getCallerBidEmail()const; + void setCallerBidEmail(const std::string& callerBidEmail); + std::string getCallerUidEmail()const; + void setCallerUidEmail(const std::string& callerUidEmail); + long getCallerUid()const; + void setCallerUid(long callerUid); + std::string getApp_ip()const; + void setApp_ip(const std::string& app_ip); + std::string getPopProduct()const; + void setPopProduct(const std::string& popProduct); + std::string getProduct()const; + void setProduct(const std::string& product); + std::string getCallerBid()const; + void setCallerBid(const std::string& callerBid); + long getOwnerId()const; + void setOwnerId(long ownerId); + std::string getVersion()const; + void setVersion(const std::string& version); + std::string getNonce()const; + void setNonce(const std::string& nonce); + bool getProxy_trust_transport_info()const; + void setProxy_trust_transport_info(bool proxy_trust_transport_info); + bool getAk_mfa_present()const; + void setAk_mfa_present(bool ak_mfa_present); + bool getSecurity_transport()const; + void setSecurity_transport(bool security_transport); + std::string getRequestId()const; + void setRequestId(const std::string& requestId); + std::string getAppId()const; + void setAppId(const std::string& appId); + std::string getChannelId()const; + void setChannelId(const std::string& channelId); + + private: + long callerParentId_; + bool proxy_original_security_transport_; + std::string sessionId_; + std::string proxy_original_source_ip_; + std::string ownerIdLoginEmail_; + std::string callerType_; + std::string accessKeyId_; + std::string uId_; + std::string securityToken_; + std::string requestContent_; + std::string callerBidEmail_; + std::string callerUidEmail_; + long callerUid_; + std::string app_ip_; + std::string popProduct_; + std::string product_; + std::string callerBid_; + long ownerId_; + std::string version_; + std::string nonce_; + bool proxy_trust_transport_info_; + bool ak_mfa_present_; + bool security_transport_; + std::string requestId_; + std::string appId_; + std::string channelId_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENREQUEST_H_ \ No newline at end of file diff --git a/rtc/include/alibabacloud/rtc/model/CreateChannelTokenResult.h b/rtc/include/alibabacloud/rtc/model/CreateChannelTokenResult.h new file mode 100644 index 000000000..3d0e54d98 --- /dev/null +++ b/rtc/include/alibabacloud/rtc/model/CreateChannelTokenResult.h @@ -0,0 +1,51 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENRESULT_H_ +#define ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Rtc + { + namespace Model + { + class ALIBABACLOUD_RTC_EXPORT CreateChannelTokenResult : public ServiceResult + { + public: + + + CreateChannelTokenResult(); + explicit CreateChannelTokenResult(const std::string &payload); + ~CreateChannelTokenResult(); + std::string getChannelToken()const; + + protected: + void parse(const std::string &payload); + private: + std::string channelToken_; + + }; + } + } +} +#endif // !ALIBABACLOUD_RTC_MODEL_CREATECHANNELTOKENRESULT_H_ \ No newline at end of file diff --git a/rtc/include/alibabacloud/rtc/model/CreateConferenceRequest.h b/rtc/include/alibabacloud/rtc/model/CreateConferenceRequest.h index 17cfbd6a4..fa07563f8 100644 --- a/rtc/include/alibabacloud/rtc/model/CreateConferenceRequest.h +++ b/rtc/include/alibabacloud/rtc/model/CreateConferenceRequest.h @@ -67,6 +67,8 @@ namespace AlibabaCloud void setCallerUid(long callerUid); std::string getApp_ip()const; void setApp_ip(const std::string& app_ip); + std::string getPopProduct()const; + void setPopProduct(const std::string& popProduct); std::string getProduct()const; void setProduct(const std::string& product); std::string getCallerBid()const; @@ -105,6 +107,7 @@ namespace AlibabaCloud std::string callerUidEmail_; long callerUid_; std::string app_ip_; + std::string popProduct_; std::string product_; std::string callerBid_; long ownerId_; diff --git a/rtc/include/alibabacloud/rtc/model/DeleteConferenceRequest.h b/rtc/include/alibabacloud/rtc/model/DeleteConferenceRequest.h index 6a6f3b6f5..a39b0b420 100644 --- a/rtc/include/alibabacloud/rtc/model/DeleteConferenceRequest.h +++ b/rtc/include/alibabacloud/rtc/model/DeleteConferenceRequest.h @@ -37,8 +37,8 @@ namespace AlibabaCloud std::string getApp_ip()const; void setApp_ip(const std::string& app_ip); - std::string getProduct()const; - void setProduct(const std::string& product); + std::string getPopProduct()const; + void setPopProduct(const std::string& popProduct); long getCallerParentId()const; void setCallerParentId(long callerParentId); bool getProxy_original_security_transport()const; @@ -82,7 +82,7 @@ namespace AlibabaCloud private: std::string app_ip_; - std::string product_; + std::string popProduct_; long callerParentId_; bool proxy_original_security_transport_; std::string callerBid_; diff --git a/rtc/include/alibabacloud/rtc/model/DescribeAppsRequest.h b/rtc/include/alibabacloud/rtc/model/DescribeAppsRequest.h index 1df729b03..7657d9bba 100644 --- a/rtc/include/alibabacloud/rtc/model/DescribeAppsRequest.h +++ b/rtc/include/alibabacloud/rtc/model/DescribeAppsRequest.h @@ -65,6 +65,8 @@ namespace AlibabaCloud void setOrder(const std::string& order); std::string getApp_ip()const; void setApp_ip(const std::string& app_ip); + std::string getPopProduct()const; + void setPopProduct(const std::string& popProduct); std::string getProduct()const; void setProduct(const std::string& product); std::string getCallerBid()const; @@ -102,6 +104,7 @@ namespace AlibabaCloud long callerUid_; std::string order_; std::string app_ip_; + std::string popProduct_; std::string product_; std::string callerBid_; long ownerId_; diff --git a/rtc/src/RtcClient.cc b/rtc/src/RtcClient.cc index 18aa8dd5f..4852fd6e2 100644 --- a/rtc/src/RtcClient.cc +++ b/rtc/src/RtcClient.cc @@ -843,3 +843,39 @@ RtcClient::DescribeRecordDetailOutcomeCallable RtcClient::describeRecordDetailCa return task->get_future(); } +RtcClient::CreateChannelTokenOutcome RtcClient::createChannelToken(const CreateChannelTokenRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CreateChannelTokenOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CreateChannelTokenOutcome(CreateChannelTokenResult(outcome.result())); + else + return CreateChannelTokenOutcome(outcome.error()); +} + +void RtcClient::createChannelTokenAsync(const CreateChannelTokenRequest& request, const CreateChannelTokenAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, createChannelToken(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +RtcClient::CreateChannelTokenOutcomeCallable RtcClient::createChannelTokenCallable(const CreateChannelTokenRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->createChannelToken(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + diff --git a/rtc/src/model/CreateChannelTokenRequest.cc b/rtc/src/model/CreateChannelTokenRequest.cc new file mode 100644 index 000000000..2a3ef883a --- /dev/null +++ b/rtc/src/model/CreateChannelTokenRequest.cc @@ -0,0 +1,313 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Rtc::Model::CreateChannelTokenRequest; + +CreateChannelTokenRequest::CreateChannelTokenRequest() : + RpcServiceRequest("rtc", "2018-01-11", "CreateChannelToken") +{} + +CreateChannelTokenRequest::~CreateChannelTokenRequest() +{} + +long CreateChannelTokenRequest::getCallerParentId()const +{ + return callerParentId_; +} + +void CreateChannelTokenRequest::setCallerParentId(long callerParentId) +{ + callerParentId_ = callerParentId; + setParameter("CallerParentId", std::to_string(callerParentId)); +} + +bool CreateChannelTokenRequest::getProxy_original_security_transport()const +{ + return proxy_original_security_transport_; +} + +void CreateChannelTokenRequest::setProxy_original_security_transport(bool proxy_original_security_transport) +{ + proxy_original_security_transport_ = proxy_original_security_transport; + setParameter("Proxy_original_security_transport", std::to_string(proxy_original_security_transport)); +} + +std::string CreateChannelTokenRequest::getSessionId()const +{ + return sessionId_; +} + +void CreateChannelTokenRequest::setSessionId(const std::string& sessionId) +{ + sessionId_ = sessionId; + setParameter("SessionId", sessionId); +} + +std::string CreateChannelTokenRequest::getProxy_original_source_ip()const +{ + return proxy_original_source_ip_; +} + +void CreateChannelTokenRequest::setProxy_original_source_ip(const std::string& proxy_original_source_ip) +{ + proxy_original_source_ip_ = proxy_original_source_ip; + setParameter("Proxy_original_source_ip", proxy_original_source_ip); +} + +std::string CreateChannelTokenRequest::getOwnerIdLoginEmail()const +{ + return ownerIdLoginEmail_; +} + +void CreateChannelTokenRequest::setOwnerIdLoginEmail(const std::string& ownerIdLoginEmail) +{ + ownerIdLoginEmail_ = ownerIdLoginEmail; + setParameter("OwnerIdLoginEmail", ownerIdLoginEmail); +} + +std::string CreateChannelTokenRequest::getCallerType()const +{ + return callerType_; +} + +void CreateChannelTokenRequest::setCallerType(const std::string& callerType) +{ + callerType_ = callerType; + setParameter("CallerType", callerType); +} + +std::string CreateChannelTokenRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void CreateChannelTokenRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +std::string CreateChannelTokenRequest::getUId()const +{ + return uId_; +} + +void CreateChannelTokenRequest::setUId(const std::string& uId) +{ + uId_ = uId; + setParameter("UId", uId); +} + +std::string CreateChannelTokenRequest::getSecurityToken()const +{ + return securityToken_; +} + +void CreateChannelTokenRequest::setSecurityToken(const std::string& securityToken) +{ + securityToken_ = securityToken; + setParameter("SecurityToken", securityToken); +} + +std::string CreateChannelTokenRequest::getRequestContent()const +{ + return requestContent_; +} + +void CreateChannelTokenRequest::setRequestContent(const std::string& requestContent) +{ + requestContent_ = requestContent; + setParameter("RequestContent", requestContent); +} + +std::string CreateChannelTokenRequest::getCallerBidEmail()const +{ + return callerBidEmail_; +} + +void CreateChannelTokenRequest::setCallerBidEmail(const std::string& callerBidEmail) +{ + callerBidEmail_ = callerBidEmail; + setParameter("CallerBidEmail", callerBidEmail); +} + +std::string CreateChannelTokenRequest::getCallerUidEmail()const +{ + return callerUidEmail_; +} + +void CreateChannelTokenRequest::setCallerUidEmail(const std::string& callerUidEmail) +{ + callerUidEmail_ = callerUidEmail; + setParameter("CallerUidEmail", callerUidEmail); +} + +long CreateChannelTokenRequest::getCallerUid()const +{ + return callerUid_; +} + +void CreateChannelTokenRequest::setCallerUid(long callerUid) +{ + callerUid_ = callerUid; + setParameter("CallerUid", std::to_string(callerUid)); +} + +std::string CreateChannelTokenRequest::getApp_ip()const +{ + return app_ip_; +} + +void CreateChannelTokenRequest::setApp_ip(const std::string& app_ip) +{ + app_ip_ = app_ip; + setParameter("App_ip", app_ip); +} + +std::string CreateChannelTokenRequest::getPopProduct()const +{ + return popProduct_; +} + +void CreateChannelTokenRequest::setPopProduct(const std::string& popProduct) +{ + popProduct_ = popProduct; + setParameter("PopProduct", popProduct); +} + +std::string CreateChannelTokenRequest::getProduct()const +{ + return product_; +} + +void CreateChannelTokenRequest::setProduct(const std::string& product) +{ + product_ = product; + setParameter("Product", product); +} + +std::string CreateChannelTokenRequest::getCallerBid()const +{ + return callerBid_; +} + +void CreateChannelTokenRequest::setCallerBid(const std::string& callerBid) +{ + callerBid_ = callerBid; + setParameter("CallerBid", callerBid); +} + +long CreateChannelTokenRequest::getOwnerId()const +{ + return ownerId_; +} + +void CreateChannelTokenRequest::setOwnerId(long ownerId) +{ + ownerId_ = ownerId; + setParameter("OwnerId", std::to_string(ownerId)); +} + +std::string CreateChannelTokenRequest::getVersion()const +{ + return version_; +} + +void CreateChannelTokenRequest::setVersion(const std::string& version) +{ + version_ = version; + setParameter("Version", version); +} + +std::string CreateChannelTokenRequest::getNonce()const +{ + return nonce_; +} + +void CreateChannelTokenRequest::setNonce(const std::string& nonce) +{ + nonce_ = nonce; + setParameter("Nonce", nonce); +} + +bool CreateChannelTokenRequest::getProxy_trust_transport_info()const +{ + return proxy_trust_transport_info_; +} + +void CreateChannelTokenRequest::setProxy_trust_transport_info(bool proxy_trust_transport_info) +{ + proxy_trust_transport_info_ = proxy_trust_transport_info; + setParameter("Proxy_trust_transport_info", std::to_string(proxy_trust_transport_info)); +} + +bool CreateChannelTokenRequest::getAk_mfa_present()const +{ + return ak_mfa_present_; +} + +void CreateChannelTokenRequest::setAk_mfa_present(bool ak_mfa_present) +{ + ak_mfa_present_ = ak_mfa_present; + setParameter("Ak_mfa_present", std::to_string(ak_mfa_present)); +} + +bool CreateChannelTokenRequest::getSecurity_transport()const +{ + return security_transport_; +} + +void CreateChannelTokenRequest::setSecurity_transport(bool security_transport) +{ + security_transport_ = security_transport; + setParameter("Security_transport", std::to_string(security_transport)); +} + +std::string CreateChannelTokenRequest::getRequestId()const +{ + return requestId_; +} + +void CreateChannelTokenRequest::setRequestId(const std::string& requestId) +{ + requestId_ = requestId; + setParameter("RequestId", requestId); +} + +std::string CreateChannelTokenRequest::getAppId()const +{ + return appId_; +} + +void CreateChannelTokenRequest::setAppId(const std::string& appId) +{ + appId_ = appId; + setParameter("AppId", appId); +} + +std::string CreateChannelTokenRequest::getChannelId()const +{ + return channelId_; +} + +void CreateChannelTokenRequest::setChannelId(const std::string& channelId) +{ + channelId_ = channelId; + setParameter("ChannelId", channelId); +} + diff --git a/rtc/src/model/CreateChannelTokenResult.cc b/rtc/src/model/CreateChannelTokenResult.cc new file mode 100644 index 000000000..e9875dc5f --- /dev/null +++ b/rtc/src/model/CreateChannelTokenResult.cc @@ -0,0 +1,52 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Rtc; +using namespace AlibabaCloud::Rtc::Model; + +CreateChannelTokenResult::CreateChannelTokenResult() : + ServiceResult() +{} + +CreateChannelTokenResult::CreateChannelTokenResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CreateChannelTokenResult::~CreateChannelTokenResult() +{} + +void CreateChannelTokenResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + + setRequestId(value["RequestId"].asString()); + if(!value["ChannelToken"].isNull()) + channelToken_ = value["ChannelToken"].asString(); + +} + +std::string CreateChannelTokenResult::getChannelToken()const +{ + return channelToken_; +} + diff --git a/rtc/src/model/CreateConferenceRequest.cc b/rtc/src/model/CreateConferenceRequest.cc index f2396213b..80195137d 100644 --- a/rtc/src/model/CreateConferenceRequest.cc +++ b/rtc/src/model/CreateConferenceRequest.cc @@ -201,6 +201,17 @@ void CreateConferenceRequest::setApp_ip(const std::string& app_ip) setParameter("App_ip", app_ip); } +std::string CreateConferenceRequest::getPopProduct()const +{ + return popProduct_; +} + +void CreateConferenceRequest::setPopProduct(const std::string& popProduct) +{ + popProduct_ = popProduct; + setParameter("PopProduct", popProduct); +} + std::string CreateConferenceRequest::getProduct()const { return product_; diff --git a/rtc/src/model/DeleteConferenceRequest.cc b/rtc/src/model/DeleteConferenceRequest.cc index e5e0e4be7..f04a2a948 100644 --- a/rtc/src/model/DeleteConferenceRequest.cc +++ b/rtc/src/model/DeleteConferenceRequest.cc @@ -36,15 +36,15 @@ void DeleteConferenceRequest::setApp_ip(const std::string& app_ip) setParameter("App_ip", app_ip); } -std::string DeleteConferenceRequest::getProduct()const +std::string DeleteConferenceRequest::getPopProduct()const { - return product_; + return popProduct_; } -void DeleteConferenceRequest::setProduct(const std::string& product) +void DeleteConferenceRequest::setPopProduct(const std::string& popProduct) { - product_ = product; - setParameter("Product", product); + popProduct_ = popProduct; + setParameter("PopProduct", popProduct); } long DeleteConferenceRequest::getCallerParentId()const diff --git a/rtc/src/model/DescribeAppsRequest.cc b/rtc/src/model/DescribeAppsRequest.cc index c9879f19e..98ee1eb09 100644 --- a/rtc/src/model/DescribeAppsRequest.cc +++ b/rtc/src/model/DescribeAppsRequest.cc @@ -190,6 +190,17 @@ void DescribeAppsRequest::setApp_ip(const std::string& app_ip) setParameter("App_ip", app_ip); } +std::string DescribeAppsRequest::getPopProduct()const +{ + return popProduct_; +} + +void DescribeAppsRequest::setPopProduct(const std::string& popProduct) +{ + popProduct_ = popProduct; + setParameter("PopProduct", popProduct); +} + std::string DescribeAppsRequest::getProduct()const { return product_;