//
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
/**
* @file
*
- * This file contains the classes for creating Get & Set response for the Get & Set request.
+ * This file contains the declaration of classes and its members related to RCSResponse
*/
#ifndef SERVERBUILDER_RCSRESPONSE_H
#define SERVERBUILDER_RCSRESPONSE_H
-#include <cstdint>
#include <memory>
namespace OIC
/**
* This class provides factory methods to create the response for a received get request.
- * The response consists of a result code, an error code and result attributes.
+ * The response consists of an error code and result attributes.
*
* @see RCSResourceObject
*/
public:
/**
* Creates a default RCSGetResponse.
- * The response will have OC_EH_OK for the result and 200 for the errorCode.
- * The attributes of RCSResourceObject will be set as the result attributes.
+ * The response will have 200 for the errorCode and the attributes of RCSResourceObject
+ * will be set as the result attributes.
*
*/
static RCSGetResponse defaultAction();
/**
- * Creates a RCSGetResponse with a result and error code passed.
+ * Creates a RCSGetResponse with error code passed.
* The attributes of the RCSResourceObject will be set as the result attributes.
*
* @param errorCode The error code to set in response.
static RCSGetResponse create(RCSResourceAttributes&& attrs);
/**
- * Creates a RCSGetResponse with a result and error code passed.
+ * Creates a RCSGetResponse with error code passed.
* This sends the passed attributes as the result attributes
* instead of the one the RCSResourceObject holds.
*
/**
* This class provides factory methods to create the response for a received set request.
- * The response consists of a result code, an error code and result attributes.
+ * The response consists of an error code and result attributes.
*
- * AcceptanceMethod provides ways how to handle attributes from a request.
+ * AcceptanceMethod provides ways how the request will be handled.
*
* @see RCSResourceObject
*/
/**
* Creates a default RCSSetResponse that has AcceptanceMethod::DEFAULT.
- * The response will have OC_EH_OK for the result and 200 for the errorCode.
+ * The response will have 200 for the errorCode.
* The attributes of RCSResourceObject will be set as the result attributes.
*
*/
/**
* Creates a default RCSSetResponse that has AcceptanceMethod::ACCEPT.
- * The response will have OC_EH_OK for the result and 200 for the errorCode.
+ * The response will have 200 for the errorCode.
* The attributes of RCSResourceObject will be set as the result attributes.
*
*/
static RCSSetResponse accept();
/**
- * Creates a RCSSetResponse that has AcceptanceMethod::ACCEPT
- * with a result and error code passed.
+ * Creates a RCSSetResponse that has AcceptanceMethod::ACCEPT and error code passed.
* The attributes of the RCSResourceObject will be set as the result attributes.
*
* @param errorCode The error code to set in response.
/**
* Creates a default RCSSetResponse that has AcceptanceMethod::IGNORE.
- * The response will have OC_EH_OK for the result and 200 for the errorCode.
+ * The response will have 200 for the errorCode.
* The attributes of RCSResourceObject will be set as the result attributes.
*
*/
static RCSSetResponse ignore();
/**
- * Creates a RCSSetResponse that has AcceptanceMethod::IGNORE
- * with a result and error code passed.
+ * Creates a RCSSetResponse that has AcceptanceMethod::IGNORE and error code passed.
* The attributes of the RCSResourceObject will be set as the result attributes.
*
* @param errorCode The error code to set in response.
static RCSSetResponse ignore(int errorCode);
/**
- * Creates a RCSSetResponse that has AcceptanceMethod::DEFAULT
- * with a result and error code passed.
+ * Creates a RCSSetResponse that has AcceptanceMethod::DEFAULT and error code passed.
* The attributes of the RCSResourceObject will be set as the result attributes.
*
* @param errorCode The error code to set in response.
static RCSSetResponse create(RCSResourceAttributes&& attrs);
/**
- * Creates a RCSSetResponse with a result and error code passed.
+ * Creates a RCSSetResponse with error code passed.
* This sends the passed attributes as the result attributes
* instead of the one the RCSResourceObject holds.
*
* @param attrs The attributes to set.
- * @param result The response result.
* @param errorCode The error code for response.
*
* @see RCSResourceAttributes
static RCSSetResponse create(RCSResourceAttributes&& attrs, int errorCode);
- //! @cond/
+ //! @cond
SetRequestHandler* getHandler() const;
//! @endcond