|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: |
|
15 * Implementation of MWmlBrowserFavouritesListboxIconHandler. |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <AknIconArray.h> |
|
23 #include <FavouritesItem.h> |
|
24 #include "BrowserFavouritesListboxIconHandler.h" |
|
25 #include "BrowserFavouritesIconIndexArray.h" |
|
26 #include "BrowserFavouritesListbox.h" |
|
27 #include "BrowserFaviconHandler.h" |
|
28 |
|
29 // CONSTANTS |
|
30 |
|
31 //================== MEMBER FUNCTIONS ========================================= |
|
32 |
|
33 //----------------------------------------------------------------------------- |
|
34 // MBrowserFavouritesListboxIconHandler::CreateIconArrayL |
|
35 //----------------------------------------------------------------------------- |
|
36 // |
|
37 CAknIconArray* MBrowserFavouritesListboxIconHandler::CreateIconArrayL() const |
|
38 { |
|
39 return LoadIconsL( ); |
|
40 } |
|
41 |
|
42 //----------------------------------------------------------------------------- |
|
43 // MBrowserFavouritesListboxIconHandler::IconIndexes |
|
44 //----------------------------------------------------------------------------- |
|
45 // |
|
46 TBrowserFavouritesIconIndexes |
|
47 MBrowserFavouritesListboxIconHandler::IconIndexes( |
|
48 const CFavouritesItem& aItem, |
|
49 CBrowserFavouritesListbox* aListbox ) const |
|
50 { |
|
51 TBrowserFavouritesIconIndexes indexes; |
|
52 |
|
53 // Do we have a Favicon? |
|
54 TInt faviconIndex; |
|
55 faviconIndex = aListbox->FaviconHandler()->GetFaviconArrayIndex( aItem ); |
|
56 |
|
57 if ( faviconIndex != KErrNotFound && aListbox->GetDefaultData().iPreferedId != aItem.Uid() ) |
|
58 { |
|
59 indexes.iItemIcon = faviconIndex; |
|
60 } |
|
61 else |
|
62 { |
|
63 indexes.iItemIcon = ItemIconIndex( aItem,aListbox ); |
|
64 } |
|
65 |
|
66 indexes.iBearerIcon = KBrowserFavouritesNoBearerIcon; //Bearer icons removed |
|
67 return indexes; |
|
68 } |
|
69 |
|
70 //----------------------------------------------------------------------------- |
|
71 // MBrowserFavouritesListboxIconHandler::BearerIconIndex |
|
72 //----------------------------------------------------------------------------- |
|
73 // |
|
74 TInt MBrowserFavouritesListboxIconHandler::BearerIconIndex( |
|
75 const TFavouritesWapAp /*aAccessPoint*/, |
|
76 const CApListItemList& /*aAccessPoints*/ |
|
77 ) const |
|
78 { |
|
79 return KBrowserFavouritesNoBearerIcon; |
|
80 } |
|
81 |
|
82 // End of File |
|
83 |