Add API - OCGetDeviceOperationalState() to get isop value of pstat.
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/353
(cherry picked from commit
2c2d19d2012093aee3fe1fb7e83e24f19871dbe7)
Change-Id: Icc64e0d8767dbb98620860955c84004418505531
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
*/
OCStackResult OCSetOtmEventHandler(void *ctx, OCOtmEventHandler cb);
+ /**
+ * Gets the bool state of "isOp" property on the pstat resource
+ * @param isOp a pointer to be assigned to isop property
+ * @return Returns ::OC_STACK_OK.
+ */
+
+OCStackResult OCGetDeviceOperationalState(bool* isOp);
+
#ifdef __cplusplus
}
#endif // __cplusplus
return ret;
}
+OCStackResult OCGetDeviceOperationalState(bool* isOp)
+{
+ if(NULL != isOp)
+ {
+ *isOp = GetPstatIsop();
+ return OC_STACK_OK;
+ }
+
+ return OC_STACK_ERROR;
+}
+
void OCClearCallBackList()
{
DeleteClientCBList();