Change APIs for Subscribe device presence.
[platform/upstream/iotivity.git] / resource / src / InProcClientWrapper.cpp
index 76cce93..b41b7ac 100644 (file)
@@ -1024,10 +1024,7 @@ namespace OC
         std::thread exec(context->callback, serverHeaderOptions, attrs,
                     result, sequenceNumber);
         exec.detach();
-        if (sequenceNumber == OC_OBSERVE_DEREGISTER)
-        {
-            return OC_STACK_DELETE_TRANSACTION;
-        }
+
         return OC_STACK_KEEP_TRANSACTION;
     }
 
@@ -1200,7 +1197,7 @@ namespace OC
 #ifdef WITH_CLOUD
     OCStackResult InProcClientWrapper::SubscribeDevicePresence(OCDoHandle* handle,
                                                                const std::string& host,
-                                                               const QueryParamsList& queryParams,
+                                                               const std::vector<std::string>& di,
                                                                OCConnectivityType connectivityType,
                                                                ObserveCallback& callback)
     {
@@ -1225,6 +1222,7 @@ namespace OC
 
             std::ostringstream os;
             os << host << OCF_RSRVD_DEVICE_PRESENCE_URI;
+            QueryParamsList queryParams({{OC_RSRVD_DEVICE_ID, di}});
             std::string url = assembleSetResourceUri(os.str(), queryParams);
 
             result = OCDoResource(handle, OC_REST_OBSERVE,