Rebuild sdk (#60)

* rebuild sdk

* fixed ut include Utils.h
This commit is contained in:
Axios
2019-08-14 14:34:09 +08:00
committed by GitHub
parent f3d9843e63
commit c43307bc80
11893 changed files with 462166 additions and 221301 deletions

View File

@@ -51,42 +51,6 @@ UbsmsClient::UbsmsClient(const std::string & accessKeyId, const std::string & ac
UbsmsClient::~UbsmsClient()
{}
UbsmsClient::NotifyUserBusinessCommandOutcome UbsmsClient::notifyUserBusinessCommand(const NotifyUserBusinessCommandRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return NotifyUserBusinessCommandOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return NotifyUserBusinessCommandOutcome(NotifyUserBusinessCommandResult(outcome.result()));
else
return NotifyUserBusinessCommandOutcome(outcome.error());
}
void UbsmsClient::notifyUserBusinessCommandAsync(const NotifyUserBusinessCommandRequest& request, const NotifyUserBusinessCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, notifyUserBusinessCommand(request), context);
};
asyncExecute(new Runnable(fn));
}
UbsmsClient::NotifyUserBusinessCommandOutcomeCallable UbsmsClient::notifyUserBusinessCommandCallable(const NotifyUserBusinessCommandRequest &request) const
{
auto task = std::make_shared<std::packaged_task<NotifyUserBusinessCommandOutcome()>>(
[this, request]()
{
return this->notifyUserBusinessCommand(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
UbsmsClient::DescribeBusinessStatusOutcome UbsmsClient::describeBusinessStatus(const DescribeBusinessStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -123,6 +87,42 @@ UbsmsClient::DescribeBusinessStatusOutcomeCallable UbsmsClient::describeBusiness
return task->get_future();
}
UbsmsClient::NotifyUserBusinessCommandOutcome UbsmsClient::notifyUserBusinessCommand(const NotifyUserBusinessCommandRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return NotifyUserBusinessCommandOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return NotifyUserBusinessCommandOutcome(NotifyUserBusinessCommandResult(outcome.result()));
else
return NotifyUserBusinessCommandOutcome(outcome.error());
}
void UbsmsClient::notifyUserBusinessCommandAsync(const NotifyUserBusinessCommandRequest& request, const NotifyUserBusinessCommandAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, notifyUserBusinessCommand(request), context);
};
asyncExecute(new Runnable(fn));
}
UbsmsClient::NotifyUserBusinessCommandOutcomeCallable UbsmsClient::notifyUserBusinessCommandCallable(const NotifyUserBusinessCommandRequest &request) const
{
auto task = std::make_shared<std::packaged_task<NotifyUserBusinessCommandOutcome()>>(
[this, request]()
{
return this->notifyUserBusinessCommand(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
UbsmsClient::SetUserBusinessStatusOutcome UbsmsClient::setUserBusinessStatus(const SetUserBusinessStatusRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();