+#ifdef MULTIPLE_OWNER
+/**
+ * The function is responsible for discovery of MOT enabled device is current subnet.
+ *
+ * @param[in] timeout Timeout in seconds, value till which function will listen to responses from
+ * server before returning the list of devices.
+ * @param[out] ppList List of MOT enabled devices.
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult OCDiscoverMultipleOwnerEnabledDevices(unsigned short timeout, OCProvisionDev_t **ppList)
+{
+ if( ppList == NULL || *ppList != NULL || 0 == timeout)
+ {
+ return OC_STACK_INVALID_PARAM;
+ }
+
+ return PMMultipleOwnerDeviceDiscovery(timeout, false, ppList);
+}
+
+/**
+ * The function is responsible for discovery of Multiple Owned device is current subnet.
+ *
+ * @param[in] timeout Timeout in seconds, value till which function will listen to responses from
+ * server before returning the list of devices.
+ * @param[out] ppList List of Multiple Owned devices.
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult OCDiscoverMultipleOwnedDevices(unsigned short timeout, OCProvisionDev_t **ppList)
+{
+ if( ppList == NULL || *ppList != NULL || 0 == timeout)
+ {
+ return OC_STACK_INVALID_PARAM;
+ }
+
+ return PMMultipleOwnerDeviceDiscovery(timeout, true, ppList);
+}
+
+
+/**
+ * API to add preconfigured PIN to local SVR DB.
+ *
+ * @param[in] targetDeviceInfo Selected target device.
+ * @param[in] preconfigPin Preconfig PIN which is used while multiple owner authentication
+ * @param[in] preconfigPinLen Byte length of preconfigPin
+ *
+ * @return OC_STACK_OK in case of success and other value otherwise.
+ */
+OCStackResult OCAddPreconfigPin(const OCProvisionDev_t *targetDeviceInfo,
+ const char *preconfigPin,
+ size_t preconfigPinLen)
+{
+ return MOTAddPreconfigPIN(targetDeviceInfo, preconfigPin, preconfigPinLen);
+}
+
+
+OCStackResult OCDoMultipleOwnershipTransfer(void* ctx,
+ OCProvisionDev_t *targetDevices,
+ OCProvisionResultCB resultCallback)
+{
+ if( NULL == targetDevices )
+ {
+ return OC_STACK_INVALID_PARAM;
+ }
+ if (NULL == resultCallback)
+ {
+ OIC_LOG(INFO, TAG, "OCDoOwnershipTransfer : NULL Callback");
+ return OC_STACK_INVALID_CALLBACK;
+ }
+ return MOTDoOwnershipTransfer(ctx, targetDevices, resultCallback);
+}
+
+OCStackResult OCRemoveSubOwner(void* ctx,
+ const OCProvisionDev_t *targetDeviceInfo,
+ const OicUuid_t* subOwner,
+ OCProvisionResultCB resultCallback)
+{
+ if (NULL == targetDeviceInfo || NULL == subOwner)
+ {
+ OIC_LOG_V(ERROR, TAG, "%s : NULL Param", __func__);
+ return OC_STACK_INVALID_PARAM;
+ }
+ if (NULL == resultCallback)
+ {
+ OIC_LOG_V(ERROR, TAG, "%s : NULL Callback", __func__);
+ return OC_STACK_INVALID_CALLBACK;
+ }
+
+ return MOTRemoveSubOwner(ctx, targetDeviceInfo, subOwner, resultCallback);
+}
+
+OCStackResult OCRemoveAllSubOwner(void* ctx,
+ const OCProvisionDev_t *targetDeviceInfo,
+ OCProvisionResultCB resultCallback)
+{
+ if (NULL == targetDeviceInfo)
+ {
+ OIC_LOG_V(ERROR, TAG, "%s : NULL Param", __func__);
+ return OC_STACK_INVALID_PARAM;
+ }
+ if (NULL == resultCallback)
+ {
+ OIC_LOG_V(ERROR, TAG, "%s : NULL Callback", __func__);
+ return OC_STACK_INVALID_CALLBACK;
+ }
+
+ return MOTRemoveSubOwner(ctx, targetDeviceInfo, &WILDCARD_SUBJECT_ID, resultCallback);
+}
+
+
+#endif //MULTIPLE_OWNER
+