Change-Id: Ia9996e794f9cc0eb4b62a4b00b8f6fa79e773fc1
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15247
Reviewed-by: dongik Lee <dongik.lee@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit
9a3b00071047071d218fee88a9d4824bdfd185c7)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15255
OCEndpointPayloadGetEndpointCount
OCFreeOCStringLL
OCGetDeviceId
+OCGetDeviceOwnedState
OCGetDirectPairedDevices
OCGetHeaderOption
OCGetNumberOfResources
*/
OCStackResult OCSetDeviceId(const OCUUIdentity *deviceId);
+ /**
+ * Gets the bool state of "isOwned" property on the doxm resource.
+ *
+ * @param isOwned a pointer to be assigned to isOwned property
+ * @return Returns ::OC_STACK_OK if success.
+ */
+OCStackResult OCGetDeviceOwnedState(bool *isOwned);
+
/**
* Encode an address string to match RFC 6874.
*
ret = SetDoxmDeviceID(&oicUuid);
return ret;
}
+
+OCStackResult OCGetDeviceOwnedState(bool *isOwned)
+{
+ bool isDeviceOwned = true;
+ OCStackResult ret = OC_STACK_ERROR;
+
+ ret = GetDoxmIsOwned(&isDeviceOwned);
+ if (OC_STACK_OK == ret)
+ {
+ *isOwned = isDeviceOwned;
+ }
+ else
+ {
+ OIC_LOG(ERROR, TAG, "Device Owned State Get error");
+ }
+ return ret;
+}
+