|
1 /* |
|
2 * Copyright (c) 2004 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: LandmarksUi Content File - Interface for selector icon manager |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef MLMKSELECTORICONMGR_H |
|
26 #define MLMKSELECTORICONMGR_H |
|
27 |
|
28 // INCLUDES |
|
29 #include <badesca.h> |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CAknIconArray; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 |
|
36 /** |
|
37 * MLmkSelectorIconMgr class |
|
38 */ |
|
39 class MLmkSelectorIconMgr |
|
40 { |
|
41 public: |
|
42 |
|
43 enum TIconType { |
|
44 EDefinedIcon = 0, // any non-default icon |
|
45 ELandmarkDefaultIcon, |
|
46 ECategoryDefaultIcon, |
|
47 ERestaurantDefaultIcon, |
|
48 EBusStopDefaultIcon |
|
49 }; |
|
50 |
|
51 public: // New functions |
|
52 /** |
|
53 * Loads icon from file to icon array from parameter file and file |
|
54 * index. For subsequent calls icon identification data is cached |
|
55 * so same index in array is returned without reloading data from file. |
|
56 * NOTE: icon mask id must be next from icon id in icon mbg file. |
|
57 * Leaves with Symbian error code if error. |
|
58 * @param aMbmFileName icon file name |
|
59 * @param aIconIdInFile id number of icon in file |
|
60 * @return icon array index |
|
61 */ |
|
62 virtual TInt GetIconL( const TDesC& aMbmFileName, |
|
63 TInt aIconIdInFile ) = 0; |
|
64 |
|
65 /** |
|
66 * Loads icon based on icon type. Returns KErrNotFound if not available. |
|
67 * @param aIcon icon type. |
|
68 * @return icon array index. |
|
69 */ |
|
70 virtual TInt GetDefaultIconL( TIconType aIcon ) = 0; |
|
71 |
|
72 /** |
|
73 * Sets the default icon for a given type. |
|
74 * If default icon has already been set this method |
|
75 * leaves with KErrAlreadyExists. |
|
76 * @param aIcon type of the icon |
|
77 * @param aMbmFileName icon file name |
|
78 * @param aIconIdInFile id number of icon in file |
|
79 */ |
|
80 virtual void SetDefaultIconL( TIconType aIcon, |
|
81 const TDesC& aMbmFileName, |
|
82 TInt aIconIdInFile ) = 0; |
|
83 |
|
84 /** |
|
85 * Resets icon manager. Resets and destroyes icon array content and |
|
86 * deletes all icon manager data, including default icons. |
|
87 */ |
|
88 virtual void ResetMgrL() = 0; |
|
89 |
|
90 // TODO: some method like InvalidateLmItemIconsL should be added |
|
91 // which could be used when database is updated. Otherwise more icons |
|
92 // are just loaded to icon manager. |
|
93 }; |
|
94 |
|
95 #endif // MLMKSELECTORICONMGR_H |
|
96 |
|
97 // End of File |