tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / Widget / IWidget.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       IWidget.h
20  * @author     Grzegorz Krawczyk (g.krawczyk@samsung.com)
21  * @version    0.1
22  * @brief
23  */
24 #ifndef INTERFACE_WIDGET_CONFIG_INFO_H
25 #define INTERFACE_WIDGET_CONFIG_INFO_H
26
27 #include <string>
28
29 #include <dpl/shared_ptr.h>
30
31 namespace WrtDeviceApis{
32 namespace Widget{
33 namespace Api {
34
35 class IWidget;
36 typedef DPL::SharedPtr<IWidget> IWidgetPtr;
37
38 class IWidget
39 {
40   public: // methods
41
42     /**
43      * getter for property from widget config xml
44      * @throw Commons::PlatformException if problem with platform occured
45      * @throw Commons::NullPointerException if problem with platform occured
46      * @throw Commons::SecurityException if wrt forbiden using this function
47      * */
48     virtual std::string getAuthor() const = 0;
49
50     /**
51      * getter for property from widget config xml
52      * @throw Commons::PlatformException if problem with platform occured
53      * @throw Commons::NullPointerException if problem with platform occured
54      * @throw Commons::SecurityException if wrt forbiden using this function
55      * */
56     virtual std::string getAuthorEmail() const = 0;
57
58     /**
59      * getter for property from widget config xml
60      * @throw Commons::PlatformException if problem with platform occured
61      * @throw Commons::NullPointerException if problem with platform occured
62      * @throw Commons::SecurityException if wrt forbiden using this function
63      * */
64     virtual std::string getAuthorHref() const = 0;
65
66     /**
67      * getter for property from widget config xml
68      * @throw Commons::PlatformException if problem with platform occured
69      * @throw Commons::NullPointerException if problem with platform occured
70      * @throw Commons::SecurityException if wrt forbiden using this function
71      * */
72     virtual std::string getDescription() const = 0;
73
74     /**
75      * getter for property from widget config xml
76      * @throw Commons::PlatformException if problem with platform occured
77      * @throw Commons::NullPointerException if problem with platform occured
78      * @throw Commons::SecurityException if wrt forbiden using this function
79      * */
80     virtual std::string getId() const = 0;
81
82     /**
83      * getter for property from widget config xml
84      * @throw Commons::PlatformException if problem with platform occured
85      * @throw Commons::NullPointerException if problem with platform occured
86      * @throw Commons::SecurityException if wrt forbiden using this function
87      * */
88     virtual std::string getName() const = 0;
89
90     /**
91      * getter for property from widget config xml
92      * @throw Commons::PlatformException if problem with platform occured
93      * @throw Commons::NullPointerException if problem with platform occured
94      * @throw Commons::SecurityException if wrt forbiden using this function
95      * */
96     virtual std::string getShortName() const = 0;
97
98     /**
99      * getter for property from widget config xml
100      * @throw Commons::PlatformException if problem with platform occured
101      * @throw Commons::NullPointerException if problem with platform occured
102      * @throw Commons::SecurityException if wrt forbiden using this function
103      * */
104     virtual std::string getVersion() const = 0;
105
106     /**
107      * getter for property from widget config xml
108      * @throw Commons::PlatformException if problem with platform occured
109      * @throw Commons::NullPointerException if problem with platform occured
110      * @throw Commons::SecurityException if wrt forbiden using this function
111      * */
112     virtual unsigned int getHeight() const = 0;
113
114     /**
115      * getter for property from widget config xml
116      * @throw Commons::PlatformException if problem with platform occured
117      * @throw Commons::NullPointerException if problem with platform occured
118      * @throw Commons::SecurityException if wrt forbiden using this function
119      * */
120     virtual unsigned int getWidth() const = 0;
121
122     virtual ~IWidget()
123     {
124     }
125 };
126
127 }
128 }
129 }
130
131 #endif