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: CloseChannel command handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CCLOSECHANNELHANDLER_H |
|
21 #define CCLOSECHANNELHANDLER_H |
|
22 |
|
23 #include <etelsat.h> |
|
24 |
|
25 #include "CSatCommandHandler.h" |
|
26 #include "SatSTypes.h" |
|
27 |
|
28 class MSatUtils; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Command handler for CloseChannel command. |
|
34 * |
|
35 * @lib CloseChannelCmd.lib |
|
36 * @since Series 60 v3.0 |
|
37 */ |
|
38 class CCloseChannelHandler : public CSatCommandHandler |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 static CCloseChannelHandler* NewL( MSatUtils* aUtils ); |
|
44 |
|
45 virtual ~CCloseChannelHandler(); |
|
46 |
|
47 // from base class MSatCommand |
|
48 |
|
49 /** |
|
50 * From MSatCommand. |
|
51 * Response from the client |
|
52 * |
|
53 */ |
|
54 void ClientResponse(); |
|
55 |
|
56 protected: |
|
57 |
|
58 // from base class CActive |
|
59 |
|
60 /** |
|
61 * From CActive. |
|
62 * Cancels the usat request. |
|
63 * |
|
64 */ |
|
65 void DoCancel(); |
|
66 |
|
67 // from base class CSatCommandHandler |
|
68 |
|
69 /** |
|
70 * From CSatCommandHandler. |
|
71 * Requests the command notification. |
|
72 * |
|
73 * @param aStatus Request status to active object notification |
|
74 */ |
|
75 void IssueUSATRequest( TRequestStatus& aStatus ); |
|
76 |
|
77 /** |
|
78 * From CSatCommandHandler. |
|
79 * Precheck before executing the command. |
|
80 * |
|
81 * @return TBool indicating is this command allowed to execute. |
|
82 */ |
|
83 TBool CommandAllowed(); |
|
84 |
|
85 /** |
|
86 * From CSatCommandHandler. |
|
87 * Need for ui session. |
|
88 * |
|
89 * @return TBool indicating does this command need UI session. |
|
90 */ |
|
91 TBool NeedUiSession(); |
|
92 |
|
93 /** |
|
94 * From CSatCommandHandler. |
|
95 * Called when USAT API notifies that command. |
|
96 * |
|
97 */ |
|
98 void HandleCommand(); |
|
99 |
|
100 /** |
|
101 * From CSatCommandHandler. |
|
102 * Indicates the failure of launching ui client. |
|
103 * |
|
104 */ |
|
105 void UiLaunchFailed(); |
|
106 |
|
107 private: |
|
108 |
|
109 CCloseChannelHandler(); |
|
110 |
|
111 /** |
|
112 * Sends notification to UI. |
|
113 * |
|
114 * @return KErrNone if notification is sent successfully |
|
115 */ |
|
116 TInt SendUiNotification(); |
|
117 |
|
118 private: // data |
|
119 |
|
120 /** |
|
121 * CloseChannel command data |
|
122 */ |
|
123 RSat::TCloseChannelV2 iCloseChannelData; |
|
124 |
|
125 /** |
|
126 * CloseChannel command package |
|
127 */ |
|
128 RSat::TCloseChannelV2Pckg iCloseChannelPckg; |
|
129 |
|
130 /** |
|
131 * CloseChannel response data |
|
132 */ |
|
133 RSat::TCloseChannelRspV2 iCloseChannelRspData; |
|
134 |
|
135 /** |
|
136 * CloseChannel response package |
|
137 */ |
|
138 RSat::TCloseChannelRspV2Pckg iCloseChannelRspPckg; |
|
139 |
|
140 /** |
|
141 * Data to UI |
|
142 */ |
|
143 TSatNotificationV1 iCloseChannelUiData; |
|
144 |
|
145 /** |
|
146 * IPC Package to ui data |
|
147 */ |
|
148 TSatNotificationV1Pckg iCloseChannelUiPckg; |
|
149 |
|
150 /** |
|
151 * UI Response |
|
152 */ |
|
153 TSatNotificationRspV1 iCloseChannelUiRsp; |
|
154 |
|
155 /** |
|
156 * IPC Package to response |
|
157 */ |
|
158 TSatNotificationRspV1Pckg iCloseChannelUiRspPckg; |
|
159 |
|
160 /** |
|
161 * Flag to signal client response that handle command is not done |
|
162 */ |
|
163 TBool iWaitHandleCloseCommand; |
|
164 |
|
165 /** |
|
166 * Flag to signal that icon response is needed before terminal |
|
167 * response is done |
|
168 */ |
|
169 TBool iWaitClientIconResponse; |
|
170 |
|
171 /** |
|
172 * Flag to signal that command has icon data |
|
173 * To be removed when icons are allowed in this command |
|
174 */ |
|
175 TBool iIconCommand; |
|
176 |
|
177 }; |
|
178 |
|
179 #endif // CCLOSECHANNELHANDLER_H |
|
180 |
|