Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_wearable / modules / tizen / Widget / Widget.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  *
18  *
19  * @file       Widget.h
20  * @author     Grzegorz Krawczyk (g.krawczyk@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24
25 #ifndef PLATFORM_WIDGET_CONFIGURATION_H_
26 #define PLATFORM_WIDGET_CONFIGURATION_H_
27
28 #include <string>
29
30 #include <Commons/WrtAccess/WrtAccess.h>
31
32 #include <Widget/IWidget.h>
33 #include <WidgetDB/IWidgetDB.h>
34 #include "Property.h"
35
36 namespace WrtDeviceApis {
37 namespace Widget {
38 class Widget : public Api::IWidget
39 {
40   public:
41
42     explicit Widget();
43     ~Widget();
44
45     virtual std::string getAuthor() const;
46     virtual std::string getAuthorEmail() const;
47     virtual std::string getAuthorHref() const;
48     virtual std::string getDescription() const;
49     virtual std::string getId() const;
50     virtual std::string getName() const;
51     virtual std::string getShortName() const;
52     virtual std::string getVersion() const;
53     virtual unsigned int getHeight() const;
54     virtual unsigned int getWidth() const;
55
56   protected:
57
58     mutable StringProperty m_author;
59     mutable StringProperty m_authorEmail;
60     mutable StringProperty m_authorHref;
61     mutable StringProperty m_description;
62     mutable StringProperty m_id;
63     mutable StringProperty m_name;
64     mutable StringProperty m_shortName;
65     mutable StringProperty m_version;
66     mutable UIntProperty m_height;
67     mutable UIntProperty m_width;
68
69   private:
70
71     std::string getProperty(WidgetDB::Api::ConfigAttribute) const;
72     void checkWidgetId() const;
73
74     int m_widgetId;
75 };
76 }
77 }
78
79 #endif