|
1 /* |
|
2 * Copyright (c) 2008 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: Friends-array decorator |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _CVIMPSTUIICONFILEPROVIDER_H |
|
21 #define _CVIMPSTUIICONFILEPROVIDER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 #include <aknsitemid.h> |
|
26 #include <akniconutils.h> |
|
27 |
|
28 #include <AknIconArray.h> |
|
29 #include <BADESCA.H> |
|
30 |
|
31 |
|
32 class CVIMPSTUiIconFileProvider : public CBase, public MAknIconFileProvider |
|
33 { |
|
34 public: |
|
35 /** |
|
36 * Constructor |
|
37 * @param aFile File handle to use |
|
38 */ |
|
39 CVIMPSTUiIconFileProvider( RFile& aFile ); |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CVIMPSTUiIconFileProvider(); |
|
46 |
|
47 |
|
48 // from base class MAknIconFileProvider |
|
49 |
|
50 /** |
|
51 * Returns an open file handle to the icon file. |
|
52 * This method should leave if an icon file with specified type does |
|
53 * not exist. That may be the case e.g. with MBM file, |
|
54 * if there are no bitmap icons. |
|
55 * |
|
56 * Note! RFs::ShareProtected must be called to the RFs instance used |
|
57 * for opening the file. |
|
58 * |
|
59 * @param aFile Icon file should be opened in this file handle, which |
|
60 * is an empty file handle, when the AknIcon framework calls this method. |
|
61 * The AknIcon framework takes care of closing the file handle after |
|
62 * having used it. |
|
63 * @param aType Icon file type. |
|
64 */ |
|
65 virtual void RetrieveIconFileHandleL( |
|
66 RFile& aFile, const TIconFileType /*aType*/ ); |
|
67 |
|
68 /** |
|
69 * With this method, AknIcon framework informs that it does not use |
|
70 * this MAknIconFileProvider instance any more. After this call, |
|
71 * it is ok to delete the object. This can be implemented simply |
|
72 * e.g. by deleting self in this callback. |
|
73 * Normally, this callback is invoked when the icon in question |
|
74 * is deleted. |
|
75 * Note, however, that if the same MAknIconFileProvider instance is |
|
76 * supplied in multiple CreateIcon calls, then it must be accessible |
|
77 * by AknIcon framework until it has signalled a matching amount |
|
78 * of these callbacks. |
|
79 */ |
|
80 virtual void Finished(); |
|
81 |
|
82 private: |
|
83 /** |
|
84 * File to use. |
|
85 * Own. |
|
86 */ |
|
87 RFile iFile; |
|
88 };//_CVIMPSTUIICONFILEPROVIDER_H |
|
89 |