1 /* |
|
2 * Copyright (c) 2002-2007 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: Refresh command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CREFRESHHANDLER_H |
|
21 #define CREFRESHHANDLER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelsat.h> |
|
25 #include "SatSTypes.h" |
|
26 #include "CSatCommandHandler.h" |
|
27 |
|
28 // FORWARD DECLARATION |
|
29 class MSatUtils; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Command handler for Refresh command. |
|
35 * |
|
36 * @lib RefreshCmd.lib |
|
37 * @since Series 60 3.0 |
|
38 */ |
|
39 class CRefreshHandler : public CSatCommandHandler |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 * @param aUtils SAT Utils interface |
|
46 */ |
|
47 static CRefreshHandler* NewL( MSatUtils* aUtils ); |
|
48 |
|
49 /** |
|
50 * Destructor. |
|
51 */ |
|
52 virtual ~CRefreshHandler(); |
|
53 |
|
54 public: // Functions from base classes |
|
55 |
|
56 /** |
|
57 * From MSatEventObserver. Overrides the default implementation. |
|
58 * @param aEvent An event that is occured. |
|
59 */ |
|
60 void Event( TInt aEvent ); |
|
61 |
|
62 protected: // Functions from base classes |
|
63 |
|
64 /** |
|
65 * From CActive Cancels the usat request. |
|
66 */ |
|
67 void DoCancel(); |
|
68 |
|
69 /** |
|
70 * From CCommandHandler Requests the command notification. |
|
71 * @param aStatus Request status |
|
72 */ |
|
73 void IssueUSATRequest( TRequestStatus& aStatus ); |
|
74 |
|
75 /** |
|
76 * From CSatCommandHandler Precheck before executing the command. |
|
77 * @return TBool indicating command is currently allowed. |
|
78 */ |
|
79 TBool CommandAllowed(); |
|
80 |
|
81 /** |
|
82 * From CSatCommandHandler Need for ui session. |
|
83 * @return TBool indicating need of ui session. |
|
84 */ |
|
85 TBool NeedUiSession(); |
|
86 |
|
87 /** |
|
88 * From CSatCommandHandler Called when USAT API notifies that command. |
|
89 */ |
|
90 void HandleCommand(); |
|
91 |
|
92 /** |
|
93 * From CSatCommandHandler. Indicates the failure of launching ui client. |
|
94 */ |
|
95 void UiLaunchFailed(); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * C++ default constructor. |
|
101 */ |
|
102 CRefreshHandler(); |
|
103 |
|
104 /** |
|
105 * By default Symbian 2nd phase constructor is private. |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 private: // New functions |
|
110 |
|
111 /** |
|
112 * Notifies the refresh clients about refresh cancel. |
|
113 */ |
|
114 void NotifyRefreshClientsCancel(); |
|
115 |
|
116 /** |
|
117 * Completes refresh when all clients has completed. |
|
118 */ |
|
119 void CompleteRefresh(); |
|
120 |
|
121 private: // Data |
|
122 |
|
123 // Refresh command data. |
|
124 RSat::TRefreshV2 iRefreshData; |
|
125 |
|
126 // Refresh command package. |
|
127 RSat::TRefreshV2Pckg iRefreshPckg; |
|
128 |
|
129 // Response from client |
|
130 RSat::TRefreshRspV1 iRefreshRsp; |
|
131 |
|
132 // Response package. |
|
133 RSat::TRefreshRspV1Pckg iRefreshRspPckg; |
|
134 |
|
135 // Count of refresh clients notified refresh but not yet answered. |
|
136 TInt iRefreshNotifyClientCount; |
|
137 |
|
138 // True whether any client has indicated additional EF read. |
|
139 TBool iAdditionalEFRead; |
|
140 |
|
141 // Indicates SimReset type refresh is executing. |
|
142 TBool iSimResetExecuting; |
|
143 }; |
|
144 |
|
145 #endif // CREFRESHHANDLER_H |
|
146 |
|
147 // End of File |
|