telephonyserverplugins/attestltsy/atcommand/generic/src/globalphonemanager.cpp
branchAT_Test_LTSY
changeset 51 6012a0dcf61c
parent 1 4047d69ee0e4
equal deleted inserted replaced
34:7c3d96ebb735 51:6012a0dcf61c
    27 
    27 
    28 #if defined (__WINS__)
    28 #if defined (__WINS__)
    29 _LIT(KPDDName,"ECDRV");
    29 _LIT(KPDDName,"ECDRV");
    30 _LIT(KLDDName,"ECOMM");
    30 _LIT(KLDDName,"ECOMM");
    31 #else
    31 #else
    32 _LIT(KPDDName,"EUART1");
    32 _LIT(KPDDName,"EUART");
    33 #if defined (PDD2_NAME)
    33 #if defined (PDD2_NAME)
    34 _LIT(KPDD2Name,"EUART2");
    34 _LIT(KPDD2Name,"EUART2");
    35 #endif
    35 #endif
    36 _LIT(KLDDName,"ECOMM");
    36 _LIT(KLDDName,"ECOMM");
    37 #endif
    37 #endif
   123 	iPhoneStatus.iDataAndFaxFlags = RPhone::KCapsUnknown;
   123 	iPhoneStatus.iDataAndFaxFlags = RPhone::KCapsUnknown;
   124 	iPhoneStatus.iInitStatus = EPhoneNotInitialised;
   124 	iPhoneStatus.iInitStatus = EPhoneNotInitialised;
   125 	iPhoneStatus.iGprsMaxNumContexts = 1;
   125 	iPhoneStatus.iGprsMaxNumContexts = 1;
   126 	iPhoneStatus.iMode=RPhone::EModeOnlineCommand;
   126 	iPhoneStatus.iMode=RPhone::EModeOnlineCommand;
   127 	
   127 	
       
   128 	LOGTEXT(_L8("[LTSY] Creating CLTsyCallInformationManager"));
       
   129 	
   128 	//Create the call information manager
   130 	//Create the call information manager
   129 	iCallInfoManager = CLtsyCallInformationManager::NewL();
   131 	iCallInfoManager = CLtsyCallInformationManager::NewL();
       
   132 	
       
   133 	LOGTEXT(_L8("[LTSY] Loading PDD"));
   130 	
   134 	
   131 	// load physical device driver
   135 	// load physical device driver
   132 	TInt r = User::LoadPhysicalDevice(KPDDName);
   136 	TInt r = User::LoadPhysicalDevice(KPDDName);
   133 	if (r != KErrNone && r != KErrAlreadyExists)
   137 	if (r != KErrNone && r != KErrAlreadyExists)
   134 		{
   138 		{
       
   139 		LOGTEXT(_L8("[LTSY] Loading PDD Failed"));
   135 		User::Leave(r);
   140 		User::Leave(r);
   136 		}
   141 		}
       
   142 	
       
   143 	LOGTEXT(_L8("[LTSY] Loading LDD"));
   137 	
   144 	
   138 	// load logical device driver
   145 	// load logical device driver
   139 	r = User::LoadLogicalDevice(KLDDName);
   146 	r = User::LoadLogicalDevice(KLDDName);
   140 	if (r != KErrNone && r != KErrAlreadyExists)
   147 	if (r != KErrNone && r != KErrAlreadyExists)
   141 		{
   148 		{
       
   149 		LOGTEXT(_L8("[LTSY] Loading LDD Failed"));
   142 		User::Leave(r);
   150 		User::Leave(r);
   143 		}
   151 		}
   144 		
   152 	
       
   153 	LOGTEXT(_L8("[LTSY] Creating CAtManager"));
       
   154 	
   145 	// create the AT Manager
   155 	// create the AT Manager
   146 	iAtManager = CAtManager::NewL();
   156 	iAtManager = CAtManager::NewL();
       
   157 	
       
   158 	LOGTEXT(_L8("[LTSY] Creating CCommEngine"));
   147 	
   159 	
   148 	// create the Comm Engine which handle 
   160 	// create the Comm Engine which handle 
   149 	iCommEngine = CCommEngine::NewL(KLtsyChatBufferSize,KLtsyCommReadPriority,KLtsyCommWritePriority,iPhoneStatus.iPortAccess);
   161 	iCommEngine = CCommEngine::NewL(KLtsyChatBufferSize,KLtsyCommReadPriority,KLtsyCommWritePriority,iPhoneStatus.iPortAccess);
   150 	
   162 	
   151 	// Set Comm Engine observer		
   163 	// Set Comm Engine observer		
   152 	iCommEngine->SetCommEngineObserver(iAtManager);
   164 	iCommEngine->SetCommEngineObserver(iAtManager);
   153 	iCommEngine->SetCommReadLineNotify(iAtManager);
   165 	iCommEngine->SetCommReadLineNotify(iAtManager);
   154 	
   166 	
       
   167 	LOGTEXT(_L8("[LTSY] Creating CTsyConfig"));
   155 	// create a CommDB configration helper class
   168 	// create a CommDB configration helper class
   156 	iConfiguration = CTsyConfig::NewL();
   169 	iConfiguration = CTsyConfig::NewL();
   157 	
   170 	
   158 	TFileName csy;
   171 	TFileName csy;
   159 	TName port;	
   172 	TName port;