fotaapplication/fotaserver/FotaServer/src/FotaServer.cpp
changeset 24 bf47f3b79154
parent 22 19fb38abab1d
equal deleted inserted replaced
22:19fb38abab1d 24:bf47f3b79154
    22 #include <apgtask.h>
    22 #include <apgtask.h>
    23 #include <apgwgnam.h>
    23 #include <apgwgnam.h>
    24 #include <schtime.h>
    24 #include <schtime.h>
    25 #include <csch_cli.h>
    25 #include <csch_cli.h>
    26 #include <e32property.h>
    26 #include <e32property.h>
    27 #include <ApUtils.h> 
    27 #include <nsmldmconst.h>
    28 #include <commdb.h>
    28 #include <cmmanager.h>
       
    29 #include <cmconnectionmethod.h>
    29 #include <DevManInternalCRKeys.h>
    30 #include <DevManInternalCRKeys.h>
    30 #include <nsmlconstants.h>
    31 #include <nsmlconstants.h>
    31 #include <centralrepository.h>
    32 #include <centralrepository.h>
    32 #include <sysversioninfo.h>
    33 #include <sysversioninfo.h>
    33 #include "FotaSrvApp.h"
    34 #include "FotaSrvApp.h"
  2276 // --------------------------------------------------------------------------
  2277 // --------------------------------------------------------------------------
  2277 //
  2278 //
  2278 TBool CFotaServer::CheckIapExistsL(TUint32 aIapId)
  2279 TBool CFotaServer::CheckIapExistsL(TUint32 aIapId)
  2279     {
  2280     {
  2280     FLOG(_L("CFotaServer::CheckIapExistsL >>"));
  2281     FLOG(_L("CFotaServer::CheckIapExistsL >>"));
  2281     CCommsDatabase* commDb = CCommsDatabase::NewL( EDatabaseTypeIAP );
  2282     TBool exists = EFalse;  
  2282     CleanupStack::PushL( commDb );
  2283     RCmManager cmManager;    
  2283     CApUtils* aputils = CApUtils::NewLC(*commDb);
  2284     cmManager.OpenLC();
  2284     TBool exists = aputils->IAPExistsL( aIapId);      
  2285     RCmConnectionMethod conn;
  2285     CleanupStack::PopAndDestroy( aputils );
  2286     TRAPD(err, conn = cmManager.ConnectionMethodL( aIapId ));
  2286     CleanupStack::PopAndDestroy( commDb );
  2287     if(err == KErrNone)//connection method exists
       
  2288        exists = ETrue;
       
  2289     conn.Close();
       
  2290     CleanupStack::PopAndDestroy();//cmManager                    
  2287     FLOG(_L("CFotaServer::CheckIapExistsL <<"));
  2291     FLOG(_L("CFotaServer::CheckIapExistsL <<"));
  2288     return exists;
  2292     return exists;
  2289     }
  2293     }
  2290 
  2294 
  2291 // --------------------------------------------------------------------------
  2295 // --------------------------------------------------------------------------