|
1 /* |
|
2 * Copyright (c) 2004-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: Interface for accesing icon data in SIM. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CSATICONHANDLER_H |
|
20 #define CSATICONHANDLER_H |
|
21 |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include "MSatSIconAPI.h" |
|
25 |
|
26 class MSatIconObserver; |
|
27 |
|
28 /** |
|
29 * Interface for accesing icon data in SIM. |
|
30 * |
|
31 * @lib SatEngine.lib |
|
32 * @since 3.0 |
|
33 */ |
|
34 class CSatIconHandler : public CActive, |
|
35 public MSatSIconAPI |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 CSatIconHandler( MSatApi& aSatApi ); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CSatIconHandler(); |
|
48 |
|
49 public: // Functions from base classes |
|
50 |
|
51 /** |
|
52 * From MSatIconAPI. Gets the icon info from SIM. |
|
53 * @param aRecordNumber Specifies the EF_IMG in SIM. |
|
54 * @param aIconEf Contains the icon informations from SIM in returning |
|
55 * of the method. |
|
56 * @param aObserver Observer for icon info get completion. |
|
57 */ |
|
58 void GetIconInfo( |
|
59 TUint8 aRecordNumber, |
|
60 RSat::TIcon& aIconEf, |
|
61 MSatIconObserver& aObserver ); |
|
62 |
|
63 /** |
|
64 * From MSatIconAPI. Gets the icon image. |
|
65 * @param aInstanceInfo Informatio of the icon, which data is |
|
66 * fetched from SIM. |
|
67 * @param aInstance Contains the icon data from SIM in returning of the |
|
68 * method. |
|
69 * @param aObserver Observer for icon image get completion. |
|
70 */ |
|
71 void GetIconInstance( |
|
72 const RSat::TInstanceInfoV3& aInstanceInfo, |
|
73 TDes8& aInstance, |
|
74 MSatIconObserver& aObserver ); |
|
75 |
|
76 /** |
|
77 * From MSatIconAPI. Gets color lookup table of the icon. |
|
78 * @param aInstanceNumber Image instance number. |
|
79 * @param aOffset Offset of the clut. |
|
80 * @param aClut Contains the Clut of the icon in returning of the |
|
81 * method. |
|
82 * @param aObserver Observer for clut get completion. |
|
83 */ |
|
84 void GetClut( |
|
85 TUint aInstanceNumber, |
|
86 TUint aOffset, |
|
87 TDes8& aClut, |
|
88 MSatIconObserver& aObserver ); |
|
89 /* |
|
90 * Set a mode to determine whether to fetch icons from NAA syncronously |
|
91 * or asynchronously. |
|
92 * |
|
93 * @param aMode Synchronous or asynchronous mode. Icons would be |
|
94 * fetched from NAA in sychronous mode if SAT UI was closed by |
|
95 * using the End Key. Otherwise, in asynchronous mode. |
|
96 * @return None |
|
97 */ |
|
98 void SetIconFetchingMode( TBool aMode ); |
|
99 |
|
100 protected: // Functions from base classes |
|
101 |
|
102 /** |
|
103 * From CActive |
|
104 */ |
|
105 void DoCancel(); |
|
106 |
|
107 /** |
|
108 * From CActive |
|
109 */ |
|
110 void RunL(); |
|
111 |
|
112 /** |
|
113 * From CActive |
|
114 * @param aError Received error code |
|
115 * @return Result error code |
|
116 */ |
|
117 TInt RunError( TInt aError ); |
|
118 |
|
119 private: // Data |
|
120 |
|
121 // Sat api |
|
122 MSatApi& iSatApi; |
|
123 |
|
124 // Indicates GetIconInfo is active. |
|
125 TBool iGetIconInfoActive; |
|
126 |
|
127 // Indicates GetIconInstance is active. |
|
128 TBool iGetIconInstanceActive; |
|
129 |
|
130 // Indicates GetClut is active. |
|
131 TBool iGetClutActive; |
|
132 |
|
133 // Observer for icon actions. |
|
134 MSatIconObserver* iObserver; |
|
135 |
|
136 // Indicates whether to fetch icons from NAA syncronously or |
|
137 // asynchronously. |
|
138 TBool iSyncIconFetching; |
|
139 }; |
|
140 |
|
141 #endif // CSATICONHANDLER_H |