telephonyprotocols/pdplayer/src/PDPConfig.cpp
branchRCL_3
changeset 6 fc69e1e37771
parent 3 962e6306d9d2
child 9 2492a6e4aed7
equal deleted inserted replaced
5:7ef16719d8cb 6:fc69e1e37771
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2006-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".
   335 	TBool fromServer;
   335 	TBool fromServer;
   336 	aIapView->GetBoolL(KCDTIdWCDMAIPAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   336 	aIapView->GetBoolL(KCDTIdWCDMAIPAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   337 	if (!fromServer)
   337 	if (!fromServer)
   338 	    {
   338 	    {
   339     	aIapView->GetTextL(KCDTIdWCDMAIPAddr | KCDTIdOutgoingGprsRecord, buf);
   339     	aIapView->GetTextL(KCDTIdWCDMAIPAddr | KCDTIdOutgoingGprsRecord, buf);
       
   340     	TInetAddr addr;
       
   341     	User::LeaveIfError(addr.Input(*buf));
       
   342     	// sending ASCII to MA but checking the validity of the address above.
   340     	aPdpAddress.Copy(*buf);
   343     	aPdpAddress.Copy(*buf);
   341     	delete buf;
   344     	delete buf;
   342     	buf = NULL;
   345     	buf = NULL;
   343 	    }
   346 	    }
   344 	
   347 	
   361 	    // IPv4 settings
   364 	    // IPv4 settings
   362     	aIapView->GetBoolL(KCDTIdWCDMAIPDNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   365     	aIapView->GetBoolL(KCDTIdWCDMAIPDNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   363     	if (!fromServer)
   366     	if (!fromServer)
   364     	    {
   367     	    {
   365     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer1 | KCDTIdOutgoingGprsRecord, buf);
   368     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer1 | KCDTIdOutgoingGprsRecord, buf);
       
   369             TInetAddr addr;
       
   370             User::LeaveIfError(addr.Input(*buf));
       
   371             // sending ASCII to MA but checking the validity of the address above.
   366     	    aDns1.Copy(*buf);
   372     	    aDns1.Copy(*buf);
   367         	delete buf;
   373         	delete buf;
   368         	buf = NULL;
   374         	buf = NULL;
   369     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer2 | KCDTIdOutgoingGprsRecord, buf);
   375     	    aIapView->GetTextL(KCDTIdWCDMAIPNameServer2 | KCDTIdOutgoingGprsRecord, buf);
       
   376     	    User::LeaveIfError(addr.Input(*buf));
       
   377             // sending ASCII to MA but checking the validity of the address above.
   370         	aDns2.Copy(*buf);
   378         	aDns2.Copy(*buf);
   371     	    delete buf;
   379     	    delete buf;
   372         	buf = NULL;
   380         	buf = NULL;
   373     	    }
   381     	    }
   374 	    }
   382 	    }
   377 	    // IPv6 settings
   385 	    // IPv6 settings
   378     	aIapView->GetBoolL(KCDTIdWCDMAIP6DNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   386     	aIapView->GetBoolL(KCDTIdWCDMAIP6DNSAddrFromServer | KCDTIdOutgoingGprsRecord, fromServer);
   379     	if (!fromServer)
   387     	if (!fromServer)
   380     	    {
   388     	    {
   381     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer1 | KCDTIdOutgoingGprsRecord, buf);
   389     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer1 | KCDTIdOutgoingGprsRecord, buf);
   382     	    aDns1.Copy(*buf);
   390             TInetAddr addr;
       
   391             User::LeaveIfError(addr.Input(*buf));
       
   392             // sending ASCII to MA but checking the validity of the address above.
       
   393             aDns1.Copy(*buf);
   383     	    delete buf;
   394     	    delete buf;
   384     		buf = NULL;
   395     		buf = NULL;
   385     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer2 | KCDTIdOutgoingGprsRecord, buf);
   396     	    aIapView->GetTextL(KCDTIdWCDMAIP6NameServer2 | KCDTIdOutgoingGprsRecord, buf);
       
   397             User::LeaveIfError(addr.Input(*buf));
       
   398             // sending ASCII to MA but checking the validity of the address above.
   386           	aDns2.Copy(*buf);
   399           	aDns2.Copy(*buf);
   387         	delete buf;
   400         	delete buf;
   388             buf = NULL;
   401             buf = NULL;
   389     	    }
   402     	    }
   390 	    }
   403 	    }