typedef void (*InputPinCallback)(char* pinBuf, size_t bufSize);
/**
+ * Function pointer to close the displied PIN.
+ */
+typedef void (*ClosePinDisplayCallback)(void);
+
+/**
* Function to setting generate PIN callback from user.
*
* @param pinCB implementation of generate PIN callback.
void SetInputPinCB(InputPinCallback pinCB);
/**
+ * Function to set the close PIN callback
+ * This callback will be invoked when PIN based OTM is finished.
+ *
+ * @param closeCB implementation of close PIN callback.
+ */
+void SetClosePinDisplayCB(ClosePinDisplayCallback closeCB);
+
+/**
* Function to unset the input PIN callback.
* NOTE : Do not call this function while PIN based ownership transfer.
*/
void UnsetGeneratePinCB();
/**
+ * Function to unset the PIN close callback.
+ * NOTE : Do not call this function while PIN based ownership transfer is in progress.
+ */
+void UnsetClosePinCB();
+
+/**
* Function to generate random PIN.
* This function will send generated PIN to user via callback.
*
*/
OCStackResult InputPin(char* pinBuffer, size_t bufferSize);
-#ifdef _ENABLE_MULTIPLE_OWNER_
+/**
+ * Function to invoke the callback for close a PIN dispaly.
+ * NOTE : This function will be invoked from SRM while OTM
+ */
+void ClosePinDisplay();
+
+#ifdef MULTIPLE_OWNER
/**
* Function to save the Pre-configured PIN.
*
const unsigned char *UNUSED1, size_t UNUSED2,
unsigned char *result, size_t result_length);
-#ifdef _ENABLE_MULTIPLE_OWNER_
+#ifdef MULTIPLE_OWNER
/**
* This internal callback is used while Random PIN based MOT.
* This callback will be used to establish a temporary secure session according to
const unsigned char *UNUSED1, size_t UNUSED2,
unsigned char *result, size_t result_length);
-#endif //_ENABLE_MULTIPLE_OWNER_
-
+#endif //MULTIPLE_OWNER
/**
* API to derive the PSK based on PIN and new device's UUID.