From bfccfcacd0000cbf0d560c905c331140078b7acd Mon Sep 17 00:00:00 2001 From: Habib Virji Date: Thu, 17 Sep 2015 11:54:19 +0100 Subject: [PATCH] Move OCGetServerInstanceId in OCStack Server instance id is needed by Resource Directory as it is a required field. Currently getting Device Id is present in ocstackinternal.h but is needed to be accessible across. This does not change any code but just moves API from ocstackinternal to ocstack. Change-Id: I4f424a0fa498f3793933cd94294d9d8f991d4258 Signed-off-by: Habib Virji Reviewed-on: https://gerrit.iotivity.org/gerrit/2635 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka Reviewed-by: Patrick Lankswert --- resource/csdk/stack/include/internal/ocstackinternal.h | 13 ------------- resource/csdk/stack/include/ocstack.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/resource/csdk/stack/include/internal/ocstackinternal.h b/resource/csdk/stack/include/internal/ocstackinternal.h index d105105..3dfc8ce 100644 --- a/resource/csdk/stack/include/internal/ocstackinternal.h +++ b/resource/csdk/stack/include/internal/ocstackinternal.h @@ -279,18 +279,6 @@ OCStackResult CAResultToOCResult(CAResult_t caResult); const OicUuid_t* OCGetServerInstanceID(void); /** - * Get a string representation the server instance ID. - * The memory is managed internal to this function, so freeing externally will result - * in a runtime error. - * Note: This will NOT seed the RNG, so it must be called after the RNG is seeded. - * This is done automatically during the OCInit process, - * so ensure that this call is done after that. - * - * @return A string representation the server instance ID. - */ -const char* OCGetServerInstanceIDString(void); - -/** * Map OCQualityOfService to CAMessageType. * * @param qos Input qos. @@ -327,4 +315,3 @@ void CopyDevAddrToEndpoint(const OCDevAddr *in, CAEndpoint_t *out); #endif // __cplusplus #endif /* OCSTACKINTERNAL_H_ */ - diff --git a/resource/csdk/stack/include/ocstack.h b/resource/csdk/stack/include/ocstack.h index 12f821f..6108e34 100644 --- a/resource/csdk/stack/include/ocstack.h +++ b/resource/csdk/stack/include/ocstack.h @@ -344,6 +344,18 @@ OCResourceHandle OCGetResourceHandle(uint8_t index); OCStackResult OCDeleteResource(OCResourceHandle handle); /** + * Get a string representation the server instance ID. + * The memory is managed internal to this function, so freeing externally will result + * in a runtime error. + * Note: This will NOT seed the RNG, so it must be called after the RNG is seeded. + * This is done automatically during the OCInit process, + * so ensure that this call is done after that. + * + * @return A string representation the server instance ID. + */ +const char* OCGetServerInstanceIDString(void); + +/** * This function gets the URI of the resource specified by handle. * * @param handle Handle of resource. -- 2.7.4