diff -r 29d87345eaeb -r 2872ae438bf7 locationmanager/locationtrail/src/clocationrecord.cpp --- a/locationmanager/locationtrail/src/clocationrecord.cpp Tue Sep 14 22:10:25 2010 +0300 +++ b/locationmanager/locationtrail/src/clocationrecord.cpp Wed Sep 15 12:40:59 2010 +0300 @@ -32,10 +32,7 @@ #include "locationtraildefs.h" #include "locationtrailpskeys.h" #include "mdeconstants.h" -#ifdef LOC_REVERSEGEOCODE -#include "reversegeocoderplugin.h" -const TUid KReverseGeoCodeUid = {0x2002DD12}; -#endif + using namespace MdeConstants; @@ -136,15 +133,13 @@ #ifdef LOC_REVERSEGEOCODE iTagCreator = CTagCreator::NewL(); - iRevGeocoderPlugin = reinterpret_cast( - REComSession::CreateImplementationL(KReverseGeoCodeUid,iDtorKey)); - if( iRevGeocoderPlugin ) - { - iRevGeocoderPlugin->AddObserverL(*this); + TInt pluginerr = KErrNone; + TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL()); + + if(pluginerr == KErrNone) + { + iRevGeocoderPlugin->AddObserverL(*this); } - - - #endif @@ -257,7 +252,6 @@ // set the pointer to NULL, ECOM will destroy object. delete iRevGeocoderPlugin; iRevGeocoderPlugin = NULL; - REComSession::DestroyedImplementation(iDtorKey); #endif LOG( "CLocationRecord::~CLocationRecord(), end" ); } @@ -1821,6 +1815,7 @@ CMdEObject& locationObject = static_cast(item); locationId = locationObject.Id(); + iMediaItems[0]->iLocationId = locationId; TRAP( error, CreateRelationL( iMediaItems[0]->iObjectId, locationId ) ); #ifdef LOC_REVERSEGEOCODE //check if found location object has lat, long