diff --git a/CHANGELOG b/CHANGELOG index 431d45f68..7a4dd9050 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2021-07-09 Version: 1.36.816 +- Add `CheckCertificate` Api. +- Supported AndroidRenderStyle, AndroidBigTitle, AndroidBigBody, AndroidXiaomiBigPictureUrl for Push and MassPush. + 2021-07-09 Version: 1.36.815 - Fix ListPIpelineTemplates. diff --git a/VERSION b/VERSION index 6c182f843..59e3a0bf7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.815 \ No newline at end of file +1.36.816 \ No newline at end of file diff --git a/push/CMakeLists.txt b/push/CMakeLists.txt index a7f0b262d..17d95625d 100644 --- a/push/CMakeLists.txt +++ b/push/CMakeLists.txt @@ -29,6 +29,8 @@ set(push_public_header_model include/alibabacloud/push/model/BindTagResult.h include/alibabacloud/push/model/CancelPushRequest.h include/alibabacloud/push/model/CancelPushResult.h + include/alibabacloud/push/model/CheckCertificateRequest.h + include/alibabacloud/push/model/CheckCertificateResult.h include/alibabacloud/push/model/CheckDeviceRequest.h include/alibabacloud/push/model/CheckDeviceResult.h include/alibabacloud/push/model/CheckDevicesRequest.h @@ -94,6 +96,8 @@ set(push_src src/model/BindTagResult.cc src/model/CancelPushRequest.cc src/model/CancelPushResult.cc + src/model/CheckCertificateRequest.cc + src/model/CheckCertificateResult.cc src/model/CheckDeviceRequest.cc src/model/CheckDeviceResult.cc src/model/CheckDevicesRequest.cc diff --git a/push/include/alibabacloud/push/PushClient.h b/push/include/alibabacloud/push/PushClient.h index 6cb41309e..1e5534efc 100644 --- a/push/include/alibabacloud/push/PushClient.h +++ b/push/include/alibabacloud/push/PushClient.h @@ -30,6 +30,8 @@ #include "model/BindTagResult.h" #include "model/CancelPushRequest.h" #include "model/CancelPushResult.h" +#include "model/CheckCertificateRequest.h" +#include "model/CheckCertificateResult.h" #include "model/CheckDeviceRequest.h" #include "model/CheckDeviceResult.h" #include "model/CheckDevicesRequest.h" @@ -105,6 +107,9 @@ namespace AlibabaCloud typedef Outcome CancelPushOutcome; typedef std::future CancelPushOutcomeCallable; typedef std::function&)> CancelPushAsyncHandler; + typedef Outcome CheckCertificateOutcome; + typedef std::future CheckCertificateOutcomeCallable; + typedef std::function&)> CheckCertificateAsyncHandler; typedef Outcome CheckDeviceOutcome; typedef std::future CheckDeviceOutcomeCallable; typedef std::function&)> CheckDeviceAsyncHandler; @@ -203,6 +208,9 @@ namespace AlibabaCloud CancelPushOutcome cancelPush(const Model::CancelPushRequest &request)const; void cancelPushAsync(const Model::CancelPushRequest& request, const CancelPushAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CancelPushOutcomeCallable cancelPushCallable(const Model::CancelPushRequest& request) const; + CheckCertificateOutcome checkCertificate(const Model::CheckCertificateRequest &request)const; + void checkCertificateAsync(const Model::CheckCertificateRequest& request, const CheckCertificateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + CheckCertificateOutcomeCallable checkCertificateCallable(const Model::CheckCertificateRequest& request) const; CheckDeviceOutcome checkDevice(const Model::CheckDeviceRequest &request)const; void checkDeviceAsync(const Model::CheckDeviceRequest& request, const CheckDeviceAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CheckDeviceOutcomeCallable checkDeviceCallable(const Model::CheckDeviceRequest& request) const; diff --git a/push/include/alibabacloud/push/model/CheckCertificateRequest.h b/push/include/alibabacloud/push/model/CheckCertificateRequest.h new file mode 100644 index 000000000..2ed4c6ceb --- /dev/null +++ b/push/include/alibabacloud/push/model/CheckCertificateRequest.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_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_ +#define ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Push + { + namespace Model + { + class ALIBABACLOUD_PUSH_EXPORT CheckCertificateRequest : public RpcServiceRequest + { + + public: + CheckCertificateRequest(); + ~CheckCertificateRequest(); + + std::string getAccessKeyId()const; + void setAccessKeyId(const std::string& accessKeyId); + long getAppKey()const; + void setAppKey(long appKey); + + private: + std::string accessKeyId_; + long appKey_; + + }; + } + } +} +#endif // !ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATEREQUEST_H_ \ No newline at end of file diff --git a/push/include/alibabacloud/push/model/CheckCertificateResult.h b/push/include/alibabacloud/push/model/CheckCertificateResult.h new file mode 100644 index 000000000..45ea11044 --- /dev/null +++ b/push/include/alibabacloud/push/model/CheckCertificateResult.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_PUSH_MODEL_CHECKCERTIFICATERESULT_H_ +#define ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATERESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Push + { + namespace Model + { + class ALIBABACLOUD_PUSH_EXPORT CheckCertificateResult : public ServiceResult + { + public: + struct ProductionCertInfo + { + std::string status; + long exipreTime; + }; + struct DevelopmentCertInfo + { + std::string status; + long exipreTime; + }; + + + CheckCertificateResult(); + explicit CheckCertificateResult(const std::string &payload); + ~CheckCertificateResult(); + DevelopmentCertInfo getDevelopmentCertInfo()const; + bool getIOS()const; + ProductionCertInfo getProductionCertInfo()const; + bool getAndroid()const; + + protected: + void parse(const std::string &payload); + private: + DevelopmentCertInfo developmentCertInfo_; + bool iOS_; + ProductionCertInfo productionCertInfo_; + bool android_; + + }; + } + } +} +#endif // !ALIBABACLOUD_PUSH_MODEL_CHECKCERTIFICATERESULT_H_ \ No newline at end of file diff --git a/push/include/alibabacloud/push/model/MassPushRequest.h b/push/include/alibabacloud/push/model/MassPushRequest.h index 0a7421a3a..34a19da0b 100644 --- a/push/include/alibabacloud/push/model/MassPushRequest.h +++ b/push/include/alibabacloud/push/model/MassPushRequest.h @@ -36,6 +36,7 @@ namespace AlibabaCloud int androidNotificationBarType; std::string androidExtParameters; int iOSBadge; + std::string androidBigBody; bool iOSBadgeAutoIncrement; std::string androidOpenType; std::string title; @@ -46,6 +47,7 @@ namespace AlibabaCloud std::string androidNotificationHuaweiChannel; std::string androidPopupActivity; std::string iOSRemindBody; + std::string androidRenderStyle; std::string iOSExtParameters; std::string androidNotifyType; std::string androidPopupTitle; @@ -62,12 +64,14 @@ namespace AlibabaCloud bool iOSSilentNotification; std::string jobKey; std::string target; + std::string androidBigTitle; std::string androidOpenUrl; std::string androidNotificationChannel; bool androidRemind; std::string androidActivity; std::string androidXiaoMiNotifyBody; std::string iOSSubtitle; + std::string androidXiaomiBigPictureUrl; bool iOSRemind; int androidNotificationNotifyId; std::string targetValue; diff --git a/push/include/alibabacloud/push/model/PushRequest.h b/push/include/alibabacloud/push/model/PushRequest.h index 37eeb1f75..9a64b9940 100644 --- a/push/include/alibabacloud/push/model/PushRequest.h +++ b/push/include/alibabacloud/push/model/PushRequest.h @@ -85,6 +85,8 @@ namespace AlibabaCloud void setAndroidXiaoMiNotifyBody(const std::string& androidXiaoMiNotifyBody); std::string getIOSSubtitle()const; void setIOSSubtitle(const std::string& iOSSubtitle); + std::string getAndroidXiaomiBigPictureUrl()const; + void setAndroidXiaomiBigPictureUrl(const std::string& androidXiaomiBigPictureUrl); bool getIOSRemind()const; void setIOSRemind(bool iOSRemind); std::string getAndroidMusic()const; @@ -97,6 +99,8 @@ namespace AlibabaCloud void setAndroidExtParameters(const std::string& androidExtParameters); int getIOSBadge()const; void setIOSBadge(int iOSBadge); + std::string getAndroidBigBody()const; + void setAndroidBigBody(const std::string& androidBigBody); bool getIOSBadgeAutoIncrement()const; void setIOSBadgeAutoIncrement(bool iOSBadgeAutoIncrement); std::string getAndroidOpenType()const; @@ -107,6 +111,8 @@ namespace AlibabaCloud void setAccessKeyId(const std::string& accessKeyId); int getSmsDelaySecs()const; void setSmsDelaySecs(int smsDelaySecs); + int getAndroidRenderStyle()const; + void setAndroidRenderStyle(int androidRenderStyle); std::string getIOSExtParameters()const; void setIOSExtParameters(const std::string& iOSExtParameters); std::string getSmsTemplateName()const; @@ -117,6 +123,8 @@ namespace AlibabaCloud void setIOSSilentNotification(bool iOSSilentNotification); std::string getTarget()const; void setTarget(const std::string& target); + std::string getAndroidBigTitle()const; + void setAndroidBigTitle(const std::string& androidBigTitle); std::string getAndroidNotificationChannel()const; void setAndroidNotificationChannel(const std::string& androidNotificationChannel); bool getAndroidRemind()const; @@ -162,22 +170,26 @@ namespace AlibabaCloud std::string androidOpenUrl_; std::string androidXiaoMiNotifyBody_; std::string iOSSubtitle_; + std::string androidXiaomiBigPictureUrl_; bool iOSRemind_; std::string androidMusic_; std::string iOSNotificationCollapseId_; std::string pushType_; std::string androidExtParameters_; int iOSBadge_; + std::string androidBigBody_; bool iOSBadgeAutoIncrement_; std::string androidOpenType_; std::string title_; std::string accessKeyId_; int smsDelaySecs_; + int androidRenderStyle_; std::string iOSExtParameters_; std::string smsTemplateName_; std::string androidPopupBody_; bool iOSSilentNotification_; std::string target_; + std::string androidBigTitle_; std::string androidNotificationChannel_; bool androidRemind_; std::string androidActivity_; diff --git a/push/include/alibabacloud/push/model/QueryPushRecordsRequest.h b/push/include/alibabacloud/push/model/QueryPushRecordsRequest.h index 6eee95c09..983bb05a8 100644 --- a/push/include/alibabacloud/push/model/QueryPushRecordsRequest.h +++ b/push/include/alibabacloud/push/model/QueryPushRecordsRequest.h @@ -53,6 +53,8 @@ namespace AlibabaCloud void setTarget(const std::string& target); long getAppKey()const; void setAppKey(long appKey); + int getPage()const; + void setPage(int page); std::string getPushType()const; void setPushType(const std::string& pushType); @@ -66,6 +68,7 @@ namespace AlibabaCloud std::string endTime_; std::string target_; long appKey_; + int page_; std::string pushType_; }; diff --git a/push/include/alibabacloud/push/model/QueryPushRecordsResult.h b/push/include/alibabacloud/push/model/QueryPushRecordsResult.h index a7b1c90cf..5541392f0 100644 --- a/push/include/alibabacloud/push/model/QueryPushRecordsResult.h +++ b/push/include/alibabacloud/push/model/QueryPushRecordsResult.h @@ -53,6 +53,8 @@ namespace AlibabaCloud std::vector getPushInfos()const; std::string getNextToken()const; int getPageSize()const; + int getTotal()const; + int getPage()const; protected: void parse(const std::string &payload); @@ -60,6 +62,8 @@ namespace AlibabaCloud std::vector pushInfos_; std::string nextToken_; int pageSize_; + int total_; + int page_; }; } diff --git a/push/src/PushClient.cc b/push/src/PushClient.cc index ea26f10e9..4a3707f81 100644 --- a/push/src/PushClient.cc +++ b/push/src/PushClient.cc @@ -195,6 +195,42 @@ PushClient::CancelPushOutcomeCallable PushClient::cancelPushCallable(const Cance return task->get_future(); } +PushClient::CheckCertificateOutcome PushClient::checkCertificate(const CheckCertificateRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return CheckCertificateOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return CheckCertificateOutcome(CheckCertificateResult(outcome.result())); + else + return CheckCertificateOutcome(outcome.error()); +} + +void PushClient::checkCertificateAsync(const CheckCertificateRequest& request, const CheckCertificateAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, checkCertificate(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +PushClient::CheckCertificateOutcomeCallable PushClient::checkCertificateCallable(const CheckCertificateRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->checkCertificate(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + PushClient::CheckDeviceOutcome PushClient::checkDevice(const CheckDeviceRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/push/src/model/CheckCertificateRequest.cc b/push/src/model/CheckCertificateRequest.cc new file mode 100644 index 000000000..9e4854e5f --- /dev/null +++ b/push/src/model/CheckCertificateRequest.cc @@ -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. + */ + +#include + +using AlibabaCloud::Push::Model::CheckCertificateRequest; + +CheckCertificateRequest::CheckCertificateRequest() : + RpcServiceRequest("push", "2016-08-01", "CheckCertificate") +{ + setMethod(HttpRequest::Method::Post); +} + +CheckCertificateRequest::~CheckCertificateRequest() +{} + +std::string CheckCertificateRequest::getAccessKeyId()const +{ + return accessKeyId_; +} + +void CheckCertificateRequest::setAccessKeyId(const std::string& accessKeyId) +{ + accessKeyId_ = accessKeyId; + setParameter("AccessKeyId", accessKeyId); +} + +long CheckCertificateRequest::getAppKey()const +{ + return appKey_; +} + +void CheckCertificateRequest::setAppKey(long appKey) +{ + appKey_ = appKey; + setParameter("AppKey", std::to_string(appKey)); +} + diff --git a/push/src/model/CheckCertificateResult.cc b/push/src/model/CheckCertificateResult.cc new file mode 100644 index 000000000..7b7f759d6 --- /dev/null +++ b/push/src/model/CheckCertificateResult.cc @@ -0,0 +1,78 @@ +/* + * 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::Push; +using namespace AlibabaCloud::Push::Model; + +CheckCertificateResult::CheckCertificateResult() : + ServiceResult() +{} + +CheckCertificateResult::CheckCertificateResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +CheckCertificateResult::~CheckCertificateResult() +{} + +void CheckCertificateResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto productionCertInfoNode = value["ProductionCertInfo"]; + if(!productionCertInfoNode["ExipreTime"].isNull()) + productionCertInfo_.exipreTime = std::stol(productionCertInfoNode["ExipreTime"].asString()); + if(!productionCertInfoNode["Status"].isNull()) + productionCertInfo_.status = productionCertInfoNode["Status"].asString(); + auto developmentCertInfoNode = value["DevelopmentCertInfo"]; + if(!developmentCertInfoNode["ExipreTime"].isNull()) + developmentCertInfo_.exipreTime = std::stol(developmentCertInfoNode["ExipreTime"].asString()); + if(!developmentCertInfoNode["Status"].isNull()) + developmentCertInfo_.status = developmentCertInfoNode["Status"].asString(); + if(!value["Android"].isNull()) + android_ = value["Android"].asString() == "true"; + if(!value["IOS"].isNull()) + iOS_ = value["IOS"].asString() == "true"; + +} + +CheckCertificateResult::DevelopmentCertInfo CheckCertificateResult::getDevelopmentCertInfo()const +{ + return developmentCertInfo_; +} + +bool CheckCertificateResult::getIOS()const +{ + return iOS_; +} + +CheckCertificateResult::ProductionCertInfo CheckCertificateResult::getProductionCertInfo()const +{ + return productionCertInfo_; +} + +bool CheckCertificateResult::getAndroid()const +{ + return android_; +} + diff --git a/push/src/model/MassPushRequest.cc b/push/src/model/MassPushRequest.cc index 6fe9e624d..957b34f46 100644 --- a/push/src/model/MassPushRequest.cc +++ b/push/src/model/MassPushRequest.cc @@ -52,6 +52,7 @@ void MassPushRequest::setPushTask(const std::vector& pushTask) setParameter(pushTaskObjStr + ".AndroidNotificationBarType", std::to_string(pushTaskObj.androidNotificationBarType)); setParameter(pushTaskObjStr + ".AndroidExtParameters", pushTaskObj.androidExtParameters); setParameter(pushTaskObjStr + ".IOSBadge", std::to_string(pushTaskObj.iOSBadge)); + setParameter(pushTaskObjStr + ".AndroidBigBody", pushTaskObj.androidBigBody); setParameter(pushTaskObjStr + ".IOSBadgeAutoIncrement", pushTaskObj.iOSBadgeAutoIncrement ? "true" : "false"); setParameter(pushTaskObjStr + ".AndroidOpenType", pushTaskObj.androidOpenType); setParameter(pushTaskObjStr + ".Title", pushTaskObj.title); @@ -62,6 +63,7 @@ void MassPushRequest::setPushTask(const std::vector& pushTask) setParameter(pushTaskObjStr + ".AndroidNotificationHuaweiChannel", pushTaskObj.androidNotificationHuaweiChannel); setParameter(pushTaskObjStr + ".AndroidPopupActivity", pushTaskObj.androidPopupActivity); setParameter(pushTaskObjStr + ".IOSRemindBody", pushTaskObj.iOSRemindBody); + setParameter(pushTaskObjStr + ".AndroidRenderStyle", pushTaskObj.androidRenderStyle); setParameter(pushTaskObjStr + ".IOSExtParameters", pushTaskObj.iOSExtParameters); setParameter(pushTaskObjStr + ".AndroidNotifyType", pushTaskObj.androidNotifyType); setParameter(pushTaskObjStr + ".AndroidPopupTitle", pushTaskObj.androidPopupTitle); @@ -78,12 +80,14 @@ void MassPushRequest::setPushTask(const std::vector& pushTask) setParameter(pushTaskObjStr + ".IOSSilentNotification", pushTaskObj.iOSSilentNotification ? "true" : "false"); setParameter(pushTaskObjStr + ".JobKey", pushTaskObj.jobKey); setParameter(pushTaskObjStr + ".Target", pushTaskObj.target); + setParameter(pushTaskObjStr + ".AndroidBigTitle", pushTaskObj.androidBigTitle); setParameter(pushTaskObjStr + ".AndroidOpenUrl", pushTaskObj.androidOpenUrl); setParameter(pushTaskObjStr + ".AndroidNotificationChannel", pushTaskObj.androidNotificationChannel); setParameter(pushTaskObjStr + ".AndroidRemind", pushTaskObj.androidRemind ? "true" : "false"); setParameter(pushTaskObjStr + ".AndroidActivity", pushTaskObj.androidActivity); setParameter(pushTaskObjStr + ".AndroidXiaoMiNotifyBody", pushTaskObj.androidXiaoMiNotifyBody); setParameter(pushTaskObjStr + ".IOSSubtitle", pushTaskObj.iOSSubtitle); + setParameter(pushTaskObjStr + ".AndroidXiaomiBigPictureUrl", pushTaskObj.androidXiaomiBigPictureUrl); setParameter(pushTaskObjStr + ".IOSRemind", pushTaskObj.iOSRemind ? "true" : "false"); setParameter(pushTaskObjStr + ".AndroidNotificationNotifyId", std::to_string(pushTaskObj.androidNotificationNotifyId)); setParameter(pushTaskObjStr + ".TargetValue", pushTaskObj.targetValue); diff --git a/push/src/model/PushRequest.cc b/push/src/model/PushRequest.cc index ef9e12ad8..fd2e4ca32 100644 --- a/push/src/model/PushRequest.cc +++ b/push/src/model/PushRequest.cc @@ -302,6 +302,17 @@ void PushRequest::setIOSSubtitle(const std::string& iOSSubtitle) setParameter("IOSSubtitle", iOSSubtitle); } +std::string PushRequest::getAndroidXiaomiBigPictureUrl()const +{ + return androidXiaomiBigPictureUrl_; +} + +void PushRequest::setAndroidXiaomiBigPictureUrl(const std::string& androidXiaomiBigPictureUrl) +{ + androidXiaomiBigPictureUrl_ = androidXiaomiBigPictureUrl; + setParameter("AndroidXiaomiBigPictureUrl", androidXiaomiBigPictureUrl); +} + bool PushRequest::getIOSRemind()const { return iOSRemind_; @@ -368,6 +379,17 @@ void PushRequest::setIOSBadge(int iOSBadge) setParameter("IOSBadge", std::to_string(iOSBadge)); } +std::string PushRequest::getAndroidBigBody()const +{ + return androidBigBody_; +} + +void PushRequest::setAndroidBigBody(const std::string& androidBigBody) +{ + androidBigBody_ = androidBigBody; + setParameter("AndroidBigBody", androidBigBody); +} + bool PushRequest::getIOSBadgeAutoIncrement()const { return iOSBadgeAutoIncrement_; @@ -423,6 +445,17 @@ void PushRequest::setSmsDelaySecs(int smsDelaySecs) setParameter("SmsDelaySecs", std::to_string(smsDelaySecs)); } +int PushRequest::getAndroidRenderStyle()const +{ + return androidRenderStyle_; +} + +void PushRequest::setAndroidRenderStyle(int androidRenderStyle) +{ + androidRenderStyle_ = androidRenderStyle; + setParameter("AndroidRenderStyle", std::to_string(androidRenderStyle)); +} + std::string PushRequest::getIOSExtParameters()const { return iOSExtParameters_; @@ -478,6 +511,17 @@ void PushRequest::setTarget(const std::string& target) setParameter("Target", target); } +std::string PushRequest::getAndroidBigTitle()const +{ + return androidBigTitle_; +} + +void PushRequest::setAndroidBigTitle(const std::string& androidBigTitle) +{ + androidBigTitle_ = androidBigTitle; + setParameter("AndroidBigTitle", androidBigTitle); +} + std::string PushRequest::getAndroidNotificationChannel()const { return androidNotificationChannel_; diff --git a/push/src/model/QueryPushRecordsRequest.cc b/push/src/model/QueryPushRecordsRequest.cc index f431150f7..2083bd90d 100644 --- a/push/src/model/QueryPushRecordsRequest.cc +++ b/push/src/model/QueryPushRecordsRequest.cc @@ -126,6 +126,17 @@ void QueryPushRecordsRequest::setAppKey(long appKey) setParameter("AppKey", std::to_string(appKey)); } +int QueryPushRecordsRequest::getPage()const +{ + return page_; +} + +void QueryPushRecordsRequest::setPage(int page) +{ + page_ = page; + setParameter("Page", std::to_string(page)); +} + std::string QueryPushRecordsRequest::getPushType()const { return pushType_; diff --git a/push/src/model/QueryPushRecordsResult.cc b/push/src/model/QueryPushRecordsResult.cc index 0007baad7..677d7a2a8 100644 --- a/push/src/model/QueryPushRecordsResult.cc +++ b/push/src/model/QueryPushRecordsResult.cc @@ -69,6 +69,10 @@ void QueryPushRecordsResult::parse(const std::string &payload) nextToken_ = value["NextToken"].asString(); if(!value["PageSize"].isNull()) pageSize_ = std::stoi(value["PageSize"].asString()); + if(!value["Page"].isNull()) + page_ = std::stoi(value["Page"].asString()); + if(!value["Total"].isNull()) + total_ = std::stoi(value["Total"].asString()); } @@ -87,3 +91,13 @@ int QueryPushRecordsResult::getPageSize()const return pageSize_; } +int QueryPushRecordsResult::getTotal()const +{ + return total_; +} + +int QueryPushRecordsResult::getPage()const +{ + return page_; +} +