Revision: 201030 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 31 Aug 2010 15:04:20 +0300
branchRCL_3
changeset 31 12a3e9fe500f
parent 28 5296bfa7b0a7
child 32 3ba072830a8a
Revision: 201030 Kit: 201035
nettools/conntest/Engine/HttpHandler.cpp
nettools/conntest/Engine/SocketsEngine.cpp
nettools/conntest/group/ConnTest.mmp
package_definition.xml
package_map.xml
--- a/nettools/conntest/Engine/HttpHandler.cpp	Thu Aug 19 09:38:07 2010 +0300
+++ b/nettools/conntest/Engine/HttpHandler.cpp	Tue Aug 31 15:04:20 2010 +0300
@@ -142,6 +142,7 @@
     TBuf<100> proxyAddr;
     TBuf8<100> proxyAddr2;
     TUint32 proxyPort;
+    TBool useProxy;
     TUint connCount;
     CCommsDatabase* TheDb;
     RStringF proxyName;
@@ -191,24 +192,29 @@
         
         if(result == KErrNone)
         {
-            // This IAP uses proxy, set it to http session
-            view->ReadUintL(TPtrC(PROXY_PORT_NUMBER), proxyPort);
-            HBufC* k = view->ReadLongTextLC(TPtrC(PROXY_SERVER_NAME));
-            proxyAddr.Copy(k->Des());
-            proxyAddr.AppendFormat(_L(":%d"), proxyPort);
-            
-            proxyAddr2.Copy(proxyAddr);
-            
-            CleanupClosePushL(proxyName);
-            proxyName = iHttpSession.StringPool().OpenFStringL(proxyAddr2);
-            connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyUsage,RHTTPSession::GetTable()), 
-                                   proxyUsage );
-            connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyAddress,RHTTPSession::GetTable()), 
-                                   proxyName );
-            CleanupStack::PopAndDestroy(&proxyName); // proxyName
-            CleanupStack::PopAndDestroy(k); //k
-            
-            RDebug::Print(_L("ConnTest: Proxy address: %S"), &proxyAddr);
+            // Check whether proxy should be used for this IAP
+            TRAPD(proxyErr, view->ReadBoolL(TPtrC(PROXY_USE_PROXY_SERVER), useProxy));
+            if((proxyErr == KErrNone) && useProxy)
+            {
+                // This IAP uses proxy, set it to http session
+                view->ReadUintL(TPtrC(PROXY_PORT_NUMBER), proxyPort);
+                HBufC* k = view->ReadLongTextLC(TPtrC(PROXY_SERVER_NAME));
+                proxyAddr.Copy(k->Des());
+                proxyAddr.AppendFormat(_L(":%d"), proxyPort);
+                
+                proxyAddr2.Copy(proxyAddr);
+                
+                CleanupClosePushL(proxyName);
+                proxyName = iHttpSession.StringPool().OpenFStringL(proxyAddr2);
+                connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyUsage,RHTTPSession::GetTable()), 
+                                       proxyUsage );
+                connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyAddress,RHTTPSession::GetTable()), 
+                                       proxyName );
+                CleanupStack::PopAndDestroy(&proxyName); // proxyName
+                CleanupStack::PopAndDestroy(k); //k
+                
+                RDebug::Print(_L("ConnTest: Proxy address: %S"), &proxyAddr);
+            }
         }
         CleanupStack::PopAndDestroy(view); // view
         CleanupStack::PopAndDestroy(TheDb); // TheDb
--- a/nettools/conntest/Engine/SocketsEngine.cpp	Thu Aug 19 09:38:07 2010 +0300
+++ b/nettools/conntest/Engine/SocketsEngine.cpp	Tue Aug 31 15:04:20 2010 +0300
@@ -547,50 +547,6 @@
         User::Panic( KPanicConnTest, EConnTestHttpClientInitializationFailed );
         }
     
-    /*
-     * In case roaming, socket needs to be restarted in following cases.
-     */
-    
-    if ( iEngineStatus == EConnecting || 
-         iEngineStatus == ELookingUp )
-        {
-        // Cancel and then re-connect
-        DoCancel();
-        ConnectL();
-        }
-    else if ( iEngineStatus == EConnected )
-        {
-        // Cancel write socket
-        iSocketsWrite->Cancel();
-        
-        // Cancel read socket
-        TBool isSocketActive( EFalse );
-        if ( iSocketsRead->IsActive() )
-            {
-            iSocketsRead->Cancel();
-            isSocketActive = ETrue;
-            }
-        
-        // Re-connect
-        ChangeStatus( EInterfaceUp );
-        ConnectL();
-        
-        // Start read socket again
-        if ( isSocketActive )
-            {
-            Read();
-            }
-        }
-    else if ( iEngineStatus == EListening )
-        {
-        DoCancel();
-        ListenL();
-        }
-    else if ( iEngineStatus == EDisconnecting )
-        {
-        DoCancel();
-        }
-    
     iConsole.PrintNotify( text );
     }
 
--- a/nettools/conntest/group/ConnTest.mmp	Thu Aug 19 09:38:07 2010 +0300
+++ b/nettools/conntest/group/ConnTest.mmp	Tue Aug 31 15:04:20 2010 +0300
@@ -76,7 +76,7 @@
 LIBRARY           apparc.lib
 LIBRARY           apgrfx.lib
 LIBRARY           avkon.lib
-LIBRARY           aknskins.lib
+LIBRARY           AknSkins.lib
 LIBRARY           aknnotify.lib
 LIBRARY           bafl.lib 
 LIBRARY           commdb.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_definition.xml	Tue Aug 31 15:04:20 2010 +0300
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<SystemDefinition schema="3.0.0">
+  <package id="conntools" name="Connectivity Tools" levels="config app">
+    <collection id="nettools" name="Net Tools" level="app">
+      <component id="conntest" filter="s60" name="Connection Test" purpose="development">
+        <unit bldFile="nettools/conntest/group"/>
+      </component>
+    </collection>
+    <collection id="emulatorlan" name="Emulator LAN" level="config">
+    	<!-- component is actually a colleciton, should be moved down a directory -->
+      <component id="emulatorlan_build" filter="s60" name="Emulator LAN Build" class="config" purpose="development">
+        <unit bldFile="emulatorlan/group"/>
+      </component>
+    </collection>
+  </package>
+</SystemDefinition>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Tue Aug 31 15:04:20 2010 +0300
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="app"/>