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 #include <ResponseStatement.h>
23 #include <ResourceAttributesConverter.h>
29 ResponseStatement ResponseStatement::create(const OC::OCRepresentation& ocRepresentation)
31 return ResponseStatement::create(
32 ResourceAttributesConverter::fromOCRepresentation(ocRepresentation));
35 ResponseStatement ResponseStatement::create(RCSResourceAttributes&& attrs)
37 return ResponseStatement(std::move(attrs));
40 ResponseStatement::ResponseStatement(const RCSResourceAttributes& attrs) :
45 ResponseStatement::ResponseStatement(RCSResourceAttributes&& attrs) :
46 m_attrs{ std::move(attrs) }
50 ResponseStatement::ResponseStatement(RCSResourceAttributes&& attrs, std::string&& uri,
51 std::vector< std::string >&& resourceTypes,
52 std::vector< std::string >&& resourceInterfaces) :
53 m_attrs{ std::move(attrs) },
54 m_uri{ std::move(uri) },
55 m_resourceTypes { std::move(resourceTypes) },
56 m_resourceInterfaces{ std::move(resourceInterfaces) }
60 std::string ResponseStatement::getUri() const
65 std::vector< std::string > ResponseStatement::getResourceTypes() const
67 return m_resourceTypes;
70 std::vector< std::string > ResponseStatement::getResourceInterfaces() const
72 return m_resourceInterfaces;
75 const RCSResourceAttributes& ResponseStatement::getAttributes() const