branch | RCL_3 |
changeset 14 | 9fdee5e1da30 |
parent 0 | 5e5d6b214f4f |
13:796276a1bdcc | 14:9fdee5e1da30 |
---|---|
22 #include <AknIconArray.h> |
22 #include <AknIconArray.h> |
23 #include <cbsfactory.h> |
23 #include <cbsfactory.h> |
24 #include <mbsaccess.h> |
24 #include <mbsaccess.h> |
25 #include <mbselement.h> |
25 #include <mbselement.h> |
26 #include <cbsbitmap.h> |
26 #include <cbsbitmap.h> |
27 #include "vimpstdebugprint.h" |
27 #include "uiservicetabtracer.h" |
28 |
28 |
29 #include <AknIconUtils.h> |
29 #include <AknIconUtils.h> |
30 #include <AknIconArray.h> |
30 #include <AknIconArray.h> |
31 #include <eikclbd.h> |
31 #include <eikclbd.h> |
32 #include <bautils.h> |
32 #include <bautils.h> |
53 // ================= MEMBER FUNCTIONS ======================= |
53 // ================= MEMBER FUNCTIONS ======================= |
54 |
54 |
55 // Two-phased constructor. |
55 // Two-phased constructor. |
56 CVIMPSTUiBrandData* CVIMPSTUiBrandData::NewL(MVIMPSTEngine& aEngine) |
56 CVIMPSTUiBrandData* CVIMPSTUiBrandData::NewL(MVIMPSTEngine& aEngine) |
57 { |
57 { |
58 TRACER_AUTO; |
|
58 CVIMPSTUiBrandData* self = new (ELeave) CVIMPSTUiBrandData; |
59 CVIMPSTUiBrandData* self = new (ELeave) CVIMPSTUiBrandData; |
59 CleanupStack::PushL( self ); |
60 CleanupStack::PushL( self ); |
60 self->ConstructL(aEngine); |
61 self->ConstructL(aEngine); |
61 CleanupStack::Pop( self ); |
62 CleanupStack::Pop( self ); |
62 return self; |
63 return self; |
86 } |
87 } |
87 |
88 |
88 // Symbian OS default constructor can leave. |
89 // Symbian OS default constructor can leave. |
89 void CVIMPSTUiBrandData::ConstructL(MVIMPSTEngine& aEngine) |
90 void CVIMPSTUiBrandData::ConstructL(MVIMPSTEngine& aEngine) |
90 { |
91 { |
91 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::ConstructL") ); |
92 TRACER_AUTO; |
92 |
93 |
93 iBrandId = HBufC8::NewL( 100 ); |
94 iBrandId = HBufC8::NewL( 100 ); |
94 TPtr8 brandIdPtr( iBrandId->Des() ); |
95 TPtr8 brandIdPtr( iBrandId->Des() ); |
95 |
96 |
96 TInt version; |
97 TInt version; |
115 iDefaultMbmPath.Zero(); |
116 iDefaultMbmPath.Zero(); |
116 iDefaultMbmPath.Append( *resourceFilePath ); |
117 iDefaultMbmPath.Append( *resourceFilePath ); |
117 |
118 |
118 CleanupStack::PopAndDestroy(); |
119 CleanupStack::PopAndDestroy(); |
119 |
120 |
120 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::ConstructL, prepare branding access") ); |
121 TRACE(" prepare branding access" ); |
121 // Leaves if no brand for service, therefore trap |
122 // Leaves if no brand for service, therefore trap |
122 PrepareBrandingAccess(); |
123 PrepareBrandingAccess(); |
123 |
124 |
124 |
125 |
125 LoadIconsL();// load the existing icons |
126 LoadIconsL();// load the existing icons |
126 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::ConstructL out") ); |
|
127 } |
127 } |
128 |
128 |
129 // --------------------------------------------------------------------------- |
129 // --------------------------------------------------------------------------- |
130 // CVIMPSTUiBrandData::PrepareBrandingAccess() |
130 // CVIMPSTUiBrandData::PrepareBrandingAccess() |
131 // --------------------------------------------------------------------------- |
131 // --------------------------------------------------------------------------- |
132 // |
132 // |
133 TInt CVIMPSTUiBrandData::PrepareBrandingAccess() |
133 TInt CVIMPSTUiBrandData::PrepareBrandingAccess() |
134 { |
134 { |
135 |
135 TRACER_AUTO; |
136 TRAPD(err, iBrandingAccess = iBrandingFactory->CreateAccessL( *iBrandId, iLanguageId )); |
136 TRAPD(err, iBrandingAccess = iBrandingFactory->CreateAccessL( *iBrandId, iLanguageId )); |
137 |
137 |
138 return err; |
138 return err; |
139 } |
139 } |
140 |
140 |
145 // (other items were commented in a header). |
145 // (other items were commented in a header). |
146 // --------------------------------------------------------- |
146 // --------------------------------------------------------- |
147 // |
147 // |
148 CAknIconArray* CVIMPSTUiBrandData::LoadIconsLC( ) |
148 CAknIconArray* CVIMPSTUiBrandData::LoadIconsLC( ) |
149 { |
149 { |
150 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadIconsLC start") ); |
150 TRACER_AUTO; |
151 CAknIconArray* copyArray = new( ELeave )CAknIconArray( 4); |
151 CAknIconArray* copyArray = new( ELeave )CAknIconArray( 4); |
152 CleanupStack::PushL( copyArray ); |
152 CleanupStack::PushL( copyArray ); |
153 |
153 |
154 TInt count = iIconsArray->Count(); |
154 TInt count = iIconsArray->Count(); |
155 CGulIcon* newIcon = NULL; |
155 CGulIcon* newIcon = NULL; |
162 // because of SetBitmapsOwnedExternally |
162 // because of SetBitmapsOwnedExternally |
163 newIcon = CGulIcon::NewL( icon->Bitmap(),icon->Mask() ); |
163 newIcon = CGulIcon::NewL( icon->Bitmap(),icon->Mask() ); |
164 newIcon->SetBitmapsOwnedExternally( ETrue ); |
164 newIcon->SetBitmapsOwnedExternally( ETrue ); |
165 copyArray->AppendL( newIcon ); // takes the ownership of newIcon |
165 copyArray->AppendL( newIcon ); // takes the ownership of newIcon |
166 } |
166 } |
167 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadIconsLC end") ); |
167 |
168 return copyArray; // on cleanup stack |
168 return copyArray; // on cleanup stack |
169 } |
169 } |
170 |
170 |
171 // --------------------------------------------------------- |
171 // --------------------------------------------------------- |
172 // CVIMPSTUiBrandData::LoadIconsL |
172 // CVIMPSTUiBrandData::LoadIconsL |
174 // (other items were commented in a header). |
174 // (other items were commented in a header). |
175 // --------------------------------------------------------- |
175 // --------------------------------------------------------- |
176 // |
176 // |
177 CAknIconArray* CVIMPSTUiBrandData::LoadIconsL() |
177 CAknIconArray* CVIMPSTUiBrandData::LoadIconsL() |
178 { |
178 { |
179 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadIconsLC") ); |
179 TRACER_AUTO; |
180 //brand data is available |
180 //brand data is available |
181 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadIconsLC - do load") ); |
181 TRACE("do load" ); |
182 return LoadBrandIconsL(); |
182 return LoadBrandIconsL(); |
183 } |
183 } |
184 |
184 |
185 // --------------------------------------------------------- |
185 // --------------------------------------------------------- |
186 // CVIMPSTUiBrandData::LoadBrandIconsLC |
186 // CVIMPSTUiBrandData::LoadBrandIconsLC |
188 // (other items were commented in a header). |
188 // (other items were commented in a header). |
189 // --------------------------------------------------------- |
189 // --------------------------------------------------------- |
190 // |
190 // |
191 CAknIconArray* CVIMPSTUiBrandData::LoadBrandIconsL( ) |
191 CAknIconArray* CVIMPSTUiBrandData::LoadBrandIconsL( ) |
192 { |
192 { |
193 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandIconsLC - IN") ); |
193 TRACER_AUTO; |
194 delete iIconsArray; |
194 delete iIconsArray; |
195 iIconsArray = NULL; |
195 iIconsArray = NULL; |
196 |
196 |
197 iIconsArray = new( ELeave )CAknIconArray( 4); |
197 iIconsArray = new( ELeave )CAknIconArray( 4); |
198 // array granularity is 3, because 3 icons are added to array |
198 // array granularity is 3, because 3 icons are added to array |
199 |
199 |
200 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendoff") ); |
200 TRACE(" KEMbmConversationsQgnpropimfriendoff" ); |
201 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendoff) );//0 |
201 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendoff) );//0 |
202 |
202 |
203 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendon") ); |
203 TRACE("KEMbmConversationsQgnpropimfriendon" ); |
204 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendon) );//1 |
204 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendon) );//1 |
205 |
205 |
206 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendaway") ); |
206 TRACE(" KEMbmConversationsQgnpropimfriendaway" ); |
207 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendaway ) );//2 |
207 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendaway ) );//2 |
208 |
208 |
209 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendbusy") ); |
209 TRACE("KEMbmConversationsQgnpropimfriendbusy" ); |
210 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendbusy ) );//3 |
210 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendbusy ) );//3 |
211 |
211 |
212 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendinvisible") ); |
212 TRACE(" KEMbmConversationsQgnpropimfriendinvisible" ); |
213 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendinvisible ) );//4 |
213 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendinvisible ) );//4 |
214 |
214 |
215 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimimsg") ); |
215 TRACE(" KEMbmConversationsQgnpropimimsg" ); |
216 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimimsg ) );//5 |
216 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimimsg ) );//5 |
217 |
217 |
218 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimimsgnew") ); |
218 TRACE(" KEMbmConversationsQgnpropimimsgnew" ); |
219 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimimsgnew ) );//6 |
219 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimimsgnew ) );//6 |
220 |
220 |
221 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropservicedefaultavatar") ); |
221 TRACE(" KEMbmConversationsQgnpropservicedefaultavatar" ); |
222 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicedefaultavatar ) );//7 |
222 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicedefaultavatar ) );//7 |
223 |
223 |
224 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropservicefriendrequestreceived") ); |
224 TRACE(" KEMbmConversationsQgnpropservicefriendrequestreceived" ); |
225 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicefriendrequestreceived ) );//8 |
225 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicefriendrequestreceived ) );//8 |
226 |
226 |
227 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropservicefriendrequestsent") ); |
227 TRACE(" KEMbmConversationsQgnpropservicefriendrequestsent" ); |
228 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicefriendrequestsent ) );//9 |
228 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropservicefriendrequestsent ) );//9 |
229 |
229 |
230 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropserviceofffriendrequestreceived") ); |
230 TRACE(" KEMbmConversationsQgnpropserviceofffriendrequestreceived" ); |
231 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropserviceofffriendrequestreceived ) );//10 |
231 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropserviceofffriendrequestreceived ) );//10 |
232 |
232 |
233 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropserviceofffriendrequestsent") ); |
233 TRACE(" KEMbmConversationsQgnpropserviceofffriendrequestsent" ); |
234 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropserviceofffriendrequestsent ) );//11 |
234 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropserviceofffriendrequestsent ) );//11 |
235 |
235 |
236 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnpropimfriendonmobile") ); |
236 TRACE(" KEMbmConversationsQgnpropimfriendonmobile" ); |
237 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendonmobile ) );//12 |
237 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimfriendonmobile ) );//12 |
238 |
238 |
239 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnservtabavatarblocked") ); |
239 TRACE(" KEMbmConversationsQgnservtabavatarblocked" ); |
240 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimuserblocked ) );//13 |
240 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimuserblocked ) );//13 |
241 |
241 |
242 CHAT_DP( D_CHAT_LIT(" -> KEMbmConversationsQgnservtabavatarblocked") ); |
242 TRACE(" KEMbmConversationsQgnservtabavatarblocked" ); |
243 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimusercallforward ) );//14 |
243 iIconsArray->AppendL( LoadBrandBitmapL(KEMbmConversationsQgnpropimusercallforward ) );//14 |
244 |
244 |
245 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandIconsLC - OUT") ); |
245 |
246 return iIconsArray; |
246 return iIconsArray; |
247 } |
247 } |
248 |
248 |
249 // ----------------------------------------------------------------------------- |
249 // ----------------------------------------------------------------------------- |
250 // CVIMPSTUiBrandData::LoadBrandBitmapL |
250 // CVIMPSTUiBrandData::LoadBrandBitmapL |
251 // (other items were commented in a header). |
251 // (other items were commented in a header). |
252 // ----------------------------------------------------------------------------- |
252 // ----------------------------------------------------------------------------- |
253 // |
253 // |
254 CGulIcon* CVIMPSTUiBrandData::LoadBrandBitmapL( const TDesC8& aId ) |
254 CGulIcon* CVIMPSTUiBrandData::LoadBrandBitmapL( const TDesC8& aId ) |
255 { |
255 { |
256 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandBitmapL - IN") ); |
256 TRACER_AUTO; |
257 |
257 |
258 CFbsBitmap* bitmap = NULL; |
258 CFbsBitmap* bitmap = NULL; |
259 CFbsBitmap* mask = NULL; |
259 CFbsBitmap* mask = NULL; |
260 |
260 |
261 //EASY WAY TO DO THINGS.. :) |
261 //EASY WAY TO DO THINGS.. :) |
262 //Fetching bitmaps from the server. |
262 //Fetching bitmaps from the server. |
263 if(!iBrandingAccess) |
263 if(!iBrandingAccess) |
264 { |
264 { |
265 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandBitmapL - create access") ); |
265 TRACE("create access" ); |
266 PrepareBrandingAccess(); |
266 PrepareBrandingAccess(); |
267 } |
267 } |
268 TRAPD(err_bitmap, iBrandingAccess->GetBitmapL( aId, bitmap, mask )); |
268 TRAPD(err_bitmap, iBrandingAccess->GetBitmapL( aId, bitmap, mask )); |
269 if(KErrNone != err_bitmap) |
269 if(KErrNone != err_bitmap) |
270 { |
270 { |
271 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandBitmapL - err") ); |
271 TRACE(" err" ); |
272 User::Leave( err_bitmap ); |
272 User::Leave( err_bitmap ); |
273 } |
273 } |
274 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandBitmapL - create icon") ); |
274 TRACE("create icon" ); |
275 CGulIcon* icon = CGulIcon::NewL(bitmap, mask); |
275 CGulIcon* icon = CGulIcon::NewL(bitmap, mask); |
276 icon->SetBitmapsOwnedExternally( EFalse ); |
276 icon->SetBitmapsOwnedExternally( EFalse ); |
277 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadBrandBitmapL - return icon") ); |
277 TRACE(" return icon" ); |
278 return icon; |
278 return icon; |
279 } |
279 } |
280 |
280 |
281 // ----------------------------------------------------------------------------- |
281 // ----------------------------------------------------------------------------- |
282 // CVIMPSTUiBrandData::LoadDefaultBitmapL |
282 // CVIMPSTUiBrandData::LoadDefaultBitmapL |
284 // ----------------------------------------------------------------------------- |
284 // ----------------------------------------------------------------------------- |
285 // |
285 // |
286 CGulIcon* CVIMPSTUiBrandData::LoadDefaultBitmapL( TInt aBitmapId, TInt aMaskId, |
286 CGulIcon* CVIMPSTUiBrandData::LoadDefaultBitmapL( TInt aBitmapId, TInt aMaskId, |
287 const TDesC& aFullPath ) |
287 const TDesC& aFullPath ) |
288 { |
288 { |
289 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::LoadDefaultBitmapL IN") ); |
289 TRACER_AUTO; |
290 |
290 |
291 CFbsBitmap* bitmap = NULL; |
291 CFbsBitmap* bitmap = NULL; |
292 CFbsBitmap* mask = NULL; |
292 CFbsBitmap* mask = NULL; |
293 AknIconUtils::CreateIconLC( bitmap,mask, aFullPath,aBitmapId,aMaskId ); |
293 AknIconUtils::CreateIconLC( bitmap,mask, aFullPath,aBitmapId,aMaskId ); |
294 CGulIcon* gulIcon = CGulIcon::NewL( bitmap, mask ); |
294 CGulIcon* gulIcon = CGulIcon::NewL( bitmap, mask ); |
302 // (other items were commented in a header). |
302 // (other items were commented in a header). |
303 // --------------------------------------------------------- |
303 // --------------------------------------------------------- |
304 // |
304 // |
305 CAknIconArray* CVIMPSTUiBrandData::LoadOwnStatusIconsLC( ) |
305 CAknIconArray* CVIMPSTUiBrandData::LoadOwnStatusIconsLC( ) |
306 { |
306 { |
307 TRACER_AUTO; |
|
307 //EASY WAY TO DO THINGS.. :) |
308 //EASY WAY TO DO THINGS.. :) |
308 //Fetching bitmaps from the server. |
309 //Fetching bitmaps from the server. |
309 if(!iBrandingAccess) |
310 if(!iBrandingAccess) |
310 { |
311 { |
311 if (KErrNone != PrepareBrandingAccess()) |
312 if (KErrNone != PrepareBrandingAccess()) |
323 // (other items were commented in a header). |
324 // (other items were commented in a header). |
324 // --------------------------------------------------------- |
325 // --------------------------------------------------------- |
325 // |
326 // |
326 CAknIconArray* CVIMPSTUiBrandData::LoadBrandOwnStatusIconsLC( ) |
327 CAknIconArray* CVIMPSTUiBrandData::LoadBrandOwnStatusIconsLC( ) |
327 { |
328 { |
329 TRACER_AUTO; |
|
328 // array granularity is 3, because 3 icons are added to array |
330 // array granularity is 3, because 3 icons are added to array |
329 CAknIconArray* icons = new( ELeave )CAknIconArray( 5); |
331 CAknIconArray* icons = new( ELeave )CAknIconArray( 5); |
330 CleanupStack::PushL( icons ); |
332 CleanupStack::PushL( icons ); |
331 |
333 |
332 // online |
334 // online |
353 // (other items were commented in a header). |
355 // (other items were commented in a header). |
354 // --------------------------------------------------------- |
356 // --------------------------------------------------------- |
355 // |
357 // |
356 CAknIconArray* CVIMPSTUiBrandData::LoadDefaultOwnStatusIconsLC( const TDesC& aMbmFile) |
358 CAknIconArray* CVIMPSTUiBrandData::LoadDefaultOwnStatusIconsLC( const TDesC& aMbmFile) |
357 { |
359 { |
360 TRACER_AUTO; |
|
358 // array granularity is 4, because 4 icons are added to array |
361 // array granularity is 4, because 4 icons are added to array |
359 CAknIconArray* icons = new( ELeave )CAknIconArray( 5); |
362 CAknIconArray* icons = new( ELeave )CAknIconArray( 5); |
360 CleanupStack::PushL( icons ); |
363 CleanupStack::PushL( icons ); |
361 |
364 |
362 |
365 |
388 // --------------------------------------------------------- |
391 // --------------------------------------------------------- |
389 // |
392 // |
390 |
393 |
391 TInt CVIMPSTUiBrandData::GetBrandBitmapsL( CFbsBitmap **aBitmap, CFbsBitmap **aMask) |
394 TInt CVIMPSTUiBrandData::GetBrandBitmapsL( CFbsBitmap **aBitmap, CFbsBitmap **aMask) |
392 { |
395 { |
393 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::GetBrandBitmapsL") ); |
396 TRACER_AUTO; |
397 |
|
394 TInt error =KErrNone; |
398 TInt error =KErrNone; |
395 if ( !iBrandingAccess && KErrNone != PrepareBrandingAccess()) |
399 if ( !iBrandingAccess && KErrNone != PrepareBrandingAccess()) |
396 { |
400 { |
397 //load default icon |
401 //load default icon |
398 AknIconUtils::CreateIconLC( *aBitmap, *aMask, |
402 AknIconUtils::CreateIconLC( *aBitmap, *aMask, |
402 } |
406 } |
403 else |
407 else |
404 { |
408 { |
405 TRAP(error, iBrandingAccess->GetBitmapL( KEMbmConversationsQgnpropimfriendon, *aBitmap, *aMask )); |
409 TRAP(error, iBrandingAccess->GetBitmapL( KEMbmConversationsQgnpropimfriendon, *aBitmap, *aMask )); |
406 } |
410 } |
407 CHAT_DP( D_CHAT_LIT("CVIMPSTUiBrandData::GetBrandBitmapsL returns: %d"), error ); |
411 TRACE("returns: %d", error ); |
408 return error; |
412 return error; |
409 } |
413 } |
410 |
414 |
411 // --------------------------------------------------------- |
415 // --------------------------------------------------------- |
412 // --------------------------------------------------------- |
416 // --------------------------------------------------------- |
414 // (other items were commented in a header). |
418 // (other items were commented in a header). |
415 // --------------------------------------------------------- |
419 // --------------------------------------------------------- |
416 // |
420 // |
417 HBufC* CVIMPSTUiBrandData::GetToUBrandedStringL() |
421 HBufC* CVIMPSTUiBrandData::GetToUBrandedStringL() |
418 { |
422 { |
423 TRACER_AUTO; |
|
419 HBufC* prompt= NULL; |
424 HBufC* prompt= NULL; |
420 if(iBrandingAccess || KErrNone == PrepareBrandingAccess()) |
425 if(iBrandingAccess || KErrNone == PrepareBrandingAccess()) |
421 { |
426 { |
422 TRAP_IGNORE(prompt = iBrandingAccess->GetTextL( KToumessage )); |
427 TRAP_IGNORE(prompt = iBrandingAccess->GetTextL( KToumessage )); |
423 } |
428 } |
443 // CVIMPSTUiBrandData::GetToUStringL() |
448 // CVIMPSTUiBrandData::GetToUStringL() |
444 // ----------------------------------------------------------------------------- |
449 // ----------------------------------------------------------------------------- |
445 // |
450 // |
446 HBufC* CVIMPSTUiBrandData::GetToUStringL() |
451 HBufC* CVIMPSTUiBrandData::GetToUStringL() |
447 { |
452 { |
453 TRACER_AUTO; |
|
448 HBufC* TouDes = NULL; |
454 HBufC* TouDes = NULL; |
449 const TInt KLangBufLength = 2; |
455 const TInt KLangBufLength = 2; |
450 const TInt KLeadingZero = 0; |
456 const TInt KLeadingZero = 0; |
451 TBuf<KLangBufLength> langBuf; |
457 TBuf<KLangBufLength> langBuf; |
452 |
458 |
534 // CVIMPSTUiBrandData::GetToUStringL() |
540 // CVIMPSTUiBrandData::GetToUStringL() |
535 // ----------------------------------------------------------------------------- |
541 // ----------------------------------------------------------------------------- |
536 // |
542 // |
537 HBufC* CVIMPSTUiBrandData::ConcatLC( TDesC& aDesc1, TDesC& aDesc2 ) |
543 HBufC* CVIMPSTUiBrandData::ConcatLC( TDesC& aDesc1, TDesC& aDesc2 ) |
538 { |
544 { |
545 TRACER_AUTO; |
|
539 HBufC* resultDesc = HBufC::NewLC( aDesc1.Length() + aDesc2.Length() ); |
546 HBufC* resultDesc = HBufC::NewLC( aDesc1.Length() + aDesc2.Length() ); |
540 resultDesc->Des().Append( aDesc1 ); |
547 resultDesc->Des().Append( aDesc1 ); |
541 resultDesc->Des().Append( aDesc2 ); |
548 resultDesc->Des().Append( aDesc2 ); |
542 return resultDesc; |
549 return resultDesc; |
543 } |
550 } |