From 2765ec0cf38ed310e07421228cb2fb486ac7a86f Mon Sep 17 00:00:00 2001 From: coderhyme Date: Sun, 28 Feb 2016 18:12:12 -0800 Subject: [PATCH] Updated api description for response classes of RE. Change-Id: I3bf6047ebe7f9b84f83438ce8093ce31e173c443 Signed-off-by: coderhyme Reviewed-on: https://gerrit.iotivity.org/gerrit/5251 Reviewed-by: Uze Choi Tested-by: jenkins-iotivity --- .../resource-encapsulation/include/RCSResponse.h | 28 ++++++++++++++++++++++ .../serverBuilder/unittests/RCSResponseTest.cpp | 11 +-------- 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/service/resource-encapsulation/include/RCSResponse.h b/service/resource-encapsulation/include/RCSResponse.h index 041a187..d94b555 100644 --- a/service/resource-encapsulation/include/RCSResponse.h +++ b/service/resource-encapsulation/include/RCSResponse.h @@ -127,8 +127,22 @@ namespace OIC */ static RCSGetResponse create(RCSResourceAttributes&& attrs, int errorCode); + /** + * Creates a RCSGetResponse for the separate response. + * The separate response is to delay sending actual response to the client. + * + * @note A separate response needs to be set with RCSSeparateResponse + * to send the result of the request. + * + * @see RCSSeparateResponse + */ static RCSGetResponse separate(); + /** + * Returns whether it is a separate response. + * + * @see separate() + */ bool isSeparate() const; //! @cond @@ -294,8 +308,22 @@ namespace OIC */ static RCSSetResponse create(RCSResourceAttributes&& attrs, int errorCode); + /** + * Creates a RCSSetResponse for a separate response. + * The separate response is to delay sending actual response to the client. + * + * @note A separate response needs to be set with RCSSeparateResponse + * to send the result of the request. + * + * @see RCSSeparateResponse + */ static RCSSetResponse separate(); + /** + * Returns whether it is a separate response. + * + * @see separate() + */ bool isSeparate() const; //! @cond diff --git a/service/resource-encapsulation/src/serverBuilder/unittests/RCSResponseTest.cpp b/service/resource-encapsulation/src/serverBuilder/unittests/RCSResponseTest.cpp index 4f55d4a..0e7acd3 100644 --- a/service/resource-encapsulation/src/serverBuilder/unittests/RCSResponseTest.cpp +++ b/service/resource-encapsulation/src/serverBuilder/unittests/RCSResponseTest.cpp @@ -20,20 +20,11 @@ #include "UnitTestHelper.h" -#include "RCSRequest.h" #include "RCSResponse.h" #include "RCSSeparateResponse.h" -#include "RCSResourceObject.h" - -#include "RequestHandler.h" -#include "ResourceAttributesConverter.h" - -#include "OCPlatform.h" - -using namespace std; +#include "RCSException.h" using namespace OIC::Service; -using namespace OC; TEST(RCSResponseTest, DefaultSetResponseHasDefaultMethod) { -- 2.7.4