Browse Source

Supported AndroidTargetUserType. AndroidHonorTargetUserType for Push and MassPush.

sdk-team 2 năm trước cách đây
mục cha
commit
a16636b8bd

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1781
+1.36.1782

+ 2 - 0
push/include/alibabacloud/push/model/MassPushRequest.h

@@ -48,6 +48,7 @@ public:
 		int androidNotificationBarPriority;
 		std::string expireTime;
 		std::string androidImageUrl;
+		int androidHonorTargetUserType;
 		std::string androidNotificationVivoChannel;
 		std::string iOSNotificationCategory;
 		std::string androidNotificationXiaomiChannel;
@@ -79,6 +80,7 @@ public:
 		std::string androidHuaweiReceiptId;
 		std::string androidNotificationHonorChannel;
 		std::string androidXiaomiImageUrl;
+		int androidTargetUserType;
 		std::string androidPopupBody;
 		std::string androidBigPictureUrl;
 		bool iOSSilentNotification;

+ 3 - 0
push/include/alibabacloud/push/model/PushMessageToAndroidRequest.h

@@ -30,6 +30,8 @@ class ALIBABACLOUD_PUSH_EXPORT PushMessageToAndroidRequest : public RpcServiceRe
 public:
 	PushMessageToAndroidRequest();
 	~PushMessageToAndroidRequest();
+	bool getStoreOffline() const;
+	void setStoreOffline(bool storeOffline);
 	std::string getTitle() const;
 	void setTitle(const std::string &title);
 	std::string getBody() const;
@@ -46,6 +48,7 @@ public:
 	void setTargetValue(const std::string &targetValue);
 
 private:
+	bool storeOffline_;
 	std::string title_;
 	std::string body_;
 	std::string jobKey_;

+ 3 - 0
push/include/alibabacloud/push/model/PushMessageToiOSRequest.h

@@ -30,6 +30,8 @@ class ALIBABACLOUD_PUSH_EXPORT PushMessageToiOSRequest : public RpcServiceReques
 public:
 	PushMessageToiOSRequest();
 	~PushMessageToiOSRequest();
+	bool getStoreOffline() const;
+	void setStoreOffline(bool storeOffline);
 	std::string getTitle() const;
 	void setTitle(const std::string &title);
 	std::string getBody() const;
@@ -46,6 +48,7 @@ public:
 	void setTargetValue(const std::string &targetValue);
 
 private:
+	bool storeOffline_;
 	std::string title_;
 	std::string body_;
 	std::string jobKey_;

+ 3 - 0
push/include/alibabacloud/push/model/PushNoticeToAndroidRequest.h

@@ -32,6 +32,8 @@ public:
 	~PushNoticeToAndroidRequest();
 	std::string getExtParameters() const;
 	void setExtParameters(const std::string &extParameters);
+	bool getStoreOffline() const;
+	void setStoreOffline(bool storeOffline);
 	std::string getTitle() const;
 	void setTitle(const std::string &title);
 	std::string getBody() const;
@@ -49,6 +51,7 @@ public:
 
 private:
 	std::string extParameters_;
+	bool storeOffline_;
 	std::string title_;
 	std::string body_;
 	std::string jobKey_;

+ 6 - 0
push/include/alibabacloud/push/model/PushRequest.h

@@ -70,6 +70,8 @@ public:
 	void setExpireTime(const std::string &expireTime);
 	std::string getAndroidImageUrl() const;
 	void setAndroidImageUrl(const std::string &androidImageUrl);
+	int getAndroidHonorTargetUserType() const;
+	void setAndroidHonorTargetUserType(int androidHonorTargetUserType);
 	std::string getAndroidNotificationVivoChannel() const;
 	void setAndroidNotificationVivoChannel(const std::string &androidNotificationVivoChannel);
 	std::string getIOSNotificationCategory() const;
@@ -138,6 +140,8 @@ public:
 	void setAndroidNotificationHonorChannel(const std::string &androidNotificationHonorChannel);
 	std::string getAndroidXiaomiImageUrl() const;
 	void setAndroidXiaomiImageUrl(const std::string &androidXiaomiImageUrl);
