X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Fprovisioning%2Finclude%2Fpmutility.h;h=f192d8ca8aa6048a5bc6a56448f9022350446215;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=15a5f8e1f69e36623fcc1a4fbea7846de240e758;hpb=cbbba8973023236d911927788c60d6f66cad0f83;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/provisioning/include/pmutility.h b/resource/csdk/security/provisioning/include/pmutility.h index 15a5f8e..f192d8c 100644 --- a/resource/csdk/security/provisioning/include/pmutility.h +++ b/resource/csdk/security/provisioning/include/pmutility.h @@ -37,6 +37,42 @@ extern "C" #define COAPS_QUERY "coaps://%s:%d%s" #define COAP_QUERY "coap://%s:%d%s" +#define COAP_TCP_PREFIX "coap+tcp://" +#define COAP_TCP_QUERY "coap+tcp://%s:%d%s" +#define COAPS_TCP_PREFIX "coaps+tcp://" +#define COAPS_TCP_QUERY "coaps+tcp://%s:%d%s" + +/** + * Discover owned/unowned device in the specified endpoint/deviceID. + * It will return the found device even though timeout is not exceeded. + * + * @param[in] waittime Timeout in seconds + * @param[in] deviceID deviceID of target device. + * @param[out] ppFoundDevice OCProvisionDev_t of found device + * + * @return OC_STACK_OK on success otherwise error.\n + * OC_STACK_INVALID_PARAM when deviceID is NULL or ppFoundDevice is not initailized. + */ +OCStackResult PMSingleDeviceDiscovery(unsigned short waittime, const OicUuid_t* deviceID, + OCProvisionDev_t **ppFoundDevice); + +/** + * Discover owned/unowned device in the specified endpoint/MAC address. + * It will return the found device even though timeout is not exceeded. + * + * @param[in] waittime Timeout in seconds. + * @param[in] deviceID deviceID of target device. + * @param[in] hostAddress MAC address of target device. + * @param[in] connType ConnectivityType for discovery. + * @param[out] ppFoundDevice OCProvisionDev_t of found device. + * + * @return OC_STACK_OK on success otherwise error. + * OC_STACK_INVALID_PARAM when deviceID is NULL or ppFoundDevice is not initailized. + */ +OCStackResult PMSingleDeviceDiscoveryInUnicast(unsigned short waittime, const OicUuid_t* deviceID, + const char* hostAddress, OCConnectivityType connType, + OCProvisionDev_t **ppFoundDevice); + /** * Discover owned/unowned devices in the same IP subnet. . * @@ -48,6 +84,19 @@ extern "C" */ OCStackResult PMDeviceDiscovery(unsigned short waittime, bool isOwned, OCProvisionDev_t **ppList); +#ifdef MULTIPLE_OWNER +/** + * Discover multiple OTM enabled devices in the same IP subnet. + * + * @param[in] waittime Timeout in seconds. + * @param[in] isMultipleOwned bool flag for MOT enabled / multiple owned discovery + * @param[in] ppDevicesList List of OCProvisionDev_t. + * + * @return OC_STACK_OK on success otherwise error. + */ +OCStackResult PMMultipleOwnerDeviceDiscovery(unsigned short waittime, bool isMultipleOwned, OCProvisionDev_t **ppDevicesList); +#endif //MULTIPLE_OWNER + /** * This function deletes list of provision target devices * @@ -96,7 +145,7 @@ bool PMGenerateQuery(bool isSecure, /** * Function to print OCProvisionDev_t for debug purpose. * - * @param[in] pDev Pointer to OCProvisionDev_t. It's information will be printed by OC_LOG_XX + * @param[in] pDev Pointer to OCProvisionDev_t. It's information will be printed by OIC_LOG_XX * */ void PMPrintOCProvisionDev(const OCProvisionDev_t* pDev); @@ -109,7 +158,7 @@ void PMPrintOCProvisionDev(const OCProvisionDev_t* pDev); * @return true when deletion is happened, false when no deletion is occured. In case either of * two arguments is null it will return false. */ -bool PMDeleteFromUUIDList(OCUuidList_t *pUuidList, OicUuid_t *targetId); +bool PMDeleteFromUUIDList(OCUuidList_t **pUuidList, OicUuid_t *targetId); #ifdef __cplusplus }