equal
deleted
inserted
replaced
30 #include "cnetworkinfo.h" |
30 #include "cnetworkinfo.h" |
31 #include "locationmanagerdebug.h" |
31 #include "locationmanagerdebug.h" |
32 #include "locationtraildefs.h" |
32 #include "locationtraildefs.h" |
33 #include "locationtrailpskeys.h" |
33 #include "locationtrailpskeys.h" |
34 #include "mdeconstants.h" |
34 #include "mdeconstants.h" |
35 #ifdef LOC_REVERSEGEOCODE |
35 |
36 #include "reversegeocoderplugin.h" |
|
37 const TUid KReverseGeoCodeUid = {0x2002DD12}; |
|
38 #endif |
|
39 |
36 |
40 |
37 |
41 using namespace MdeConstants; |
38 using namespace MdeConstants; |
42 |
39 |
43 const TUint KNetQueryBit = 1; // 1 bit |
40 const TUint KNetQueryBit = 1; // 1 bit |
134 iNetworkInfoTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
131 iNetworkInfoTimer = CPeriodic::NewL( CActive::EPriorityStandard ); |
135 |
132 |
136 #ifdef LOC_REVERSEGEOCODE |
133 #ifdef LOC_REVERSEGEOCODE |
137 iTagCreator = CTagCreator::NewL(); |
134 iTagCreator = CTagCreator::NewL(); |
138 |
135 |
139 iRevGeocoderPlugin = reinterpret_cast<CReverseGeoCoderPlugin*>( |
136 TInt pluginerr = KErrNone; |
140 REComSession::CreateImplementationL(KReverseGeoCodeUid,iDtorKey)); |
137 TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL()); |
141 if( iRevGeocoderPlugin ) |
138 |
142 { |
139 if(pluginerr == KErrNone) |
143 iRevGeocoderPlugin->AddObserverL(*this); |
140 { |
|
141 iRevGeocoderPlugin->AddObserverL(*this); |
144 } |
142 } |
145 |
|
146 |
|
147 |
|
148 #endif |
143 #endif |
149 |
144 |
150 |
145 |
151 TInt interval( 0 ); |
146 TInt interval( 0 ); |
152 TRAP(err, ReadCenRepValueL(KIntervalKey, interval)); |
147 TRAP(err, ReadCenRepValueL(KIntervalKey, interval)); |
255 } |
250 } |
256 delete iTagCreator; |
251 delete iTagCreator; |
257 // set the pointer to NULL, ECOM will destroy object. |
252 // set the pointer to NULL, ECOM will destroy object. |
258 delete iRevGeocoderPlugin; |
253 delete iRevGeocoderPlugin; |
259 iRevGeocoderPlugin = NULL; |
254 iRevGeocoderPlugin = NULL; |
260 REComSession::DestroyedImplementation(iDtorKey); |
|
261 #endif |
255 #endif |
262 LOG( "CLocationRecord::~CLocationRecord(), end" ); |
256 LOG( "CLocationRecord::~CLocationRecord(), end" ); |
263 } |
257 } |
264 |
258 |
265 // -------------------------------------------------------------------------- |
259 // -------------------------------------------------------------------------- |
1819 { |
1813 { |
1820 CMdEItem& item = aQuery.ResultItem(0); |
1814 CMdEItem& item = aQuery.ResultItem(0); |
1821 CMdEObject& locationObject = static_cast<CMdEObject&>(item); |
1815 CMdEObject& locationObject = static_cast<CMdEObject&>(item); |
1822 locationId = locationObject.Id(); |
1816 locationId = locationObject.Id(); |
1823 |
1817 |
|
1818 iMediaItems[0]->iLocationId = locationId; |
1824 TRAP( error, CreateRelationL( iMediaItems[0]->iObjectId, locationId ) ); |
1819 TRAP( error, CreateRelationL( iMediaItems[0]->iObjectId, locationId ) ); |
1825 #ifdef LOC_REVERSEGEOCODE |
1820 #ifdef LOC_REVERSEGEOCODE |
1826 //check if found location object has lat, long |
1821 //check if found location object has lat, long |
1827 CMdEProperty* latProp = NULL; |
1822 CMdEProperty* latProp = NULL; |
1828 CMdEProperty* lonProp = NULL; |
1823 CMdEProperty* lonProp = NULL; |