Change-Id: I0a3285d906d250a932a6cb98daff0b34ba6bff79
Signed-off-by: Sandeep Sharma <sandeep.s9@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15257
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit
194d25ca4d7dccbe2201d0db563a785b4f838d9c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15313
static OCStackResult setInputPinCallback(InputPinCallback inputPin);
/**
+ * API for de-registering Pin Callback.
+ *
+ * @return ::OC_STACK_OK in case of success and other value otherwise.
+ */
+ static OCStackResult unsetInputPinCallback();
+
+ /**
* API to get status of all the devices in current subnet. The status include endpoint
* information and doxm information which can be extracted during owned and unowned
* discovery. Along with this information, API will provide information about
return result;
}
+ OCStackResult OCSecure::unsetInputPinCallback()
+ {
+ OCStackResult result;
+ auto cLock = OCPlatform_impl::Instance().csdkLock().lock();
+
+ if (cLock)
+ {
+ std::lock_guard<std::recursive_mutex> lock(*cLock);
+ UnsetInputPinCB();
+ result = OC_STACK_OK;
+ }
+ else
+ {
+ oclog() <<"Mutex not found";
+ result = OC_STACK_ERROR;
+ }
+
+ return result;
+ }
+
OCStackResult OCSecure::getDevInfoFromNetwork(unsigned short timeout,
DeviceList_t &ownedDevList,
DeviceList_t &unownedDevList)