+	int getAndroidTargetUserType() const;
+	void setAndroidTargetUserType(int androidTargetUserType);
 	std::string getSmsTemplateName() const;
 	void setSmsTemplateName(const std::string &smsTemplateName);
 	std::string getAndroidPopupBody() const;
@@ -194,6 +198,7 @@ private:
 	int androidNotificationBarPriority_;
 	std::string expireTime_;
 	std::string androidImageUrl_;
+	int androidHonorTargetUserType_;
 	std::string androidNotificationVivoChannel_;
 	std::string iOSNotificationCategory_;
 	std::string androidNotificationXiaomiChannel_;
@@ -228,6 +233,7 @@ private:
 	std::string androidHuaweiReceiptId_;
 	std::string androidNotificationHonorChannel_;
 	std::string androidXiaomiImageUrl_;
+	int androidTargetUserType_;
 	std::string smsTemplateName_;
 	std::string androidPopupBody_;
 	std::string androidBigPictureUrl_;

+ 2 - 0
push/include/alibabacloud/push/model/QueryDeviceInfoResult.h

@@ -35,11 +35,13 @@ namespace AlibabaCloud
 				struct DeviceInfo
 				{
 					std::string lastOnlineTime;
+					std::string brand;
 					std::string account;
 					std::string deviceType;
 					std::string deviceId;
 					std::string deviceToken;
 					std::string alias;
+					std::string model;
 					std::string phoneNumber;
 					bool online;
 					std::string tags;

+ 2 - 0
push/src/model/MassPushRequest.cc

@@ -62,6 +62,7 @@ void MassPushRequest::setPushTask(const std::vector<MassPushRequest::PushTask> &
     setBodyParameter(pushTaskObjStr + ".AndroidNotificationBarPriority", std::to_string(pushTaskObj.androidNotificationBarPriority));
     setBodyParameter(pushTaskObjStr + ".ExpireTime", pushTaskObj.expireTime);
     setBodyParameter(pushTaskObjStr + ".AndroidImageUrl", pushTaskObj.androidImageUrl);
+    setBodyParameter(pushTaskObjStr + ".AndroidHonorTargetUserType", std::to_string(pushTaskObj.androidHonorTargetUserType));
     setBodyParameter(pushTaskObjStr + ".AndroidNotificationVivoChannel", pushTaskObj.androidNotificationVivoChannel);
     setBodyParameter(pushTaskObjStr + ".iOSNotificationCategory", pushTaskObj.iOSNotificationCategory);
     setBodyParameter(pushTaskObjStr + ".AndroidNotificationXiaomiChannel", pushTaskObj.androidNotificationXiaomiChannel);
@@ -93,6 +94,7 @@ void MassPushRequest::setPushTask(const std::vector<MassPushRequest::PushTask> &
     setBodyParameter(pushTaskObjStr + ".AndroidHuaweiReceiptId", pushTaskObj.androidHuaweiReceiptId);
     setBodyParameter(pushTaskObjStr + ".AndroidNotificationHonorChannel", pushTaskObj.androidNotificationHonorChannel);
     setBodyParameter(pushTaskObjStr + ".AndroidXiaomiImageUrl", pushTaskObj.androidXiaomiImageUrl);
+    setBodyParameter(pushTaskObjStr + ".AndroidTargetUserType", std::to_string(pushTaskObj.androidTargetUserType));
     setBodyParameter(pushTaskObjStr + ".AndroidPopupBody", pushTaskObj.androidPopupBody);
     setBodyParameter(pushTaskObjStr + ".AndroidBigPictureUrl", pushTaskObj.androidBigPictureUrl);
     setBodyParameter(pushTaskObjStr + ".iOSSilentNotification", pushTaskObj.iOSSilentNotification ? "true" : "false");

+ 9 - 0
push/src/model/PushMessageToAndroidRequest.cc

@@ -25,6 +25,15 @@ PushMessageToAndroidRequest::PushMessageToAndroidRequest()
 
 PushMessageToAndroidRequest::~PushMessageToAndroidRequest() {}
 
+bool PushMessageToAndroidRequest::getStoreOffline() const {
+  return storeOffline_;
+}
+
+void PushMessageToAndroidRequest::setStoreOffline(bool storeOffline) {
+  storeOffline_ = storeOffline;
+  setParameter(std::string("StoreOffline"), storeOffline ? "true" : "false");
+}
+
 std::string PushMessageToAndroidRequest::getTitle() const {
   return title_;
 }

+ 9 - 0
push/src/model/PushMessageToiOSRequest.cc

@@ -25,6 +25,15 @@ PushMessageToiOSRequest::PushMessageToiOSRequest()
 
 PushMessageToiOSRequest::~PushMessageToiOSRequest() {}
 
+bool PushMessageToiOSRequest::getStoreOffline() const {
+  return storeOffline_;
+}
+
+void PushMessageToiOSRequest::setStoreOffline(bool storeOffline) {
+  storeOffline_ = storeOffline;
+  setParameter(std::string("StoreOffline"), storeOffline ? "true" : "false");
+}
+
 std::string PushMessageToiOSRequest::getTitle() const {
   return title_;
 }

+ 9 - 0
push/src/model/PushNoticeToAndroidRequest.cc

@@ -34,6 +34,15 @@ void PushNoticeToAndroidRequest::setExtParameters(const std::string &extParamete
   setParameter(std::string("ExtParameters"), extParameters);
 }
 
+bool PushNoticeToAndroidRequest::getStoreOffline() const {
+  return storeOffline_;
+}
+
+void PushNoticeToAndroidRequest::setStoreOffline(bool storeOffline) {
+  storeOffline_ = storeOffline;
+  setParameter(std::string("StoreOffline"), storeOffline ? "true" : "false");
+}
+
 std::string PushNoticeToAndroidRequest::getTitle() const {
   return title_;
 }

+ 18 - 0
push/src/model/PushRequest.cc

@@ -205,6 +205,15 @@ void PushRequest::setAndroidImageUrl(const std::string &androidImageUrl) {
   setParameter(std::string("AndroidImageUrl"), androidImageUrl);
 }
 
+int PushRequest::getAndroidHonorTargetUserType() const {
+  return androidHonorTargetUserType_;
+}
+
+void PushRequest::setAndroidHonorTargetUserType(int androidHonorTargetUserType) {
+  androidHonorTargetUserType_ = androidHonorTargetUserType;
+  setParameter(std::string("AndroidHonorTargetUserType"), std::to_string(androidHonorTargetUserType));
+}
+
 std::string PushRequest::getAndroidNotificationVivoChannel() const {
   return androidNotificationVivoChannel_;
 }
@@ -511,6 +520,15 @@ void PushRequest::setAndroidXiaomiImageUrl(const std::string &androidXiaomiImage
   setParameter(std::string("AndroidXiaomiImageUrl"), androidXiaomiImageUrl);
 }
 
+int PushRequest::getAndroidTargetUserType() const {
+  return androidTargetUserType_;
+}
+
+void PushRequest::setAndroidTargetUserType(int androidTargetUserType) {
+  androidTargetUserType_ = androidTargetUserType;
+  setParameter(std::string("AndroidTargetUserType"), std::to_string(androidTargetUserType));
+}
+
 std::string PushRequest::getSmsTemplateName() const {
   return smsTemplateName_;
 }

+ 4 - 0
push/src/model/QueryDeviceInfoResult.cc

@@ -60,6 +60,10 @@ void QueryDeviceInfoResult::parse(const std::string &payload)
 		deviceInfo_.deviceToken = deviceInfoNode["DeviceToken"].asString();
 	if(!deviceInfoNode["Alias"].isNull())
 		deviceInfo_.alias = deviceInfoNode["Alias"].asString();
+	if(!deviceInfoNode["Brand"].isNull())
+		deviceInfo_.brand = deviceInfoNode["Brand"].asString();
+	if(!deviceInfoNode["Model"].isNull())
+		deviceInfo_.model = deviceInfoNode["Model"].asString();
 
 }