1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2003-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". |
85 Determine if a script needs to be used. |
91 Determine if a script needs to be used. |
86 @see CNetdialSM::UseScript. |
92 @see CNetdialSM::UseScript. |
87 */ |
93 */ |
88 { |
94 { |
89 TInt len = 0; |
95 TInt len = 0; |
90 __FLOG_STMT(_LIT8(logString0,"Netdial:\tGetUseScriptL");) |
96 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSM_GETUSESCRIPTL_1, "Netdial:\tGetUseScriptL"); |
91 __FLOG_STATIC(KNetDialLogFolder(), KNetDialLogFile(), logString0); |
|
92 iDbAccess->GetScriptDetailsL(iUseScript, len); |
97 iDbAccess->GetScriptDetailsL(iUseScript, len); |
93 __FLOG_STMT(_LIT8(logString1,"Netdial:\tGetUseScriptL. iUseScript [%d]");) |
98 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSM_GETUSESCRIPTL_2, "Netdial:\tGetUseScriptL. iUseScript [%d]",iUseScript); |
94 __FLOG_STATIC1(KNetDialLogFolder(), KNetDialLogFile(), logString1, iUseScript); |
|
95 } |
99 } |
96 #endif // SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT |
100 #endif // SYMBIAN_NETWORKING_CSDAGENT_BCA_SUPPORT |
97 TInt CNetdialSM::GetExcessData(TDes8& aBuffer) |
101 TInt CNetdialSM::GetExcessData(TDes8& aBuffer) |
98 /** |
102 /** |
99 Get excess data buffer from script engine. |
103 Get excess data buffer from script engine. |
100 |
104 |
101 @param aBuffer a reference to the observer. |
105 @param aBuffer a reference to the observer. |
102 @return KErrNotFound if script is not found. |
106 @return KErrNotFound if script is not found. |
103 */ |
107 */ |
104 { |
108 { |
105 __FLOG_STMT(_LIT8(logString,"NetDial:\tGetting Excess Data");) |
109 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSM_GETEXCESSDATA_1,"NetDial:\tGetting Excess Data"); |
106 __FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString()); |
|
107 if (iNdScript!=NULL) |
110 if (iNdScript!=NULL) |
108 return iNdScript->GetExcessData(aBuffer); |
111 return iNdScript->GetExcessData(aBuffer); |
109 else |
112 else |
110 { |
113 { |
111 aBuffer.Zero(); |
114 aBuffer.Zero(); |
199 to script executor, otherwise advance phase to and call ServiceStarted() |
202 to script executor, otherwise advance phase to and call ServiceStarted() |
200 */ |
203 */ |
201 { |
204 { |
202 if(iStatus!=KErrNone) |
205 if(iStatus!=KErrNone) |
203 { |
206 { |
204 __FLOG_STMT(_LIT(logString3,"Get Login Info");) |
207 OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CGETLOGININFO_RUNL_1,"NetDial:\tCompleted Phase 'Get Login Info' with Error %d", iStatus.Int()); |
205 __FLOG_STATIC2(KNetDialLogFolder(),KNetDialLogFile(),TRefByValue<const TDesC>(KCompletedPhaseLogString()), &logString3(), iStatus.Int()); |
|
206 if (iNdEnv->Script()!=NULL) |
208 if (iNdEnv->Script()!=NULL) |
207 iNdEnv->Script()->CloseScript(); |
209 iNdEnv->Script()->CloseScript(); |
208 iSMObserver->ConnectionComplete(ECsdGotLoginInfo,iStatus.Int()); |
210 iSMObserver->ConnectionComplete(ECsdGotLoginInfo,iStatus.Int()); |
209 return; |
211 return; |
210 } |
212 } |
211 iSMObserver->UpdateProgress(ECsdGotLoginInfo,KErrNone); |
213 iSMObserver->UpdateProgress(ECsdGotLoginInfo,KErrNone); |
212 |
214 |
213 if (!(iNdEnv->BaseEnv())->IsReconnect()) |
215 if (!(iNdEnv->BaseEnv())->IsReconnect()) |
214 { |
216 { |
215 __FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),KServiceStartedLogString()); |
217 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CGETLOGININFO_RUNL_2,"NetDial:\tService Started"); |
216 } |
218 } |
217 else |
219 else |
218 { |
220 { |
219 __FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),KServiceStartedReconnLogString()); |
221 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CGETLOGININFO_RUNL_3, "NetDial:\tService Started On Reconnection"); |
220 } |
222 } |
221 iSMObserver->ServiceStarted(); |
223 iSMObserver->ServiceStarted(); |
222 (iNdEnv->BaseEnv())->CompleteState(KErrNone); |
224 (iNdEnv->BaseEnv())->CompleteState(KErrNone); |
223 } |
225 } |
224 |
226 |