1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 // |
18 // |
19 |
19 |
20 |
20 |
21 |
21 |
22 //INCLUDES |
22 //INCLUDES |
|
23 |
|
24 #include "OstTraceDefinitions.h" |
|
25 #ifdef OST_TRACE_COMPILER_IN_USE |
|
26 #include "CSatNotifyLanguageNotificationTraces.h" |
|
27 #endif |
|
28 |
23 #include <satcs.h> // Etel SAT IPC definitions |
29 #include <satcs.h> // Etel SAT IPC definitions |
24 #include "CSatTsy.h" // Tsy class header |
30 #include "CSatTsy.h" // Tsy class header |
25 #include "CSatNotifyLanguageNotification.h" // Tsy class header |
31 #include "CSatNotifyLanguageNotification.h" // Tsy class header |
26 #include "CSatNotificationsTsy.h" // Class header |
32 #include "CSatNotificationsTsy.h" // Class header |
27 #include "CBerTlv.h" // Ber Tlv data handling |
33 #include "CBerTlv.h" // Ber Tlv data handling |
28 #include "TTlv.h" // TTlv class |
34 #include "TTlv.h" // TTlv class |
29 #include "CSatDataPackage.h" // Parameter packing |
35 #include "CSatDataPackage.h" // Parameter packing |
30 #include "TfLogger.h" // For TFLOGSTRING |
|
31 #include "TSatUtility.h" // Utilities |
36 #include "TSatUtility.h" // Utilities |
32 #include "CSatTsyReqHandleStore.h" // Request handle class |
37 #include "CSatTsyReqHandleStore.h" // Request handle class |
33 #include "cmmmessagemanagerbase.h" // Message manager class for |
38 #include "cmmmessagemanagerbase.h" // Message manager class for |
34 // forwarding req. |
39 // forwarding req. |
35 |
40 |
41 CSatNotifyLanguageNotification* CSatNotifyLanguageNotification::NewL |
46 CSatNotifyLanguageNotification* CSatNotifyLanguageNotification::NewL |
42 ( |
47 ( |
43 CSatNotificationsTsy* aNotificationsTsy |
48 CSatNotificationsTsy* aNotificationsTsy |
44 ) |
49 ) |
45 { |
50 { |
46 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::NewL"); |
51 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_NEWL_1, "CSAT: CSatNotifyLanguageNotification::NewL"); |
47 CSatNotifyLanguageNotification* const satNotifyLanguageNotification = |
52 CSatNotifyLanguageNotification* const satNotifyLanguageNotification = |
48 new ( ELeave ) CSatNotifyLanguageNotification( aNotificationsTsy ); |
53 new ( ELeave ) CSatNotifyLanguageNotification( aNotificationsTsy ); |
49 CleanupStack::PushL( satNotifyLanguageNotification ); |
54 CleanupStack::PushL( satNotifyLanguageNotification ); |
50 satNotifyLanguageNotification->ConstructL(); |
55 satNotifyLanguageNotification->ConstructL(); |
51 CleanupStack::Pop( satNotifyLanguageNotification ); |
56 CleanupStack::Pop( satNotifyLanguageNotification ); |
52 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::NewL, end of method"); |
57 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_NEWL_2, "CSAT: CSatNotifyLanguageNotification::NewL, end of method"); |
53 return satNotifyLanguageNotification; |
58 return satNotifyLanguageNotification; |
54 } |
59 } |
55 |
60 |
56 // ----------------------------------------------------------------------------- |
61 // ----------------------------------------------------------------------------- |
57 // CSatNotifyLanguageNotification::CSatNotifyLanguageNotification |
62 // CSatNotifyLanguageNotification::CSatNotifyLanguageNotification |
61 CSatNotifyLanguageNotification::~CSatNotifyLanguageNotification |
66 CSatNotifyLanguageNotification::~CSatNotifyLanguageNotification |
62 ( |
67 ( |
63 // None |
68 // None |
64 ) |
69 ) |
65 { |
70 { |
66 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::\ |
71 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_DTOR_1, "CSAT: CSatNotifyLanguageNotification::~CSatNotifyLanguageNotification"); |
67 ~CSatNotifyLanguageNotification"); |
|
68 } |
72 } |
69 |
73 |
70 // ----------------------------------------------------------------------------- |
74 // ----------------------------------------------------------------------------- |
71 // CSatNotifyLanguageNotification::CSatNotifyLanguageNotification |
75 // CSatNotifyLanguageNotification::CSatNotifyLanguageNotification |
72 // Default C++ constructor |
76 // Default C++ constructor |
88 void CSatNotifyLanguageNotification::ConstructL |
92 void CSatNotifyLanguageNotification::ConstructL |
89 ( |
93 ( |
90 // None |
94 // None |
91 ) |
95 ) |
92 { |
96 { |
93 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::ConstructL"); |
97 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_CONSTRUCTL_1, "CSAT: CSatNotifyLanguageNotification::ConstructL"); |
94 } |
98 } |
95 |
99 |
96 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
97 // CSatNotifyLanguageNotification::Notify |
101 // CSatNotifyLanguageNotification::Notify |
98 // Save the request handle type for notification requested by ETel server |
102 // Save the request handle type for notification requested by ETel server |
102 ( |
106 ( |
103 const TTsyReqHandle aTsyReqHandle, |
107 const TTsyReqHandle aTsyReqHandle, |
104 const TDataPackage& aPackage |
108 const TDataPackage& aPackage |
105 ) |
109 ) |
106 { |
110 { |
107 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::Notify"); |
111 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_NOTIFY_1, "CSAT: CSatNotifyLanguageNotification::Notify"); |
108 // Save data pointer to client side for completion |
112 // Save data pointer to client side for completion |
109 iLanguageNotificationV2Pckg = reinterpret_cast<RSat:: |
113 iLanguageNotificationV2Pckg = reinterpret_cast<RSat:: |
110 TLanguageNotificationV2Pckg*>( aPackage.Des1n() ); |
114 TLanguageNotificationV2Pckg*>( aPackage.Des1n() ); |
111 // Save the request handle |
115 // Save the request handle |
112 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
116 iNotificationsTsy->iSatTsy->SaveReqHandle( aTsyReqHandle, |
128 TInt CSatNotifyLanguageNotification::CancelNotification |
132 TInt CSatNotifyLanguageNotification::CancelNotification |
129 ( |
133 ( |
130 const TTsyReqHandle aTsyReqHandle |
134 const TTsyReqHandle aTsyReqHandle |
131 ) |
135 ) |
132 { |
136 { |
133 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::CancelNotification"); |
137 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_CANCELNOTIFICATION_1, "CSAT: CSatNotifyLanguageNotification::CancelNotification"); |
134 // Reset the request handle |
138 // Reset the request handle |
135 iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( |
139 iNotificationsTsy->iSatReqHandleStore->ResetTsyReqHandle( |
136 CSatTsy::ESatNotifyLanguageNotificationPCmdReqType ); |
140 CSatTsy::ESatNotifyLanguageNotificationPCmdReqType ); |
137 // Reset the data pointer |
141 // Reset the data pointer |
138 iLanguageNotificationV2Pckg = NULL; |
142 iLanguageNotificationV2Pckg = NULL; |
152 ( |
156 ( |
153 CSatDataPackage* aDataPackage, |
157 CSatDataPackage* aDataPackage, |
154 TInt aErrorCode |
158 TInt aErrorCode |
155 ) |
159 ) |
156 { |
160 { |
157 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::CompleteNotifyL"); |
161 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_COMPLETENOTIFYL_1, "CSAT: CSatNotifyLanguageNotification::CompleteNotifyL"); |
158 |
162 |
159 TInt returnValue( KErrNone ); |
163 TInt returnValue( KErrNone ); |
160 TInt ret( KErrNone ); |
164 TInt ret( KErrNone ); |
161 TBuf<1> additionalInfo; |
165 TBuf<1> additionalInfo; |
162 |
166 |
199 TUint8 cmdQualifier(commandDetails.GetShortInfo( |
203 TUint8 cmdQualifier(commandDetails.GetShortInfo( |
200 ETLV_CommandQualifier ) ); |
204 ETLV_CommandQualifier ) ); |
201 |
205 |
202 if ( !cmdQualifier ) |
206 if ( !cmdQualifier ) |
203 { |
207 { |
204 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::\ |
208 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_COMPLETENOTIFYL_2, "CSAT: CSatNotifyLanguageNotification::CompleteNotifyL, No specific language used"); |
205 CompleteNotifyL, No specific language used"); |
|
206 // No specific language used |
209 // No specific language used |
207 languageNotificationV2.iNotificationType = |
210 languageNotificationV2.iNotificationType = |
208 RSat::ENonSpecificLangNotification; |
211 RSat::ENonSpecificLangNotification; |
209 } |
212 } |
210 else if ( KSpecificLanguage == cmdQualifier ) |
213 else if ( KSpecificLanguage == cmdQualifier ) |
235 |
238 |
236 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
239 iNotificationsTsy->iSatTsy->ReqCompleted( reqHandle, ret ); |
237 }// End of if( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
240 }// End of if( CSatTsy::ESatReqHandleUnknown != reqHandle ) |
238 else |
241 else |
239 { |
242 { |
240 TFLOGSTRING("CSAT: CSatNotifyLanguageNotification::CompleteNotifyL,\ |
243 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_COMPLETENOTIFYL_3, "CSAT: CSatNotifyLanguageNotification::CompleteNotifyL, Request not ongoing"); |
241 Request not ongoing"); |
|
242 additionalInfo.Zero(); |
244 additionalInfo.Zero(); |
243 additionalInfo.Append( KNoCause ); |
245 additionalInfo.Append( KNoCause ); |
244 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
246 CreateTerminalRespL( pCmdNumber, RSat::KMeUnableToProcessCmd, |
245 additionalInfo ); |
247 additionalInfo ); |
246 } |
248 } |
255 TInt CSatNotifyLanguageNotification::TerminalResponseL |
257 TInt CSatNotifyLanguageNotification::TerminalResponseL |
256 ( |
258 ( |
257 TDes8* aRsp |
259 TDes8* aRsp |
258 ) |
260 ) |
259 { |
261 { |
260 TFLOGSTRING("CSAT:CSatNotifyLanguageNotification::TerminalResponseL"); |
262 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_TERMINALRESPONSEL_1, "CSAT:CSatNotifyLanguageNotification::TerminalResponseL"); |
261 TInt ret( KErrNone ); |
263 TInt ret( KErrNone ); |
262 TBuf<1> additionalInfo; |
264 TBuf<1> additionalInfo; |
263 additionalInfo.FillZ(1); |
265 additionalInfo.FillZ(1); |
264 |
266 |
265 RSat::TLanguageNotificationRspV2Pckg* aRspPckg = |
267 RSat::TLanguageNotificationRspV2Pckg* aRspPckg = |
284 TUint8 aPCmdNumber, |
286 TUint8 aPCmdNumber, |
285 TUint8 aGeneralResult, |
287 TUint8 aGeneralResult, |
286 TDesC16& aAdditionalInfo |
288 TDesC16& aAdditionalInfo |
287 ) |
289 ) |
288 { |
290 { |
289 TFLOGSTRING("CSAT:CSatNotifyLanguageNotification::CreateTerminalRespL"); |
291 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CSATNOTIFYLANGUAGENOTIFICATION_CREATETERMINALRESPL_1, "CSAT:CSatNotifyLanguageNotification::CreateTerminalRespL"); |
290 TTlv tlvSpecificData; |
292 TTlv tlvSpecificData; |
291 // Create General Result TLV here |
293 // Create General Result TLV here |
292 tlvSpecificData.AddTag( KTlvResultTag ); |
294 tlvSpecificData.AddTag( KTlvResultTag ); |
293 // General result |
295 // General result |
294 tlvSpecificData.AddByte( aGeneralResult ); |
296 tlvSpecificData.AddByte( aGeneralResult ); |