Initialize Tizen 2.3
[framework/web/wrt-plugins-common.git] / src_mobile / 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 class IWidget;
35 typedef DPL::SharedPtr<IWidget> IWidgetPtr;
36
37 class IWidget
38 {
39   public: // methods
40
41     /**
42      * getter for property from widget config xml
43      * @throw Commons::PlatformException if problem with platform occured
44      * @throw Commons::NullPointerException if problem with platform occured
45      * @throw Commons::SecurityException if wrt forbiden using this function
46      * */
47     virtual std::string getAuthor() const = 0;
48
49     /**
50      * getter for property from widget config xml
51      * @throw Commons::PlatformException if problem with platform occured
52      * @throw Commons::NullPointerException if problem with platform occured
53      * @throw Commons::SecurityException if wrt forbiden using this function
54      * */
55     virtual std::string getAuthorEmail() const = 0;
56
57     /**
58      * getter for property from widget config xml
59      * @throw Commons::PlatformException if problem with platform occured
60      * @throw Commons::NullPointerException if problem with platform occured
61      * @throw Commons::SecurityException if wrt forbiden using this function
62      * */
63     virtual std::string getAuthorHref() const = 0;
64
65     /**
66      * getter for property from widget config xml
67      * @throw Commons::PlatformException if problem with platform occured
68      * @throw Commons::NullPointerException if problem with platform occured
69      * @throw Commons::SecurityException if wrt forbiden using this function
70      * */
71     virtual std::string getDescription() const = 0;
72
73     /**
74      * getter for property from widget config xml
75      * @throw Commons::PlatformException if problem with platform occured
76      * @throw Commons::NullPointerException if problem with platform occured
77      * @throw Commons::SecurityException if wrt forbiden using this function
78      * */
79     virtual std::string getId() const = 0;
80
81     /**
82      * getter for property from widget config xml
83      * @throw Commons::PlatformException if problem with platform occured
84      * @throw Commons::NullPointerException if problem with platform occured
85      * @throw Commons::SecurityException if wrt forbiden using this function
86      * */
87     virtual std::string getName() const = 0;
88
89     /**
90      * getter for property from widget config xml
91      * @throw Commons::PlatformException if problem with platform occured
92      * @throw Commons::NullPointerException if problem with platform occured
93      * @throw Commons::SecurityException if wrt forbiden using this function
94      * */
95     virtual std::string getShortName() const = 0;
96
97     /**
98      * getter for property from widget config xml
99      * @throw Commons::PlatformException if problem with platform occured
100      * @throw Commons::NullPointerException if problem with platform occured
101      * @throw Commons::SecurityException if wrt forbiden using this function
102      * */
103     virtual std::string getVersion() const = 0;
104
105     /**
106      * getter for property from widget config xml
107      * @throw Commons::PlatformException if problem with platform occured
108      * @throw Commons::NullPointerException if problem with platform occured
109      * @throw Commons::SecurityException if wrt forbiden using this function
110      * */
111     virtual unsigned int getHeight() const = 0;
112
113     /**
114      * getter for property from widget config xml
115      * @throw Commons::PlatformException if problem with platform occured
116      * @throw Commons::NullPointerException if problem with platform occured
117      * @throw Commons::SecurityException if wrt forbiden using this function
118      * */
119     virtual unsigned int getWidth() const = 0;
120
121     virtual ~IWidget()
122     {}
123 };
124 }
125 }
126 }
127
128 #endif