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