Public beta version.
This commit is contained in:
@@ -67,6 +67,8 @@ set(aliyuncvc_public_header_model
|
||||
include/alibabacloud/aliyuncvc/model/EndLiveResult.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceActiveCodeRequest.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceActiveCodeResult.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceInfoRequest.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceInfoResult.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceTokenRequest.h
|
||||
include/alibabacloud/aliyuncvc/model/GetDeviceTokenResult.h
|
||||
include/alibabacloud/aliyuncvc/model/GetMeetingRequest.h
|
||||
@@ -168,6 +170,8 @@ set(aliyuncvc_src
|
||||
src/model/EndLiveResult.cc
|
||||
src/model/GetDeviceActiveCodeRequest.cc
|
||||
src/model/GetDeviceActiveCodeResult.cc
|
||||
src/model/GetDeviceInfoRequest.cc
|
||||
src/model/GetDeviceInfoResult.cc
|
||||
src/model/GetDeviceTokenRequest.cc
|
||||
src/model/GetDeviceTokenResult.cc
|
||||
src/model/GetMeetingRequest.cc
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
#include "model/EndLiveResult.h"
|
||||
#include "model/GetDeviceActiveCodeRequest.h"
|
||||
#include "model/GetDeviceActiveCodeResult.h"
|
||||
#include "model/GetDeviceInfoRequest.h"
|
||||
#include "model/GetDeviceInfoResult.h"
|
||||
#include "model/GetDeviceTokenRequest.h"
|
||||
#include "model/GetDeviceTokenResult.h"
|
||||
#include "model/GetMeetingRequest.h"
|
||||
@@ -198,6 +200,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetDeviceActiveCodeResult> GetDeviceActiveCodeOutcome;
|
||||
typedef std::future<GetDeviceActiveCodeOutcome> GetDeviceActiveCodeOutcomeCallable;
|
||||
typedef std::function<void(const AliyuncvcClient*, const Model::GetDeviceActiveCodeRequest&, const GetDeviceActiveCodeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDeviceActiveCodeAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDeviceInfoResult> GetDeviceInfoOutcome;
|
||||
typedef std::future<GetDeviceInfoOutcome> GetDeviceInfoOutcomeCallable;
|
||||
typedef std::function<void(const AliyuncvcClient*, const Model::GetDeviceInfoRequest&, const GetDeviceInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDeviceInfoAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetDeviceTokenResult> GetDeviceTokenOutcome;
|
||||
typedef std::future<GetDeviceTokenOutcome> GetDeviceTokenOutcomeCallable;
|
||||
typedef std::function<void(const AliyuncvcClient*, const Model::GetDeviceTokenRequest&, const GetDeviceTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetDeviceTokenAsyncHandler;
|
||||
@@ -350,6 +355,9 @@ namespace AlibabaCloud
|
||||
GetDeviceActiveCodeOutcome getDeviceActiveCode(const Model::GetDeviceActiveCodeRequest &request)const;
|
||||
void getDeviceActiveCodeAsync(const Model::GetDeviceActiveCodeRequest& request, const GetDeviceActiveCodeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDeviceActiveCodeOutcomeCallable getDeviceActiveCodeCallable(const Model::GetDeviceActiveCodeRequest& request) const;
|
||||
GetDeviceInfoOutcome getDeviceInfo(const Model::GetDeviceInfoRequest &request)const;
|
||||
void getDeviceInfoAsync(const Model::GetDeviceInfoRequest& request, const GetDeviceInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDeviceInfoOutcomeCallable getDeviceInfoCallable(const Model::GetDeviceInfoRequest& request) const;
|
||||
GetDeviceTokenOutcome getDeviceToken(const Model::GetDeviceTokenRequest &request)const;
|
||||
void getDeviceTokenAsync(const Model::GetDeviceTokenRequest& request, const GetDeviceTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetDeviceTokenOutcomeCallable getDeviceTokenCallable(const Model::GetDeviceTokenRequest& request) const;
|
||||
|
||||
@@ -39,14 +39,14 @@ namespace AlibabaCloud
|
||||
~DeleteUserResult();
|
||||
std::string getMessage()const;
|
||||
int getErrorCode()const;
|
||||
std::string getSuccess()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
int errorCode_;
|
||||
std::string success_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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_ALIYUNCVC_MODEL_GETDEVICEINFOREQUEST_H_
|
||||
#define ALIBABACLOUD_ALIYUNCVC_MODEL_GETDEVICEINFOREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/aliyuncvc/AliyuncvcExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Aliyuncvc
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALIYUNCVC_EXPORT GetDeviceInfoRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetDeviceInfoRequest();
|
||||
~GetDeviceInfoRequest();
|
||||
|
||||
std::string getCastScreenCode()const;
|
||||
void setCastScreenCode(const std::string& castScreenCode);
|
||||
|
||||
private:
|
||||
std::string castScreenCode_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_GETDEVICEINFOREQUEST_H_
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* 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_ALIYUNCVC_MODEL_GETDEVICEINFORESULT_H_
|
||||
#define ALIBABACLOUD_ALIYUNCVC_MODEL_GETDEVICEINFORESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/aliyuncvc/AliyuncvcExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Aliyuncvc
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_ALIYUNCVC_EXPORT GetDeviceInfoResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Device
|
||||
{
|
||||
int status;
|
||||
std::string castScreenCode;
|
||||
std::string iP;
|
||||
std::string sn;
|
||||
std::string ssid;
|
||||
std::string activationCode;
|
||||
std::string mac;
|
||||
};
|
||||
|
||||
|
||||
GetDeviceInfoResult();
|
||||
explicit GetDeviceInfoResult(const std::string &payload);
|
||||
~GetDeviceInfoResult();
|
||||
std::string getMessage()const;
|
||||
Device getDevice()const;
|
||||
int getErrorCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string message_;
|
||||
Device device_;
|
||||
int errorCode_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_ALIYUNCVC_MODEL_GETDEVICEINFORESULT_H_
|
||||
@@ -39,6 +39,8 @@ namespace AlibabaCloud
|
||||
void setIP(const std::string& iP);
|
||||
std::string getGroupId()const;
|
||||
void setGroupId(const std::string& groupId);
|
||||
std::string getOwnerId()const;
|
||||
void setOwnerId(const std::string& ownerId);
|
||||
std::string getDeviceId()const;
|
||||
void setDeviceId(const std::string& deviceId);
|
||||
std::string getGroupName()const;
|
||||
@@ -51,6 +53,7 @@ namespace AlibabaCloud
|
||||
private:
|
||||
std::string iP_;
|
||||
std::string groupId_;
|
||||
std::string ownerId_;
|
||||
std::string deviceId_;
|
||||
std::string groupName_;
|
||||
std::string mac_;
|
||||
|
||||
@@ -879,6 +879,42 @@ AliyuncvcClient::GetDeviceActiveCodeOutcomeCallable AliyuncvcClient::getDeviceAc
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AliyuncvcClient::GetDeviceInfoOutcome AliyuncvcClient::getDeviceInfo(const GetDeviceInfoRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetDeviceInfoOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetDeviceInfoOutcome(GetDeviceInfoResult(outcome.result()));
|
||||
else
|
||||
return GetDeviceInfoOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AliyuncvcClient::getDeviceInfoAsync(const GetDeviceInfoRequest& request, const GetDeviceInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getDeviceInfo(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AliyuncvcClient::GetDeviceInfoOutcomeCallable AliyuncvcClient::getDeviceInfoCallable(const GetDeviceInfoRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetDeviceInfoOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getDeviceInfo(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AliyuncvcClient::GetDeviceTokenOutcome AliyuncvcClient::getDeviceToken(const GetDeviceTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -40,7 +40,7 @@ void DeleteUserResult::parse(const std::string &payload)
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString();
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = std::stoi(value["ErrorCode"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
@@ -58,7 +58,7 @@ int DeleteUserResult::getErrorCode()const
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string DeleteUserResult::getSuccess()const
|
||||
bool DeleteUserResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
40
aliyuncvc/src/model/GetDeviceInfoRequest.cc
Normal file
40
aliyuncvc/src/model/GetDeviceInfoRequest.cc
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* 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 <alibabacloud/aliyuncvc/model/GetDeviceInfoRequest.h>
|
||||
|
||||
using AlibabaCloud::Aliyuncvc::Model::GetDeviceInfoRequest;
|
||||
|
||||
GetDeviceInfoRequest::GetDeviceInfoRequest() :
|
||||
RpcServiceRequest("aliyuncvc", "2019-10-30", "GetDeviceInfo")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetDeviceInfoRequest::~GetDeviceInfoRequest()
|
||||
{}
|
||||
|
||||
std::string GetDeviceInfoRequest::getCastScreenCode()const
|
||||
{
|
||||
return castScreenCode_;
|
||||
}
|
||||
|
||||
void GetDeviceInfoRequest::setCastScreenCode(const std::string& castScreenCode)
|
||||
{
|
||||
castScreenCode_ = castScreenCode;
|
||||
setBodyParameter("CastScreenCode", castScreenCode);
|
||||
}
|
||||
|
||||
85
aliyuncvc/src/model/GetDeviceInfoResult.cc
Normal file
85
aliyuncvc/src/model/GetDeviceInfoResult.cc
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* 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 <alibabacloud/aliyuncvc/model/GetDeviceInfoResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aliyuncvc;
|
||||
using namespace AlibabaCloud::Aliyuncvc::Model;
|
||||
|
||||
GetDeviceInfoResult::GetDeviceInfoResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetDeviceInfoResult::GetDeviceInfoResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetDeviceInfoResult::~GetDeviceInfoResult()
|
||||
{}
|
||||
|
||||
void GetDeviceInfoResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto deviceNode = value["Device"];
|
||||
if(!deviceNode["ActivationCode"].isNull())
|
||||
device_.activationCode = deviceNode["ActivationCode"].asString();
|
||||
if(!deviceNode["CastScreenCode"].isNull())
|
||||
device_.castScreenCode = deviceNode["CastScreenCode"].asString();
|
||||
if(!deviceNode["Sn"].isNull())
|
||||
device_.sn = deviceNode["Sn"].asString();
|
||||
if(!deviceNode["Status"].isNull())
|
||||
device_.status = std::stoi(deviceNode["Status"].asString());
|
||||
if(!deviceNode["IP"].isNull())
|
||||
device_.iP = deviceNode["IP"].asString();
|
||||
if(!deviceNode["Mac"].isNull())
|
||||
device_.mac = deviceNode["Mac"].asString();
|
||||
if(!deviceNode["Ssid"].isNull())
|
||||
device_.ssid = deviceNode["Ssid"].asString();
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = std::stoi(value["ErrorCode"].asString());
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
|
||||
}
|
||||
|
||||
std::string GetDeviceInfoResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
GetDeviceInfoResult::Device GetDeviceInfoResult::getDevice()const
|
||||
{
|
||||
return device_;
|
||||
}
|
||||
|
||||
int GetDeviceInfoResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
bool GetDeviceInfoResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,17 @@ void RegisterUemDeviceRequest::setGroupId(const std::string& groupId)
|
||||
setParameter("GroupId", groupId);
|
||||
}
|
||||
|
||||
std::string RegisterUemDeviceRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void RegisterUemDeviceRequest::setOwnerId(const std::string& ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", ownerId);
|
||||
}
|
||||
|
||||
std::string RegisterUemDeviceRequest::getDeviceId()const
|
||||
{
|
||||
return deviceId_;
|
||||
|
||||
Reference in New Issue
Block a user