telephonyprotocols/csdagt/src/ND_SCR.CPP
branchRCL_3
changeset 65 630d2f34d719
parent 0 3553901f7fa8
child 66 07a122eea281
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
     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".
    17 
    17 
    18 /**
    18 /**
    19  @file Nd_scr.cpp 
    19  @file Nd_scr.cpp 
    20 */
    20 */
    21 
    21 
       
    22 
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "ND_SCRTraces.h"
       
    26 #endif
       
    27 
    22 #include "ND_SCR.H"
    28 #include "ND_SCR.H"
    23 #include "ND_STD.H"
    29 #include "ND_STD.H"
    24 #include "SLOGGER.H"
       
    25 #include "SSCREXEC.H"
    30 #include "SSCREXEC.H"
    26 #include "ND_DBACC.H"
    31 #include "ND_DBACC.H"
    27 
    32 
    28 
    33 
    29 _LIT(KLoginNameVar,"login_name$");
    34 _LIT(KLoginNameVar,"login_name$");
   317 Call OpenPct() from dialog processor.
   322 Call OpenPct() from dialog processor.
   318 
   323 
   319 @return error code for OpenPct() request.
   324 @return error code for OpenPct() request.
   320 */
   325 */
   321 	{
   326 	{
   322 	__FLOG_STMT(_LIT8(logString,"NetDial:\tOpening PCT");)
   327 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_OPENPCT_1, "NetDial:\tOpening PCT");
   323 	__FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString());
       
   324 
   328 
   325 	const TInt ret = iDlgPrc->OpenPct();
   329 	const TInt ret = iDlgPrc->OpenPct();
   326 	if (ret == KErrNone)
   330 	if (ret == KErrNone)
   327 		iPctOpen = ETrue;
   331 		iPctOpen = ETrue;
   328 	return ret;
   332 	return ret;
   332 /**
   336 /**
   333 Destroy PCT notification.
   337 Destroy PCT notification.
   334 Call DestroyPctNotification() from dialog processor.
   338 Call DestroyPctNotification() from dialog processor.
   335 */
   339 */
   336 	{
   340 	{
   337 	__FLOG_STMT(_LIT8(logString,"NetDial:\tRequesting Destroy PCT Notification");)
   341 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_DESTROYPCTNOTIFICATION_1, "NetDial:\tRequesting Destroy PCT Notification");
   338 	__FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString());
       
   339 	
   342 	
   340 	iDlgPrc->DestroyPctNotification(*this);
   343 	iDlgPrc->DestroyPctNotification(*this);
   341 	}	
   344 	}	
   342 
   345 
   343 TInt CNetDialScript::WritePct(TDes& aBuffer)
   346 TInt CNetDialScript::WritePct(TDes& aBuffer)
   346 
   349 
   347 @param aBuffer a reference for incoming data.
   350 @param aBuffer a reference for incoming data.
   348 @return error code for WritePct() request.
   351 @return error code for WritePct() request.
   349 */
   352 */
   350 	{
   353 	{
   351 	__FLOG_STMT(_LIT8(logString,"NetDial:\tWriting To PCT");)
   354 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_WRITEPCT_1, "NetDial:\tWriting To PCT");
   352 	__FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString());
       
   353 	
   355 	
   354 	return iDlgPrc->WritePct(aBuffer);
   356 	return iDlgPrc->WritePct(aBuffer);
   355 	}	
   357 	}	
   356 
   358 
   357 void CNetDialScript::ReadPct(TDes& aBuffer)
   359 void CNetDialScript::ReadPct(TDes& aBuffer)
   359 Read data from PCT.
   361 Read data from PCT.
   360 
   362 
   361 @param aBuffer a reference for read data.
   363 @param aBuffer a reference for read data.
   362 */
   364 */
   363 	{
   365 	{
   364 	__FLOG_STMT(_LIT8(logString,"NetDial:\tReading From PCT");)
   366 	OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_READPCT_1, "NetDial:\tReading From PCT");
   365 	__FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString());
       
   366 	
   367 	
   367 	iDlgPrc->ReadPct(*this,aBuffer);
   368 	iDlgPrc->ReadPct(*this,aBuffer);
   368 	}
   369 	}
   369 
   370 
   370 void CNetDialScript::ClosePct()
   371 void CNetDialScript::ClosePct()
   373 If PCT is open, call ClosePct() from dialog processor 
   374 If PCT is open, call ClosePct() from dialog processor 
   374 */
   375 */
   375 	{
   376 	{
   376 	if (iPctOpen)
   377 	if (iPctOpen)
   377 		{
   378 		{
   378 		__FLOG_STMT(_LIT8(logString,"NetDial:\tClosing PCT");)
   379 		OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_CLOSEPCT_1, "NetDial:\tClosing PCT");
   379 		__FLOG_STATIC(KNetDialLogFolder(),KNetDialLogFile(),logString());
       
   380 	
   380 	
   381 		iDlgPrc->ClosePct();
   381 		iDlgPrc->ClosePct();
   382 		iPctOpen = EFalse;
   382 		iPctOpen = EFalse;
   383 		iUsePct = EFalse;
   383 		iUsePct = EFalse;
   384 		}
   384 		}
   411 Call ReadPctComplete() from script executor with aError to complete the ReadPct() request.
   411 Call ReadPctComplete() from script executor with aError to complete the ReadPct() request.
   412 
   412 
   413 @param aError a error code for completition.
   413 @param aError a error code for completition.
   414 */
   414 */
   415 	{
   415 	{
   416 	__FLOG_STMT(_LIT8(logString,"NetDial:\tRead PCT Complete with Error %d");)
   416 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS,CNETDIALSCRIPT_MDPOREADPCTCOMPLETE_1,"NetDial:\tRead PCT Complete with Error %d",aError);
   417 	__FLOG_STATIC1(KNetDialLogFolder(),KNetDialLogFile(),TRefByValue<const TDesC8>(logString()),aError);
       
   418 	iScriptExecutor->ReadPctComplete(aError);
   417 	iScriptExecutor->ReadPctComplete(aError);
   419 	}
   418 	}
   420 void CNetDialScript::MDPODestroyPctComplete(TInt aError)
   419 void CNetDialScript::MDPODestroyPctComplete(TInt aError)
   421 /**
   420 /**
   422 Destroy PCT complete.
   421 Destroy PCT complete.
   423 Call DestroyPctNotificationReceived() from script executor with aError to complete the DestroyPctNotification() request.
   422 Call DestroyPctNotificationReceived() from script executor with aError to complete the DestroyPctNotification() request.
   424 
   423 
   425 @param aError a error code for completition.
   424 @param aError a error code for completition.
   426 */
   425 */
   427 	{
   426 	{
   428 	__FLOG_STMT(_LIT8(logString,"NetDial:\tDestroy PCT Notification Complete with Error %d");)
   427 	OstTraceDef1(OST_TRACE_CATEGORY_DEBUG, TRACE_INTERNALS, CNETDIALSCRIPT_MDPODESTROYPCTCOMPLETE_1, "NetDial:\tDestroy PCT Notification Complete with Error %d",aError);
   429 	__FLOG_STATIC1(KNetDialLogFolder(),KNetDialLogFile(),TRefByValue<const TDesC8>(logString()),aError);
       
   430 
   428 
   431 	iScriptExecutor->DestroyPctNotificationReceived(aError);
   429 	iScriptExecutor->DestroyPctNotificationReceived(aError);
   432 	}
   430 	}
   433 
   431 
   434 void CNetDialScript::RunL()
   432 void CNetDialScript::RunL()