61 // |
62 // |
62 EXPORT_C void CCaInnerEntry::ExternalizeL( RWriteStream& aStream ) const |
63 EXPORT_C void CCaInnerEntry::ExternalizeL( RWriteStream& aStream ) const |
63 { |
64 { |
64 aStream.WriteInt32L( iId ); |
65 aStream.WriteInt32L( iId ); |
65 aStream.WriteInt32L( iUid ); |
66 aStream.WriteInt32L( iUid ); |
66 aStream.WriteInt32L( iIcon.iId ); |
|
67 aStream.WriteUint32L( iIcon.iFileName.Length() ); |
|
68 aStream.WriteL( iIcon.iFileName, iIcon.iFileName.Length() ); |
|
69 aStream.WriteUint32L( iIcon.iSkinId.Length() ); |
|
70 aStream.WriteL( iIcon.iSkinId, iIcon.iSkinId.Length() ); |
|
71 aStream.WriteUint32L( iIcon.iApplicationId.Length() ); |
|
72 aStream.WriteL( iIcon.iApplicationId, iIcon.iApplicationId.Length() ); |
|
73 aStream.WriteUint32L( iFlags ); |
67 aStream.WriteUint32L( iFlags ); |
74 aStream.WriteUint32L( iRole ); |
68 aStream.WriteUint32L( iRole ); |
75 aStream.WriteUint32L( iText.Length() ); |
69 aStream.WriteUint32L( iText.Length() ); |
76 aStream.WriteL( iText, iText.Length() ); |
70 aStream.WriteL( iText, iText.Length() ); |
77 aStream.WriteUint32L( iDescription.Length() ); |
71 aStream.WriteUint32L( iDescription.Length() ); |
78 aStream.WriteL( iDescription, iDescription.Length() ); |
72 aStream.WriteL( iDescription, iDescription.Length() ); |
79 aStream.WriteUint32L( iEntryTypeName.Length() ); |
73 aStream.WriteUint32L( iEntryTypeName.Length() ); |
80 aStream.WriteL( iEntryTypeName, iEntryTypeName.Length() ); |
74 aStream.WriteL( iEntryTypeName, iEntryTypeName.Length() ); |
81 iAttributes.ExternalizeL( aStream ); |
75 iAttributes.ExternalizeL( aStream ); |
|
76 iIcon->ExternalizeL( aStream ); |
82 aStream.CommitL(); |
77 aStream.CommitL(); |
83 } |
78 } |
84 |
79 |
85 // --------------------------------------------------------------------------- |
80 // --------------------------------------------------------------------------- |
86 // |
81 // |
88 // |
83 // |
89 EXPORT_C void CCaInnerEntry::InternalizeL( RReadStream& aStream ) |
84 EXPORT_C void CCaInnerEntry::InternalizeL( RReadStream& aStream ) |
90 { |
85 { |
91 iId = aStream.ReadInt32L(); |
86 iId = aStream.ReadInt32L(); |
92 iUid = aStream.ReadInt32L(); |
87 iUid = aStream.ReadInt32L(); |
93 iIcon.iId = aStream.ReadInt32L(); |
|
94 TUint length = aStream.ReadUint32L(); |
|
95 aStream.ReadL( iIcon.iFileName, length ); |
|
96 length = aStream.ReadUint32L(); |
|
97 aStream.ReadL( iIcon.iSkinId, length ); |
|
98 length = aStream.ReadUint32L(); |
|
99 aStream.ReadL( iIcon.iApplicationId, length ); |
|
100 iFlags = aStream.ReadUint32L(); |
88 iFlags = aStream.ReadUint32L(); |
101 iRole = aStream.ReadUint32L(); |
89 iRole = aStream.ReadUint32L(); |
102 length = aStream.ReadUint32L(); |
90 TUint length = aStream.ReadUint32L(); |
103 iText.Close(); |
91 iText.Close(); |
104 iText.CreateL( length ); |
92 iText.CreateL( length ); |
105 aStream.ReadL( iText, length ); |
93 aStream.ReadL( iText, length ); |
106 length = aStream.ReadUint32L(); |
94 length = aStream.ReadUint32L(); |
107 iDescription.Close( ); |
95 iDescription.Close( ); |
110 length = aStream.ReadUint32L( ); |
98 length = aStream.ReadUint32L( ); |
111 iEntryTypeName.Close(); |
99 iEntryTypeName.Close(); |
112 iEntryTypeName.CreateL( length ); |
100 iEntryTypeName.CreateL( length ); |
113 aStream.ReadL( iEntryTypeName, length ); |
101 aStream.ReadL( iEntryTypeName, length ); |
114 iAttributes.InternalizeL( aStream ); |
102 iAttributes.InternalizeL( aStream ); |
|
103 iIcon->InternalizeL( aStream ); |
115 } |
104 } |
116 |
105 |
117 // --------------------------------------------------------------------------- |
106 // --------------------------------------------------------------------------- |
118 // |
107 // |
119 // --------------------------------------------------------------------------- |
108 // --------------------------------------------------------------------------- |
120 // |
109 // |
121 void CCaInnerEntry::ConstructL() |
110 void CCaInnerEntry::ConstructL() |
122 { |
111 { |
123 |
112 iIcon = CCaInnerIconDescription::NewL(); |
124 } |
113 } |
125 |
114 |
126 // --------------------------------------------------------------------------- |
115 // --------------------------------------------------------------------------- |
127 // |
116 // |
128 // --------------------------------------------------------------------------- |
117 // --------------------------------------------------------------------------- |
129 // |
118 // |
130 CCaInnerEntry::CCaInnerEntry() |
119 CCaInnerEntry::CCaInnerEntry() |
131 { |
120 { |
132 |
|
133 } |
121 } |
134 |
122 |
135 // --------------------------------------------------------------------------- |
123 // --------------------------------------------------------------------------- |
136 // |
124 // |
137 // --------------------------------------------------------------------------- |
125 // --------------------------------------------------------------------------- |
170 |
158 |
171 // --------------------------------------------------------------------------- |
159 // --------------------------------------------------------------------------- |
172 // |
160 // |
173 // --------------------------------------------------------------------------- |
161 // --------------------------------------------------------------------------- |
174 // |
162 // |
175 EXPORT_C const CCaInnerEntry::TIconAttributes& CCaInnerEntry::GetIcon() const |
163 EXPORT_C const CCaInnerIconDescription* CCaInnerEntry::Icon() const |
176 { |
164 { |
177 return iIcon; |
165 return iIcon; |
178 } |
166 } |
179 |
167 |
180 // --------------------------------------------------------------------------- |
168 // --------------------------------------------------------------------------- |
267 // --------------------------------------------------------------------------- |
255 // --------------------------------------------------------------------------- |
268 // |
256 // |
269 EXPORT_C void CCaInnerEntry::SetIconDataL( |
257 EXPORT_C void CCaInnerEntry::SetIconDataL( |
270 const TDesC& aFilename, const TDesC& aSkinId, const TDesC& aApplicationId ) |
258 const TDesC& aFilename, const TDesC& aSkinId, const TDesC& aApplicationId ) |
271 { |
259 { |
272 iIcon.iFileName.Copy( aFilename ); |
260 iIcon->SetFileNameL( aFilename ); |
273 iIcon.iSkinId.Copy( aSkinId ); |
261 iIcon->SetSkinIdL( aSkinId ); |
274 iIcon.iApplicationId.Copy(aApplicationId); |
262 iIcon->SetApplicationIdL( aApplicationId ); |
275 } |
263 } |
276 |
264 |
277 // --------------------------------------------------------------------------- |
265 // --------------------------------------------------------------------------- |
278 // |
266 // |
279 // --------------------------------------------------------------------------- |
267 // --------------------------------------------------------------------------- |
331 |
319 |
332 // --------------------------------------------------------------------------- |
320 // --------------------------------------------------------------------------- |
333 // |
321 // |
334 // --------------------------------------------------------------------------- |
322 // --------------------------------------------------------------------------- |
335 // |
323 // |
|
324 EXPORT_C TBool CCaInnerEntry::FindAttribute( const TDesC& aKey, |
|
325 TPtrC& aAttrVal ) |
|
326 { |
|
327 return iAttributes.Find( aKey, aAttrVal ); |
|
328 } |
|
329 |
|
330 // --------------------------------------------------------------------------- |
|
331 // |
|
332 // --------------------------------------------------------------------------- |
|
333 // |
336 EXPORT_C void CCaInnerEntry::SetUid( TInt32 aUid ) |
334 EXPORT_C void CCaInnerEntry::SetUid( TInt32 aUid ) |
337 { |
335 { |
338 iUid = aUid; |
336 iUid = aUid; |
339 } |
337 } |
340 |
338 |