Update change log and spec for wrt-plugins-tizen_0.4.9
[platform/framework/web/wrt-plugins-tizen.git] / src / Application / ApplicationInformation.h
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 #ifndef TIZENAPIS_API_APPLICATION_INFORMATION_H_
19 #define TIZENAPIS_API_APPLICATION_INFORMATION_H_
20
21 #include <string>
22 #include <vector>
23 #include <dpl/log/log.h>
24 #include <dpl/shared_ptr.h>
25
26 namespace DeviceAPI {
27 namespace Application {
28
29 class ApplicationInformation;
30 typedef DPL::SharedPtr<ApplicationInformation> ApplicationInformationPtr;
31
32 typedef std::vector<ApplicationInformationPtr> ApplicationInformationArray;
33 typedef DPL::SharedPtr<ApplicationInformationArray> ApplicationInformationArrayPtr;
34
35 class ApplicationInformation
36 {
37   public:
38     ApplicationInformation(const std::string &appId);
39     ApplicationInformation();
40         ~ApplicationInformation();
41
42         std::string getName() const;
43         void setName(const std::string &name);
44         std::string getAppId() const;
45         void setAppId(const std::string &appId);
46         std::string getIconPath() const;
47         void setIconPath(const std::string &iconPath);
48         std::string getVersion() const;
49         void setVersion(const std::string &version);
50         bool getShow() const;
51         void setShow(const bool &show);
52         std::vector<std::string> getCategories() const;
53         void setCategories(const std::vector<std::string> &categories);
54         void addCategories(const std::string &category);
55         time_t getInstallDate() const;
56         void setInstallDate(const time_t &date);
57         long getInstallSize() const;
58         void setInstallSize(const long &size);
59         std::string getPackageId() const;
60         void setPackageId(const std::string &pkgId);    
61         // temporal code. if package manager issue is solved, disable below code.
62 #if 1   
63         bool isInitialized() const;
64         void setInitialize();
65 #endif
66
67   private:
68     std::string m_name;
69     std::string m_appId;
70     std::string m_iconPath;
71     std::string m_version;
72         bool m_show;
73         time_t m_installDate;
74         long m_installSize;
75         std::string     m_pkgId;
76         // temporal code. if package manager issue is solved, disable below code.
77         bool m_isInitialized;
78         std::vector<std::string> m_categories;
79 };
80 }
81 }
82 #endif