Update change log and spec for wrt-plugins-tizen_0.4.9
[platform/framework/web/wrt-plugins-tizen.git] / src / Application / ApplicationInformation.cpp
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #include "ApplicationInformation.h"
19
20 namespace DeviceAPI {
21 namespace Application { 
22 ApplicationInformation::ApplicationInformation(const std::string &appId)
23 {
24         m_show = false;
25         m_installDate = 0;
26         m_installSize = 0;
27         m_isInitialized = false;
28         m_appId = appId;
29 }
30
31 ApplicationInformation::ApplicationInformation()
32 {
33         m_show = false;
34         m_installDate = 0;
35         m_installSize = 0;
36         m_isInitialized = false;
37 }
38
39 ApplicationInformation::~ApplicationInformation()
40 {
41 }
42
43 std::string ApplicationInformation::getName() const
44 {
45         return m_name;
46 }
47
48 void ApplicationInformation::setName(const std::string &name)
49 {
50         m_name = name;
51 }
52
53 std::string ApplicationInformation::getAppId() const
54 {
55         return m_appId;
56 }
57
58 void ApplicationInformation::setAppId(const std::string &appId)
59 {
60         m_appId = appId;
61 }
62
63 std::string ApplicationInformation::getIconPath() const
64 {
65         return m_iconPath;
66 }
67
68 void ApplicationInformation::setIconPath(const std::string &iconPath)
69 {
70         m_iconPath = iconPath;
71 }
72
73 std::string ApplicationInformation::getVersion() const
74 {
75         return m_version;
76 }
77
78 void ApplicationInformation::setVersion(const std::string &version)
79 {
80         m_version = version;
81 }
82
83 bool ApplicationInformation::getShow() const
84 {
85         return m_show;
86 }
87
88 void ApplicationInformation::setShow(const bool &show)
89 {
90         m_show = show;
91 }
92
93 std::vector<std::string> ApplicationInformation::getCategories() const
94 {
95         return m_categories;
96 }
97
98 void ApplicationInformation::setCategories(const std::vector<std::string> &categories)
99 {
100         m_categories = categories;
101 }
102
103 void ApplicationInformation::addCategories(const std::string &category)
104 {
105         m_categories.push_back(category);
106 }
107
108 time_t ApplicationInformation::getInstallDate() const
109 {
110         return m_installDate;
111 }
112
113 void ApplicationInformation::setInstallDate(const time_t &date)
114 {
115         m_installDate = date;
116 }
117
118 long ApplicationInformation::getInstallSize() const
119 {
120         return m_installSize;
121 }
122
123 void ApplicationInformation::setInstallSize(const long &size)
124 {
125         m_installSize = size;
126 }
127
128 std::string ApplicationInformation::getPackageId() const
129 {
130         return m_pkgId;
131 }
132
133 void ApplicationInformation::setPackageId(const std::string &pkgId)
134 {
135         m_pkgId = pkgId;
136 }
137
138
139 // Temporal code. if package manager issue is solved, disable below code.
140 #if 1
141 bool ApplicationInformation::isInitialized() const
142 {
143         return m_isInitialized;
144 }
145
146 void ApplicationInformation::setInitialize()
147 {
148         m_isInitialized = true;
149 }
150 #endif
151
152 }
153 }