X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Fprovisioning%2Finclude%2Fpmutility.h;h=f192d8ca8aa6048a5bc6a56448f9022350446215;hb=refs%2Ftags%2Fsubmit%2Ftizen_4.0%2F20171010.021147;hp=d3947b1eb9f9c7659bd6b9eca7c3325caf75f1a0;hpb=1a2a7c36fdf4469b481d7c0a61a23ebb6bebd367;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/provisioning/include/pmutility.h b/resource/csdk/security/provisioning/include/pmutility.h old mode 100755 new mode 100644 index d3947b1..f192d8c --- a/resource/csdk/security/provisioning/include/pmutility.h +++ b/resource/csdk/security/provisioning/include/pmutility.h @@ -38,21 +38,40 @@ extern "C" #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 devices in the specified endpoint. - * It will return when found one or more device even though timeout is not exceeded + * 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] host address of target endpoint - * @param[in] connType connectivity type of endpoint - * @param[out] ppDevicesList List of OCProvisionDev_t + * @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 PMSingleDeviceDiscovery(unsigned short waittime, const char* host, - OCConnectivityType connType, OCProvisionDev_t **ppDevicesList); +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. . @@ -65,6 +84,19 @@ OCStackResult PMSingleDeviceDiscovery(unsigned short waittime, const char* host, */ 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 *