author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 14 Sep 2010 20:58:58 +0300 | |
branch | RCL_3 |
changeset 35 | 3321d3e205b6 |
parent 34 | 5456b4e8b3a8 |
permissions | -rw-r--r-- |
34 | 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 the publisher name |
|
139 |
// --------------------------------------------------------------------------- |
|
140 |
// |
|
141 |
inline const TDesC& CXnPluginData::PublisherName() const |
|
142 |
{ |
|
143 |
return iPublisherName ? *iPublisherName : KNullDesC16(); |
|
144 |
}; |
|
145 |
||
146 |
// ----------------------------------------------------------------------------- |
|
147 |
// Sets this plugin occupied, i.e. holding widget |
|
148 |
// ----------------------------------------------------------------------------- |
|
149 |
// |
|
150 |
inline void CXnPluginData::SetOccupied() |
|
151 |
{ |
|
152 |
iFlags.Set( EIsOccupied ); |
|
153 |
}; |
|
154 |
||
155 |
// ----------------------------------------------------------------------------- |
|
156 |
// Queries whether the plugin is occupied |
|
157 |
// ----------------------------------------------------------------------------- |
|
158 |
// |
|
159 |
inline TBool CXnPluginData::Occupied() const |
|
160 |
{ |
|
161 |
return ( iFlags.IsSet( EIsOccupied ) ? ETrue : EFalse ); |
|
162 |
}; |
|
163 |
||
164 |
// --------------------------------------------------------------------------- |
|
165 |
// Returns removable |
|
166 |
// --------------------------------------------------------------------------- |
|
167 |
// |
|
168 |
inline TBool CXnPluginData::Removable() const |
|
169 |
{ |
|
170 |
return ( iFlags.IsSet( EIsRemovable ) ? ETrue : EFalse ); |
|
171 |
}; |
|
172 |
||
173 |
// --------------------------------------------------------------------------- |
|
35
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
174 |
// Returns editable |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
175 |
// --------------------------------------------------------------------------- |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
176 |
// |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
177 |
inline TBool CXnPluginData::Editable() const |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
178 |
{ |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
179 |
return( iFlags.IsSet( EIsEditable ) ? ETrue : EFalse ); |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
180 |
} |
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
181 |
|
3321d3e205b6
Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
182 |
// --------------------------------------------------------------------------- |
34 | 183 |
// Returns list of plugindata |
184 |
// --------------------------------------------------------------------------- |
|
185 |
// |
|
186 |
inline RPointerArray< CXnPluginData >& CXnPluginData::PluginData() const |
|
187 |
{ |
|
188 |
return iPluginsData; |
|
189 |
}; |
|
190 |
||
191 |
#endif // _XNPLUGINDATA_INL_ |