Added api in PDM to set device as stale
authorRandeep Singh <randeep.s@samsung.com>
Fri, 2 Oct 2015 11:24:30 +0000 (20:24 +0900)
committerSachin Agrawal <sachin.agrawal@intel.com>
Fri, 11 Dec 2015 04:57:15 +0000 (04:57 +0000)
commit488a5167cf9f58b1b7b22d3019b2769cf37fc779
tree744696865df7d7f09c87860914fc72b73e935c26
parentb6856b2160bc892fa0445105dc8793c00518d8ee
Added api in PDM to set device as stale

Remove Device API deletes the device from the PDM. but if value is deleted from
DB then we loose that device's reference which is required by other functions of
same API.

To overcome this issue we have added device stale API which instead of removing
device row, sets stale status of device as true.

Due to this chnage APIs like PDMLinkDevices and PDMGetOwnedDevices are also changed.
these apis now ignore data corresponding to stale entries.

Change-Id: I9ee2180296163e289724c7c71f70c4271b9f1c4f
Signed-off-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3415
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Reviewed-by: Sachin Agrawal <sachin.agrawal@intel.com>
resource/csdk/security/provisioning/include/internal/provisioningdatabasemanager.h
resource/csdk/security/provisioning/src/provisioningdatabasemanager.c
resource/csdk/security/provisioning/unittest/provisioningdatabasemanager.cpp
resource/csdk/security/provisioning/unittest/secureresourceprovider.cpp