#endif // __cplusplus\r
\r
#define OXM_STRING_MAX_LENGTH 32\r
-#define WRONG_PIN_MAX_ATTEMP 5\r
+#define WRONG_PIN_MAX_ATTEMP 1\r
\r
typedef struct OTMCallbackData OTMCallbackData_t;\r
typedef struct OTMContext OTMContext_t;\r
OCStackResult OTMDoOwnershipTransfer(void* ctx,\r
OCProvisionDev_t* selectedDeviceList, OCProvisionResultCB resultCB);\r
\r
+/**\r
+ * API to set a allow status of OxM\r
+ *\r
+ * @param[in] oxm Owership transfer method (ref. OicSecOxm_t)\r
+ * @param[in] allowStatus allow status (true = allow, false = not allow)\r
+ *\r
+ * @return OC_STACK_OK in case of success and other value otherwise.\r
+ */\r
+OCStackResult OTMSetOxmAllowStatus(const OicSecOxm_t oxm, const bool allowStatus);\r
+\r
+\r
/*\r
*Callback for load secret for temporal secure session\r
*\r
*/\r
typedef OCStackResult (*OTMLoadSecret)(OTMContext_t* otmCtx);\r
\r
-\r
/*\r
* Callback for create secure channel using secret inputed from OTMLoadSecret callback\r
*/\r
OCProvisionResult_t* ctxResultArray; /**< Result array having result of all device. */\r
size_t ctxResultArraySize; /**< No of elements in result array. */\r
bool ctxHasError; /**< Does OT process have any error. */\r
+ OCDoHandle ocDoHandle; /** <A handle for latest request message*/\r
OTMCallbackData_t otmCallback; /**< OTM callbacks to perform the OT/MOT. **/\r
int attemptCnt;\r
};\r
*/\r
OCStackResult OTMSetOTCallback(OicSecOxm_t oxm, OTMCallbackData_t* callbacks);\r
\r
+/**\r
+ * Function to save the result of provisioning.\r
+ *\r
+ * @param[in,out] otmCtx Context value of ownership transfer.\r
+ * @param[in] res result of provisioning\r
+ */\r
+void SetResult(OTMContext_t* otmCtx, const OCStackResult res);\r
+\r
+/**\r
+ * Function to select appropriate security provisioning method.\r
+ *\r
+ * @param[in] supportedMethods Array of supported methods\r
+ * @param[in] numberOfMethods number of supported methods\r
+ * @param[out] selectedMethod Selected methods\r
+ * @param[in] ownerType type of owner device (SUPER_OWNER or SUB_OWNER)\r
+ * @return OC_STACK_OK on success\r
+ */\r
+OCStackResult OTMSelectOwnershipTransferMethod(const OicSecOxm_t *supportedMethods,\r
+ size_t numberOfMethods, OicSecOxm_t *selectedMethod, OwnerType_t ownerType);\r
+\r
+/**\r
+ * This function configures SVR DB as self-ownership.\r
+ *\r
+ *@return OC_STACK_OK in case of successful configue and other value otherwise.\r
+ */\r
+OCStackResult ConfigSelfOwnership(void);\r
+\r
+/**\r
+ * API to terminate the OTM process when terminating OCStack\r
+ */\r
+void OTMTerminate();\r
+\r
#ifdef __cplusplus\r
}\r
#endif\r