telephonyprotocols/csdagt/src/ND_DIRCT.CPP
changeset 44 8b72faa1200f
parent 0 3553901f7fa8
equal deleted inserted replaced
39:2473f5e227f9 44:8b72faa1200f
     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".
    21 
    21 
    22 #include "ND_DIRCT.H"
    22 #include "ND_DIRCT.H"
    23 #include "ND_SCR.H"
    23 #include "ND_SCR.H"
    24 #include "ND_DBACC.H"
    24 #include "ND_DBACC.H"
    25 #include "ND_STD.H"
    25 #include "ND_STD.H"
    26 #include "SLOGGER.H"
       
    27 #include "ND_DIRECTSTATES.H"
    26 #include "ND_DIRECTSTATES.H"
    28 
    27 
    29 CDirCtAgXSM* CDirCtAgXSM::NewL(MAgentNotify& aControllerObserver, CDialogProcessor* aDlgPrc, CCommsDbAccess& aDbAccess)
    28 CDirCtAgXSM* CDirCtAgXSM::NewL(MAgentNotify& aControllerObserver, CDialogProcessor* aDlgPrc, CCommsDbAccess& aDbAccess)
    30 /**
    29 /**
    31 2 phased constructor, first phase.
    30 2 phased constructor, first phase.
    88 	iDbAccess->GetCommPortForDirectConnectL(commPort);
    87 	iDbAccess->GetCommPortForDirectConnectL(commPort);
    89 	TCommRole role;
    88 	TCommRole role;
    90 	iDbAccess->GetCommPortRoleL(role);
    89 	iDbAccess->GetCommPortRoleL(role);
    91 	TInt len;
    90 	TInt len;
    92 	iDbAccess->GetScriptDetailsL(iUseScript,len);
    91 	iDbAccess->GetScriptDetailsL(iUseScript,len);
       
    92 	
    93 	if (!iUseScript || len==0)	
    93 	if (!iUseScript || len==0)	
    94 		{		// set them consistently
    94 		{		// set them consistently
    95 		iUseScript=EFalse;
    95 		iUseScript=EFalse;
    96 		}
    96 		}
       
    97 	
       
    98 	if (iNdScript != NULL)
       
    99 	    {
       
   100         delete iNdScript;
       
   101         iNdScript = NULL;
       
   102 	    }
       
   103 	
    97 	iNdScript=CNetDialScript::NewL(iDbAccess,iDlgPrc,commPort,role,len);	// create it whatever because we need other stuff
   104 	iNdScript=CNetDialScript::NewL(iDbAccess,iDlgPrc,commPort,role,len);	// create it whatever because we need other stuff
    98 	}
   105 	}
    99 
   106 
   100 TInt CDirCtAgXSM::Notification(TNifToAgentEventType /*aEvent*/, TAny* /*aInfo*/)
   107 TInt CDirCtAgXSM::Notification(TNifToAgentEventType /*aEvent*/, TAny* /*aInfo*/)
   101 /**
   108 /**