From acf4c165a7abefa76e5b1136f223c5869ce3e4c1 Mon Sep 17 00:00:00 2001 From: Sashi Penta Date: Sat, 15 Nov 2014 11:58:18 -0800 Subject: [PATCH] Modify presenceclient sample Modify presenceclient application to subcribe to MC address without the need to discover a resource. Change-Id: I0aed9941dab56a22f9eb58fa8150000b4a554b42 Signed-off-by: Sashi Penta --- resource/examples/presenceclient.cpp | 54 +++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/resource/examples/presenceclient.cpp b/resource/examples/presenceclient.cpp index b279087..da17b98 100644 --- a/resource/examples/presenceclient.cpp +++ b/resource/examples/presenceclient.cpp @@ -116,26 +116,19 @@ void foundResource(std::shared_ptr resource) { curResource = resource; OCPlatform::OCPresenceHandle presenceHandle; - switch(TEST_CASE) + + if(TEST_CASE == TEST_UNICAST_PRESENCE_NORMAL) + { + OCPlatform::subscribePresence(presenceHandle, hostAddress, + &presenceHandler); + std::cout<< "Subscribed to unicast address:" << hostAddress <