|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Data class to hold widget info - inline functions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _XNPLUGINDATA_INL_ |
|
20 #define _XNPLUGINDATA_INL_ |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // Sets plugindata node |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 inline void CXnPluginData::SetNode( CXnDomNode* aNode ) |
|
27 { |
|
28 iNode = aNode; |
|
29 }; |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // Returns plugindata node |
|
33 // --------------------------------------------------------------------------- |
|
34 // |
|
35 inline CXnDomNode* CXnPluginData::Node() const |
|
36 { |
|
37 return iNode; |
|
38 }; |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // Sets Owner |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 inline void CXnPluginData::SetOwner( CXnDomNode* aOwner ) |
|
45 { |
|
46 iOwner = aOwner; |
|
47 }; |
|
48 |
|
49 // --------------------------------------------------------------------------- |
|
50 // Returns Owner |
|
51 // --------------------------------------------------------------------------- |
|
52 // |
|
53 inline CXnDomNode* CXnPluginData::Owner() const |
|
54 { |
|
55 return iOwner; |
|
56 }; |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // Return the parent of this plugin data |
|
60 // ----------------------------------------------------------------------------- |
|
61 // |
|
62 inline CXnPluginData* CXnPluginData::Parent() const |
|
63 { |
|
64 return iParent; |
|
65 }; |
|
66 |
|
67 // ----------------------------------------------------------------------------- |
|
68 // Return view manager |
|
69 // ----------------------------------------------------------------------------- |
|
70 // |
|
71 inline CXnViewManager& CXnPluginData::ViewManager() const |
|
72 { |
|
73 return iManager; |
|
74 }; |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // Queries whether this plugin is in active view |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 inline TBool CXnPluginData::Active() const |
|
81 { |
|
82 TBool retval( EFalse ); |
|
83 |
|
84 if( iParent ) |
|
85 { |
|
86 retval = iParent->Active(); |
|
87 } |
|
88 |
|
89 return retval; |
|
90 }; |
|
91 |
|
92 // --------------------------------------------------------------------------- |
|
93 // Returns Config. ID |
|
94 // --------------------------------------------------------------------------- |
|
95 // |
|
96 inline const TDesC8& CXnPluginData::ConfigurationId() const |
|
97 { |
|
98 return iConfigurationId ? *iConfigurationId : KNullDesC8(); |
|
99 }; |
|
100 |
|
101 // --------------------------------------------------------------------------- |
|
102 // Returns plugin ID |
|
103 // --------------------------------------------------------------------------- |
|
104 // |
|
105 inline const TDesC8& CXnPluginData::PluginId() const |
|
106 { |
|
107 return iPluginId ? *iPluginId : KNullDesC8(); |
|
108 }; |
|
109 |
|
110 // --------------------------------------------------------------------------- |
|
111 // Returns plugin UID |
|
112 // --------------------------------------------------------------------------- |
|
113 // |
|
114 inline const TDesC8& CXnPluginData::PluginUid() const |
|
115 { |
|
116 return iPluginUid ? *iPluginUid : KNullDesC8(); |
|
117 }; |
|
118 |
|
119 // --------------------------------------------------------------------------- |
|
120 // Returns plugin name |
|
121 // --------------------------------------------------------------------------- |
|
122 // |
|
123 inline const TDesC8& CXnPluginData::PluginName() const |
|
124 { |
|
125 return iPluginName ? *iPluginName : KNullDesC8(); |
|
126 }; |
|
127 |
|
128 // --------------------------------------------------------------------------- |
|
129 // Returns plugin type |
|
130 // --------------------------------------------------------------------------- |
|
131 // |
|
132 inline const TDesC8& CXnPluginData::Type() const |
|
133 { |
|
134 return iPluginType ? *iPluginType : KNullDesC8(); |
|
135 }; |
|
136 |
|
137 // --------------------------------------------------------------------------- |
|
138 // Returns plugin state |
|
139 // --------------------------------------------------------------------------- |
|
140 // |
|
141 inline const TDesC8& CXnPluginData::PluginState() const |
|
142 { |
|
143 return iPluginState ? *iPluginState : KNullDesC8(); |
|
144 }; |
|
145 |
|
146 // --------------------------------------------------------------------------- |
|
147 // Returns the publisher name |
|
148 // --------------------------------------------------------------------------- |
|
149 // |
|
150 inline const TDesC& CXnPluginData::PublisherName() const |
|
151 { |
|
152 return iPublisherName ? *iPublisherName : KNullDesC16(); |
|
153 }; |
|
154 |
|
155 // ----------------------------------------------------------------------------- |
|
156 // Sets this plugin occupied, i.e. holding widget |
|
157 // ----------------------------------------------------------------------------- |
|
158 // |
|
159 inline void CXnPluginData::SetOccupied() |
|
160 { |
|
161 iFlags.Set( EIsOccupied ); |
|
162 }; |
|
163 |
|
164 // ----------------------------------------------------------------------------- |
|
165 // Queries whether the plugin is occupied |
|
166 // ----------------------------------------------------------------------------- |
|
167 // |
|
168 inline TBool CXnPluginData::Occupied() const |
|
169 { |
|
170 return ( iFlags.IsSet( EIsOccupied ) ? ETrue : EFalse ); |
|
171 }; |
|
172 |
|
173 // --------------------------------------------------------------------------- |
|
174 // Sets removable |
|
175 // --------------------------------------------------------------------------- |
|
176 // |
|
177 inline void CXnPluginData::SetRemovable( TBool aRemovable ) |
|
178 { |
|
179 if( aRemovable ) |
|
180 { |
|
181 iFlags.Set( EIsRemovable ); |
|
182 } |
|
183 else |
|
184 { |
|
185 iFlags.Clear( EIsRemovable ); |
|
186 } |
|
187 }; |
|
188 |
|
189 // --------------------------------------------------------------------------- |
|
190 // Returns removable |
|
191 // --------------------------------------------------------------------------- |
|
192 // |
|
193 inline TBool CXnPluginData::Removable() const |
|
194 { |
|
195 return ( iFlags.IsSet( EIsRemovable ) ? ETrue : EFalse ); |
|
196 }; |
|
197 |
|
198 // --------------------------------------------------------------------------- |
|
199 // Returns list of plugindata |
|
200 // --------------------------------------------------------------------------- |
|
201 // |
|
202 inline RPointerArray< CXnPluginData >& CXnPluginData::PluginData() const |
|
203 { |
|
204 return iPluginsData; |
|
205 }; |
|
206 |
|
207 #endif // _XNPLUGINDATA_INL_ |