|
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 "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: CAknFileProviderIconManager class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef AKN_FILE_PROVIDER_ICON_MANAGER_H |
|
21 #define AKN_FILE_PROVIDER_ICON_MANAGER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <fbs.h> |
|
26 #include "AknIconManager.h" |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * class CAknFileProviderIconManager. |
|
34 * @internal |
|
35 */ |
|
36 NONSHARABLE_CLASS(CAknFileProviderIconManager) : public CAknIconManager |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 static CAknFileProviderIconManager* NewL( |
|
41 MAknIconFileProvider& aFile, |
|
42 const TInt16 aBitmapId, |
|
43 const TInt16 aMaskId ); |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 ~CAknFileProviderIconManager(); |
|
49 |
|
50 private: // From CAknIconManager |
|
51 |
|
52 /** |
|
53 * Virtual method. |
|
54 * Loads a bitmap icon. |
|
55 */ |
|
56 void LoadBitmapIconL(); |
|
57 |
|
58 /** |
|
59 * Virtual method. |
|
60 * Returns opened file handle to the icon file, |
|
61 * if such is supplied by the client. |
|
62 */ |
|
63 RFile* FileHandleL( MAknIconFileProvider::TIconFileType aType ); |
|
64 |
|
65 /** |
|
66 * Virtual method. |
|
67 * This is called, when the file handle is no longer required, |
|
68 * and should be closed. |
|
69 */ |
|
70 void ReleaseFileHandle(); |
|
71 |
|
72 private: // Private constructors |
|
73 |
|
74 CAknFileProviderIconManager( |
|
75 MAknIconFileProvider& aFile, |
|
76 const TInt16 aBitmapId, |
|
77 const TInt16 aMaskId ); |
|
78 |
|
79 void ConstructL(); |
|
80 |
|
81 private: // Data |
|
82 |
|
83 // Icon file provider implemented by the client. |
|
84 // This class is responsible for calling MAknIconFileProvider::Finished, |
|
85 // when the provider is not accessed any more, and can be deleted by the client. |
|
86 MAknIconFileProvider& iFileProvider; |
|
87 |
|
88 // File handle provided by the provider is stored here during its usage. |
|
89 RFile iFile; |
|
90 // Information of which file type is currently opened in iFile; |
|
91 TInt iFileType; |
|
92 }; |
|
93 |
|
94 #endif // AKN_FILE_PROVIDER_ICON_MANAGER_H |
|
95 |
|
96 // End of File |