locationdataharvester/maptileservice/src/maptileservice.cpp
changeset 35 59575560d1e6
parent 31 8db05346071b
child 41 b3dd5ec3089d
equal deleted inserted replaced
31:8db05346071b 35:59575560d1e6
    33 
    33 
    34 // Central Repository Key IDs
    34 // Central Repository Key IDs
    35 const TInt KEnableLocationFeature  = 0x1;
    35 const TInt KEnableLocationFeature  = 0x1;
    36 
    36 
    37 const char *MAPTILE_STATUS_RECEIVER = "/maptilestatuspublisher/name";
    37 const char *MAPTILE_STATUS_RECEIVER = "/maptilestatuspublisher/name";
    38 const char *MAPTILE_STATUS_PUBLISHER = "/maptilepublisher";
    38 const char *MAPTILE_STATUS_PUBLISHER = "/maptilecontactpublisher";
    39 const char *MAPTILE_STATUS_CALENDAR_PUBLISHER = "/maptilecalpublisher";
    39 const char *MAPTILE_STATUS_CALENDAR_PUBLISHER = "/maptilecalpublisher";
    40 
    40 
    41 
    41 
    42 // -----------------------------------------------------------------------------
    42 // -----------------------------------------------------------------------------
    43 // MapTileService::MapTileService()
    43 // MapTileService::MapTileService()
    84 // -----------------------------------------------------------------------------
    84 // -----------------------------------------------------------------------------
    85 //
    85 //
    86 bool MapTileService::isLocationFeatureEnabled(AppType appType)
    86 bool MapTileService::isLocationFeatureEnabled(AppType appType)
    87 {    
    87 {    
    88     //Create the centrep with uid 0x2002C3A8
    88     //Create the centrep with uid 0x2002C3A8
    89     bool iLocationFeatureEnabled = false;
    89     bool enableLocationFeature = false;
    90     
    90     
    91     CRepository* centralRepository = NULL;  
    91     CRepository* centralRepository = NULL;  
    92      
    92      
    93     TRAPD( err, centralRepository = CRepository::NewL( KUidMapTileInterface ) );
    93     TRAPD( err, centralRepository = CRepository::NewL( KUidMapTileInterface ) );
    94     if ( KErrNone == err )
    94     if ( KErrNone == err )
   106              ret = centralRepository->Get( KEnableLocationFeature , repValue );
   106              ret = centralRepository->Get( KEnableLocationFeature , repValue );
   107         }
   107         }
   108       
   108       
   109         if ( ret == KErrNone && repValue == 1 )
   109         if ( ret == KErrNone && repValue == 1 )
   110         {
   110         {
   111             iLocationFeatureEnabled  = true;
   111             enableLocationFeature  = true;
   112         }
   112         }
   113            
   113            
   114          delete centralRepository;
   114          delete centralRepository;
   115     }
   115     }
   116            
   116            
   117     return iLocationFeatureEnabled;
   117     return   enableLocationFeature;
   118     
   118     
   119 }
   119 }
   120 
   120 
   121 
   121 
   122 // -----------------------------------------------------------------------------
   122 // -----------------------------------------------------------------------------