fotaapplication/fotaserver/src/FotaNetworkRegStatus.cpp
changeset 73 ae69c2e8bc34
parent 51 2e64dc50f295
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
   310     FLOG(_L("CFotaNetworkRegStatus::IsWlanSupportedL, status = %d <<"),
   310     FLOG(_L("CFotaNetworkRegStatus::IsWlanSupportedL, status = %d <<"),
   311             status);
   311             status);
   312     return status;
   312     return status;
   313     }
   313     }
   314 
   314 
   315 // -----------------------------------------------------------------------------
       
   316 // CFotaNetworkRegStatus::IsConnectionPossibleL
       
   317 // Checks whether the network connection is possible in the given IAP Id
       
   318 // This method can leave
       
   319 // -----------------------------------------------------------------------------
       
   320 /*TBool CFotaNetworkRegStatus::IsConnectionPossibleL(TInt aIapid)
       
   321     {
       
   322     FLOG(_L("CFotaNetworkRegStatus::IsConnectionPossibleL >>"));
       
   323     TBool status(EFalse);
       
   324 
       
   325     TUint32 bearer = FindBearerL(aIapid);
       
   326     if (bearer == KUidPacketDataBearerType)
       
   327         {
       
   328         FLOG(_L("Bearer is Packet data"));
       
   329         if (CheckGlobalRFState() && CheckNetworkRegStateL())
       
   330             {
       
   331             FLOG(_L("Network is up and connection is possible "));
       
   332             status = ETrue;
       
   333             }
       
   334         else
       
   335             {
       
   336             FLOG(_L("Network is not up and connection is not possible "));
       
   337             status = EFalse;
       
   338             }
       
   339         }
       
   340     else if (bearer == KUidWlanBearerType)//for wlan or other bearers
       
   341         {
       
   342         FLOG(_L("Bearer is wlan and proceeding for download "));
       
   343         //proceed & this else loop to be removed
       
   344         status = ETrue;
       
   345         }
       
   346     else
       
   347         {
       
   348         FLOG(_L("Bearer is not packet data or WLAN"));
       
   349         }
       
   350 
       
   351     FLOG(_L("CFotaNetworkRegStatus::IsConnectionPossibleL, status = %d <<"),
       
   352             status);
       
   353     return status;
       
   354     }*/
       
   355 
       
   356 // ----------------------------------------------------------------------------------------
       
   357 // CFotaDownload::FindBearerId
       
   358 // Finds the Bearer Id for a given IAP Id
       
   359 // ----------------------------------------------------------------------------------------
       
   360 /*TUint32 CFotaNetworkRegStatus::FindBearerL(TInt aIapId)
       
   361     {
       
   362     FLOG(_L("CFotaNetworkRegStatus::FindBearerL: %d"), aIapId);
       
   363     TUint32 bearer = 0;
       
   364     TInt err(KErrNone);
       
   365     // Query CM Id
       
   366     TInt cmId(aIapId);
       
   367     RCmManagerExt CmManagerExt;
       
   368     TRAP( err, CmManagerExt.OpenL() );
       
   369     FLOG(_L("CmManagerExt.OpenL() with error as  %d"), err);
       
   370     if (err == KErrNone)
       
   371         {
       
   372         RCmConnectionMethodExt cm;
       
   373         TRAP( err, cm = CmManagerExt.ConnectionMethodL( cmId ) );
       
   374         FLOG(_L("CmManagerExt.ConnectionMethodL with error as  %d"), err);
       
   375         if (err == KErrNone)
       
   376             {
       
   377             CleanupClosePushL(cm);
       
   378             FLOG(_L("cm pushed to cleanupstack "));
       
   379             bearer = cm.GetIntAttributeL(CMManager::ECmBearerType);
       
   380             FLOG(_L("bearer is %d "), bearer);
       
   381             CleanupStack::PopAndDestroy(); // cm	  
       
   382             FLOG(_L("cm poped & destroyed from cleanupstack "));
       
   383             }
       
   384 
       
   385         CmManagerExt.Close();
       
   386         FLOG(_L("CmManagerExt closed "));
       
   387         }
       
   388     FLOG(_L("CFotaNetworkRegStatus::FindBearerL end with bearer: %d"), bearer);
       
   389     return bearer;
       
   390     }*/
       
   391 
   315 
   392 // End of File 
   316 // End of File