|
1 /* |
|
2 * Copyright (c) 2002-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: This is the handler for the SIM Application Toolkit Get Inkey |
|
15 * proactive command. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSATCGETINKEYHANDLER_H |
|
22 #define CSATCGETINKEYHANDLER_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include "etelsat.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class RSatUiSession; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * This is the Get Inkey command active object handler. |
|
35 * The class receives command data from ETel, processes it and |
|
36 * passes it on to the user. Following that, the response is encoded and |
|
37 * sent back to ETel. |
|
38 * |
|
39 * @lib SatClient.lib |
|
40 * @since Series 60 2.6 |
|
41 */ |
|
42 class CSatCGetInkeyHandler : public CActive |
|
43 { |
|
44 public: // Constructors and destructor |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 * @param aSat A pointer to a session (does not take ownership). |
|
49 */ |
|
50 static CSatCGetInkeyHandler* NewL( RSatUiSession* aSat ); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CSatCGetInkeyHandler(); |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 /** |
|
60 * Starts listening for the Sat command. |
|
61 */ |
|
62 void Start(); |
|
63 |
|
64 protected: // Functions from base classes |
|
65 |
|
66 /** |
|
67 * From CActive |
|
68 * |
|
69 * Handles the request completion. |
|
70 */ |
|
71 void RunL(); |
|
72 |
|
73 /** |
|
74 * From CActive |
|
75 * |
|
76 * Implements the cancel protocol. |
|
77 */ |
|
78 void DoCancel(); |
|
79 |
|
80 private: // Constructors |
|
81 |
|
82 /** |
|
83 * C++ default constructor. |
|
84 * @param aPriority The priority of this active object. |
|
85 * @param aSat A pointer to a session (does not take ownership). |
|
86 */ |
|
87 CSatCGetInkeyHandler( |
|
88 TInt aPriority, |
|
89 RSatUiSession* aSat ); |
|
90 |
|
91 private: // New functions |
|
92 |
|
93 /** |
|
94 * Examine the client response. |
|
95 * @param aResponse Client response data |
|
96 * @param aCharacter User input |
|
97 * @param aRequestedIconDisplayed Informs if icon is not used |
|
98 */ |
|
99 void ExamineClientResponse( |
|
100 TSatUiResponse aResponse, |
|
101 const TChar& aCharacter, |
|
102 TBool aRequestedIconDisplayed ); |
|
103 |
|
104 /** |
|
105 * Return given duration in seconds. |
|
106 * @return Return given duration in seconds. |
|
107 */ |
|
108 TUint DurationInTenthOfSeconds() const; |
|
109 |
|
110 /** |
|
111 * Convert seconds to duration. |
|
112 * @param aDurationInSeconds Duration in seconds |
|
113 */ |
|
114 void TenthOfSecondsToDuration( TUint aDurationInSeconds ); |
|
115 |
|
116 private: // Data |
|
117 |
|
118 /** |
|
119 * Reference to the Sat API |
|
120 */ |
|
121 RSatUiSession* iSession; |
|
122 |
|
123 /** |
|
124 * The data structure for the command data |
|
125 */ |
|
126 RSat::TGetInkeyV2 iGetInkeyData; |
|
127 |
|
128 /** |
|
129 * The data package for IPC |
|
130 */ |
|
131 RSat::TGetInkeyV2Pckg iGetInkeyPckg; |
|
132 |
|
133 /** |
|
134 * The response data structure |
|
135 */ |
|
136 RSat::TGetInkeyRspV2 iGetInkeyRsp; |
|
137 |
|
138 /** |
|
139 * The response package for IPC |
|
140 */ |
|
141 RSat::TGetInkeyRspV2Pckg iGetInkeyRspPckg; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif // CSATCGETINKEYHANDLER_H |
|
146 |
|
147 // End of File |