locationmanager/geotagger/src/cinternalgeotagger.cpp
changeset 56 fd6cce931a8a
parent 52 40db28bb26b8
equal deleted inserted replaced
52:40db28bb26b8 56:fd6cce931a8a
    22 
    22 
    23 #include "locationmanagerdebug.h"
    23 #include "locationmanagerdebug.h"
    24 #include "mdeconstants.h"
    24 #include "mdeconstants.h"
    25 #include "mdesession.h"
    25 #include "mdesession.h"
    26 #include "cinternalgeotagger.h"
    26 #include "cinternalgeotagger.h"
    27 #ifdef LOC_REVERSEGEOCODE
       
    28 #include "reversegeocoderplugin.h"
       
    29 const TUid KReverseGeoCodeUid = {0x2002DD12};
       
    30 #endif
       
    31 
    27 
    32 using namespace MdeConstants;
    28 using namespace MdeConstants;
    33 
    29 
    34 _LIT ( KCountry, "country:");   // country:india 
    30 _LIT ( KCountry, "country:");   // country:india 
    35 
    31 
   111         }
   107         }
   112     
   108     
   113     //for reverse geocoding (geo-tagging)
   109     //for reverse geocoding (geo-tagging)
   114     
   110     
   115 #ifdef LOC_REVERSEGEOCODE
   111 #ifdef LOC_REVERSEGEOCODE
   116       
   112     	
   117 	   TRAP_IGNORE(
   113 		TInt pluginerr = KErrNone;
   118         iRevGeocoderPlugin = reinterpret_cast<CReverseGeoCoderPlugin*>(
   114     TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL());
   119            REComSession::CreateImplementationL(KReverseGeoCodeUid, iDtorKey));)
   115     		
   120            	
   116    if(pluginerr == KErrNone)
   121         if( iRevGeocoderPlugin )
   117    	{
   122 			{
   118 		iRevGeocoderPlugin->AddObserverL(*this);
   123             iRevGeocoderPlugin->AddObserverL(*this); 
   119 	 	}
   124 			}
   120 
   125 
   121 
   126 #endif //LOC_REVERSEGEOCODE
   122 #endif //LOC_REVERSEGEOCODE
   127 
   123 
   128     LOG("CInternalGeoTagger::ConstructL ,end");
   124     LOG("CInternalGeoTagger::ConstructL ,end");
   129     }
   125     }
   166 #ifdef LOC_REVERSEGEOCODE
   162 #ifdef LOC_REVERSEGEOCODE
   167     delete iTagCreator;
   163     delete iTagCreator;
   168     iTagCreator = NULL;
   164     iTagCreator = NULL;
   169     delete iRevGeocoderPlugin;
   165     delete iRevGeocoderPlugin;
   170     iRevGeocoderPlugin = NULL;
   166     iRevGeocoderPlugin = NULL;
   171     REComSession::DestroyedImplementation(iDtorKey);	
   167 
   172 #endif //LOC_REVERSEGEOCODE
   168 #endif //LOC_REVERSEGEOCODE
   173     if(iMdeSessionOwnFlag)
   169     if(iMdeSessionOwnFlag)
   174         {
   170         {
   175     	delete iMdeSession;
   171     	delete iMdeSession;
   176     	iMdeSession = NULL; 
   172     	iMdeSession = NULL;