locationmanager/geoconverter/src/cgeoconverter.cpp
changeset 40 910a23996aa0
parent 36 aa5a574040a4
child 43 c5e73110f733
equal deleted inserted replaced
38:5210ffae7137 40:910a23996aa0
   133     LOG("CGeoConverter::ConvertL, begin");
   133     LOG("CGeoConverter::ConvertL, begin");
   134 #ifdef LOC_GEOTAGGING_CELLID    
   134 #ifdef LOC_GEOTAGGING_CELLID    
   135     
   135     
   136     //Set mobile country code
   136     //Set mobile country code
   137     TLex lexer( aNetworkInfo.iCountryCode );
   137     TLex lexer( aNetworkInfo.iCountryCode );
   138     TUint countryCode;
   138     TUint countryCode = 0;
   139     
   139     
   140     User::LeaveIfError( lexer.Val( countryCode, EDecimal) );
   140     User::LeaveIfError( lexer.Val( countryCode, EDecimal) );
   141     //Set mobile network code
   141     //Set mobile network code
   142     lexer = aNetworkInfo.iNetworkId;
   142     lexer = aNetworkInfo.iNetworkId;
   143     TUint networkCode;
   143     TUint networkCode = 0;
   144     User::LeaveIfError( lexer.Val( networkCode, EDecimal) );
   144     User::LeaveIfError( lexer.Val( networkCode, EDecimal) );
   145     LOG1("Network mode - %d", aNetworkInfo.iMode);
   145     LOG1("Network mode - %d", aNetworkInfo.iMode);
   146     CLbsAreaInfoBase* areaInfoBase = NULL;
   146     CLbsAreaInfoBase* areaInfoBase = NULL;
   147     switch(aNetworkInfo.iAccess)
   147     switch(aNetworkInfo.iAccess)
   148         {
   148         {
   190     //Add the cell information to the location info class. This class
   190     //Add the cell information to the location info class. This class
   191     //would be sent to the Location Monitor server that would perform the
   191     //would be sent to the Location Monitor server that would perform the
   192     //requested conversion and update the position estimate
   192     //requested conversion and update the position estimate
   193     if(areaInfoBase != NULL) // self check
   193     if(areaInfoBase != NULL) // self check
   194         {
   194         {
       
   195         // reset previous one.. to clear the local info.
       
   196         iLocInfo->ResetAreaInfo(CLbsLocationInfo::ELbsAreaInfoAll);
   195         iLocInfo->AddAreaInfoL( areaInfoBase ); 
   197         iLocInfo->AddAreaInfoL( areaInfoBase ); 
       
   198         //ownership is transferred.
       
   199         iWcdmaCellInfo = NULL;
       
   200         iGsmCellInfo = NULL;
   196         //Request conversion of GSM cell information to corresponding coordinate information
   201         //Request conversion of GSM cell information to corresponding coordinate information
   197         iLocConverter->ConvertLocationInfoL( *iLocInfo, ELbsConversionSilent, 
   202         iLocConverter->ConvertLocationInfoL( *iLocInfo, ELbsConversionSilent, 
   198                                                 ELbsConversionOutputPosition  );
   203                                                 ELbsConversionOutputPosition  );
   199         }
   204         }
   200 #endif    
   205 #endif