1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef ES_COMMON_RICH_H_
22 #define ES_COMMON_RICH_H_
31 #include "OCPlatform.h"
35 #include "securevirtualresourcetypes.h"
36 #include "OCProvisioningManager.hpp"
51 * @brief Properties of easysetup resource. It includes a provisioning status and last
61 EnrolleeStatus(const OCRepresentation& rep)
66 EnrolleeStatus(const EnrolleeStatus& enrolleeStatus) :
67 m_rep(enrolleeStatus.getRepresentation())
71 EnrolleeStatus(const EnrolleeStatus&& enrolleeStatus) :
72 m_rep(std::move(enrolleeStatus.getRepresentation()))
77 * Get a provisioning status property of Enrollee.
79 * @return a provisioning status property of Enrollee
81 ProvStatus getProvStatus() const
83 if(m_rep.hasAttribute(OC_RSRVD_ES_PROVSTATUS))
85 return static_cast<ProvStatus>(
86 m_rep.getValue<int>(OC_RSRVD_ES_PROVSTATUS));
92 * Get a last error code property of Enrollee.
94 * @return a last error code property of Enrollee.
96 ESErrorCode getLastErrCode() const
98 if(m_rep.hasAttribute(OC_RSRVD_ES_LAST_ERRORCODE))
100 return static_cast<ESErrorCode>(
101 m_rep.getValue<int>(OC_RSRVD_ES_LAST_ERRORCODE));
103 return ES_ERRCODE_NO_ERROR;
107 * Get OCRepresentation object
109 * @return OCRepresentation object
111 const OCRepresentation& getRepresentation() const
116 OCRepresentation m_rep;
120 * @brief Data class stored for provisioning of coap cloud server properties
135 CloudProp(const CloudProp& cloudProp) :
136 m_rep(cloudProp.toOCRepresentation()),
137 m_cloudID(cloudProp.getCloudID()),
138 m_credID(cloudProp.getCredID())
142 CloudProp(const CloudProp&& cloudProp) :
143 m_rep(std::move(cloudProp.toOCRepresentation())),
144 m_cloudID(cloudProp.getCloudID()),
145 m_credID(cloudProp.getCredID())
150 * Constructor with OCRepresentation object. This is used for JNI communication.
151 * @param rep OCRepresentation object
153 CloudProp(const OCRepresentation &rep)
161 * Set CoapCloudConf resource properties to be delivered to Enrollee
163 * @param authCode Auth code issued by OAuth2.0-compatible account server
164 * @param authProvider Auth provider ID
165 * @param ciServer Cloud interface server URL which an Enrollee is going to registered
167 void setCloudProp(string authCode, string authProvider, string ciServer)
169 m_rep.setValue(OC_RSRVD_ES_AUTHCODE, authCode);
170 m_rep.setValue(OC_RSRVD_ES_AUTHPROVIDER, authProvider);
171 m_rep.setValue(OC_RSRVD_ES_CISERVER, ciServer);
175 * Set CoapCloudConf resource properties with Access token to be delivered to Enrollee
177 * @param accessToken Access token which is given in a return of auth code issued by
178 * OAuth2.0-compatible account server
179 * @param tokenType Access token type, i.e. "bearer"
180 * @param authProvider Auth provider ID
181 * @param ciServer Cloud interface server URL which an Enrollee is going to registered
183 * @see OAUTH_TOKENTYPE
185 void setCloudPropWithAccessToken(string accessToken, OAUTH_TOKENTYPE tokenType,
186 string authProvider, string ciServer)
188 m_rep.setValue(OC_RSRVD_ES_ACCESSTOKEN, accessToken);
189 m_rep.setValue(OC_RSRVD_ES_ACCESSTOKEN_TYPE, tokenType);
190 m_rep.setValue(OC_RSRVD_ES_AUTHPROVIDER, authProvider);
191 m_rep.setValue(OC_RSRVD_ES_CISERVER, ciServer);
195 * Set CloudServer's UUID
197 * @param cloudID Cloud Interface server's UUID
199 void setCloudID(string cloudID)
205 * Set CloudServer's credential ID of certificate
207 * @param credID Cloud Interface server's credential ID of certificate
209 void setCredID(int credID)
215 * Get an auth code to be delivered.
217 * @return an auth code to be delivered.
219 std::string getAuthCode() const
221 if(m_rep.hasAttribute(OC_RSRVD_ES_AUTHCODE))
223 return m_rep.getValue<std::string>(OC_RSRVD_ES_AUTHCODE);
225 return std::string("");
229 * Get an auth provider which issued an auth code
231 * @return an auth provider which issued an auth code
233 std::string getAuthProvider() const
235 if(m_rep.hasAttribute(OC_RSRVD_ES_AUTHPROVIDER))
237 return m_rep.getValue<std::string>(OC_RSRVD_ES_AUTHPROVIDER);
239 return std::string("");
243 * Get a CI server to be delivered
245 * @return a CI server to be delivered
247 std::string getCiServer() const
249 if(m_rep.hasAttribute(OC_RSRVD_ES_CISERVER))
251 return m_rep.getValue<std::string>(OC_RSRVD_ES_CISERVER);
253 return std::string("");
257 * Get a CI server's Uuid to be delivered
259 * @return a CI server's Uuid to be delivered
261 std::string getCloudID() const
267 * Get a CI server's credential ID of certificate
269 * @return a CI server's credential ID of certificated
271 int getCredID() const
277 * Get an access token to be delivered.
279 * @return an access token to be delivered.
281 std::string getAccessToken() const
283 if(m_rep.hasAttribute(OC_RSRVD_ES_ACCESSTOKEN))
285 return m_rep.getValue<std::string>(OC_RSRVD_ES_ACCESSTOKEN);
287 return std::string("");
291 * Get an access token type to be delivered.
293 * @return an access token type to be delivered.
295 OAUTH_TOKENTYPE getAccessTokenType() const
298 if(m_rep.hasAttribute(OC_RSRVD_ES_ACCESSTOKEN_TYPE))
300 return static_cast<OAUTH_TOKENTYPE>(
301 m_rep.getValue<int>(OC_RSRVD_ES_ACCESSTOKEN_TYPE));
303 return NONE_OAUTH_TOKENTYPE;
307 * Get OCRepresentation object
309 * @return OCRepresentation object
311 const OCRepresentation &toOCRepresentation() const
316 OCRepresentation m_rep;
317 std::string m_cloudID;
322 * @brief Data class stored for provisioning of Device properties which includes
323 * properties of WiFiConf resource and DevConf resource
336 DeviceProp(const DeviceProp& deviceProp) :
337 m_rep(deviceProp.toOCRepresentation())
341 DeviceProp(const DeviceProp&& deviceProp) :
342 m_rep(std::move(deviceProp.toOCRepresentation()))
347 * Constructor with OCRepresentation object. This is used for JNI communication.
348 * @param rep OCRepresentation object
350 DeviceProp(const OCRepresentation &rep)
356 * Set WiFiConf resource properties to be delivered to Enrollee
358 * @param ssid Ssid of the Enroller
359 * @param pwd Pwd of the Enrolle
360 * @param authtype Auth type of the Enroller
361 * @param enctype Encryption type of the Enroller
366 void setWiFiProp(string ssid, string pwd, WIFI_AUTHTYPE authtype, WIFI_ENCTYPE enctype)
368 m_rep.setValue(OC_RSRVD_ES_SSID, ssid);
369 m_rep.setValue(OC_RSRVD_ES_CRED, pwd);
370 m_rep.setValue(OC_RSRVD_ES_AUTHTYPE, authtype);
371 m_rep.setValue(OC_RSRVD_ES_ENCTYPE, enctype);
375 * Set DevConf resource properties to be delivered to Enrollee
377 * @param language IETF language tag using ISO 639X
378 * @param country ISO Country Code (ISO 3166-1 Alpha-2)
379 * @param location location information
381 void setDevConfProp(string language, string country, string location)
383 m_rep.setValue(OC_RSRVD_ES_LANGUAGE, language);
384 m_rep.setValue(OC_RSRVD_ES_COUNTRY, country);
385 m_rep.setValue(OC_RSRVD_ES_LOCATION, location);
389 * Get a SSID of Enroller
391 * @return a SSID of enroller
393 std::string getSsid() const
395 if(m_rep.hasAttribute(OC_RSRVD_ES_SSID))
397 return m_rep.getValue<std::string>(OC_RSRVD_ES_SSID);
399 return std::string("");
403 * Get a password of Enroller
405 * @return a password of enroller
407 std::string getPassword() const
409 if(m_rep.hasAttribute(OC_RSRVD_ES_CRED))
411 return m_rep.getValue<std::string>(OC_RSRVD_ES_CRED);
413 return std::string("");
417 * Get an auth type of Enroller
419 * @return an auth type of enroller
423 WIFI_AUTHTYPE getAuthType() const
425 if(m_rep.hasAttribute(OC_RSRVD_ES_AUTHTYPE))
427 return static_cast<WIFI_AUTHTYPE>(m_rep.getValue<int>(OC_RSRVD_ES_AUTHTYPE));
433 * Get an encryption type of Enroller
435 * @return an encryption type of enroller
439 WIFI_ENCTYPE getEncType() const
441 if(m_rep.hasAttribute(OC_RSRVD_ES_ENCTYPE))
443 return static_cast<WIFI_ENCTYPE>(m_rep.getValue<int>(OC_RSRVD_ES_ENCTYPE));
449 * Get a language to be set. A language is expressed in IETF language tag
452 * @return a language to be set
454 std::string getLanguage() const
456 if(m_rep.hasAttribute(OC_RSRVD_ES_LANGUAGE))
458 return m_rep.getValue<std::string>(OC_RSRVD_ES_LANGUAGE);
460 return std::string("");
464 * Get a country to be set. A country is expressed in ISO Country Code
465 * (ISO 3166-1 Alpha-2)
467 * @return a country to be set
469 std::string getCountry() const
471 if(m_rep.hasAttribute(OC_RSRVD_ES_COUNTRY))
473 return m_rep.getValue<std::string>(OC_RSRVD_ES_COUNTRY);
475 return std::string("");
479 * Get a location to be set. A location is GPS information
481 * @return a country to be set
483 std::string getLocation() const
485 if(m_rep.hasAttribute(OC_RSRVD_ES_LOCATION))
487 return m_rep.getValue<std::string>(OC_RSRVD_ES_LOCATION);
489 return std::string("");
493 * Get OCRepresentation object
495 * @return OCRepresentation object
497 const OCRepresentation &toOCRepresentation() const
503 OCRepresentation m_rep;
507 * Security Provisioning Status
509 class SecProvisioningStatus
512 SecProvisioningStatus(string deviceUUID, ESResult result) :
513 m_devUUID(deviceUUID), m_result(result)
516 m_selectedOTMethod = OIC_JUST_WORKS;
517 m_isMOTEnabled = false;
523 SecProvisioningStatus(std::shared_ptr<OCSecureResource> resource, ESResult result) :
526 m_isMOTEnabled = false;
527 if(resource.get() != nullptr)
529 m_devUUID = resource->getDeviceID();
530 m_isOwned = resource->getOwnedStatus();
531 #ifdef MULTIPLE_OWNER
532 m_isMOTEnabled = resource->isMOTEnabled();
535 if( OC_STACK_OK != resource->getOTMethod(&m_selectedOTMethod) )
537 m_selectedOTMethod = OIC_OXM_COUNT; // Out-of-range
540 if(resource->getOwnedStatus())
542 char uuidString[UUID_STRING_SIZE] = {};
543 if(OCConvertUuidToString(resource->getDevPtr()->doxm->owner.id, uuidString))
545 m_ownerID = uuidString;
555 OicSecOxm_t getSelectedOTMethod() const
557 return m_selectedOTMethod;
560 bool isMOTEnabled() const
562 return m_isMOTEnabled;
565 bool isOwnedDevice() const
570 const std::string getOwnerID()
575 const std::string getDeviceUUID()
580 * Get a result for about security provisioning is success or not.
583 * ::ES_SEC_OPERATION_IS_NOT_SUPPORTED\n
584 * ::ES_SECURE_RESOURCE_DISCOVERY_FAILURE\n
585 * ::ES_OWNERSHIP_TRANSFER_FAILURE\n
588 ESResult getESResult()
596 OicSecOxm_t m_selectedOTMethod;
599 std::string m_ownerID;
604 * @brief This provide a set of getter APIs from received response for getConfiguration().
605 * Received information includes a device name, WiFi supported mode, and frequency.
606 * Additionally, you can know if Enrollee can be access to cloud server with this
614 * The expected OCRepresentation is one for collection resource and has several child
615 * OCRepresentation object corresponding to WiFiConf, DevConf, and CoapCloudConf
616 * resources' representations.
618 EnrolleeConf(const OCRepresentation& rep) :
623 EnrolleeConf(const EnrolleeConf& enrolleeConf) :
624 m_EasySetupRep(enrolleeConf.getEasySetupRep())
628 EnrolleeConf(const EnrolleeConf&& enrolleeConf) :
629 m_EasySetupRep(std::move(enrolleeConf.getEasySetupRep()))
634 * Get a device name of Enrollee. It is Device's human-friendly name like device model
637 * @return a device name of Enrollee
639 std::string getDeviceName() const
641 std::vector<OCRepresentation> children = m_EasySetupRep.getChildren();
642 for(auto child = children.begin(); child != children.end(); ++child)
644 if(child->getUri().find(OC_RSRVD_ES_URI_DEVCONF) != std::string::npos)
646 OCRepresentation rep;
647 if(child->hasAttribute(OC_RSRVD_REPRESENTATION))
649 rep = child->getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
653 return std::string("");
656 if(rep.hasAttribute(OC_RSRVD_ES_DEVNAME))
658 return rep.getValue<std::string>(OC_RSRVD_ES_DEVNAME);
662 return std::string("");
666 * Get a model number of Enrollee.
668 * @return a model number of Enrollee
670 std::string getModelNumber() const
672 std::vector<OCRepresentation> children = m_EasySetupRep.getChildren();
673 for(auto child = children.begin(); child != children.end(); ++child)
675 if(child->getUri().find(OC_RSRVD_ES_URI_DEVCONF) != std::string::npos)
677 OCRepresentation rep;
678 if(child->hasAttribute(OC_RSRVD_REPRESENTATION))
680 rep = child->getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
684 return std::string("");
687 if(rep.hasAttribute(OC_RSRVD_ES_MODELNUMBER))
689 return rep.getValue<std::string>(OC_RSRVD_ES_MODELNUMBER);
693 return std::string("");
697 * Get a set of WiFi supported modes of Enrollee
699 * @return a set of WiFi supported modes of Enrollee
703 vector<WIFI_MODE> getWiFiModes() const
705 vector<WIFI_MODE> modes;
708 std::vector<OCRepresentation> children = m_EasySetupRep.getChildren();
709 for(auto child = children.begin(); child != children.end(); ++child)
711 if(child->getUri().find(OC_RSRVD_ES_URI_WIFICONF) != std::string::npos)
713 OCRepresentation rep;
714 if(child->hasAttribute(OC_RSRVD_REPRESENTATION))
716 rep = child->getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
723 if(rep.hasAttribute(OC_RSRVD_ES_SUPPORTEDWIFIMODE))
725 for(auto it : rep.getValue
726 <std::vector<int>>(OC_RSRVD_ES_SUPPORTEDWIFIMODE))
728 modes.push_back(static_cast<WIFI_MODE>(it));
737 * Get a WiFi supported frequency of Enrollee
739 * @return a WiFi supported frequency of Enrollee
743 WIFI_FREQ getWiFiFreq() const
745 std::vector<OCRepresentation> children = m_EasySetupRep.getChildren();
746 for(auto child = children.begin(); child != children.end(); ++child)
748 if(child->getUri().find(OC_RSRVD_ES_URI_WIFICONF) != std::string::npos)
750 OCRepresentation rep;
751 if(child->hasAttribute(OC_RSRVD_REPRESENTATION))
753 rep = child->getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
757 return WIFI_FREQ_NONE;
760 if(rep.hasAttribute(OC_RSRVD_ES_SUPPORTEDWIFIFREQ))
762 return static_cast<WIFI_FREQ>(
763 rep.getValue<int>(OC_RSRVD_ES_SUPPORTEDWIFIFREQ));
767 return WIFI_FREQ_NONE;
771 * Get a provisioning status property of Enrollee.
773 * @return a provisioning status property of Enrollee
775 ProvStatus getProvStatus() const
777 OCRepresentation rep;
778 if(m_EasySetupRep.hasAttribute(OC_RSRVD_REPRESENTATION))
780 rep = m_EasySetupRep.getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
784 return ES_STATE_INIT;
787 if(rep.hasAttribute(OC_RSRVD_ES_PROVSTATUS))
789 return static_cast<ProvStatus>(
790 rep.getValue<int>(OC_RSRVD_ES_PROVSTATUS));
792 return ES_STATE_INIT;
796 * Get a last error code property of Enrollee.
798 * @return a last error code property of Enrollee.
800 ESErrorCode getLastErrCode() const
802 OCRepresentation rep;
803 if(m_EasySetupRep.hasAttribute(OC_RSRVD_REPRESENTATION))
805 rep = m_EasySetupRep.getValue<OCRepresentation>(OC_RSRVD_REPRESENTATION);
809 return ES_ERRCODE_NO_ERROR;
812 if(rep.hasAttribute(OC_RSRVD_ES_LAST_ERRORCODE))
814 return static_cast<ESErrorCode>(
815 rep.getValue<int>(OC_RSRVD_ES_LAST_ERRORCODE));
817 return ES_ERRCODE_NO_ERROR;
821 * Get an accessibility to cloud server of an Enrollee
823 * @return an accessibility to cloud server of an Enrollee
825 bool isCloudAccessible() const
827 std::vector<OCRepresentation> children = m_EasySetupRep.getChildren();
828 for(auto child = children.begin(); child != children.end(); ++child)
830 for(auto rt : child->getResourceTypes())
832 if(0 == rt.compare(OC_RSRVD_ES_RES_TYPE_COAPCLOUDCONF))
842 * Get OCRepresentation object
844 * @return OCRepresentation object
846 const OCRepresentation& getEasySetupRep() const
848 return m_EasySetupRep;
852 OCRepresentation m_EasySetupRep;
856 * Status object for getStatus API. This object is given to application
857 * when a response for GET request to provisioning resource at Enrollee is arrived.
858 * It returns a result of the API and requested data delivered in the response which includes
859 * a provisioning status and last error code stored in Enrollee.
861 * @see EnrolleeStatus
863 class GetEnrolleeStatus
869 GetEnrolleeStatus(ESResult result, const EnrolleeStatus& status) :
870 m_result(result), m_enrolleeStatus(status)
875 * Get a result of getting provisioning status and last error code of Enrollee
878 * ::ES_COMMUNICATION_ERROR\n
882 ESResult getESResult()
888 * Get Enrollee's status and last error code properties
890 * @return Enrollee's status and last error code properties
892 * @see EnrolleeStatus
894 const EnrolleeStatus& getEnrolleeStatus()
896 return m_enrolleeStatus;
901 EnrolleeStatus m_enrolleeStatus;
905 * Status object for getConfiguration API. This object is given to application
906 * when a response for GET request to provisioning resource at Enrollee is arrived.
907 * It returns a result of the API and requested data delivered in the response which includes
908 * WiFi configuration and device configuration stored in Enrollee.
912 class GetConfigurationStatus
918 GetConfigurationStatus(ESResult result, const EnrolleeConf& conf) :
919 m_result(result), m_enrolleeConf(conf)
924 * Get a result of getting preconfiguration of Enrollee
927 * ::ES_COMMUNICATION_ERROR\n
932 ESResult getESResult()
938 * Get Enrollee's pre-configuration properties
940 * @return Enrollee's pre-configuration properties
944 EnrolleeConf& getEnrolleeConf()
946 return m_enrolleeConf;
951 EnrolleeConf m_enrolleeConf;
955 * Status object for provisionDeviceProperties API. This object is given to application
956 * when a response for GET request to provisioning resource at Enrollee is arrived.
957 * It returns a result of the request.
959 class DevicePropProvisioningStatus
965 DevicePropProvisioningStatus(ESResult result) :
971 * Get a result of Device property provisioning
974 * ::ES_COMMUNICATION_ERROR\n
979 ESResult getESResult()
989 * Status object for provisionCloudProperties API. This object is given to application
990 * when a response for GET request to provisioning resource at Enrollee is arrived.
991 * It returns a result of the request and status of this provisioning. The status provides
992 * an information if the enrollee is found in a given network and the provisioning is
995 class CloudPropProvisioningStatus
1001 CloudPropProvisioningStatus(ESResult result) :
1007 * Get a result of Cloud property provisioning
1010 * ::ES_ENROLLEE_DISCOVERY_FAILURE\n
1011 * ::ES_SECURE_RESOURCE_DISCOVERY_FAILURE\n
1012 * ::ES_ACL_PROVISIONING_FAILURE\n
1013 * ::ES_CERT_PROVISIONING_FAILURE\n
1014 * ::ES_COMMUNICATION_ERROR\n
1019 ESResult getESResult()
1029 * Status object for connect API. This object is given to application
1030 * when a response for 'Connect' request from Enrollee is arrived.
1032 class ConnectRequestStatus
1038 ConnectRequestStatus(ESResult result) :
1044 * Get a result of Connect request
1047 * ::ES_COMMUNICATION_ERROR\n
1052 ESResult getESResult()
1061 class ESOwnershipTransferData
1064 #ifdef __WITH_DTLS__
1065 ESOwnershipTransferData() :
1066 m_MOTMethod(OIC_OXM_COUNT), m_preconfiguredPin("")
1070 ESOwnershipTransferData(const ESOwnershipTransferData& data) :
1071 m_MOTMethod(data.getMOTMethod()),
1072 m_preconfiguredPin(data.getPreConfiguredPin())
1076 ESResult setMOTMethod(OicSecOxm_t method)
1078 #ifdef MULTIPLE_OWNER
1079 if(OIC_RANDOM_DEVICE_PIN != method)
1084 m_MOTMethod = method;
1093 ESResult setMOTMethod(OicSecOxm_t method, const std::string& pin)
1095 #ifdef MULTIPLE_OWNER
1096 if(OIC_PRECONFIG_PIN != method || pin.empty())
1101 m_preconfiguredPin = pin;
1102 m_MOTMethod = method;
1112 OicSecOxm_t getMOTMethod() const
1117 std::string getPreConfiguredPin() const
1119 return m_preconfiguredPin;
1123 OicSecOxm_t m_MOTMethod;
1124 std::string m_preconfiguredPin;
1129 * Callback function definition for providing Enrollee status
1131 typedef function< void(shared_ptr< GetEnrolleeStatus >) > GetStatusCb;
1134 * Callback function definition for providing Enrollee configuration status
1136 typedef function< void(shared_ptr< GetConfigurationStatus >) > GetConfigurationStatusCb;
1139 * Callback function definition for providing Enrollee device property provisioning status
1141 typedef function< void(shared_ptr< DevicePropProvisioningStatus >) > DevicePropProvStatusCb;
1144 * Callback function definition for providing Enrollee cloud property provisioning status
1146 typedef function< void(shared_ptr< CloudPropProvisioningStatus >) > CloudPropProvStatusCb;
1149 * Callback function definition for providing 'Connect' request status
1151 typedef function< void(shared_ptr< ConnectRequestStatus >) > ConnectRequestStatusCb;
1155 * Callback function definition for providing Enrollee security provisioning status
1157 typedef function< void(shared_ptr<SecProvisioningStatus>) > SecurityProvStatusCb;
1160 * Callback function definition for providing Enrollee security provisioning status.
1161 * This callback is an overloaded version of SecurityProvStatusCb, which has
1162 * ESOwnershipTransferData as a return value.
1164 typedef function< ESOwnershipTransferData(shared_ptr<SecProvisioningStatus>) >
1165 SecurityProvStatusCbWithOption;
1168 * Callback definition to be invoked when the security stack expects a pin from application
1170 typedef function< void(string&) > SecurityPinCb;
1173 * Callback definition to be invoked when the stack expects a db path
1175 typedef function< void(string&) > SecProvisioningDbPathCb;
1179 #endif //WITH_ARDUINO
1181 #endif //ES_COMMON_RICH_H_