* @return ::OC_STACK_OK for Success, otherwise some error value.
*/
OCStackResult PstatToCBORPayload(const OicSecPstat_t *pstat, uint8_t **cborPayload,
- size_t *cborSize);
+ size_t *cborSize, bool writableOnly);
/**
* This method converts cbor into PSTAT data.
OCStackResult CBORPayloadToPstat(const uint8_t *cborPayload, const size_t cborSize,
OicSecPstat_t **pstat);
+#ifdef MULTIPLE_OWNER
+/**
+ * Function to check the pstat access of SubOwner
+ *
+ * @param[in] cborPayload CBOR payload of pstat
+ * @param[in] size Byte length of cborPayload
+ *
+ * @return ::true for valid access, otherwise invalid access
+ */
+bool IsValidPstatAccessForSubOwner(const uint8_t *cborPayload, size_t size);
+#endif
+
+
/** This function deallocates the memory for OicSecPstat_t.
*
* @param pstat is the pointer to @ref OicSecPstat_t.
*/
OCStackResult SetPstatRownerId(const OicUuid_t* newROwner);
+/**
+ * Gets the OicUuid_t value for the rownerid of the pstat resource.
+ *
+ * @param rowneruuid a pointer to be assigned to the rowneruuid property
+ * @return ::OC_STACK_OK if rowneruuid is assigned correctly, else ::OC_STACK_ERROR.
+ */
+OCStackResult GetPstatRownerId(OicUuid_t *rowneruuid);
+
+/**
+ * This function returns the "isop" status of the device.
+ *
+ * @return true iff pstat.isop == 1, else false
+ */
+bool GetPstatIsop();
+
+/**
+ * Internal function to change pastat resource to Ready for Normal Operation.
+ *
+ * @param newROwner new owner
+ *
+ * @retval ::OC_STACK_OK for Success, otherwise some error value
+ */
+OCStackResult SetPstatSelfOwnership(const OicUuid_t* newROwner);
+
#ifdef __cplusplus
}
#endif