1 /******************************************************************
\r
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
\r
7 * Licensed under the Apache License, Version 2.0 (the "License");
\r
8 * you may not use this file except in compliance with the License.
\r
9 * You may obtain a copy of the License at
\r
11 * http://www.apache.org/licenses/LICENSE-2.0
\r
13 * Unless required by applicable law or agreed to in writing, software
\r
14 * distributed under the License is distributed on an "AS IS" BASIS,
\r
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 * See the License for the specific language governing permissions and
\r
17 * limitations under the License.
\r
19 ******************************************************************/
\r
27 #include "RequestResponseBody.h"
\r
30 #include "IncludeResolver.h"
\r
37 virtual std::map<std::string, HeaderPtr> const &getHeaders() const;
\r
38 virtual void setHeader(const std::string &headerName, const HeaderPtr &header);
\r
39 virtual std::string getDescription() const;
\r
40 virtual void setDescription(const std::string &description);
\r
41 virtual void setResponseBody(const std::string &typeName);
\r
42 virtual void setResponseBody(const std::string &type, const RequestResponseBodyPtr &body) ;
\r
43 virtual std::map<std::string, RequestResponseBodyPtr> const &getResponseBody() const;
\r
44 virtual RequestResponseBodyPtr getResponseBody(const std::string &bodyType);
\r
47 Response() : m_includeResolver(NULL) {}
\r
48 Response(const YAML::Node &yamlNode,
\r
49 const IncludeResolverPtr &includeResolver): m_includeResolver(includeResolver) { readResponse(yamlNode);}
\r
51 void readResponse(const YAML::Node &yamlNode) ;
\r
53 std::string m_description;
\r
54 std::map<std::string, RequestResponseBodyPtr> m_responseBody;
\r
55 std::map<std::string, HeaderPtr> m_headers;
\r
56 IncludeResolverPtr m_includeResolver;
\r
58 typedef std::shared_ptr<Response> ResponsePtr;
\r