telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp
--- a/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp Mon Mar 15 12:45:06 2010 +0200
+++ b/telephonyprotocols/pdplayer/umts/test/te_spudNetworkSide/src/te_spudNetworkSideSteps.cpp Wed Mar 31 23:24:02 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
@@ -29,6 +29,8 @@
#include <nifvar.h> // Nifman Progress notifications
#include <in_sock.h>
#include <es_enum.h>
+#include <comms-infras/es_config.h>
+#include <nifman.h>
#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
#include <networking/qoslib.h>
@@ -1273,7 +1275,16 @@
TInetAddr dstAddr;
dstAddr.SetPort(KConfiguredTftFilter1SrcPort);
- dstAddr.Input(KConfiguredTftFilter1SrcAddr);
+
+ TPtrC ip6Addr;
+ if(GetStringFromConfig(ConfigSection(), _L("IP6Addr"), ip6Addr))
+ {
+ dstAddr.Input(ip6Addr);
+ }
+ else
+ {
+ dstAddr.Input(KConfiguredTftFilter1SrcAddr);
+ }
iSocket.Connect(dstAddr, status);
User::WaitForRequest(status);
@@ -2237,4 +2248,73 @@
return EPass;
}
+enum TVerdict CIoctlAddressRetrieve::RunTestStepL()
+ {
+ StartPrimaryOnlyL();
+
+ TPtrC addresse;
+ TBool checkSipAddress = ETrue;
+ if(!GetStringFromConfig(ConfigSection(), _L("ExpectedAddress"), addresse))
+ {
+ checkSipAddress = EFalse;
+ }
+
+ TInt expectedError = KErrNone;
+ if(!GetIntFromConfig(ConfigSection(), _L("SipAddressExpectedError"), expectedError))
+ {
+ expectedError = KErrNone;
+ }
+
+ TInt sipAddressIndex = 0;
+ if(!GetIntFromConfig(ConfigSection(), _L("IndexOfTheSIPAddressToGet"), sipAddressIndex))
+ {
+ User::Leave(KErrNotFound);
+ }
+
+ //call ioctl
+ TRequestStatus status;
+
+ INFO_PRINTF1(_L("Calling ioctl.."));
+
+ // Request the Sip address available
+ TSipServerAddrBuf sipServerAddr;
+ sipServerAddr().index = sipAddressIndex;
+ iInterface.Ioctl(KCOLConfiguration, KConnGetSipServerAddr, status, &sipServerAddr);
+ User::WaitForRequest(status);
+
+ INFO_PRINTF2(_L("SIP address retrieval completed with Err[%d]..."), status.Int());
+ if(status.Int() == expectedError)
+ {
+ if (expectedError == KErrNone && checkSipAddress)
+ {
+ THostName addr;
+ sipServerAddr().address.Output(addr);
+
+ // Verify the retrieved address is correct
+ TPtrC addressToCompare;
+
+ addressToCompare.Set(addresse);
+
+ INFO_PRINTF2(_L("Received SIP address: %S"), &addr);
+ if(addr.CompareF(addressToCompare) != 0)
+ {
+ INFO_PRINTF2(_L("Expected SIP address %S!"), &addressToCompare);
+ TESTEL(0, KErrNotFound);
+ }
+ }
+ else
+ {
+ INFO_PRINTF1(_L("As Expected"));
+ }
+ }
+ else
+ {
+ INFO_PRINTF1(_L("Unexpected"));
+ User::Leave(status.Int());
+ }
+
+ iInterface.Stop();
+ iInterface.Close();
+ return EPass;
+ }