6d769e531941ab4c846daa34da78c60ccd470fde
[framework/web/wrt-commons.git] / tests / ace / Interfaces.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /*
17  * @file        Interfaces.h
18  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
19  * @version     1.0
20  * @brief       Stubs used by PolicyInformationPoint.h
21  */
22 #ifndef _TEST_ACE_TESTS_INTERFACE_H_
23 #define _TEST_ACE_TESTS_INTERFACE_H_
24
25 #include <string>
26 #include <dpl/ace/WRT_INTERFACE.h>
27 #include <map>
28 #include <vector>
29
30 class Request;
31
32 class WebRuntimeImp : public IWebRuntime {
33 public:
34     int getAttributesValues(
35             const Request &request,
36             std::list<ATTRIBUTE> *attribute);
37     std::string getSessionId(const Request &) { return std::string(); }
38 };
39
40 class ResourceInformationImp : public IResourceInformation {
41 public:
42     int getAttributesValues(
43             const Request &request,
44             std::list<ATTRIBUTE> *attribute);
45 };
46
47 class OperationSystemImp : public IOperationSystem {
48 public:
49     int getAttributesValues(
50             const Request &request,
51             std::list<ATTRIBUTE> *attribute);
52 };
53
54 class FunctionParamImpl : public IFunctionParam
55 {
56 public:
57     virtual int getAttributesValues(const Request & /* request*/,
58       std::list<ATTRIBUTE> *attributes);
59     void addAttribute(const std::string &key,
60       const std::string &value)
61     {
62         paramMap.insert(make_pair(key, value));
63     }
64     virtual ~FunctionParamImpl() {}
65 private:
66     typedef std::multimap<std::string, std::string> ParamMap;
67     ParamMap paramMap;
68 };
69
70 #endif //  _TEST_ACE_TESTS_INTERFACE_H_