#define NS_DISCOVER_QUERY "/oic/res?rt=x.org.iotivity.notification"
#define NS_PRESENCE_SUBSCRIBE_QUERY_TCP "/oic/ad?rt=x.org.iotivity.notification"
-#ifdef WITH_PRESENCE
OCStackApplicationResult NSConsumerPresenceListener(
void * ctx, OCDoHandle handle, OCClientResponse * clientResponse)
{
return OC_STACK_KEEP_TRANSACTION;
}
-#endif
OCStackApplicationResult NSProviderDiscoverListener(
void * ctx, OCDoHandle handle, OCClientResponse * clientResponse)
else if (address->adapter == OC_ADAPTER_TCP)
{
type = CT_ADAPTER_TCP;
- NS_LOG(DEBUG, "Request discover [TCP]");
-#ifdef WITH_PRESENCE
+ NS_LOG(DEBUG, "Request discover and subscribe presence [TCP]");
NS_LOG(DEBUG, "Subscribe presence [TCP]");
NSInvokeRequest(NULL, OC_REST_PRESENCE, address, NS_PRESENCE_SUBSCRIBE_QUERY_TCP,
NULL, NSConsumerPresenceListener, NULL, NULL, type);
-#endif
+
if (rType == NS_DISCOVER_CLOUD)
{
callbackData = (void *) NS_DISCOVER_CLOUD;