Support continuous pushing.

This commit is contained in:
sdk-team
2019-10-14 14:05:26 +08:00
parent 0dc8a66e75
commit 8fe6dfd981
13 changed files with 560 additions and 1 deletions

View File

@@ -34,6 +34,10 @@
#include "model/CheckDeviceResult.h"
#include "model/CheckDevicesRequest.h"
#include "model/CheckDevicesResult.h"
#include "model/CompleteContinuouslyPushRequest.h"
#include "model/CompleteContinuouslyPushResult.h"
#include "model/ContinuouslyPushRequest.h"
#include "model/ContinuouslyPushResult.h"
#include "model/ListPushRecordsRequest.h"
#include "model/ListPushRecordsResult.h"
#include "model/ListSummaryAppsRequest.h"
@@ -107,6 +111,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CheckDevicesResult> CheckDevicesOutcome;
typedef std::future<CheckDevicesOutcome> CheckDevicesOutcomeCallable;
typedef std::function<void(const PushClient*, const Model::CheckDevicesRequest&, const CheckDevicesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckDevicesAsyncHandler;
typedef Outcome<Error, Model::CompleteContinuouslyPushResult> CompleteContinuouslyPushOutcome;
typedef std::future<CompleteContinuouslyPushOutcome> CompleteContinuouslyPushOutcomeCallable;
typedef std::function<void(const PushClient*, const Model::CompleteContinuouslyPushRequest&, const CompleteContinuouslyPushOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CompleteContinuouslyPushAsyncHandler;
typedef Outcome<Error, Model::ContinuouslyPushResult> ContinuouslyPushOutcome;
typedef std::future<ContinuouslyPushOutcome> ContinuouslyPushOutcomeCallable;
typedef std::function<void(const PushClient*, const Model::ContinuouslyPushRequest&, const ContinuouslyPushOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ContinuouslyPushAsyncHandler;
typedef Outcome<Error, Model::ListPushRecordsResult> ListPushRecordsOutcome;
typedef std::future<ListPushRecordsOutcome> ListPushRecordsOutcomeCallable;
typedef std::function<void(const PushClient*, const Model::ListPushRecordsRequest&, const ListPushRecordsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListPushRecordsAsyncHandler;
@@ -199,6 +209,12 @@ namespace AlibabaCloud
CheckDevicesOutcome checkDevices(const Model::CheckDevicesRequest &request)const;
void checkDevicesAsync(const Model::CheckDevicesRequest& request, const CheckDevicesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CheckDevicesOutcomeCallable checkDevicesCallable(const Model::CheckDevicesRequest& request) const;
CompleteContinuouslyPushOutcome completeContinuouslyPush(const Model::CompleteContinuouslyPushRequest &request)const;
void completeContinuouslyPushAsync(const Model::CompleteContinuouslyPushRequest& request, const CompleteContinuouslyPushAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CompleteContinuouslyPushOutcomeCallable completeContinuouslyPushCallable(const Model::CompleteContinuouslyPushRequest& request) const;
ContinuouslyPushOutcome continuouslyPush(const Model::ContinuouslyPushRequest &request)const;
void continuouslyPushAsync(const Model::ContinuouslyPushRequest& request, const ContinuouslyPushAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ContinuouslyPushOutcomeCallable continuouslyPushCallable(const Model::ContinuouslyPushRequest& request) const;
ListPushRecordsOutcome listPushRecords(const Model::ListPushRecordsRequest &request)const;
void listPushRecordsAsync(const Model::ListPushRecordsRequest& request, const ListPushRecordsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListPushRecordsOutcomeCallable listPushRecordsCallable(const Model::ListPushRecordsRequest& request) const;

View File

@@ -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_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHREQUEST_H_
#define ALIBABACLOUD_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/push/PushExport.h>
namespace AlibabaCloud
{
namespace Push
{
namespace Model
{
class ALIBABACLOUD_PUSH_EXPORT CompleteContinuouslyPushRequest : public RpcServiceRequest
{
public:
CompleteContinuouslyPushRequest();
~CompleteContinuouslyPushRequest();
std::string getMessageId()const;
void setMessageId(const std::string& messageId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
long getAppKey()const;
void setAppKey(long appKey);
private:
std::string messageId_;
std::string accessKeyId_;
long appKey_;
};
}
}
}
#endif // !ALIBABACLOUD_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHREQUEST_H_

View File

@@ -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_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHRESULT_H_
#define ALIBABACLOUD_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/push/PushExport.h>
namespace AlibabaCloud
{
namespace Push
{
namespace Model
{
class ALIBABACLOUD_PUSH_EXPORT CompleteContinuouslyPushResult : public ServiceResult
{
public:
CompleteContinuouslyPushResult();
explicit CompleteContinuouslyPushResult(const std::string &payload);
~CompleteContinuouslyPushResult();
std::string getMessageId()const;
protected:
void parse(const std::string &payload);
private:
std::string messageId_;
};
}
}
}
#endif // !ALIBABACLOUD_PUSH_MODEL_COMPLETECONTINUOUSLYPUSHRESULT_H_

View File

@@ -0,0 +1,60 @@
/*
* 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_PUSH_MODEL_CONTINUOUSLYPUSHREQUEST_H_
#define ALIBABACLOUD_PUSH_MODEL_CONTINUOUSLYPUSHREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/push/PushExport.h>
namespace AlibabaCloud
{
namespace Push
{
namespace Model
{
class ALIBABACLOUD_PUSH_EXPORT ContinuouslyPushRequest : public RpcServiceRequest
{
public:
ContinuouslyPushRequest();
~ContinuouslyPushRequest();
std::string getMessageId()const;
void setMessageId(const std::string& messageId);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getTarget()const;
void setTarget(const std::string& target);
long getAppKey()const;
void setAppKey(long appKey);
std::string getTargetValue()const;
void setTargetValue(const std::string& targetValue);
private:
std::string messageId_;
std::string accessKeyId_;
std::string target_;
long appKey_;
std::string targetValue_;
};
}
}
}
#endif // !ALIBABACLOUD_PUSH_MODEL_CONTINUOUSLYPUSHREQUEST_H_

View File

@@ -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_PUSH_MODEL_CONTINUOUSLYPUSHRESULT_H_
#define ALIBABACLOUD_PUSH_MODEL_CONTINUOUSLYPUSHRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/push/PushExport.h>
namespace AlibabaCloud
{
namespace Push
{
namespace Model
{
class ALIBABACLOUD_PUSH_EXPORT ContinuouslyPushResult : public ServiceResult
{
public:
ContinuouslyPushResult();
explicit ContinuouslyPushResult(const std::string &payload);
~ContinuouslyPushResult();
std::string getMessageId()const;
protected:
void parse(const std::string &payload);
private:
std::string messageId_;
};
}
}
}
#endif // !ALIBABACLOUD_PUSH_MODEL_CONTINUOUSLYPUSHRESULT_H_