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