Source code formating unification
[framework/web/wrt-commons.git] / tests / dpl / localization / mockup_src / widget_dao.cpp
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  * This file contains the declaration of widget dao class.
18  *
19  * @file    widget_dao_read_only.cpp
20  * @author  Yang Jie (jie2.yang@samsung.com)
21  * @author  Przemyslaw Dobrowolski (p.dobrowolsk@samsung.com)
22  * @author  Pawel Sikorski (p.sikorski@samsung.com)
23  * @version 1.0
24  * @brief   This file contains the declaration of widget dao
25  */
26
27 //#include "../mockup_include/dpl/wrt-dao-rw/widget_dao.h"
28 #include <dpl/wrt-dao-rw/widget_dao.h>
29
30 #include <sstream>
31 #include <dpl/foreach.h>
32 #include <dpl/log/log.h>
33 #include <dpl/sstream.h>
34
35 namespace WrtDB {
36 std::map<DbWidgetHandle,
37          WidgetDAO::WidgetStartFileList> WidgetDAO::s_startFileMap;
38 std::map<DbWidgetHandle,
39          WidgetDAO::LocalizedStartFileList> WidgetDAO::s_localizedStartFileMap;
40 std::map<DbWidgetHandle, DPL::String> WidgetDAO::s_pathMap;
41
42 DbWidgetHandle WidgetDAO::getHandle(const WidgetGUID /* GUID */) const
43 {
44     LogError("Not impleneted!");
45     return 0;
46 }
47
48 DbWidgetHandle WidgetDAO::getHandle(const DPL::String /* tizenAppId */)
49 {
50     LogError("Not implemented!");
51     return 0;
52 }
53
54 DPL::String WidgetDAO::getPath() const
55 {
56     return s_pathMap[m_widgetHandle];
57 }
58
59 void WidgetDAO::setPath(const DPL::String &path) const
60 {
61     s_pathMap[m_widgetHandle] = path;
62 }
63
64 WidgetLocalizedInfo
65 WidgetDAO::getLocalizedInfo(const DPL::String& /* languageTag */)
66 const
67 {
68     LogError("Not implemented!");
69     return WidgetLocalizedInfo();
70 }
71
72 DPL::OptionalString WidgetDAO::getDefaultlocale() const
73 {
74     LogError("Not implemented!");
75     return DPL::OptionalString();
76 }
77
78 WidgetDAO::WidgetLocalizedIconList WidgetDAO::getLocalizedIconList() const
79 {
80     LogError("Not implemented!");
81     return WidgetLocalizedIconList();
82 }
83
84 WidgetDAO::WidgetIconList WidgetDAO::getIconList() const
85 {
86     LogError("Not implemented!");
87     return WidgetIconList();
88 }
89
90 WidgetDAO::LocalizedStartFileList WidgetDAO::getLocalizedStartFileList() const
91 {
92     return s_localizedStartFileMap[m_widgetHandle];
93 }
94
95 void WidgetDAO::setLocalizedStartFileList(const LocalizedStartFileList &list)
96 const
97 {
98     s_localizedStartFileMap[m_widgetHandle] = list;
99 }
100
101 WidgetDAO::WidgetStartFileList WidgetDAO::getStartFileList() const
102 {
103     return s_startFileMap[m_widgetHandle];
104 }
105
106 void WidgetDAO::setStartFileList(const WidgetStartFileList &list) const
107 {
108     s_startFileMap[m_widgetHandle] = list;
109 }
110 } // namespace WrtDB