From bc642742ca1498f30e6e0b4595d8ee998ef38730 Mon Sep 17 00:00:00 2001 From: "jaesick.shin" Date: Fri, 19 Aug 2016 11:15:48 +0900 Subject: [PATCH] Update Provider Example. Add User input logic for topic. Change-Id: I0308f4bf28c222ebb164bf824668579075e058e5 Signed-off-by: jaesick.shin Reviewed-on: https://gerrit.iotivity.org/gerrit/10633 Reviewed-by: Chihyun Cho Reviewed-by: Uze Choi Tested-by: Uze Choi --- .../notification/examples/linux/notificationprovider.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/service/notification/examples/linux/notificationprovider.c b/service/notification/examples/linux/notificationprovider.c index d2f348c50..fc1da9620 100644 --- a/service/notification/examples/linux/notificationprovider.c +++ b/service/notification/examples/linux/notificationprovider.c @@ -237,6 +237,7 @@ int main() printf("NSSendNotification()"); char title[100]; char body[100]; + char topic[100]; printf("id : %d\n", ++id); printf("title : "); @@ -246,8 +247,12 @@ int main() printf("body : "); gets(body); + printf("topic : "); + gets(topic); + printf("app - mTitle : %s \n", title); printf("app - mContentText : %s \n", body); + printf("app - topic : %s \n", topic); NSMessage * msg = NSCreateMessage(); @@ -255,6 +260,11 @@ int main() msg->contentText = OICStrdup(body); msg->sourceName = OICStrdup("OCF"); + if(topic[0] != '\0') + { + msg->topic = OICStrdup(topic); + } + NSSendMessage(msg); } break; -- 2.34.1