1 //******************************************************************
\r
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\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
21 #ifndef RE_INTERFACEHANDLER_H_
\r
22 #define RE_INTERFACEHANDLER_H_
\r
25 #include <functional>
\r
32 class RCSResourceObject;
\r
33 class RCSRepresentation;
\r
34 class RCSResourceAttributes;
\r
36 const std::string BASELINE_INTERFACE = "oic.if.baseline";
\r
37 const std::string ACTUATOR_INTERFACE = "oic.if.a";
\r
38 const std::string SENSOR_INTERFACE = "oic.if.s";
\r
39 const std::string BATCH_INTERFACE = "oic.if.b";
\r
41 class InterfaceHandler
\r
44 typedef std::function< RCSRepresentation(RCSRequest, const RCSResourceObject&) >
\r
47 typedef std::function< RCSRepresentation(RCSRequest, const RCSResourceObject&) >
\r
51 InterfaceHandler(GetResponseBuilder, SetResponseBuilder);
\r
53 bool isGetSupported() const;
\r
54 bool isSetSupported() const;
\r
56 GetResponseBuilder getGetResponseBuilder() const;
\r
57 SetResponseBuilder getSetResponseBuilder() const;
\r
60 GetResponseBuilder m_getBuilder;
\r
61 SetResponseBuilder m_setBuilder;
\r
64 InterfaceHandler getDefaultInterfaceHandler(const std::string&, const std::string&);
\r
68 #endif /* RE_INTERFACEHANDLER_H_ */
\r