Supported CloudGame.
This commit is contained in:
62
cloudgame/include/alibabacloud/cloudgame/CloudgameClient.h
Normal file
62
cloudgame/include/alibabacloud/cloudgame/CloudgameClient.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_CLOUDGAMECLIENT_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_CLOUDGAMECLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "CloudgameExport.h"
|
||||
#include "model/ListGamesRequest.h"
|
||||
#include "model/ListGamesResult.h"
|
||||
#include "model/ListProjectsRequest.h"
|
||||
#include "model/ListProjectsResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudgame
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDGAME_EXPORT CloudgameClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::ListGamesResult> ListGamesOutcome;
|
||||
typedef std::future<ListGamesOutcome> ListGamesOutcomeCallable;
|
||||
typedef std::function<void(const CloudgameClient*, const Model::ListGamesRequest&, const ListGamesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListGamesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListProjectsResult> ListProjectsOutcome;
|
||||
typedef std::future<ListProjectsOutcome> ListProjectsOutcomeCallable;
|
||||
typedef std::function<void(const CloudgameClient*, const Model::ListProjectsRequest&, const ListProjectsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListProjectsAsyncHandler;
|
||||
|
||||
CloudgameClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
CloudgameClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
CloudgameClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~CloudgameClient();
|
||||
ListGamesOutcome listGames(const Model::ListGamesRequest &request)const;
|
||||
void listGamesAsync(const Model::ListGamesRequest& request, const ListGamesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListGamesOutcomeCallable listGamesCallable(const Model::ListGamesRequest& request) const;
|
||||
ListProjectsOutcome listProjects(const Model::ListProjectsRequest &request)const;
|
||||
void listProjectsAsync(const Model::ListProjectsRequest& request, const ListProjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListProjectsOutcomeCallable listProjectsCallable(const Model::ListProjectsRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_CLOUDGAMECLIENT_H_
|
||||
32
cloudgame/include/alibabacloud/cloudgame/CloudgameExport.h
Normal file
32
cloudgame/include/alibabacloud/cloudgame/CloudgameExport.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_CLOUDGAMEEXPORT_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_CLOUDGAMEEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_CLOUDGAME_LIBRARY)
|
||||
# define ALIBABACLOUD_CLOUDGAME_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_CLOUDGAME_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_CLOUDGAME_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_CLOUDGAMEEXPORT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_MODEL_LISTGAMESREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_MODEL_LISTGAMESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudgame/CloudgameExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudgame
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDGAME_EXPORT ListGamesRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListGamesRequest();
|
||||
~ListGamesRequest();
|
||||
|
||||
std::string getOrderKey()const;
|
||||
void setOrderKey(const std::string& orderKey);
|
||||
std::string getSortType()const;
|
||||
void setSortType(const std::string& sortType);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
|
||||
private:
|
||||
std::string orderKey_;
|
||||
std::string sortType_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_MODEL_LISTGAMESREQUEST_H_
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_MODEL_LISTGAMESRESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_MODEL_LISTGAMESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudgame/CloudgameExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudgame
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDGAME_EXPORT ListGamesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DataListItem
|
||||
{
|
||||
std::string status;
|
||||
std::string frameRate;
|
||||
std::string inputType;
|
||||
std::string device;
|
||||
std::string gameName;
|
||||
std::string installPath;
|
||||
std::string curVersion;
|
||||
std::string savePath;
|
||||
std::string gameId;
|
||||
std::string resolution;
|
||||
};
|
||||
|
||||
|
||||
ListGamesResult();
|
||||
explicit ListGamesResult(const std::string &payload);
|
||||
~ListGamesResult();
|
||||
std::vector<DataListItem> getDataList()const;
|
||||
int getPageSize()const;
|
||||
int getCurrentPage()const;
|
||||
std::string getCount()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<DataListItem> dataList_;
|
||||
int pageSize_;
|
||||
int currentPage_;
|
||||
std::string count_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_MODEL_LISTGAMESRESULT_H_
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_MODEL_LISTPROJECTSREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_MODEL_LISTPROJECTSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudgame/CloudgameExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudgame
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDGAME_EXPORT ListProjectsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListProjectsRequest();
|
||||
~ListProjectsRequest();
|
||||
|
||||
std::string getProjectName()const;
|
||||
void setProjectName(const std::string& projectName);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
|
||||
private:
|
||||
std::string projectName_;
|
||||
int pageNumber_;
|
||||
int pageSize_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_MODEL_LISTPROJECTSREQUEST_H_
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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_CLOUDGAME_MODEL_LISTPROJECTSRESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDGAME_MODEL_LISTPROJECTSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudgame/CloudgameExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudgame
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDGAME_EXPORT ListProjectsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DataListItem
|
||||
{
|
||||
std::string highDefinitionCodeRate;
|
||||
std::string highDefinitionResolution;
|
||||
std::string projectName;
|
||||
std::string standardResolution;
|
||||
std::string projectId;
|
||||
std::string highestCodeRate;
|
||||
int concurrencyLimitNumber;
|
||||
std::string standardCodeRate;
|
||||
std::string highestResolution;
|
||||
};
|
||||
|
||||
|
||||
ListProjectsResult();
|
||||
explicit ListProjectsResult(const std::string &payload);
|
||||
~ListProjectsResult();
|
||||
std::vector<DataListItem> getDataList()const;
|
||||
int getPageSize()const;
|
||||
int getCurrentPage()const;
|
||||
int getCount()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<DataListItem> dataList_;
|
||||
int pageSize_;
|
||||
int currentPage_;
|
||||
int count_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDGAME_MODEL_LISTPROJECTSRESULT_H_
|
||||
Reference in New Issue
Block a user