From 503ac0bf719ac8684f5175bda2d9716dec4c5bd1 Mon Sep 17 00:00:00 2001 From: Parkhi Date: Tue, 11 Oct 2016 16:34:01 +0900 Subject: [PATCH] Remove unused old API. - delete registerSecurityCallbackHandler api. Change-Id: I0d4c31af7ac9d5d25c260cf07f5ebf38381609ea Signed-off-by: Parkhi Reviewed-on: https://gerrit.iotivity.org/gerrit/13081 Tested-by: jenkins-iotivity Reviewed-by: Jihun Ha Reviewed-by: Uze Choi (cherry picked from commit 071b2cf0e75cae68b8441552dbbc660d158489d9) Reviewed-on: https://gerrit.iotivity.org/gerrit/13197 --- .../easy-setup/mediator/richsdk/inc/RemoteEnrollee.h | 17 ----------------- .../mediator/richsdk/src/EnrolleeSecurity.cpp | 10 ---------- .../mediator/richsdk/src/EnrolleeSecurity.h | 4 ---- .../mediator/richsdk/src/RemoteEnrollee.cpp | 19 ------------------- 4 files changed, 50 deletions(-) diff --git a/service/easy-setup/mediator/richsdk/inc/RemoteEnrollee.h b/service/easy-setup/mediator/richsdk/inc/RemoteEnrollee.h index e1ce4f3..a58dacb 100755 --- a/service/easy-setup/mediator/richsdk/inc/RemoteEnrollee.h +++ b/service/easy-setup/mediator/richsdk/inc/RemoteEnrollee.h @@ -52,23 +52,6 @@ namespace OIC public: ~RemoteEnrollee() = default; -#ifdef __WITH_DTLS__ - /** - * Register Security status and other information callback handlers. - * - * @param secProvisioningDbCb Callback to be invoked when the stack expects a - * path for the provisioning db. - * @param securityPinCb Callback to get security pin during pin based ownership transfer. - * - * @throws InvalidParameterException If callback is an empty function or null. - * @throws ESBadRequestException If registration is already completed. - * - * @see SecProvisioningResult - */ - ESResult registerSecurityCallbackHandler(const SecurityPinCb securityPinCb, - const SecProvisioningDbPathCb secProvisioningDbPathCb); -#endif //__WITH_DTLS__ - /** * Get an Enrollee's status which includes provisioning status and last error code * diff --git a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp index a7a30d0..8912859 100755 --- a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp +++ b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp @@ -58,16 +58,6 @@ namespace OIC m_ocResource = resource; } - void EnrolleeSecurity::registerCallbackHandler( - const SecurityProvStatusCb securityProvStatusCb, - const SecurityPinCb securityPinCb, - const SecProvisioningDbPathCb secProvisioningDbPathCb) - { - m_securityProvStatusCb = securityProvStatusCb; - m_securityPinCb = securityPinCb; - m_secProvisioningDbPathCb = secProvisioningDbPathCb; - } - void EnrolleeSecurity::convertUUIDToString(const uint8_t uuid[UUID_SIZE], std::string& uuidString) { diff --git a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.h b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.h index 4a4e4c1..5ea2f87 100755 --- a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.h +++ b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.h @@ -52,10 +52,6 @@ namespace OIC public: EnrolleeSecurity(std::shared_ptr< OC::OCResource > resource, const std::string secDbPath); - void registerCallbackHandler( - const SecurityProvStatusCb securityProvStatusCb, - const SecurityPinCb securityPinCb, - const SecProvisioningDbPathCb secProvisioningDbPathCb); ESResult provisionOwnership(); std::string getUUID() const; diff --git a/service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp b/service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp index e23f2c2..6fec143 100755 --- a/service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp +++ b/service/easy-setup/mediator/richsdk/src/RemoteEnrollee.cpp @@ -53,22 +53,6 @@ namespace OIC m_deviceId = resource->sid(); } -#ifdef __WITH_DTLS__ - ESResult RemoteEnrollee::registerSecurityCallbackHandler( - const SecurityPinCb securityPinCb, - const SecProvisioningDbPathCb secProvisioningDbPathCb) - { - // No need to check NULL for m_secProvisioningDbPathCB as this is not a mandatory - // callback function. If m_secProvisioningDbPathCB is NULL, provisioning manager - // in security layer will try to find the PDM.db file in the local path. - // If PDM.db is found, the provisioning manager operations will succeed. - // Otherwise all the provisioning manager operations will fail. - m_secProvisioningDbPathCb = secProvisioningDbPathCb; - m_securityPinCb = securityPinCb; - return ES_OK; - } -#endif //__WITH_DTLS__ - void RemoteEnrollee::securityStatusHandler( const std::shared_ptr< SecProvisioningStatus > status) const { @@ -238,9 +222,6 @@ namespace OIC //TODO : DBPath is passed empty as of now. Need to take dbpath from application. m_enrolleeSecurity = std::make_shared (m_ocResource, ""); - m_enrolleeSecurity->registerCallbackHandler(securityProvStatusCb, m_securityPinCb, - m_secProvisioningDbPathCb); - res = m_enrolleeSecurity->provisionOwnership(); std::shared_ptr< SecProvisioningStatus > securityProvisioningStatus = -- 2.7.4