|
1 /* |
|
2 * Copyright (c) 2006-2009 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: |
|
15 * Name : CSatEventDownloadTsy.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * EventDownload-related functionality of Sat Tsy |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATEVENTDOWNLOADTSY_H |
|
25 #define CSATEVENTDOWNLOADTSY_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <e32base.h> |
|
29 #include <etelsat.h> |
|
30 #include <et_phone.h> |
|
31 |
|
32 #include "TSatEventList.h" // Event list class |
|
33 #include "TSatUtility.h" // Utilities |
|
34 |
|
35 // CONSTANTS |
|
36 const TUint8 KMaxCauseLength = 248; |
|
37 |
|
38 // FORWARD DECLARATION |
|
39 class CSatTsy; |
|
40 class CSatDataPackage; |
|
41 |
|
42 // DESCRIPTION |
|
43 /** |
|
44 * Sat event download handling |
|
45 * @lib Commonsimatktsy |
|
46 * @since 3.1 |
|
47 */ |
|
48 NONSHARABLE_CLASS ( CSatEventDownloadTsy ) : public CBase |
|
49 { |
|
50 |
|
51 public: |
|
52 |
|
53 /** |
|
54 * This structure contains data needed for CallDisconnected |
|
55 * envelope. |
|
56 */ |
|
57 struct TCallDisconnectedEnvelope |
|
58 { |
|
59 TUint8 iCmdNumber; // Command number |
|
60 TBool iNearEnd; // MO flag |
|
61 TBool iCauseGiven; // Cause given |
|
62 TBuf8<KMaxCauseLength> iCause; // Cause |
|
63 }; |
|
64 |
|
65 /** |
|
66 * This structure contains data needed for MTCall |
|
67 * envelope. |
|
68 */ |
|
69 struct TMTCallEnvelope |
|
70 { |
|
71 TUint8 iCmdNumber; // Command number |
|
72 TUint8 iTONandNPI; // Ton and Npi |
|
73 TBuf8<KNumberMaxLength> iDiallingNumber;// Calling Party BCD number |
|
74 TPtrC8 iCalledPartySubAddress; // Calling Party Subaddress |
|
75 }; |
|
76 public: |
|
77 |
|
78 /** |
|
79 * Two-phased constructor. |
|
80 * @param aSatTsy |
|
81 * return CSatTsy*: created eventdownload object |
|
82 */ |
|
83 static CSatEventDownloadTsy* NewL( CSatTsy* aSatTsy ); |
|
84 |
|
85 /** |
|
86 * C++ Destructor. |
|
87 */ |
|
88 ~CSatEventDownloadTsy(); |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * By default C++ constructor is private. |
|
94 */ |
|
95 CSatEventDownloadTsy(); |
|
96 |
|
97 /** |
|
98 * Class attributes are created in ConstructL. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 public: // New functions |
|
103 |
|
104 /** |
|
105 * Handles extended client requests. |
|
106 * @param aTsyReqHandle: TSY request handle |
|
107 * @param aIpc: Request IPC number |
|
108 * @param aPackage: Packed request parameters |
|
109 * @return: Result of the request |
|
110 */ |
|
111 TInt DoExtFuncL(const TTsyReqHandle aTsyReqHandle, const TInt aIpc, |
|
112 const TDataPackage& aPackage ); |
|
113 |
|
114 /** |
|
115 * Sets on events |
|
116 * @param aEvents: event mask |
|
117 */ |
|
118 void SetUpEventList( TUint32 aEvents ); |
|
119 |
|
120 /** |
|
121 * Method to set internal flag to EFalse or ETrue. |
|
122 * @param aStatus EFalse or ETrue |
|
123 */ |
|
124 void SetSetUpCallStatus( const TBool aStatus ); |
|
125 |
|
126 /** |
|
127 * Cancels request that's IPC number and request handle are given in |
|
128 * parameters |
|
129 * @param aIpc: Request IPC number |
|
130 * @param aTsyReqHandle: TSY request handle |
|
131 * @return: Result of the request |
|
132 */ |
|
133 TInt CancelService( |
|
134 const TInt aIpc, |
|
135 const TTsyReqHandle aTsyReqHandle ); |
|
136 |
|
137 public: |
|
138 |
|
139 /** |
|
140 * Creates MT call envelope to NAA |
|
141 * @param aDataPackage: Packaged parameters |
|
142 * @return phonet sender status |
|
143 */ |
|
144 TInt CompleteMTCallL( const CSatDataPackage* aDataPackage ); |
|
145 |
|
146 /** |
|
147 * Creates call connected envelope to NAA |
|
148 * @param aDataPackage: Packed parameters |
|
149 * @return success/failure indication |
|
150 */ |
|
151 TInt CompleteCallConnectedL( const CSatDataPackage* aDataPackage ); |
|
152 |
|
153 /** |
|
154 * Creates call disconnected envelope to NAA |
|
155 * @param aDataPackage: Packed parameters |
|
156 * @return success/failure indication |
|
157 */ |
|
158 TInt CompleteCallDisconnectedL( const CSatDataPackage* aDataPackage ); |
|
159 |
|
160 /** |
|
161 * Creates location status envelope to NAA |
|
162 * @param aDataPackage: Packed parameters |
|
163 * @return success/failure indication |
|
164 */ |
|
165 TInt CompleteLocationStatusL( const CSatDataPackage* aDataPackage ); |
|
166 |
|
167 /** |
|
168 * Access Technology change |
|
169 * Creates Access technology change envelope to NAA |
|
170 * @param aDataPackage: Packed parameters |
|
171 * @return phonet sender status |
|
172 */ |
|
173 TInt CompleteAccessTechnologyChangeL( |
|
174 const CSatDataPackage* aDataPackage ); |
|
175 |
|
176 private: |
|
177 |
|
178 /** |
|
179 * Creates user activity envelope to NAA |
|
180 * @return success/failure indication |
|
181 */ |
|
182 TInt CreateUserActivityEnvelopeL(); |
|
183 |
|
184 /** |
|
185 * Creates idle screen available envelope to NAA |
|
186 * @return success/failure indication |
|
187 */ |
|
188 TInt CreateIdleScreenAvailableEnvelopeL(); |
|
189 |
|
190 /** |
|
191 * Creates browser termination envelope to NAA |
|
192 * @param aCause: Browser termination cause |
|
193 * @return success/failure indication |
|
194 */ |
|
195 TInt CreateBrowserTerminationEnvelopeL( |
|
196 const RSat::TBrowserTerminationCause aCause ); |
|
197 |
|
198 /** |
|
199 * Creates language selection envelope to NAA |
|
200 * @param aLanguage: selected language |
|
201 * @return success/failure indication |
|
202 */ |
|
203 TInt CreateLanguageSelectionEnvelopeL( const TUint16 aLanguage ); |
|
204 |
|
205 /** |
|
206 * Bearer Independent Protocol |
|
207 * Creates data available envelope to NAA. The NAA may sent a |
|
208 * ReceiveData PCmd after a DataAvailable event. |
|
209 * @param aStatus channel status |
|
210 * @param aLength data length to be received |
|
211 * @return phonet sender status |
|
212 */ |
|
213 TInt CreateDataAvailableEnvelopeL( const RSat::TChannelStatus aStatus, |
|
214 const TInt8 aLength ); |
|
215 |
|
216 /** |
|
217 * Bearer Independent Protocol |
|
218 * Creates channel status envelope to NAA |
|
219 * @param aStatus channel status |
|
220 * @return phonet sender status |
|
221 */ |
|
222 TInt CreateChannelStatusEnvelopeL( const RSat::TChannelStatus aStatus ); |
|
223 |
|
224 |
|
225 private: // Data |
|
226 |
|
227 // Pointer to Sat TSY |
|
228 CSatTsy* iSatTsy; |
|
229 // Event list |
|
230 TSatEventList iEventList; |
|
231 // Flag for SetUpCall |
|
232 TBool iSetUpCallOngoing; |
|
233 // Location status |
|
234 TUint8 iLocationStatus; |
|
235 // Operator code |
|
236 TBuf8<3> iOperatorCode; |
|
237 // Location area code |
|
238 TUint16 iLocationaAreaCode; |
|
239 // Cell Id |
|
240 TUint16 iCellId; |
|
241 // Flag for forcing the Location status envelope is every time after |
|
242 // SetUpEventList PCmd |
|
243 TBool iForceLocationStatusEnvelope; |
|
244 }; |
|
245 |
|
246 #endif // CSATEVENTDOWNLOADTSY_H |
|
247 |
|
248 // End of File |