1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef SERVERBUILDER_RCSSEPARATERESPONSE_H
22 #define SERVERBUILDER_RCSSEPARATERESPONSE_H
24 #include "RCSRequest.h"
31 * This class is to send a delayed response for request handlers of the RCSResourceObject.
33 * @see RCSResourceObject
34 * @see RCSResourceObject::SetRequestHandler
35 * @see RCSResourceObject::GetRequestHandler
36 * @see RCSGetResponse::separate()
37 * @see RCSSetResponse::separate()
39 class RCSSeparateResponse
43 * Constructs with a request.
45 * @note The request must be from a request handler which returns separate().
47 * @see RCSResourceObject::SetRequestHandler
48 * @see RCSResourceObject::GetRequestHandler
49 * @see RCSGetResponse::separate()
50 * @see RCSSetResponse::separate()
52 explicit RCSSeparateResponse(const RCSRequest& request);
57 explicit RCSSeparateResponse(RCSRequest&& request);
59 RCSSeparateResponse(const RCSSeparateResponse&) = delete;
60 RCSSeparateResponse& operator=(const RCSSeparateResponse&) = delete;
62 RCSSeparateResponse(RCSSeparateResponse&&) = default;
63 RCSSeparateResponse& operator=(RCSSeparateResponse&&) =default;
66 * Sends the response to the client.
67 * The payload will be composed of properties(including attributes) of
68 * the resource object of the request.
70 * @throws RCSBadRequestException If the RCSResourceObject which receives the request
71 * is gone or it is already set.
72 * @throws RCSPlatformException If the operation failed.
85 #endif // SERVERBUILDER_RCSSEPARATERESPONSE_H