extern "C" {
#endif
+typedef enum PdmDeviceState {
+ PDM_DEVICE_ACTIVE = 0,
+ PDM_DEVICE_STALE = 1,
+ PDM_DEVICE_INIT = 2,
+ PDM_DEVICE_UNKNOWN = 99
+}PdmDeviceState_t;
/**
* This method is used by provisioning manager to open provisioning database.
OCStackResult PDMInit(const char* dbPath);
/**
+ * This method is used by provisioning manager to check device status.
+ *
+ * @param[in] uuid information about the target device's uuid.
+ * @param[out] result device status.
+ *
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult PDMGetDeviceState(const OicUuid_t* uuid, PdmDeviceState_t* result);
+
+/**
+ * This method is used by provisioning manager to update device status.
+ *
+ * @param[in] uuid id of device.
+ * @param[in] state device state. (ref. PdmDeviceState_t)
+ *
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult PDMSetDeviceState(const OicUuid_t* uuid, PdmDeviceState_t state);
+
+/**
* This method is used by provisioning manager to check duplication of device's Device ID with
* provisioning database.
*
OCStackResult PDMDeleteDevice(const OicUuid_t *uuidOfDevice);
/**
+ * This method is used by OTM & PDM to remove device information with device state.
+ *
+ * @param[in] state device state to be removed.
+ *
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult PDMDeleteDeviceWithState(const PdmDeviceState_t state);
+
+/**
* This method is used by provisioning manager to get owned devices' Device IDs.
*
* @param[out] uuidList information about the list of owned devices' uuids.
* @return OC_STACK_OK in case of success and other value otherwise.
*/
OCStackResult PDMIsLinkExists(const OicUuid_t* uuidOfDevice1, const OicUuid_t* uuidOfDevice2,
- bool *result );
+ bool *result);
+
#ifdef __cplusplus
}