ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
--- a/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Tue Aug 31 15:21:33 2010 +0300
+++ b/ncdengine/engine/accesspointmanager/src/catalogsaccesspointmanagerimpl.cpp	Wed Sep 01 12:22:02 2010 +0100
@@ -18,12 +18,9 @@
 
 #include "catalogsaccesspointmanagerimpl.h"
 
-#ifdef _0
 #include <ApUtils.h>
 #include <ApSelect.h> 
 #include <ApDataHandler.h>
-#endif
-
 #include <badesca.h>
 
 #include "catalogsaccesspoint.h"
@@ -64,7 +61,6 @@
 _LIT(KBrowseAccessPoint, "browsingAccessPoint");
 _LIT(KPurchaseAccessPoint, "purchasingAccessPoint");
 
-#ifdef _0
 // literals used for access point settings in client configuration protocol (in alphabetical order)
 _LIT(KApName, "name");
 
@@ -156,7 +152,7 @@
 
 _LIT(KWapWspOptionConnectionless, "EWapWspOptionConnectionless");
 _LIT(KWapWspOptionConnectionOriented, "EWapWspOptionConnectionOriented");
-#endif
+
 
 CCatalogsAccessPointManager::CCatalogsAccessPointManager(
     CNcdGeneralManager& aGeneralManager ) :
@@ -569,7 +565,6 @@
     TUint32& aAccessPointId) 
     {
     DLTRACEIN((_L("Namespace: %S, CatalogId: %S, Action: %d, clientUid: %d"), &aNameSpace, &aCatalogId, aAction, aClientUid.iUid));
-    
     CCatalogsAccessPoint* accessPoint( NULL );
     CCatalogsClientAccessPointData* apData( NULL );
     TInt err = GetAccessPoint( accessPoint, apData );
@@ -598,7 +593,7 @@
     DLTRACEIN((_L("Namespace: %S, NodeId: %S, Action: %d, clientUid: %d"),
                &aNodeIdentifier.NodeNameSpace(), &aNodeIdentifier.NodeId(), aAction,
                aClientUid.iUid));
-    
+
     CCatalogsAccessPoint* accessPoint( NULL );
     CCatalogsClientAccessPointData* apData( NULL );
     TInt err = GetAccessPoint( accessPoint, apData );
@@ -716,17 +711,14 @@
     }
             
     
-TBool CCatalogsAccessPointManager::ValidateAccessPointL( CCatalogsAccessPoint* /* aAccessPoint */ )
+TBool CCatalogsAccessPointManager::ValidateAccessPointL( CCatalogsAccessPoint* aAccessPoint )
     {
     DLTRACEIN((""));
-    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return EFalse;
 #endif
-
-#ifdef _0
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /* EDatabaseTypeIAP */);
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
     CleanupStack::PushL( commdb );
     CApSelect*  select;
     select = CApSelect::NewLC(
@@ -773,22 +765,18 @@
             
     // Someone has altered the access point settings.
     CleanupStack::PopAndDestroy(4);
-#endif
-    
     return EFalse;
     }
 
-TBool CCatalogsAccessPointManager::MatchInCommsDbL( const CCatalogsAccessPointSettings& /* aSettings */, TUint32& /* aId */)
+TBool CCatalogsAccessPointManager::MatchInCommsDbL( const CCatalogsAccessPointSettings& aSettings, TUint32& aId )
     {
     DLTRACEIN(_L("Checking comms DB for matching access point"));
-    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return EFalse;
 #endif
     
-#ifdef _0
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /* EDatabaseTypeIAP */ );
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
     CleanupStack::PushL( commdb );
     CApSelect*  select;
     select = CApSelect::NewLC(
@@ -828,22 +816,17 @@
         
     CleanupStack::PopAndDestroy( 4, commdb ); // util, handler, select, commdb
     DLTRACEOUT(("Matching AP not found"));
-#endif
-    
     return EFalse;
     }
 
-void CCatalogsAccessPointManager::CreateApToCommsDBL( const CCatalogsAccessPoint& /* aSettings */, TUint32& /* aId */ )
+void CCatalogsAccessPointManager::CreateApToCommsDBL( const CCatalogsAccessPoint& aSettings, TUint32& aId )
     {
     DLTRACEIN(_L("Creating AP to comms DB"));
-    
 #ifdef __WINS__
     // Comms database is not accessible in emulator.
     return;
 #endif
-
-#ifdef _0
-    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP */);
+    CCommsDatabase *commdb = CCommsDatabase::NewL( /*EDatabaseTypeIAP*/ );
     CleanupStack::PushL( commdb );
     
     CApDataHandler*     handler = CApDataHandler::NewLC( *commdb );        
@@ -913,12 +896,9 @@
     CApUtils* util = CApUtils::NewLC( *commdb );
     aId = util->IapIdFromWapIdL( wapId );
     CleanupStack::PopAndDestroy( 4, commdb ); // commDb, handler, newAp, util
-    
-#endif
     DLTRACEOUT(("Access point created to comms DB"));
     }
 
-#ifdef _0
 HBufC16* CCatalogsAccessPointManager::ReadText16L( CApAccessPointItem* aItem, const TApMember& aApMember )
     {
     TInt length = aItem->ReadTextLengthL( aApMember );
@@ -946,7 +926,7 @@
     CleanupStack::Pop(); // buffer
     return buffer;
     }
-#endif
+
 
 void CCatalogsAccessPointManager::RemoveAccessPointsFromCommsDbL(
     TBool aAddShutdownOperation )
@@ -1000,10 +980,9 @@
     iClientAccessPointData = NULL;
     }
 
-void CCatalogsAccessPointManager::RemoveApFromCommsDatabaseL( const TUint32& /* aId */ )
+void CCatalogsAccessPointManager::RemoveApFromCommsDatabaseL( const TUint32& aId )
     {
-    
-#ifdef _0
+    DLTRACEIN(("aId: %u", aId ));
     CCommsDatabase *commdb = CCommsDatabase::NewL( EDatabaseTypeIAP );
     CleanupStack::PushL( commdb );
     CApDataHandler* dataHandler = CApDataHandler::NewLC( *commdb );
@@ -1012,7 +991,6 @@
     dataHandler->RemoveAPL( wapId );
     
     CleanupStack::PopAndDestroy( 3, commdb ); // util, dataHandler, commdb
-#endif
     }
 
     
@@ -1078,7 +1056,7 @@
     item->SaveL();    
     }
 
-#ifdef _0   
+    
 TBool CCatalogsAccessPointManager::MatchingSettingsL(
     const CCatalogsAccessPointSettings& aSettings, CApAccessPointItem& aItem) 
     {
@@ -1210,13 +1188,11 @@
     DLTRACEOUT(("Matching settings"));
     return ETrue;
     }
-#endif   
+    
     
 void CCatalogsAccessPointManager::SetApDetailL(
-    CCatalogsAccessPoint& /* aAp */, const TDesC& /* aKey */, const TDesC& /* aValue */ ) 
+    CCatalogsAccessPoint& aAp, const TDesC& aKey, const TDesC& aValue ) 
     {
-    
-#ifdef _0
     DLTRACEIN((""));
     TBool value = EFalse;
     
@@ -1607,7 +1583,6 @@
         {
         DLWARNING(( _L("Unknown access point detail: %S"), &aKey));
         }
-#endif
     }