Add setting the icon image.
authorjaesick.shin <jaesick.shin@samsung.com>
Thu, 8 Sep 2016 07:36:02 +0000 (16:36 +0900)
committerUze Choi <uzchoi@samsung.com>
Thu, 8 Sep 2016 08:44:08 +0000 (08:44 +0000)
Add setting the icon image in NSSetMessagePayload.
Add NS_ATTRIBUTE_ICON_IMAGE in NSConstants.h

Change-Id: Ia1327da32c80737283ea54f8b2e9f2d4f376efb5
Signed-off-by: jaesick.shin <jaesick.shin@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11559
Reviewed-by: Chihyun Cho <ch79.cho@samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/common/NSConstants.h
service/notification/src/provider/NSProviderNotification.c

index 3c6d9497ad6f83ae78d89b277e6ff2023d44ae9d..93974441f40622a297c6055348f7a183ce8ca2a0 100644 (file)
 #define NS_ATTRIBUTE_TYPE "TYPE"
 #define NS_ATTRIBUTE_DATETIME "DATE_TIME"
 #define NS_ATTRIBUTE_TTL "TTL"
+#define NS_ATTRIBUTE_ICON_IMAGE "ICON_IMAGE"
 
 typedef enum eConnectionState
 {
index e08365f55b6b41f9e6690ab03ecad94dad033355..c8a8f501b0ef38368b07d4be049bb8d519f42d3a 100644 (file)
@@ -43,6 +43,11 @@ NSResult NSSetMessagePayload(NSMessage *msg, OCRepPayload** msgPayload)
     NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_TEXT, msg->contentText);
     NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_SOURCE, msg->sourceName);
     NSDuplicateSetPropertyString(msgPayload, NS_ATTRIBUTE_TOPIC_NAME, msg->topic);
+    if(msg->mediaContents)
+    {
+        NSDuplicateSetPropertyString(msgPayload,
+                NS_ATTRIBUTE_ICON_IMAGE, msg->mediaContents->iconImage);
+    }
 
     NS_LOG(DEBUG, "NSSetMessagePayload - OUT");
     return NS_OK;