# HG changeset patch # User hgs # Date 1284731689 -10800 # Node ID a3cc46f377726269cd46488369b1bd72431f33f1 # Parent aa5a574040a43dd5842d6b81686f78e0304f656e 201037 diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFDbItemContainer.cpp --- a/clfwrapper/ClientSrc/CCLFDbItemContainer.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFDbItemContainer.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -65,6 +65,7 @@ CCLFContainerItem::~CCLFContainerItem() { delete iMdEObject; + iMdEObject = NULL; } // ----------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFDbItemProvider.cpp --- a/clfwrapper/ClientSrc/CCLFDbItemProvider.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFDbItemProvider.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -84,6 +84,7 @@ { Cancel(); delete iObjectQuery; + iObjectQuery = NULL; iItemArray.ResetAndDestroy(); } diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFEngineImpl.cpp --- a/clfwrapper/ClientSrc/CCLFEngineImpl.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFEngineImpl.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -105,14 +105,21 @@ CCLFEngineImpl::~CCLFEngineImpl() { delete iItemProvider; + iItemProvider = NULL; delete iUpdateStartEventHandler; + iUpdateStartEventHandler = NULL; delete iUpdateEndEventHandler; + iUpdateEndEventHandler = NULL; delete iDbItemContainer; + iDbItemContainer = NULL; delete iCLFServerProxy; + iCLFServerProxy = NULL; iChangedItemObserverArray.Close(); iProcessObserverArray.Close(); delete iQueryAdapter; + iQueryAdapter = NULL; delete iMdESession; + iMdESession = NULL; } // ----------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFItemImpl.cpp --- a/clfwrapper/ClientSrc/CCLFItemImpl.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFItemImpl.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -521,6 +521,7 @@ for ( HBufC* const* p = hashIter.NextValue(); p; p = hashIter.NextValue() ) { delete *p; + p = NULL; } iTextMap.Close(); } diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp --- a/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -157,7 +157,9 @@ { iChangedItemProvider.RemoveChangedItemProviderObserver( this ); delete iMimeTypeArray; + iMimeTypeArray = NULL; delete iMediaTypeArray; + iMediaTypeArray = NULL; iItemArray.ResetAndDestroy(); delete iItemProvider; iResultArray.Close(); diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFQueryAdapter.cpp --- a/clfwrapper/ClientSrc/CCLFQueryAdapter.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFQueryAdapter.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -255,8 +255,8 @@ } aStatus = KRequestPending; - iStatusArray.Append( &aStatus ); - iQueryArray.Append( aQuery ); + iStatusArray.AppendL( &aStatus ); + iQueryArray.AppendL( aQuery ); // Check that we can actually execute the query. We can if we have at least one query condition. if ( rootCondition.Count() > 0 ) diff -r aa5a574040a4 -r a3cc46f37772 clfwrapper/ClientSrc/CCLFServerProxy.cpp --- a/clfwrapper/ClientSrc/CCLFServerProxy.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/clfwrapper/ClientSrc/CCLFServerProxy.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -758,7 +758,9 @@ TRAP_IGNORE( iMdESession.RemoveObjectPresentObserverL( *this )); iUpdateItemsHandlerArray.ResetAndDestroy(); delete iUriArray; + iUriArray = NULL; delete iExtensionArray; + iExtensionArray = NULL; iFs.Close(); iHC.RemoveHarvesterEventObserver( *this ); diff -r aa5a574040a4 -r a3cc46f37772 contextengine/group/contextengine.mmp --- a/contextengine/group/contextengine.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/contextengine/group/contextengine.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -47,7 +47,7 @@ #if defined(WINS) deffile ../bwincw/contextenginewinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/contextenginearm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 contextengine/plugins/calendarplugin/src/CalendarContextPlugin.cpp --- a/contextengine/plugins/calendarplugin/src/CalendarContextPlugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/contextengine/plugins/calendarplugin/src/CalendarContextPlugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -89,12 +89,15 @@ { WRITELOG( "CCalendarContextPlugin::~CCalendarContextPlugin -- ENTER" ); delete iCalInstanceView; + iCalInstanceView = NULL; delete iCalSession; + iCalSession = NULL; if( iInitTimer ) { iInitTimer->Cancel(); delete iInitTimer; + iInitTimer = NULL; } WRITELOG( "CCalendarContextPlugin::~CCalendarContextPlugin -- RETURN" ); @@ -366,11 +369,15 @@ } WRITELOG( "CCalendarContextPlugin::AddMetaDataL - Add calendar relation to MDE" ); +#ifdef _DEBUG TRAP( addError, iMdeSession->AddRelationL( *relationObject ) ); if ( addError != KErrNone) { WRITELOG1( "CCalendarContextPlugin::AddMetaDataL - Add calendar relation to MDE error: %d", addError ); } +#else + TRAP_IGNORE( iMdeSession->AddRelationL( *relationObject ) ); +#endif CleanupStack::PopAndDestroy( relationObject ); CleanupStack::PopAndDestroy( calendarObject ); @@ -516,7 +523,6 @@ void CCalendarContextPlugin::StartRetryL() { WRITELOG( "CCalendarContextPlugin::StartRetryL() ENTER" ); - TInt err(KErrNone); if(iRetryCount++ > KMaxRetryCount) { @@ -535,10 +541,11 @@ return; } - +#ifdef _DEBUG + TInt err( KErrNone ); if(!iInitTimer) { - TRAP(err, iInitTimer = CPeriodic::NewL(CActive::EPriorityStandard) ); + TRAP(err, iInitTimer = CPeriodic::NewL( CActive::EPriorityStandard ) ); } if( err != KErrNone ) @@ -546,7 +553,13 @@ WRITELOG1( "CCalendarContextPlugin::OpenViewL() iInitTimer->Start failed %d", err ); User::Leave( err ); } - +#else + if(!iInitTimer) + { + iInitTimer = CPeriodic::NewL( CActive::EPriorityStandard ); + } +#endif + WRITELOG( "CCalendarContextPlugin::OpenViewL() iInitTimer->Start" ); iInitTimer->Start( KInitRetryTimeout, KInitRetryTimeout, TCallBack(InitRetryCallback, this)); WRITELOG( "CCalendarContextPlugin::StartRetryL() RETURN" ); diff -r aa5a574040a4 -r a3cc46f37772 contextengine/plugins/contextplugininterface/group/contextplugininterface.mmp --- a/contextengine/plugins/contextplugininterface/group/contextplugininterface.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/contextengine/plugins/contextplugininterface/group/contextplugininterface.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -39,7 +39,7 @@ #if defined(WINS) deffile ../bwincw/contextplugininterfacewinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/contextplugininterfacearm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 contextengine/plugins/locationplugin/src/locationcontextplugin.cpp --- a/contextengine/plugins/locationplugin/src/locationcontextplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/contextengine/plugins/locationplugin/src/locationcontextplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -138,17 +138,39 @@ return; } - if ( !iLocationTrailConnected ) // no trail, no snapshot - { - aHD.SetErrorCode( KErrDisconnected ); - aObserver.PluginSnapshotStatus( &aHD ); - return; + if ( !iLocationTrailConnected ) + { + WRITELOG( "CLocationContextPlugin::ContextSnapshot() - try to reconnect" ); + iManipulator.Close(); + iLocationTrail.Close(); + TInt err = iLocationTrail.Connect(); + if ( err == KErrNone ) + { + err = iManipulator.Connect(); + if( err == KErrNone ) + { + iLocationTrailConnected = ETrue; + } + } + + if (err != KErrNone ) + { + // no trail, no snapshot + aHD.SetErrorCode( KErrDisconnected ); + aObserver.PluginSnapshotStatus( &aHD ); + return; + } } TInt ret = KErrNone; ret = iManipulator.LocationSnapshot( aHD.MdeObject().Id() ); + if( ret == KErrServerTerminated ) + { + iLocationTrailConnected = EFalse; + } + if( ret != KErrNone ) { ret = KErrCompletion; diff -r aa5a574040a4 -r a3cc46f37772 contextengine/src/contextengine.cpp --- a/contextengine/src/contextengine.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/contextengine/src/contextengine.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -109,6 +109,7 @@ { // destroy the singleton and free TLS delete data; + data = NULL; UserSvr::DllFreeTls( KContextEngineTLSKey ); } } @@ -132,6 +133,7 @@ { // destroy the singleton and free TLS delete data; + data = NULL; UserSvr::DllFreeTls( KContextEngineTLSKey ); } } @@ -144,6 +146,7 @@ { WRITELOG( "CContextEngine::~CContextEngine" ); // DEBUG INFO delete iContextEngineAO; + iContextEngineAO = NULL; MdsUtils::CleanupPtrArray( &iSnapshotQueue ); REComSession::FinalClose(); // we are done @@ -279,6 +282,7 @@ if ( iSnapshotQueue.Append( aItem ) != KErrNone ) { delete aItem; + aItem = NULL; return; } diff -r aa5a574040a4 -r a3cc46f37772 group/bld.inf --- a/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,8 @@ #include -#include "../locationmanager/inc/locplatsupport.mmh" + +#include "../rom/bld.inf" #include "../metadataengine/group/bld.inf" #include "../locationmanager/group/bld.inf" @@ -36,31 +37,7 @@ PRJ_EXPORTS -#if defined(_LOC_GEOTAGGING_CELLID) -#ifdef _LOC_REVERSEGEOCODE -../rom/mds_cellid_reverse_geocode_enabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) -#else -../rom/mds_cellidenabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) -#endif -#elif defined(_LOC_REVERSEGEOCODE) -#ifdef _LOC_GEOTAGGING_CELLID -../rom/mds_cellid_reverse_geocode_enabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) -#else -../rom/mds_reverse_geocode_enabled_only.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) -#endif -#else -../rom/mds.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) -#endif - -#ifdef RD_MDS_2_5 -../rom/ContentListingFramework.iby CORE_MW_LAYER_IBY_EXPORT_PATH( ContentListingFramework.iby ) -#endif - -//Stubs -../sis/mds/mds_stub.sis /epoc32/data/z/system/install/mds_stub.sis - PRJ_TESTMMPFILES PRJ_TESTEXPORTS -../rom/mds_testers.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds_testers.iby) diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistclient/group/blacklistclient.mmp --- a/harvester/blacklistclient/group/blacklistclient.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistclient/group/blacklistclient.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -44,7 +44,7 @@ deffile ../bwincw/blacklistclientwinscw.def #else -#if defined(ARMCC) +#if defined(EABI) deffile ../eabi/blacklistclientarm.def #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistclient/src/blacklistclient.cpp --- a/harvester/blacklistclient/src/blacklistclient.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistclient/src/blacklistclient.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -278,6 +278,7 @@ if ( err != KErrNone ) { delete item; + item = NULL; } @@ -300,6 +301,7 @@ { CBlacklistItem* item = iBlacklistMemoryTable[index]; delete item; + item = NULL; iBlacklistMemoryTable.Remove( index ); } diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistclient/traces/blacklistclientTraces.h --- a/harvester/blacklistclient/traces/blacklistclientTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistclient/traces/blacklistclientTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __BLACKLISTCLIENTTRACES_H__ @@ -6,35 +6,35 @@ #define KOstTraceComponentID 0x2001b2ed -#define RBLACKLISTCLIENT_RBLACKLISTCLIENT 0x860001 -#define DUP1_RBLACKLISTCLIENT_RBLACKLISTCLIENT 0x860002 -#define RBLACKLISTCLIENT_CONNECT 0x860003 -#define DUP1_RBLACKLISTCLIENT_CONNECT 0x860004 -#define RBLACKLISTCLIENT_VERSION 0x860005 -#define RBLACKLISTCLIENT_STARTSERVER 0x860006 -#define DUP1_RBLACKLISTCLIENT_STARTSERVER 0x860007 -#define RBLACKLISTCLIENT_REMOVEFROMDBL 0x860008 -#define DUP1_RBLACKLISTCLIENT_REMOVEFROMDBL 0x860009 -#define RBLACKLISTCLIENT_DOLOADBLACKLISTL 0x86000a -#define DUP1_RBLACKLISTCLIENT_DOLOADBLACKLISTL 0x86000b -#define RBLACKLISTCLIENT_LOADBLACKLISTL 0x86000c -#define DUP1_RBLACKLISTCLIENT_LOADBLACKLISTL 0x86000d -#define RBLACKLISTCLIENT_ADDTOMEMORYTABLEL 0x86000e -#define DUP1_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL 0x86000f -#define RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL 0x860010 -#define DUP1_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL 0x860011 -#define RBLACKLISTCLIENT_ISBLACKLISTEDL 0x860012 -#define DUP1_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x860013 -#define DUP2_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x860014 -#define DUP3_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x860015 -#define RBLACKLISTCLIENT_GETLISTINDEX 0x860016 -#define DUP1_RBLACKLISTCLIENT_GETLISTINDEX 0x860017 -#define RBLACKLISTCLIENT_ADDL 0x860018 -#define DUP1_RBLACKLISTCLIENT_ADDL 0x860019 -#define RBLACKLISTCLIENT_REMOVEL 0x86001a -#define DUP1_RBLACKLISTCLIENT_REMOVEL 0x86001b -#define RBLACKLISTCLIENT_CLOSEDBL 0x86001c -#define DUP1_RBLACKLISTCLIENT_CLOSEDBL 0x86001d +#define RBLACKLISTCLIENT_RBLACKLISTCLIENT 0x30001 +#define DUP1_RBLACKLISTCLIENT_RBLACKLISTCLIENT 0x30002 +#define RBLACKLISTCLIENT_CONNECT 0x30003 +#define DUP1_RBLACKLISTCLIENT_CONNECT 0x30004 +#define RBLACKLISTCLIENT_VERSION 0x30005 +#define RBLACKLISTCLIENT_STARTSERVER 0x30006 +#define DUP1_RBLACKLISTCLIENT_STARTSERVER 0x30007 +#define RBLACKLISTCLIENT_REMOVEFROMDBL 0x30008 +#define DUP1_RBLACKLISTCLIENT_REMOVEFROMDBL 0x30009 +#define RBLACKLISTCLIENT_DOLOADBLACKLISTL 0x3000a +#define DUP1_RBLACKLISTCLIENT_DOLOADBLACKLISTL 0x3000b +#define RBLACKLISTCLIENT_LOADBLACKLISTL 0x3000c +#define DUP1_RBLACKLISTCLIENT_LOADBLACKLISTL 0x3000d +#define RBLACKLISTCLIENT_ADDTOMEMORYTABLEL 0x3000e +#define DUP1_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL 0x3000f +#define RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL 0x30010 +#define DUP1_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL 0x30011 +#define RBLACKLISTCLIENT_ISBLACKLISTEDL 0x30012 +#define DUP1_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x30013 +#define DUP2_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x30014 +#define DUP3_RBLACKLISTCLIENT_ISBLACKLISTEDL 0x30015 +#define RBLACKLISTCLIENT_GETLISTINDEX 0x30016 +#define DUP1_RBLACKLISTCLIENT_GETLISTINDEX 0x30017 +#define RBLACKLISTCLIENT_ADDL 0x30018 +#define DUP1_RBLACKLISTCLIENT_ADDL 0x30019 +#define RBLACKLISTCLIENT_REMOVEL 0x3001a +#define DUP1_RBLACKLISTCLIENT_REMOVEL 0x3001b +#define RBLACKLISTCLIENT_CLOSEDBL 0x3001c +#define DUP1_RBLACKLISTCLIENT_CLOSEDBL 0x3001d #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistclient/traces/fixed_id.definitions --- a/harvester/blacklistclient/traces/fixed_id.definitions Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistclient/traces/fixed_id.definitions Fri Sep 17 16:54:49 2010 +0300 @@ -1,31 +1,31 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_NORMAL=0x86 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_ADDL=0x19 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL=0xf -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_CLOSEDBL=0x1d -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_CONNECT=0x4 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_DOLOADBLACKLISTL=0xb -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_GETLISTINDEX=0x17 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x13 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_LOADBLACKLISTL=0xd -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_RBLACKLISTCLIENT=0x2 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_REMOVEFROMDBL=0x9 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL=0x11 -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_REMOVEL=0x1b -[TRACE]TRACE_NORMAL[0x86]_DUP1_RBLACKLISTCLIENT_STARTSERVER=0x7 -[TRACE]TRACE_NORMAL[0x86]_DUP2_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x14 -[TRACE]TRACE_NORMAL[0x86]_DUP3_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x15 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_ADDL=0x18 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL=0xe -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_CLOSEDBL=0x1c -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_CONNECT=0x3 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_DOLOADBLACKLISTL=0xa -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_GETLISTINDEX=0x16 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x12 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_LOADBLACKLISTL=0xc -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_RBLACKLISTCLIENT=0x1 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_REMOVEFROMDBL=0x8 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL=0x10 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_REMOVEL=0x1a -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_STARTSERVER=0x6 -[TRACE]TRACE_NORMAL[0x86]_RBLACKLISTCLIENT_VERSION=0x5 +[GROUP]TRACE_NORMAL=0x3 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_ADDL=0x19 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL=0xf +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_CLOSEDBL=0x1d +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_CONNECT=0x4 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_DOLOADBLACKLISTL=0xb +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_GETLISTINDEX=0x17 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x13 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_LOADBLACKLISTL=0xd +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_RBLACKLISTCLIENT=0x2 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_REMOVEFROMDBL=0x9 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL=0x11 +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_REMOVEL=0x1b +[TRACE]TRACE_NORMAL[0x3]_DUP1_RBLACKLISTCLIENT_STARTSERVER=0x7 +[TRACE]TRACE_NORMAL[0x3]_DUP2_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x14 +[TRACE]TRACE_NORMAL[0x3]_DUP3_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x15 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_ADDL=0x18 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_ADDTOMEMORYTABLEL=0xe +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_CLOSEDBL=0x1c +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_CONNECT=0x3 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_DOLOADBLACKLISTL=0xa +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_GETLISTINDEX=0x16 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_ISBLACKLISTEDL=0x12 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_LOADBLACKLISTL=0xc +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_RBLACKLISTCLIENT=0x1 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_REMOVEFROMDBL=0x8 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_REMOVEFROMMEMORYTABLEL=0x10 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_REMOVEL=0x1a +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_STARTSERVER=0x6 +[TRACE]TRACE_NORMAL[0x3]_RBLACKLISTCLIENT_VERSION=0x5 diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistserver/group/blacklistserver.mmp --- a/harvester/blacklistserver/group/blacklistserver.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistserver/group/blacklistserver.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -50,6 +50,6 @@ PAGED BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O2 -OTime +OPTION ARMCC -O3 -OTime EPOCPROCESSPRIORITY background diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistserver/src/blacklistserver.cpp --- a/harvester/blacklistserver/src/blacklistserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistserver/src/blacklistserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -217,6 +217,7 @@ iBlacklistServerChunk.Close(); delete iSqLiteConnection; + iSqLiteConnection = NULL; WRITELOG( "CBlacklistServer::~CBlacklistServer - end" ); OstTrace0( TRACE_NORMAL, DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER, "CBlacklistServer::~CBlacklistServer -end " ); @@ -291,6 +292,7 @@ { TRAP(result, CBlacklistServer::ExeMainL()); delete cleanup; + cleanup = NULL; } __UHEAP_MARKEND; WRITELOG( "CBlacklistServer::E32Main - end" ); @@ -495,6 +497,7 @@ if ( err != KErrNone ) { delete item; + item = NULL; } WRITELOG( "CBlacklistServer::AddToMemoryTableL - end" ); @@ -518,6 +521,7 @@ { CBlacklistItem * item = iBlacklistMemoryTable[index]; delete item; + item = NULL; iBlacklistMemoryTable.Remove( index ); } @@ -723,7 +727,7 @@ variables->AppendL( TColumn( lcBuf ) ); variables->AppendL( TColumn( aMediaId ) ); - iBufferedRemoveItems.Append( variables ); // transfer ownership + iBufferedRemoveItems.AppendL( variables ); // transfer ownership iDBUpdateNeeded = ETrue; CleanupStack::Pop( lcBuf ); CleanupStack::Pop( 2, variables ); @@ -768,7 +772,7 @@ rowData->AppendL( TColumn( lcBuf ) ); rowData->AppendL( TColumn( aMediaId ) ); - iBufferedAddedItems.Append( rowData ); // transfer ownership + iBufferedAddedItems.AppendL( rowData ); // transfer ownership iDBUpdateNeeded = ETrue; CleanupStack::Pop( lcBuf ); CleanupStack::Pop( 2, rowData ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistserver/src/blacklistsession.cpp --- a/harvester/blacklistserver/src/blacklistsession.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistserver/src/blacklistsession.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -118,7 +118,7 @@ aMessage.ReadL( 0, mediaIdPckg ); RBuf uri; - uri.Create( aMessage.GetDesLength( 1 ) ); + User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) ); CleanupClosePushL( uri ); aMessage.ReadL( 1, uri ); @@ -140,7 +140,7 @@ void CBlacklistSession::RemoveL( const RMessage2& aMessage ) { RBuf uri; - uri.Create( aMessage.GetDesLength( 1 ) ); + User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) ); CleanupClosePushL( uri ); aMessage.ReadL( 1, uri ); @@ -162,7 +162,7 @@ void CBlacklistSession::RemoveFromDBL( const RMessage2& aMessage ) { RBuf uri; - uri.Create( aMessage.GetDesLength( 1 ) ); + User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) ); CleanupClosePushL( uri ); aMessage.ReadL( 1, uri ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistserver/traces/blacklistserverTraces.h --- a/harvester/blacklistserver/traces/blacklistserverTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistserver/traces/blacklistserverTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __BLACKLISTSERVERTRACES_H__ @@ -6,60 +6,60 @@ #define KOstTraceComponentID 0x2001b2eb -#define CBLACKLISTSERVER_CUSTOMSECURITYCHECKL 0x860001 -#define DUP1_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL 0x860002 -#define CBLACKLISTSERVER_CUSTOMFAILUREACTIONL 0x860003 -#define CBLACKLISTSERVER_NEWL 0x860004 -#define DUP1_CBLACKLISTSERVER_NEWL 0x860005 -#define CBLACKLISTSERVER_NEWLC 0x860006 -#define DUP1_CBLACKLISTSERVER_NEWLC 0x860007 -#define CBLACKLISTSERVER_CONSTRUCTL 0x860008 -#define DUP1_CBLACKLISTSERVER_CONSTRUCTL 0x860009 -#define CBLACKLISTSERVER_CBLACKLISTSERVER 0x86000a -#define DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER 0x86000b -#define CBLACKLISTSERVER_CLOSEDB 0x86000c -#define DUP1_CBLACKLISTSERVER_CLOSEDB 0x86000d -#define CBLACKLISTSERVER_EXEMAINL 0x86000e -#define DUP1_CBLACKLISTSERVER_EXEMAINL 0x86000f -#define _E32MAIN 0x860010 -#define DUP1__E32MAIN 0x860011 -#define CBLACKLISTSERVER_OPENDATABASEL 0x860012 -#define DUP1_CBLACKLISTSERVER_OPENDATABASEL 0x860013 -#define CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL 0x860014 -#define DUP1_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL 0x860015 -#define CBLACKLISTSERVER_MEMORYHANDLE 0x860016 -#define CBLACKLISTSERVER_LOADDATABASETOMEMORYL 0x860017 -#define DUP1_CBLACKLISTSERVER_LOADDATABASETOMEMORYL 0x860018 -#define CBLACKLISTSERVER_CREATEBLACKLISTTABLEL 0x860019 -#define DUP1_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL 0x86001a -#define CBLACKLISTSERVER_ADDTOMEMORYTABLEL 0x86001b -#define DUP1_CBLACKLISTSERVER_ADDTOMEMORYTABLEL 0x86001c -#define CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE 0x86001d -#define DUP1_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE 0x86001e -#define CBLACKLISTSERVER_GETMEMORYTABLEINDEX 0x86001f -#define DUP1_CBLACKLISTSERVER_GETMEMORYTABLEINDEX 0x860020 -#define CBLACKLISTSERVER_TABLEEXISTSL 0x860021 -#define DUP1_CBLACKLISTSERVER_TABLEEXISTSL 0x860022 -#define CBLACKLISTSERVER_NEWSESSIONL 0x860023 -#define DUP1_CBLACKLISTSERVER_NEWSESSIONL 0x860024 -#define CBLACKLISTSERVER_RUNERROR 0x860025 -#define DUP1_CBLACKLISTSERVER_RUNERROR 0x860026 -#define CBLACKLISTSERVER_ADDSESSION 0x860027 -#define CBLACKLISTSERVER_REMOVESESSION 0x860028 -#define DUP1_CBLACKLISTSERVER_REMOVESESSION 0x860029 -#define DUP2_CBLACKLISTSERVER_REMOVESESSION 0x86002a -#define CBLACKLISTSERVER_ADDL 0x86002b -#define DUP1_CBLACKLISTSERVER_ADDL 0x86002c -#define CBLACKLISTSERVER_REMOVEL 0x86002d -#define DUP1_CBLACKLISTSERVER_REMOVEL 0x86002e -#define CBLACKLISTSERVER_REMOVEFROMDBL 0x86002f -#define DUP1_CBLACKLISTSERVER_REMOVEFROMDBL 0x860030 -#define CBLACKLISTSERVER_ADDTODBL 0x860031 -#define DUP1_CBLACKLISTSERVER_ADDTODBL 0x860032 -#define CBLACKLISTSERVER_WRITEALLDATATODBL 0x860033 -#define DUP1_CBLACKLISTSERVER_WRITEALLDATATODBL 0x860034 -#define CBLACKLISTSERVER_COMMITBUFFEREDITEMSL 0x860035 -#define DUP1_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL 0x860036 +#define CBLACKLISTSERVER_CUSTOMSECURITYCHECKL 0x30001 +#define DUP1_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL 0x30002 +#define CBLACKLISTSERVER_CUSTOMFAILUREACTIONL 0x30003 +#define CBLACKLISTSERVER_NEWL 0x30004 +#define DUP1_CBLACKLISTSERVER_NEWL 0x30005 +#define CBLACKLISTSERVER_NEWLC 0x30006 +#define DUP1_CBLACKLISTSERVER_NEWLC 0x30007 +#define CBLACKLISTSERVER_CONSTRUCTL 0x30008 +#define DUP1_CBLACKLISTSERVER_CONSTRUCTL 0x30009 +#define CBLACKLISTSERVER_CBLACKLISTSERVER 0x3000a +#define DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER 0x3000b +#define CBLACKLISTSERVER_CLOSEDB 0x3000c +#define DUP1_CBLACKLISTSERVER_CLOSEDB 0x3000d +#define CBLACKLISTSERVER_EXEMAINL 0x3000e +#define DUP1_CBLACKLISTSERVER_EXEMAINL 0x3000f +#define _E32MAIN 0x30010 +#define DUP1__E32MAIN 0x30011 +#define CBLACKLISTSERVER_OPENDATABASEL 0x30012 +#define DUP1_CBLACKLISTSERVER_OPENDATABASEL 0x30013 +#define CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL 0x30014 +#define DUP1_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL 0x30015 +#define CBLACKLISTSERVER_MEMORYHANDLE 0x30016 +#define CBLACKLISTSERVER_LOADDATABASETOMEMORYL 0x30017 +#define DUP1_CBLACKLISTSERVER_LOADDATABASETOMEMORYL 0x30018 +#define CBLACKLISTSERVER_CREATEBLACKLISTTABLEL 0x30019 +#define DUP1_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL 0x3001a +#define CBLACKLISTSERVER_ADDTOMEMORYTABLEL 0x3001b +#define DUP1_CBLACKLISTSERVER_ADDTOMEMORYTABLEL 0x3001c +#define CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE 0x3001d +#define DUP1_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE 0x3001e +#define CBLACKLISTSERVER_GETMEMORYTABLEINDEX 0x3001f +#define DUP1_CBLACKLISTSERVER_GETMEMORYTABLEINDEX 0x30020 +#define CBLACKLISTSERVER_TABLEEXISTSL 0x30021 +#define DUP1_CBLACKLISTSERVER_TABLEEXISTSL 0x30022 +#define CBLACKLISTSERVER_NEWSESSIONL 0x30023 +#define DUP1_CBLACKLISTSERVER_NEWSESSIONL 0x30024 +#define CBLACKLISTSERVER_RUNERROR 0x30025 +#define DUP1_CBLACKLISTSERVER_RUNERROR 0x30026 +#define CBLACKLISTSERVER_ADDSESSION 0x30027 +#define CBLACKLISTSERVER_REMOVESESSION 0x30028 +#define DUP1_CBLACKLISTSERVER_REMOVESESSION 0x30029 +#define DUP2_CBLACKLISTSERVER_REMOVESESSION 0x3002a +#define CBLACKLISTSERVER_ADDL 0x3002b +#define DUP1_CBLACKLISTSERVER_ADDL 0x3002c +#define CBLACKLISTSERVER_REMOVEL 0x3002d +#define DUP1_CBLACKLISTSERVER_REMOVEL 0x3002e +#define CBLACKLISTSERVER_REMOVEFROMDBL 0x3002f +#define DUP1_CBLACKLISTSERVER_REMOVEFROMDBL 0x30030 +#define CBLACKLISTSERVER_ADDTODBL 0x30031 +#define DUP1_CBLACKLISTSERVER_ADDTODBL 0x30032 +#define CBLACKLISTSERVER_WRITEALLDATATODBL 0x30033 +#define DUP1_CBLACKLISTSERVER_WRITEALLDATATODBL 0x30034 +#define CBLACKLISTSERVER_COMMITBUFFEREDITEMSL 0x30035 +#define DUP1_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL 0x30036 #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/blacklistserver/traces/fixed_id.definitions --- a/harvester/blacklistserver/traces/fixed_id.definitions Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/blacklistserver/traces/fixed_id.definitions Fri Sep 17 16:54:49 2010 +0300 @@ -1,56 +1,56 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_NORMAL=0x86 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_ADDL=0x2b -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_ADDSESSION=0x27 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_ADDTODBL=0x31 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_ADDTOMEMORYTABLEL=0x1b -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CBLACKLISTSERVER=0xa -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CLOSEDB=0xc -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL=0x35 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CONSTRUCTL=0x8 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL=0x19 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CUSTOMFAILUREACTIONL=0x3 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL=0x1 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_EXEMAINL=0xe -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_GETMEMORYTABLEINDEX=0x1f -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_LOADDATABASETOMEMORYL=0x17 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_MEMORYHANDLE=0x16 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_NEWL=0x4 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_NEWLC=0x6 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_NEWSESSIONL=0x23 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_OPENDATABASEL=0x12 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_REMOVEFROMDBL=0x2f -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE=0x1d -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_REMOVEL=0x2d -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_REMOVESESSION=0x28 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_RUNERROR=0x25 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL=0x14 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_TABLEEXISTSL=0x21 -[TRACE]TRACE_NORMAL[0x86]_CBLACKLISTSERVER_WRITEALLDATATODBL=0x33 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_ADDL=0x2c -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_ADDTODBL=0x32 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_ADDTOMEMORYTABLEL=0x1c -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER=0xb -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_CLOSEDB=0xd -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL=0x36 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_CONSTRUCTL=0x9 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL=0x1a -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL=0x2 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_EXEMAINL=0xf -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_GETMEMORYTABLEINDEX=0x20 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_LOADDATABASETOMEMORYL=0x18 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_NEWL=0x5 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_NEWLC=0x7 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_NEWSESSIONL=0x24 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_OPENDATABASEL=0x13 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_REMOVEFROMDBL=0x30 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE=0x1e -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_REMOVEL=0x2e -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_REMOVESESSION=0x29 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_RUNERROR=0x26 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL=0x15 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_TABLEEXISTSL=0x22 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CBLACKLISTSERVER_WRITEALLDATATODBL=0x34 -[TRACE]TRACE_NORMAL[0x86]_DUP1__E32MAIN=0x11 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CBLACKLISTSERVER_REMOVESESSION=0x2a -[TRACE]TRACE_NORMAL[0x86]__E32MAIN=0x10 +[GROUP]TRACE_NORMAL=0x3 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_ADDL=0x2b +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_ADDSESSION=0x27 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_ADDTODBL=0x31 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_ADDTOMEMORYTABLEL=0x1b +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CBLACKLISTSERVER=0xa +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CLOSEDB=0xc +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL=0x35 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CONSTRUCTL=0x8 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL=0x19 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CUSTOMFAILUREACTIONL=0x3 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL=0x1 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_EXEMAINL=0xe +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_GETMEMORYTABLEINDEX=0x1f +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_LOADDATABASETOMEMORYL=0x17 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_MEMORYHANDLE=0x16 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_NEWL=0x4 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_NEWLC=0x6 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_NEWSESSIONL=0x23 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_OPENDATABASEL=0x12 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_REMOVEFROMDBL=0x2f +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE=0x1d +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_REMOVEL=0x2d +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_REMOVESESSION=0x28 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_RUNERROR=0x25 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL=0x14 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_TABLEEXISTSL=0x21 +[TRACE]TRACE_NORMAL[0x3]_CBLACKLISTSERVER_WRITEALLDATATODBL=0x33 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_ADDL=0x2c +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_ADDTODBL=0x32 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_ADDTOMEMORYTABLEL=0x1c +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER=0xb +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_CLOSEDB=0xd +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_COMMITBUFFEREDITEMSL=0x36 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_CONSTRUCTL=0x9 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_CREATEBLACKLISTTABLEL=0x1a +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_CUSTOMSECURITYCHECKL=0x2 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_EXEMAINL=0xf +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_GETMEMORYTABLEINDEX=0x20 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_LOADDATABASETOMEMORYL=0x18 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_NEWL=0x5 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_NEWLC=0x7 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_NEWSESSIONL=0x24 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_OPENDATABASEL=0x13 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_REMOVEFROMDBL=0x30 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_REMOVEFROMMEMORYTABLE=0x1e +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_REMOVEL=0x2e +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_REMOVESESSION=0x29 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_RUNERROR=0x26 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_SERIALIZETOSHAREDMEMORYL=0x15 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_TABLEEXISTSL=0x22 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CBLACKLISTSERVER_WRITEALLDATATODBL=0x34 +[TRACE]TRACE_NORMAL[0x3]_DUP1__E32MAIN=0x11 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CBLACKLISTSERVER_REMOVESESSION=0x2a +[TRACE]TRACE_NORMAL[0x3]__E32MAIN=0x10 diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/group/harvesterclient.mmp --- a/harvester/client/group/harvesterclient.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/group/harvesterclient.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,7 @@ #if defined(WINSCW) deffile ../bwincw/harvesterclientwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/harvesterclientarm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/inc/harvesterclientao.h --- a/harvester/client/inc/harvesterclientao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/inc/harvesterclientao.h Fri Sep 17 16:54:49 2010 +0300 @@ -61,6 +61,8 @@ */ void Active(); + void CancelRequest(); + protected: /** @@ -111,6 +113,8 @@ * Harvester server assigned file name */ TFileName iURI; + + TBool iCancelled; }; #endif // __CHARVESTERCLIENTAO_H__ diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/src/harvesterclient.cpp --- a/harvester/client/src/harvesterclient.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/src/harvesterclient.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -54,10 +54,11 @@ WRITELOG( "RHarvesterClient::RHarvesterClient() - Constructor" ); OstTrace0( TRACE_NORMAL, RHARVESTERCLIENT_RHARVESTERCLIENT, "RHarvesterClient::RHarvesterClient" ); - iHarvesterClientAO = NULL; iObserver = NULL; iHEO = NULL; iRequestQueue = NULL; + iHarvesterClientAO = NULL; + iSessionWatcher = NULL; } // ---------------------------------------------------------------------------------------- @@ -69,7 +70,6 @@ WRITELOG( "RHarvesterClient::Connect()" ); OstTrace0( TRACE_NORMAL, RHARVESTERCLIENT_CONNECT, "RHarvesterClient::Connect" ); - RProperty property; const TInt error( property.Attach( KHarvesterPSShutdown, KShutdown, EOwnerThread ) ); TInt value = 0; @@ -114,28 +114,29 @@ } else { + WRITELOG1( "RHarvesterClient::Connect() - Server is not running or could not be started, error &d", err ); + delete iRequestQueue; + iRequestQueue = NULL; delete iHarvesterClientAO; iHarvesterClientAO = NULL; - delete iRequestQueue; - iRequestQueue = NULL; + return err; } -#ifdef _DEBUG - if ( err != KErrNone ) + if( err != KErrNone ) { - WRITELOG1( "RHarvesterClient::Connect() - Server is not running or could not be started, error &d", err ); + WRITELOG1( "RHarvesterClient::Connect() - Session creation failed, error &d", err ); + delete iRequestQueue; + iRequestQueue = NULL; + delete iHarvesterClientAO; + iHarvesterClientAO = NULL; } - else - { - WRITELOG( "RHarvesterClient::Connect() - no errors" ); - } - WRITELOG( "RHarvesterClient::Connect() - end" ); -#endif - + iHEO = NULL; iSessionWatcher = NULL; + WRITELOG( "RHarvesterClient::Connect() - end" ); + return err; } @@ -183,26 +184,40 @@ delete iSessionWatcher; iSessionWatcher = NULL; - // cancels Harvest Complete request if it exist at server + WRITELOG( "RHarvesterClient::Close() - cancelling pending harvesting requests" ); + if( iRequestQueue && iRequestQueue->RequestsPending() ) + { + iRequestQueue->Cancel(); + } + + WRITELOG( "RHarvesterClient::Close() - removing harvester client observer" ); + if( iObserver ) + { + RemoveObserver( iObserver ); + } UnregisterHarvestComplete(); WRITELOG( "RHarvesterClient::Close() - UnregisterHarvest done" ); + WRITELOG( "RHarvesterClient::Close() - forcing remaining harvesting requests" ); if( iRequestQueue && iRequestQueue->RequestsPending() ) { - iRequestQueue->Cancel(); + WRITELOG( "RHarvesterClient::Close() - Pending harvesting requests detected -> ForceHarvest" ); iRequestQueue->ForceRequests(); } + WRITELOG( "RHarvesterClient::Close() - ForceHarvest done" ); + delete iRequestQueue; iRequestQueue = NULL; + delete iHEO; + iHEO = NULL; + + WRITELOG( "RHarvesterClient::Close() - deleting harvester client AO" ); delete iHarvesterClientAO; iHarvesterClientAO = NULL; - delete iHEO; - iHEO = NULL; - WRITELOG( "RHarvesterClient::Close() - Closing session" ); RSessionBase::Close(); @@ -219,8 +234,8 @@ if ( iHarvesterClientAO ) { - iHarvesterClientAO->SetObserver( aObserver ); - } + iHarvesterClientAO->SetObserver( aObserver ); + } iObserver = aObserver; } @@ -233,18 +248,17 @@ WRITELOG( "RHarvesterClient::RemoveObserver()" ); OstTrace0( TRACE_NORMAL, RHARVESTERCLIENT_REMOVEOBSERVER, "RHarvesterClient::RemoveObserver" ); - if ( iHarvesterClientAO ) - { - iHarvesterClientAO->RemoveObserver( aObserver ); - } - - if ( aObserver == iObserver ) + if ( aObserver == iObserver && iObserver ) { - if ( iObserver ) - { - WRITELOG( "CHarvesterClientAO::RemoveObserver() - deleting observer" ); - iObserver = NULL; - } + WRITELOG( "RHarvesterClient::RemoveObserver() - deleting observer" ); + + if ( iHarvesterClientAO ) + { + WRITELOG( "RHarvesterClient::RemoveObserver() - calling iHarvesterClientAO->RemoveObserver" ); + iHarvesterClientAO->RemoveObserver( aObserver ); + } + + iObserver = NULL; } } @@ -300,7 +314,6 @@ WRITELOG1( "RHarvesterClient::HarvestFile() - file %S", &aURI ); OstTrace0( TRACE_NORMAL, RHARVESTERCLIENT_HARVESTFILE, "RHarvesterClient::HarvestFile" ); - HBufC8* paramBuf = NULL; TRAPD( err, paramBuf = SerializeArrayL( aAlbumIds ) ); if ( err ) @@ -335,11 +348,13 @@ WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrServerBusy ); iObserver->HarvestingComplete( const_cast(aURI), KErrServerBusy ); delete harvestFileActive; + harvestFileActive = NULL; } else if( err ) { WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrServerBusy ); delete harvestFileActive; + harvestFileActive = NULL; } else { @@ -352,11 +367,13 @@ WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrDisconnected ); iObserver->HarvestingComplete( const_cast(aURI), KErrDisconnected ); delete harvestFileActive; + harvestFileActive = NULL; } else { WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrDisconnected ); delete harvestFileActive; + harvestFileActive = NULL; } WRITELOG( "RHarvesterClient::HarvestFile() - end" ); } @@ -408,11 +425,13 @@ WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrServerBusy ); iObserver->HarvestingComplete( const_cast(aURI), KErrServerBusy ); delete harvestFileActive; + harvestFileActive = NULL; } else if( err ) { WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrServerBusy ); delete harvestFileActive; + harvestFileActive = NULL; } else { @@ -424,11 +443,13 @@ WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrDisconnected ); iObserver->HarvestingComplete( const_cast(aURI), KErrDisconnected ); delete harvestFileActive; + harvestFileActive = NULL; } else { WRITELOG1( "RHarvesterClient::HarvestFile() - cannot not send harvest request to server, error: %d", KErrDisconnected ); delete harvestFileActive; + harvestFileActive = NULL; } } @@ -464,11 +485,10 @@ // ---------------------------------------------------------------------------------------- // void RHarvesterClient::RegisterHarvestComplete(TDes& aURI, TRequestStatus& aStatus) - { + { TIpcArgs ipcArgs( &aURI ); OstTrace0( TRACE_NORMAL, RHARVESTERCLIENT_REGISTERHARVESTCOMPLETE, "RHarvesterClient::RegisterHarvestComplete" ); - if( !iHandle ) { return; @@ -488,7 +508,7 @@ return; } - Send( EUnregisterHarvestComplete ); + SendReceive( EUnregisterHarvestComplete ); } // ---------------------------------------------------------------------------------------- @@ -498,7 +518,10 @@ void RHarvesterClient::HarvestFile( TInt& aService, TIpcArgs& aArgs, TRequestStatus& aStatus ) { // send to server harvesting complete observer - iHarvesterClientAO->Active(); + if( iObserver && iHarvesterClientAO ) + { + iHarvesterClientAO->Active(); + } SendReceive( aService, aArgs, aStatus ); } @@ -508,8 +531,6 @@ // void RHarvesterClient::ForceHarvestFile( TInt& aService, TIpcArgs& aArgs ) { - // send to server harvesting complete observer - iHarvesterClientAO->Active(); SendReceive( aService, aArgs ); } diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/src/harvesterclientao.cpp --- a/harvester/client/src/harvesterclientao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/src/harvesterclientao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -51,7 +51,7 @@ OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::~CHarvesterClientAO" ); WRITELOG( "CHarvesterClientAO::~CHarvesterClientAO()" ); - Cancel(); + CancelRequest(); } // --------------------------------------------------------------------------- @@ -60,9 +60,10 @@ // --------------------------------------------------------------------------- // CHarvesterClientAO::CHarvesterClientAO( RHarvesterClient& aHarvesterClient ) - : CActive( CActive::EPriorityStandard ), + : CActive( CActive::EPriorityUserInput ), iObserver( NULL ), - iHarvesterClient( aHarvesterClient ) + iHarvesterClient( aHarvesterClient ), + iCancelled( EFalse ) { OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::CHarvesterClientAO" ); @@ -97,19 +98,17 @@ // RemoveObserver // --------------------------------------------------------------------------- // -void CHarvesterClientAO::RemoveObserver( MHarvestObserver* aObserver ) +void CHarvesterClientAO::RemoveObserver( MHarvestObserver* /*aObserver*/ ) { WRITELOG( "CHarvesterClientAO::RemoveObserver()" ); OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_REMOVEOBSERVER, "CHarvesterClientAO::RemoveObserver" ); - - if ( aObserver == iObserver ) - { - if ( iObserver ) - { - WRITELOG( "CHarvesterClientAO::RemoveObserver() - deleting observer" ); - iObserver = NULL; - } - } + if ( iObserver ) + { + WRITELOG( "CHarvesterClientAO::RemoveObserver() - deleting observer" ); + iObserver = NULL; + } + + CancelRequest(); } // --------------------------------------------------------------------------- @@ -120,7 +119,8 @@ { WRITELOG( "CHarvesterClientAO::DoCancel()" ); OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_DOCANCEL, "CHarvesterClientAO::DoCancel" ); - + iHarvesterClient.UnregisterHarvestComplete(); + WRITELOG( "CHarvesterClientAO::DoCancel() - end" ); } // --------------------------------------------------------------------------- @@ -129,9 +129,12 @@ // void CHarvesterClientAO::Active() { - if (!IsActive()) + WRITELOG( "CHarvesterClientAO::Active" ); + if ( iObserver && !IsActive()) { + WRITELOG( "CHarvesterClientAO::Active - calling RegisterHarvestComplete" ); iHarvesterClient.RegisterHarvestComplete(iURI, iStatus); + iCancelled = EFalse; SetActive(); } } @@ -144,7 +147,6 @@ { WRITELOG( "CHarvesterClientAO::RunL()" ); OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_RUNL, "CHarvesterClientAO::RunL" ); - const TInt status = iStatus.Int(); @@ -161,10 +163,12 @@ } // if the request was not canceled or server is not terminated, Activating AO again - if ( status != KErrCancel && status != KErrServerTerminated ) + if ( status != KErrCancel && status != KErrServerTerminated && iObserver && !iCancelled ) { + WRITELOG( "CHarvesterClientAO::RunL() - not cancelled or terminated, calling Active" ); Active(); } + WRITELOG( "CHarvesterClientAO::RunL() - end" ); } // --------------------------------------------------------------------------- @@ -181,3 +185,24 @@ return KErrNone; } + +// --------------------------------------------------------------------------- +// Active +// --------------------------------------------------------------------------- +// +void CHarvesterClientAO::CancelRequest() + { + WRITELOG( "CHarvesterClientAO::CancelRequest" ); + if( !iCancelled ) + { + WRITELOG( "CHarvesterClientAO::CancelRequest - not cancelled, calling Cancel" ); + iCancelled = ETrue; + Cancel(); + } + if( !IsActive() ) + { + WRITELOG( "CHarvesterClientAO::CancelRequest - setting priority to High" ); + SetPriority( CActive::EPriorityHigh ); + } + } + diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/src/harvestereventobserverao.cpp --- a/harvester/client/src/harvestereventobserverao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/src/harvestereventobserverao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -126,6 +126,7 @@ iHarvesterClient.Send( EUnregisterHarvesterEvent, ipcArgs ); iObservers.Remove( i ); delete observer; + observer = NULL; } } diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/src/harvesterrequestactive.cpp --- a/harvester/client/src/harvesterrequestactive.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/src/harvesterrequestactive.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -32,14 +32,11 @@ if( IsActive() ) { Cancel(); - if( iObserver ) - { - iObserver->HarvestingComplete( iUri, KErrCancel ); - } - iRequestCompleted = ETrue; } + iRequestCompleted = ETrue; delete iAlbumIds; + iAlbumIds = NULL; } // --------------------------------------------------------------------------- @@ -79,10 +76,16 @@ // void CHarvesterRequestActive::RunL() { + if( iStatus.Int() == KErrCancel ) + { + return; + } + if( iStatus.Int() && iObserver ) { iObserver->HarvestingComplete( iUri, iStatus.Int() ); } + iRequestCompleted = ETrue; if( iRequestQueue ) { @@ -104,7 +107,8 @@ if( iObserver ) { iObserver->HarvestingComplete( iUri, aError ); - } + } + iRequestCompleted = ETrue; return KErrNone; } @@ -116,6 +120,7 @@ void CHarvesterRequestActive::DoCancel() { iCancelled = ETrue; + iObserver = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/src/harvestersessionwatcher.cpp --- a/harvester/client/src/harvestersessionwatcher.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/src/harvestersessionwatcher.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -38,6 +38,7 @@ CHarvesterSessionWatcher::~CHarvesterSessionWatcher() // destruct { Cancel(); + iObserver = NULL; } // --------------------------------------------------------------------------- @@ -105,7 +106,10 @@ case ERunning: { // server terminated, notify clients - iObserver->HarvesterServerTerminated(); + if( iObserver ) + { + iObserver->HarvesterServerTerminated(); + } break; } diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/traces/fixed_id.definitions --- a/harvester/client/traces/fixed_id.definitions Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/traces/fixed_id.definitions Fri Sep 17 16:54:49 2010 +0300 @@ -1,22 +1,23 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_NORMAL=0x86 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO=0xe -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_CONSTRUCTL=0x10 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_DOCANCEL=0x13 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_NEWL=0xd -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_REMOVEOBSERVER=0x12 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_RUNL=0x14 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERCLIENTAO_SETOBSERVER=0x11 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO=0xf -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_CLOSE=0x5 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_CONNECT=0x2 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_HARVESTFILE=0x8 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_HARVESTFILEWITHUID=0x9 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_PAUSE=0x3 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_REGISTERHARVESTCOMPLETE=0xa -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_REMOVEOBSERVER=0x7 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_RESUME=0x4 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_RHARVESTERCLIENT=0x1 -[TRACE]TRACE_NORMAL[0x86]_RHARVESTERCLIENT_SETOBSERVER=0x6 -[TRACE]TRACE_NORMAL[0x86]__CREATESERVERPROCESS=0xc -[TRACE]TRACE_NORMAL[0x86]__STARTSERVER=0xb +[GROUP]TRACE_NORMAL=0x3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO=0xe +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_CONSTRUCTL=0x10 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_DOCANCEL=0x13 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_NEWL=0xd +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_REMOVEOBSERVER=0x15 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_RUNL=0x14 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_SETOBSERVER=0x11 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO=0xf +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_CLOSE=0x5 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_CONNECT=0x2 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_HARVESTFILE=0x8 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_HARVESTFILEWITHUID=0x9 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_PAUSE=0x3 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_REGISTERHARVESTCOMPLETE=0xa +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_REMOVEOBSERVER=0x7 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_RESUME=0x4 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_RHARVESTERCLIENT=0x1 +[TRACE]TRACE_NORMAL[0x3]_RHARVESTERCLIENT_SETOBSERVER=0x6 +[TRACE]TRACE_NORMAL[0x3]__CREATESERVERPROCESS=0xc +[TRACE]TRACE_NORMAL[0x3]__STARTSERVER=0xb +[[OBSOLETE]][TRACE]TRACE_NORMAL[0x3]_CHARVESTERCLIENTAO_REMOVEOBSERVER=0x12 diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/traces/harvesterclientTraces.h --- a/harvester/client/traces/harvesterclientTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/traces/harvesterclientTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTERCLIENTTRACES_H__ @@ -6,18 +6,18 @@ #define KOstTraceComponentID 0x200009f4 -#define RHARVESTERCLIENT_RHARVESTERCLIENT 0x860001 -#define RHARVESTERCLIENT_CONNECT 0x860002 -#define RHARVESTERCLIENT_PAUSE 0x860003 -#define RHARVESTERCLIENT_RESUME 0x860004 -#define RHARVESTERCLIENT_CLOSE 0x860005 -#define RHARVESTERCLIENT_SETOBSERVER 0x860006 -#define RHARVESTERCLIENT_REMOVEOBSERVER 0x860007 -#define RHARVESTERCLIENT_HARVESTFILE 0x860008 -#define RHARVESTERCLIENT_HARVESTFILEWITHUID 0x860009 -#define RHARVESTERCLIENT_REGISTERHARVESTCOMPLETE 0x86000a -#define _STARTSERVER 0x86000b -#define _CREATESERVERPROCESS 0x86000c +#define RHARVESTERCLIENT_RHARVESTERCLIENT 0x30001 +#define RHARVESTERCLIENT_CONNECT 0x30002 +#define RHARVESTERCLIENT_PAUSE 0x30003 +#define RHARVESTERCLIENT_RESUME 0x30004 +#define RHARVESTERCLIENT_CLOSE 0x30005 +#define RHARVESTERCLIENT_SETOBSERVER 0x30006 +#define RHARVESTERCLIENT_REMOVEOBSERVER 0x30007 +#define RHARVESTERCLIENT_HARVESTFILE 0x30008 +#define RHARVESTERCLIENT_HARVESTFILEWITHUID 0x30009 +#define RHARVESTERCLIENT_REGISTERHARVESTCOMPLETE 0x3000a +#define _STARTSERVER 0x3000b +#define _CREATESERVERPROCESS 0x3000c #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/client/traces/harvesterclientaoTraces.h --- a/harvester/client/traces/harvesterclientaoTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/client/traces/harvesterclientaoTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTERCLIENTAOTRACES_H__ @@ -6,14 +6,14 @@ #define KOstTraceComponentID 0x200009f4 -#define CHARVESTERCLIENTAO_NEWL 0x86000d -#define CHARVESTERCLIENTAO_CHARVESTERCLIENTAO 0x86000e -#define DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO 0x86000f -#define CHARVESTERCLIENTAO_CONSTRUCTL 0x860010 -#define CHARVESTERCLIENTAO_SETOBSERVER 0x860011 -#define CHARVESTERCLIENTAO_REMOVEOBSERVER 0x860012 -#define CHARVESTERCLIENTAO_DOCANCEL 0x860013 -#define CHARVESTERCLIENTAO_RUNL 0x860014 +#define CHARVESTERCLIENTAO_NEWL 0x3000d +#define CHARVESTERCLIENTAO_CHARVESTERCLIENTAO 0x3000e +#define DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO 0x3000f +#define CHARVESTERCLIENTAO_CONSTRUCTL 0x30010 +#define CHARVESTERCLIENTAO_SETOBSERVER 0x30011 +#define CHARVESTERCLIENTAO_DOCANCEL 0x30013 +#define CHARVESTERCLIENTAO_RUNL 0x30014 +#define CHARVESTERCLIENTAO_REMOVEOBSERVER 0x30015 #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/bwincw/harvestercommonwinscw.def --- a/harvester/common/bwincw/harvestercommonwinscw.def Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/bwincw/harvestercommonwinscw.def Fri Sep 17 16:54:49 2010 +0300 @@ -66,4 +66,5 @@ ?HandleObjectPropertyL@CMdeObjectWrapper@@SAXAAVCMdEObject@@AAVCMdEPropertyDef@@PAXH@Z @ 65 NONAME ; void CMdeObjectWrapper::HandleObjectPropertyL(class CMdEObject &, class CMdEPropertyDef &, void *, int) ?SendHarvestingStatusEventL@CHarvesterPluginFactory@@QAEXH@Z @ 66 NONAME ; void CHarvesterPluginFactory::SendHarvestingStatusEventL(int) ?PauseHarvester@CHarvesterPluginFactory@@QAEXH@Z @ 67 NONAME ; void CHarvesterPluginFactory::PauseHarvester(int) + ?GetObjectDefL@CHarvesterPluginFactory@@QAEXPAVCHarvesterData@@AAVTDes16@@@Z @ 68 NONAME ; void CHarvesterPluginFactory::GetObjectDefL(class CHarvesterData *, class TDes16 &) diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/bwincw/harvesterplugininterfacewinscw.def --- a/harvester/common/bwincw/harvesterplugininterfacewinscw.def Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/bwincw/harvesterplugininterfacewinscw.def Fri Sep 17 16:54:49 2010 +0300 @@ -13,4 +13,5 @@ ?GetMimeType@CHarvesterPlugin@@UAEXABVTDesC16@@AAVTDes16@@@Z @ 12 NONAME ; void CHarvesterPlugin::GetMimeType(class TDesC16 const &, class TDes16 &) ?SetHarvesterPluginFactory@CHarvesterPlugin@@QAEXAAVCHarvesterPluginFactory@@@Z @ 13 NONAME ; void CHarvesterPlugin::SetHarvesterPluginFactory(class CHarvesterPluginFactory &) ?PluginInIdleState@CHarvesterPlugin@@QAEHXZ @ 14 NONAME ; int CHarvesterPlugin::PluginInIdleState(void) + ?StopHarvest@CHarvesterPlugin@@UAEXXZ @ 15 NONAME ; void CHarvesterPlugin::StopHarvest(void) diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/eabi/harvestercommonarm.def --- a/harvester/common/eabi/harvestercommonarm.def Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/eabi/harvestercommonarm.def Fri Sep 17 16:54:49 2010 +0300 @@ -86,4 +86,5 @@ _ZN18CHarvesterExifUtilD1Ev @ 85 NONAME _ZN18CHarvesterExifUtilD2Ev @ 86 NONAME _ZN23CHarvesterPluginFactory14PauseHarvesterEi @ 87 NONAME + _ZN23CHarvesterPluginFactory13GetObjectDefLEP14CHarvesterDataR6TDes16 @ 88 NONAME diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/eabi/harvesterplugininterfacearm.def --- a/harvester/common/eabi/harvesterplugininterfacearm.def Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/eabi/harvesterplugininterfacearm.def Fri Sep 17 16:54:49 2010 +0300 @@ -17,4 +17,5 @@ _ZN16CHarvesterPlugin11GetMimeTypeERK7TDesC16R6TDes16 @ 16 NONAME _ZN16CHarvesterPlugin25SetHarvesterPluginFactoryER23CHarvesterPluginFactory @ 17 NONAME _ZN16CHarvesterPlugin17PluginInIdleStateEv @ 18 NONAME + _ZN16CHarvesterPlugin11StopHarvestEv @ 19 NONAME diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/group/harvestercommon.mmp --- a/harvester/common/group/harvestercommon.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/group/harvestercommon.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,7 @@ #if defined(WINSCW) deffile ../bwincw/harvestercommonwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/harvestercommonarm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/group/harvesterdata.mmp --- a/harvester/common/group/harvesterdata.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/group/harvesterdata.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,7 @@ #if defined(WINSCW) deffile ../bwincw/harvesterdatawinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/harvesterdataarm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/group/harvesterplugininterface.mmp --- a/harvester/common/group/harvesterplugininterface.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/group/harvesterplugininterface.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -46,7 +46,7 @@ #if defined(WINS) deffile ../bwincw/harvesterplugininterfacewinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/harvesterplugininterfacearm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvestdata.inl --- a/harvester/common/inc/harvestdata.inl Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvestdata.inl Fri Sep 17 16:54:49 2010 +0300 @@ -80,9 +80,55 @@ // void CObjectDataArray::Append( CMdEObject* aMdeObject, CLocationData* aLocationData, CMdEQuery* aQuery ) { - iMdeObjectArray.Append( aMdeObject ); - iLocationArray.Append( aLocationData ); - iQueryArray.Append( aQuery ); + TInt mdeObjectIndex(KErrNone); + TInt locationDataIndex(KErrNone); + + mdeObjectIndex = iMdeObjectArray.Append( aMdeObject ); + + if( mdeObjectIndex != KErrNone ) + { + delete aMdeObject; + aMdeObject = NULL; + + delete aLocationData; + aLocationData = NULL; + + delete aQuery; + aQuery = NULL; + } + else + { + locationDataIndex = iLocationArray.Append( aLocationData ); + + if( locationDataIndex != KErrNone ) + { + iMdeObjectArray.Remove( mdeObjectIndex ); + delete aMdeObject; + aMdeObject = NULL; + + delete aLocationData; + aLocationData = NULL; + + delete aQuery; + aQuery = NULL; + } + else + { + if( iQueryArray.Append( aQuery ) != KErrNone ) + { + iMdeObjectArray.Remove( mdeObjectIndex ); + delete aMdeObject; + aMdeObject = NULL; + + iLocationArray.Remove( locationDataIndex ); + delete aLocationData; + aLocationData = NULL; + + delete aQuery; + aQuery = NULL; + } + } + } } // --------------------------------------------------------------------------- @@ -96,8 +142,14 @@ return; } delete iMdeObjectArray[aIndex]; + iMdeObjectArray[aIndex] = NULL; + delete iLocationArray[aIndex]; + iLocationArray[aIndex] = NULL; + delete iQueryArray[aIndex]; + iQueryArray[aIndex] = NULL; + iMdeObjectArray.Remove( aIndex ); iLocationArray.Remove( aIndex ); iQueryArray.Remove( aIndex ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvestercenreputil.h --- a/harvester/common/inc/harvestercenreputil.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvestercenreputil.h Fri Sep 17 16:54:49 2010 +0300 @@ -28,7 +28,7 @@ { TUint32 iPreinstalled; HBufC* iPath; - ~TScanItem() { delete iPath; } + ~TScanItem() { delete iPath; iPath = NULL;} }; // CLASS DECLARATION diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvestercommon.h --- a/harvester/common/inc/harvestercommon.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvestercommon.h Fri Sep 17 16:54:49 2010 +0300 @@ -98,6 +98,7 @@ const TInt KOriginIgnored = 255; const TInt KOriginFastHarvest = 254; +const TInt KOriginIgnoreAttribsChanged = 253; const CActive::TPriority KHarvesterPriorityContextEngine = CActive::EPriorityUserInput; const CActive::TPriority KHarvesterPriorityMonitorPlugin = CActive::EPriorityUserInput; @@ -106,6 +107,8 @@ // Between Standard and UserInput to allow components to react to important events correctly const TInt KHarvesterCustomImportantPriority = 5; +// Higher than MonitorPlugin priority but lower than High. Highest priority within Harvester +const TInt KHarvesterServerHighPriority = 11; #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvestereventmanager.h --- a/harvester/common/inc/harvestereventmanager.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvestereventmanager.h Fri Sep 17 16:54:49 2010 +0300 @@ -154,6 +154,7 @@ virtual ~CHarvesterEventManagerStaticData() { delete iHEM; + iHEM = NULL; } protected: diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvesterpluginfactory.h --- a/harvester/common/inc/harvesterpluginfactory.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvesterpluginfactory.h Fri Sep 17 16:54:49 2010 +0300 @@ -44,6 +44,8 @@ IMPORT_C void SendHarvestingStatusEventL( TBool aStarted ); IMPORT_C void PauseHarvester( TBool aPaused ); + + IMPORT_C void GetObjectDefL( CHarvesterData* aHD, TDes& aObjectDef ); private: CHarvesterPluginFactory(); @@ -59,6 +61,9 @@ TBool iHarvesting; CHarvesterEventManager* iHarvesterEventManager; + + HBufC* iLastConfirmedContainerExt; + HBufC* iLastConfirmedSupportedExt; }; #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/inc/harvesterplugininfo.h --- a/harvester/common/inc/harvesterplugininfo.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/inc/harvesterplugininfo.h Fri Sep 17 16:54:49 2010 +0300 @@ -27,6 +27,7 @@ virtual ~CHarvesterPluginInfo() { delete iPlugin; + iPlugin = NULL; iExtensions.ResetAndDestroy(); iExtensions.Close(); iObjectTypes.ResetAndDestroy(); diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/blacklistitem.cpp --- a/harvester/common/src/blacklistitem.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/blacklistitem.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -51,6 +51,7 @@ CBlacklistItem::~CBlacklistItem() { delete iUri; + iUri = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvestercenreputil.cpp --- a/harvester/common/src/harvestercenreputil.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvestercenreputil.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -198,7 +198,9 @@ continue; } HBufC* pathBuf = path.AllocL(); - aPaths.Append( pathBuf ); + CleanupStack::PushL( pathBuf ); + aPaths.AppendL( pathBuf ); + CleanupStack::Pop( pathBuf ); } CleanupStack::PopAndDestroy( &scanPathKeys ); @@ -214,14 +216,17 @@ repo->FindL( aPartialKey, KSearchMask, scanPathKeys ); TBuf path; + for( TInt i = scanPathKeys.Count() - 1; i >=0; i-- ) { const TInt error( repo->Get( scanPathKeys[i], path ) ); + if( error != KErrNone ) { continue; } TUint32 preinstalled = MdeConstants::MediaObject::ENotPreinstalled; + if( path[ path.Length() - 1 ] != TChar('\\') ) { User::LeaveIfError( repo->GetMeta( scanPathKeys[i], preinstalled ) ); @@ -231,7 +236,7 @@ item->iPath = path.AllocL(); item->iPreinstalled = preinstalled; CleanupStack::Pop( item ); - aItems.Append( item ); // ownership is transferred + aItems.AppendL( item ); // ownership is transferred } CleanupStack::PopAndDestroy( &scanPathKeys ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvesterdata.cpp --- a/harvester/common/src/harvesterdata.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvesterdata.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,11 @@ CHarvesterData::CHarvesterData( const HBufC* aUri ) { iUri = aUri; + iClientData = NULL; + iMdeObject = NULL; + iLocationData = NULL; iIsBinary = ETrue; + iClientId = KNullUid; } //========================================================================== @@ -39,9 +43,13 @@ CHarvesterData::~CHarvesterData() { delete iUri; + iUri = NULL; delete iClientData; + iClientData = NULL; delete iMdeObject; + iMdeObject = NULL; delete iLocationData; + iLocationData = NULL; } //========================================================================== @@ -225,6 +233,11 @@ // EXPORT_C void CHarvesterData::SetMdeObject( CMdEObject* aMdeObject ) { + if( iMdeObject ) + { + delete iMdeObject; + iMdeObject = NULL; + } iMdeObject = aMdeObject; } diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvestereventmanager.cpp --- a/harvester/common/src/harvestereventmanager.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvestereventmanager.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -93,6 +93,7 @@ { // destroy the singleton and free TLS delete data; + data = NULL; UserSvr::DllFreeTls( KHarvesterEventManagerTLSKey ); } } @@ -439,6 +440,7 @@ iRegisteredObservers.Remove( i ); delete observer; + observer = NULL; } // Find if any other observer is using the same queue else @@ -468,6 +470,7 @@ iEventQueues.Remove( mid ); queue->Close(); delete queue; + queue = NULL; break; } else if( compare > 0 ) diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvesterexifutil.cpp --- a/harvester/common/src/harvesterexifutil.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvesterexifutil.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -156,6 +156,7 @@ } delete reader; + reader = NULL; WRITELOG( "CHarvesterExifUtil::IsValidExifData end" ); OstTrace0( TRACE_NORMAL, DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA, "CHarvesterExifUtil::IsValidExifData end" ); @@ -432,7 +433,7 @@ EXPORT_C TTime CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL( const TDesC8& aDateTime ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL()" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL()" ); OstTrace0( TRACE_NORMAL, CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL" ); TDateTime datetime( 0, EJanuary, 0, 0, 0, 0, 0 ); @@ -445,7 +446,7 @@ TInt error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get year" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get year" ); OstTrace0( TRACE_NORMAL, DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get year" ); User::Leave( error ); @@ -458,7 +459,7 @@ error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get month" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get month" ); OstTrace0( TRACE_NORMAL, DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get month" ); User::Leave( error ); @@ -473,7 +474,7 @@ error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get date" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get date" ); OstTrace0( TRACE_NORMAL, DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get date" ); User::Leave( error ); @@ -486,7 +487,7 @@ error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get hours" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get hours" ); OstTrace0( TRACE_NORMAL, DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get hours" ); User::Leave( error ); @@ -499,7 +500,7 @@ error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get minutes" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get minutes" ); OstTrace0( TRACE_NORMAL, DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get minutes" ); User::Leave( error ); @@ -512,7 +513,7 @@ error = lex.Val( number ); if ( error != KErrNone ) { - WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get seconds" ); + WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get seconds" ); OstTrace0( TRACE_NORMAL, DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get seconds" ); User::Leave( error ); @@ -828,7 +829,9 @@ WRITELOG( "CHarvesterExifUtil::ComposeExifData() - Image doesn't contain EXIF data" ); modifyExif = CExifModify::NewL( aImagePtr, CExifModify::ECreate, CExifModify::ENoJpegParsing ); + CleanupStack::PushL( modifyExif ); SetExifDefaultsL( aMdeObject, *modifyExif ); + CleanupStack::Pop( modifyExif ); exifChanged = ETrue; } CleanupStack::PushL( modifyExif ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvestermediaidutil.cpp --- a/harvester/common/src/harvestermediaidutil.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvestermediaidutil.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -136,8 +136,10 @@ if (data->iRefCount <= 0) { delete data->iMediaIdUtil; + data->iMediaIdUtil = NULL; delete data; + data = NULL; UserSvr::DllFreeTls(KHarvesterMediaIdTLSKey); } } diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvesterplugin.cpp --- a/harvester/common/src/harvesterplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvesterplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -65,7 +65,8 @@ iDtor_ID_Key( KNullUid ), iOriginPropertyDef( NULL ), iTitlePropertyDef( NULL ), - iHarvesting( EFalse ) + iHarvesting( EFalse ), + iPaused( EFalse ) { } @@ -109,6 +110,7 @@ { if( iState == EHarvesterIdle ) { + iPaused = EFalse; SetNextRequest( EHarvesterGathering ); } } @@ -144,16 +146,17 @@ { if( iQueue->Count() == 0 ) { - SetNextRequest( EHarvesterIdle ); if( iHarvesting ) { TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) ); iHarvesting = EFalse; } iQueue->Compress(); + SetNextRequest( EHarvesterIdle ); } else { + WRITELOG( "CHarvesterPlugin::RunL EHarvesterGathering - items in queue" ); if ( !iHarvesting ) { TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( ETrue ) ); @@ -162,6 +165,11 @@ CHarvesterData* hd = (*iQueue)[0]; iQueue->Remove( 0 ); + if( !hd ) + { + SetNextRequest( EHarvesterGathering ); + break; + } const TDesC& uri = hd->Uri(); TUint32 mediaId = hd->MdeObject().MediaId(); @@ -194,7 +202,7 @@ TRAP_IGNORE( SetDefaultPropertiesL( *hd ) ); WRITELOG1("CHarvesterPlugin::RunL - Calling HarvestL for file: %S", &uri); - TRAPD(err, HarvestL( hd ) ); + TRAPD( err, HarvestL( hd ) ); if ( iBlacklist ) { @@ -239,12 +247,28 @@ } // --------------------------------------------------------------------------- +// StartHarvest +// --------------------------------------------------------------------------- +// +EXPORT_C void CHarvesterPlugin::StopHarvest() + { + Cancel(); + iState = EHarvesterIdle; + if( iHarvesting ) + { + TRAP_IGNORE( iFactory->SendHarvestingStatusEventL( EFalse ) ); + iHarvesting = EFalse; + } + iPaused = ETrue; + } + +// --------------------------------------------------------------------------- // SetNextRequest // --------------------------------------------------------------------------- // void CHarvesterPlugin::SetNextRequest( THarvesterState aState ) { - if ( ! IsActive() ) + if ( !IsActive() && !iPaused ) { iState = aState; SetActive(); diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/harvesterpluginfactory.cpp --- a/harvester/common/src/harvesterpluginfactory.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/harvesterpluginfactory.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -68,6 +68,12 @@ { WRITELOG( "CHarvesterPluginFactory::~CHarvesterPluginFactory()" ); + delete iLastConfirmedContainerExt; + iLastConfirmedContainerExt = NULL; + + delete iLastConfirmedSupportedExt; + iLastConfirmedSupportedExt = NULL; + if (iHarvesterEventManager) { iHarvesterEventManager->ReleaseInstance(); @@ -93,50 +99,9 @@ // GetObjectDef // --------------------------------------------------------------------------- // -EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData& aHD, TDes& aObjectDef ) +EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData& /*aHD*/, TDes& aObjectDef ) { - TPtrC extPtr; - if( MdsUtils::GetExt( aHD.Uri(), extPtr ) ) - { - RPointerArray supportedPlugins; - CleanupClosePushL( supportedPlugins ); - GetSupportedPluginsL( supportedPlugins, extPtr ); - - const TInt sCount = supportedPlugins.Count(); - if( sCount == 1 ) - { - CHarvesterPluginInfo* info = supportedPlugins[0]; - if( info->iObjectTypes.Count() == 1 ) - { - aObjectDef.Copy( *(info->iObjectTypes[0]) ); - aHD.SetHarvesterPluginInfo( info ); - CleanupStack::PopAndDestroy( &supportedPlugins ); - return; - } - } - for( TInt i = sCount - 1; i >=0; i-- ) - { - CHarvesterPluginInfo* info = supportedPlugins[i]; - if ( !(info->iPlugin) ) - { - info->iPlugin = CHarvesterPlugin::NewL( info->iPluginUid ); - info->iPlugin->SetQueue( info->iQueue ); - info->iPlugin->SetHarvesterPluginFactory( *this ); - info->iPlugin->SetBlacklist( *iBlacklist ); - } - info->iPlugin->GetObjectType( aHD.Uri(), aObjectDef ); - if( aObjectDef.Length() > 0 ) - { - aHD.SetHarvesterPluginInfo( info ); - break; - } - } - CleanupStack::PopAndDestroy( &supportedPlugins ); - } - else - { - aObjectDef.Zero(); - } + aObjectDef.Zero(); } // --------------------------------------------------------------------------- @@ -209,7 +174,8 @@ if( aHD->ObjectType() == EFastHarvest || aHD->Origin() == MdeConstants::Object::ECamera ) { - hpi->iQueue.Insert( aHD, 0 ); + hpi->iQueue.InsertL( aHD, 0 ); + if( !hpi->iPlugin->IsActive() ) { hpi->iPlugin->SetPriority( KHarvesterPriorityHarvestingPlugin + 1 ); @@ -328,11 +294,9 @@ pluginInfo->iPluginUid = aPluginUid; -#ifdef MDS_HARVESTERPLUGINS_ON_BOOT pluginInfo->iPlugin = CHarvesterPlugin::NewL( pluginInfo->iPluginUid ); pluginInfo->iPlugin->SetQueue( pluginInfo->iQueue ); pluginInfo->iPlugin->SetHarvesterPluginFactory( *this ); -#endif iHarvesterPluginInfoArray.AppendL( pluginInfo ); CleanupStack::Pop( pluginInfo ); @@ -372,6 +336,13 @@ TPtrC extPtr; if( MdsUtils::GetExt( aFileName, extPtr ) ) { + if( iLastConfirmedSupportedExt && + extPtr.CompareF( iLastConfirmedSupportedExt->Des() ) == 0 ) + { + // Extension has previously been confirmed to be + // supported file extension, no need to ask from plugins + return ETrue; + } TInt pluginInfoCount = iHarvesterPluginInfoArray.Count(); TInt extCount = 0; for ( TInt i = pluginInfoCount; --i >= 0; ) @@ -385,6 +356,9 @@ TInt result = MdsUtils::Compare( *ext, extPtr ); if ( result == 0 ) { + delete iLastConfirmedSupportedExt; + iLastConfirmedSupportedExt = NULL; + iLastConfirmedSupportedExt = extPtr.Alloc(); return ETrue; } } @@ -400,6 +374,14 @@ if( MdsUtils::GetExt( aURI, extPtr ) ) { + if( iLastConfirmedContainerExt && + extPtr.CompareF( iLastConfirmedContainerExt->Des() ) == 0 ) + { + // Extension has previously been confirmed to be + // container file extension, no need to ask from plugins + return ETrue; + } + RPointerArray supportedPlugins; CleanupClosePushL( supportedPlugins ); GetSupportedPluginsL( supportedPlugins, extPtr ); @@ -409,6 +391,9 @@ if( info->iObjectTypes.Count() > 1 ) { isContainerFile = ETrue; + delete iLastConfirmedContainerExt; + iLastConfirmedContainerExt = NULL; + iLastConfirmedContainerExt = extPtr.Alloc(); break; } } @@ -437,6 +422,7 @@ EXPORT_C void CHarvesterPluginFactory::SendHarvestingStatusEventL( TBool aStarted ) { + WRITELOG( "CHarvesterPluginFactory::SendHarvestingStatusEventL" ); const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count(); TBool itemsLeft( EFalse ); TBool allPluginsOnIdle( ETrue ); @@ -460,6 +446,7 @@ if( !iHarvesting && itemsLeft && aStarted ) { + WRITELOG( "CHarvesterPluginFactory::SendHarvestingStatusEventL - overall started" ); iHarvesting = ETrue; iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateStarted ); // This next line is for caching the harvester started event for observers registering @@ -469,6 +456,7 @@ } else if( iHarvesting && (!itemsLeft || allPluginsOnIdle) && !aStarted ) { + WRITELOG( "CHarvesterPluginFactory::SendHarvestingStatusEventL - overall finished" ); iHarvesting = EFalse; iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateFinished ); iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeOverall, KCacheItemCountForEventCaching ); @@ -482,7 +470,7 @@ { if( iHarvesterPluginInfoArray[i]->iPlugin && aPaused ) { - iHarvesterPluginInfoArray[i]->iPlugin->Cancel(); + iHarvesterPluginInfoArray[i]->iPlugin->StopHarvest(); } else if( iHarvesterPluginInfoArray[i]->iPlugin ) { @@ -491,3 +479,56 @@ } } +EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData* aHD, TDes& aObjectDef ) + { + TPtrC extPtr; + if( MdsUtils::GetExt( aHD->Uri(), extPtr ) ) + { + RPointerArray supportedPlugins; + CleanupClosePushL( supportedPlugins ); + GetSupportedPluginsL( supportedPlugins, extPtr ); + + const TInt sCount = supportedPlugins.Count(); + if( sCount == 1 ) + { + CHarvesterPluginInfo* info = supportedPlugins[0]; + if( info->iObjectTypes.Count() == 1 ) + { + aObjectDef.Copy( *(info->iObjectTypes[0]) ); + aHD->SetHarvesterPluginInfo( info ); + CleanupStack::PopAndDestroy( &supportedPlugins ); + return; + } + } + for( TInt i = sCount - 1; i >=0; i-- ) + { + CHarvesterPluginInfo* info = supportedPlugins[i]; + if ( !(info->iPlugin) ) + { + info->iPlugin = CHarvesterPlugin::NewL( info->iPluginUid ); + info->iPlugin->SetQueue( info->iQueue ); + info->iPlugin->SetHarvesterPluginFactory( *this ); + info->iPlugin->SetBlacklist( *iBlacklist ); + } + info->iPlugin->GetObjectType( aHD->Uri(), aObjectDef ); + // It is possible for unmount to occure while we are waiting + // for GetObjectType to return, thus check aHD for validity + if( aHD && aObjectDef.Length() > 0 ) + { + aHD->SetHarvesterPluginInfo( info ); + break; + } + else if( !aHD ) + { + break; + } + } + CleanupStack::PopAndDestroy( &supportedPlugins ); + } + else + { + aObjectDef.Zero(); + } + } + + diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/mdeobjectwrapper.cpp --- a/harvester/common/src/mdeobjectwrapper.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/mdeobjectwrapper.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -157,7 +157,7 @@ case EPropertyReal32: { TReal32* value = static_cast( aData ); - WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %d", &aPropertyDef.Name(), *value ); + WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %f", &aPropertyDef.Name(), *value ); property->SetReal32ValueL( *value ); } break; @@ -173,9 +173,7 @@ case EPropertyTime: { TTime* value = static_cast( aData ); -#ifdef _DEBUG - WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %d", &aPropertyDef.Name(), value->Int64() ); -#endif + WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %u", &aPropertyDef.Name(), value->Int64() ); property->SetTimeValueL( *value ); } break; diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/placeholderdata.cpp --- a/harvester/common/src/placeholderdata.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/placeholderdata.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -50,6 +50,7 @@ CPlaceholderData::~CPlaceholderData() { delete iUri; + iUri = NULL; } //========================================================================== @@ -86,6 +87,7 @@ EXPORT_C void CPlaceholderData::SetUri( const TDesC& aUri ) { delete iUri; + iUri = NULL; iUri = aUri.Alloc(); } diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/src/propertywatcher.cpp --- a/harvester/common/src/propertywatcher.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/src/propertywatcher.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -66,6 +66,7 @@ if ( me ) { delete me; + me = NULL; Dll::SetTls( NULL ); // Free TLS. } diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/traces/fixed_id.definitions --- a/harvester/common/traces/fixed_id.definitions Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/traces/fixed_id.definitions Fri Sep 17 16:54:49 2010 +0300 @@ -1,33 +1,33 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_NORMAL=0x86 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xb -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREVENTMANAGER_GETINSTANCEL=0x1 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x3 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREVENTMANAGER_RELEASEINSTANCE=0x2 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x19 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x11 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTEREXIFUTIL_READEXIFDATAL=0x14 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xc -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x4 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1a -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x12 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTEREXIFUTIL_READEXIFDATAL=0x15 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xd -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x5 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1b -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x13 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTEREXIFUTIL_READEXIFDATAL=0x16 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xe -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x6 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1c -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTEREXIFUTIL_READEXIFDATAL=0x17 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xf -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x7 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1d -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTEREXIFUTIL_READEXIFDATAL=0x18 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0x10 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x8 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1e -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x9 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1f -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0xa +[GROUP]TRACE_NORMAL=0x3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xb +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREVENTMANAGER_GETINSTANCEL=0x1 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREVENTMANAGER_RELEASEINSTANCE=0x2 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x19 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x11 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTEREXIFUTIL_READEXIFDATAL=0x14 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xc +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x4 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1a +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x12 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTEREXIFUTIL_READEXIFDATAL=0x15 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xd +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x5 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1b +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA=0x13 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTEREXIFUTIL_READEXIFDATAL=0x16 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xe +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x6 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1c +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTEREXIFUTIL_READEXIFDATAL=0x17 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0xf +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x7 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1d +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTEREXIFUTIL_READEXIFDATAL=0x18 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL=0x10 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x8 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1e +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0x9 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL=0x1f +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT=0xa diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/traces/harvestereventmanagerTraces.h --- a/harvester/common/traces/harvestereventmanagerTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/traces/harvestereventmanagerTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTEREVENTMANAGERTRACES_H__ @@ -6,22 +6,22 @@ #define KOstTraceComponentID 0x200009fe -#define CHARVESTEREVENTMANAGER_GETINSTANCEL 0x860001 -#define CHARVESTEREVENTMANAGER_RELEASEINSTANCE 0x860002 -#define CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860003 -#define DUP1_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860004 -#define DUP2_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860005 -#define DUP3_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860006 -#define DUP4_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860007 -#define DUP5_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860008 -#define DUP6_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x860009 -#define DUP7_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x86000a -#define CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x86000b -#define DUP1_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x86000c -#define DUP2_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x86000d -#define DUP3_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x86000e -#define DUP4_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x86000f -#define DUP5_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x860010 +#define CHARVESTEREVENTMANAGER_GETINSTANCEL 0x30001 +#define CHARVESTEREVENTMANAGER_RELEASEINSTANCE 0x30002 +#define CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30003 +#define DUP1_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30004 +#define DUP2_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30005 +#define DUP3_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30006 +#define DUP4_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30007 +#define DUP5_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30008 +#define DUP6_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x30009 +#define DUP7_CHARVESTEREVENTMANAGER_INCREASEITEMCOUNT 0x3000a +#define CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x3000b +#define DUP1_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x3000c +#define DUP2_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x3000d +#define DUP3_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x3000e +#define DUP4_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x3000f +#define DUP5_CHARVESTEREVENTMANAGER_DECREASEITEMCOUNTL 0x30010 #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/common/traces/harvesterexifutilTraces.h --- a/harvester/common/traces/harvesterexifutilTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/common/traces/harvesterexifutilTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTEREXIFUTILTRACES_H__ @@ -6,21 +6,21 @@ #define KOstTraceComponentID 0x200009fe -#define CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x860011 -#define DUP1_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x860012 -#define DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x860013 -#define CHARVESTEREXIFUTIL_READEXIFDATAL 0x860014 -#define DUP1_CHARVESTEREXIFUTIL_READEXIFDATAL 0x860015 -#define DUP2_CHARVESTEREXIFUTIL_READEXIFDATAL 0x860016 -#define DUP3_CHARVESTEREXIFUTIL_READEXIFDATAL 0x860017 -#define DUP4_CHARVESTEREXIFUTIL_READEXIFDATAL 0x860018 -#define CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x860019 -#define DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001a -#define DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001b -#define DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001c -#define DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001d -#define DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001e -#define DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x86001f +#define CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x30011 +#define DUP1_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x30012 +#define DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA 0x30013 +#define CHARVESTEREXIFUTIL_READEXIFDATAL 0x30014 +#define DUP1_CHARVESTEREXIFUTIL_READEXIFDATAL 0x30015 +#define DUP2_CHARVESTEREXIFUTIL_READEXIFDATAL 0x30016 +#define DUP3_CHARVESTEREXIFUTIL_READEXIFDATAL 0x30017 +#define DUP4_CHARVESTEREXIFUTIL_READEXIFDATAL 0x30018 +#define CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x30019 +#define DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001a +#define DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001b +#define DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001c +#define DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001d +#define DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001e +#define DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL 0x3001f #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/composerplugininterface/group/composerplugininterface.mmp --- a/harvester/composerplugins/composerplugininterface/group/composerplugininterface.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/composerplugininterface/group/composerplugininterface.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -39,7 +39,7 @@ #if defined(WINS) deffile ../bwincw/composerplugininterfacewinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/composerplugininterfacearm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/imagecomposer/inc/imagecomposerao.h --- a/harvester/composerplugins/imagecomposer/inc/imagecomposerao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/imagecomposer/inc/imagecomposerao.h Fri Sep 17 16:54:49 2010 +0300 @@ -267,6 +267,8 @@ CHarvesterExifUtil* iExifUtil; RFs iFs; + + TBool iFastModeEnabled; }; #endif // __CIMAGECOMPOSERAO_H__ diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/imagecomposer/src/composerimageplugin.cpp --- a/harvester/composerplugins/imagecomposer/src/composerimageplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/imagecomposer/src/composerimageplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -48,10 +48,13 @@ WRITELOG( "CComposerImagePlugin::~CComposerImagePlugin()" ); delete iImageComposerAO; + iImageComposerAO = NULL; delete iLocationRelationObserver; + iLocationRelationObserver = NULL; delete iImagePresentObserver; - + iImagePresentObserver = NULL; delete iMdEHarvesterSession; + iMdEHarvesterSession = NULL; } // --------------------------------------------------------------------------- @@ -85,11 +88,15 @@ { WRITELOG( "CComposerImagePlugin::SetObservers()" ); +#ifdef _DEBUG TRAPD( err, SetObserversL() ); if ( err != KErrNone ) { WRITELOG1( "CComposerImagePlugin::SetObservers Error: %d", err ); } +#else + TRAP_IGNORE( SetObserversL() ); +#endif } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp --- a/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -71,16 +71,20 @@ if ( iMdeObject ) { delete iMdeObject; + iMdeObject = NULL; } if ( iExifUtil ) { delete iExifUtil; + iExifUtil = NULL; } delete iRelationQuery; + iRelationQuery = NULL; iFs.Close(); delete iMdEHarvesterSession; + iMdEHarvesterSession = NULL; } // --------------------------------------------------------------------------- @@ -110,6 +114,7 @@ CActiveScheduler::Add( this ); iExifUtil = CHarvesterExifUtil::NewL(); + iFastModeEnabled = EFalse; User::LeaveIfError( iFs.Connect() ); } @@ -241,6 +246,10 @@ if( iItemQueue.Count() <= 0 ) { iItemQueue.Compress(); + if( iFastModeEnabled ) + { + SetPriority( KHarvesterPriorityComposerPlugin ); + } SetNextRequest( ERequestReady ); } else @@ -250,9 +259,23 @@ if ( err == KErrNone ) { + CMdEProperty* prop = NULL; + CMdEPropertyDef& originPropDef = iMdeObject->Def().GetPropertyDefL( Object::KOriginProperty ); + iMdeObject->Property( originPropDef, prop ); + if( prop && prop->Uint8ValueL() == MdeConstants::Object::ECamera && !iFastModeEnabled ) + { + iFastModeEnabled = ETrue; + SetPriority( KHarvesterPriorityMonitorPlugin ); + } + else if( iFastModeEnabled ) + { + iFastModeEnabled = EFalse; + SetPriority( KHarvesterPriorityComposerPlugin ); + } + SetNextRequest( ERequestCompose ); } - // if object does not exists, find next + // if object does not exists, or data is not modified, find next else if ( err == KErrNotFound || err == KErrAbort ) { if ( err == KErrAbort && mdeObjectId != KNoId ) @@ -400,6 +423,7 @@ if( error != KErrNone || entry.iModified == time ) { + WRITELOG( "CImageComposerAO::GetObjectFromMdeL() - image data has not been modified - abort" ); User::Leave( KErrAbort ); } } @@ -746,8 +770,13 @@ // Check whether the file is open TBool isOpen( EFalse ); - iFs.IsFileOpen( uri, isOpen ); - if ( isOpen ) + const TInt openError = iFs.IsFileOpen( uri, isOpen ); + if( openError != KErrNone ) + { + WRITELOG( "CImageComposerAO::DoWriteExifL() - check for open file failed!" ); + User::Leave( openError ); + } + else if ( isOpen ) { WRITELOG( "CImageComposerAO::DoWriteExifL() - file handle is open!" ); User::Leave( KErrInUse ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/imagecomposer/src/imagepresentobserver.cpp --- a/harvester/composerplugins/imagecomposer/src/imagepresentobserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/imagecomposer/src/imagepresentobserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -87,8 +87,10 @@ void CImagePresentObserver::HandleObjectPresentNotification(CMdESession& /*aSession*/, TBool aPresent, const RArray& aObjectIdArray) { + WRITELOG( "CImagePresentObserver::HandleObjectPresentNotification" ); if ( aPresent ) { + WRITELOG( "CImagePresentObserver::HandleObjectPresentNotification - objects present" ); if ( !iStarted ) { CMdEObjectDef* imageObjDef = NULL; diff -r aa5a574040a4 -r a3cc46f37772 harvester/composerplugins/imagecomposer/src/locationrelationobserver.cpp --- a/harvester/composerplugins/imagecomposer/src/locationrelationobserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/composerplugins/imagecomposer/src/locationrelationobserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -47,6 +47,7 @@ { iQuery->Cancel(); delete iQuery; + iQuery = NULL; } } @@ -208,6 +209,7 @@ } delete relation; + relation = NULL; } ) } diff -r aa5a574040a4 -r a3cc46f37772 harvester/data/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/harvester/data/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file +* +*/ + + +PRJ_PLATFORMS + DEFAULT + +PRJ_EXPORTS +blacklist_backup_registration.xml /epoc32/winscw/c/private/200009F5/backup_registration.xml +blacklist_backup_registration.xml /epoc32/data/z/private/200009F5/backup_registration.xml +default_origin_mappings.db /epoc32/winscw/c/private/200009F5/mappings.db +default_origin_mappings.db /epoc32/data/z/private/200009F5/mappings.db +../conf/harvester.confml MW_LAYER_CONFML(harvester.confml) +../conf/harvester_200009FE.crml MW_LAYER_CRML(harvester_200009FE.crml) + +../sis/blacklistserver/blacklistserver_stub.sis /epoc32/data/z/system/install/blacklistserver_stub.sis +../sis/composerplugins/composerplugins_stub.sis /epoc32/data/z/system/install/composerplugins_stub.sis +../sis/harvester/harvester_stub.sis /epoc32/data/z/system/install/harvester_stub.sis +../sis/harvesterplugins/harvesterplugins_stub.sis /epoc32/data/z/system/install/harvesterplugins_stub.sis +../sis/monitorplugins/monitorplugins_stub.sis /epoc32/data/z/system/install/monitorplugins_stub.sis + +PRJ_MMPFILES + +PRJ_TESTMMPFILES + + +PRJ_TESTEXPORTS diff -r aa5a574040a4 -r a3cc46f37772 harvester/data/default_origin_mappings.db --- a/harvester/data/default_origin_mappings.db Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/data/default_origin_mappings.db Fri Sep 17 16:54:49 2010 +0300 @@ -1,39 +1,40 @@ -Process UID / Origin -mapping table - -UID Origin -200009EE 0 -101FFA91 0 -10208A29 0 -101FD659 1 -101FFA86 1 -2000D16B 1 -10208A6D 1 -101f857a 1 -10003a3f 2 -101f4d90 2 -1028242D 2 -1028242E 2 -101FFB51 2 -101F8839 2 -101FFAAB 2 -200071D8 2 -10008D60 2 -10008d39 2 -1028190b 2 -10008D5F 2 -10008D60 2 -10008D61 2 -100058CA 4 -1028290B 4 -10281FA8 4 -10281FA7 4 -10281FA5 4 -10281FA6 4 -101FFA91 254 -20026F35 254 -20026F2F 254 -200009F5 255 -2000A7AE 255 -200071BE 255 -101f7771 255 -1020e519 255 +Process UID / Origin -mapping table + +UID Origin +200009EE 0 +101FFA91 0 +10208A29 0 +101FD659 1 +101FFA86 1 +2000D16B 1 +10208A6D 1 +101F857A 1 +10003A3F 2 +101F4D90 2 +1028242D 2 +1028242E 2 +101FFB51 2 +101F8839 2 +101FFAAB 2 +200071D8 2 +10008D60 2 +10008d39 2 +1028190b 2 +10008D5F 2 +10008D60 2 +10008D61 2 +100058CA 4 +1028290B 4 +10281FA8 4 +10281FA7 4 +10281FA5 4 +10281FA6 4 +101FFC31 253 +101FFA91 254 +20026F35 254 +20026F2F 254 +200009F5 255 +2000A7AE 255 +200071BE 255 +101F7771 255 +1020E519 255 diff -r aa5a574040a4 -r a3cc46f37772 harvester/group/bld.inf --- a/harvester/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -25,27 +25,16 @@ #include "../server/group/bld.inf" #include "../client/group/bld.inf" +#include "../data/bld.inf" PRJ_PLATFORMS DEFAULT PRJ_EXPORTS -../data/blacklist_backup_registration.xml /epoc32/winscw/c/private/200009F5/backup_registration.xml -../data/blacklist_backup_registration.xml /epoc32/data/z/private/200009F5/backup_registration.xml -../data/default_origin_mappings.db /epoc32/winscw/c/private/200009F5/mappings.db -../data/default_origin_mappings.db /epoc32/data/z/private/200009F5/mappings.db -../conf/harvester.confml MW_LAYER_CONFML(harvester.confml) -../conf/harvester_200009FE.crml MW_LAYER_CRML(harvester_200009FE.crml) - -../sis/blacklistserver/blacklistserver_stub.sis /epoc32/data/z/system/install/blacklistserver_stub.sis -../sis/composerplugins/composerplugins_stub.sis /epoc32/data/z/system/install/composerplugins_stub.sis -../sis/harvester/harvester_stub.sis /epoc32/data/z/system/install/harvester_stub.sis -../sis/harvesterplugins/harvesterplugins_stub.sis /epoc32/data/z/system/install/harvesterplugins_stub.sis -../sis/monitorplugins/monitorplugins_stub.sis /epoc32/data/z/system/install/monitorplugins_stub.sis PRJ_MMPFILES PRJ_TESTMMPFILES +PRJ_TESTEXPORTS -PRJ_TESTEXPORTS diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h --- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -66,10 +66,11 @@ private: CHarvesterAudioPluginPropertyDefs(); - void ConstructL(CMdEObjectDef& aObjectDef); + void ConstructL( CMdEObjectDef& aObjectDef ); public: - static CHarvesterAudioPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterAudioPluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef ); }; class CHarvesterAudioPlugin : public CHarvesterPlugin, @@ -148,6 +149,8 @@ */ void GetMusicPropertiesL( CHarvesterData* aHD, TBool aIsAdd, TPtrC aMimeType ); + void InitPropDefsL( CMdEObjectDef& aObjectDef ); + private: CAudioMDParser* iAudioParser; diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp --- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -25,6 +25,7 @@ #include #include +#include "harvestercommon.h" #include "harvesteraudioplugin.h" #include "harvesteraudiopluginutils.h" #include "mdsutils.h" @@ -36,52 +37,55 @@ const TUid KHarvesterRepoUid = { 0x200009FE }; const TUint32 KEnableAlbumArtHarvest = 0x00090001; -CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase() +CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } void CHarvesterAudioPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) { - CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); + SetByObjectDefL( aObjectDef ); + } + +CHarvesterAudioPluginPropertyDefs* CHarvesterAudioPluginPropertyDefs::NewL() + { + CHarvesterAudioPluginPropertyDefs* self = + new (ELeave) CHarvesterAudioPluginPropertyDefs(); + return self; + } - // Common property definitions - CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); - iCreationDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty ); - iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KLastModifiedDateProperty ); - iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); - iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); - iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); +void CHarvesterAudioPluginPropertyDefs::SetByObjectDefL(CMdEObjectDef& aObjectDef) + { + CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); + + // Common property definitions + CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); + iCreationDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty ); + iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KLastModifiedDateProperty ); + iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); + iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); + iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTimeOffsetProperty ); iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); - // Media property definitions - CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); - iRatingPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KRatingProperty ); - iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty ); - iArtistPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KArtistProperty ); - iDurationPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDurationProperty ); - iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KCopyrightProperty ); - iTrackPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KTrackProperty ); - iThumbnailPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KThumbnailPresentProperty ); - iDatePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KReleaseDateProperty ); + // Media property definitions + CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); + iRatingPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KRatingProperty ); + iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty ); + iArtistPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KArtistProperty ); + iDurationPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDurationProperty ); + iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KCopyrightProperty ); + iTrackPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KTrackProperty ); + iThumbnailPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KThumbnailPresentProperty ); + iDatePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KReleaseDateProperty ); iDrmPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDRMProperty ); - // Audio property definitions - CMdEObjectDef& audioDef = nsDef.GetObjectDefL( MdeConstants::Audio::KAudioObject ); - iAlbumPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KAlbumProperty ); - iComposerPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KComposerProperty ); - iOriginalArtistPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KOriginalArtistProperty ); - } - -CHarvesterAudioPluginPropertyDefs* CHarvesterAudioPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterAudioPluginPropertyDefs* self = - new (ELeave) CHarvesterAudioPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } + // Audio property definitions + CMdEObjectDef& audioDef = nsDef.GetObjectDefL( MdeConstants::Audio::KAudioObject ); + iAlbumPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KAlbumProperty ); + iComposerPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KComposerProperty ); + iOriginalArtistPropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KOriginalArtistProperty ); + } using namespace MdeConstants; @@ -118,11 +122,16 @@ WRITELOG( "CHarvesterAudioPlugin::~CHarvesterAudioPlugin()" ); delete iAudioParser; + iAudioParser = NULL; delete iPropDefs; + iPropDefs = NULL; delete iTNM; + iTNM = NULL; delete iPhoneSoundsPath; + iPhoneSoundsPath = NULL; delete iMmcSoundsPath; + iMmcSoundsPath = NULL; } // --------------------------------------------------------------------------- @@ -144,7 +153,10 @@ { TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) ); } + + iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL(); + SetPriority( KHarvesterPriorityHarvestingPlugin - 2 ); TFileName sounds = PathInfo::SoundsPath(); @@ -287,13 +299,7 @@ TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset(); TTime localModifiedDate = entry.iModified + timeOffsetSeconds; - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + InitPropDefsL( mdeObject.Def() ); CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, *iPropDefs->iCreationDatePropertyDef, &localModifiedDate, aIsAdd ); @@ -322,13 +328,7 @@ if ( mapping && !mdeObject.Placeholder() ) { - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + InitPropDefsL( mdeObject.Def() ); CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, *iPropDefs->iItemTypePropertyDef, (TAny*)&(mapping->iMimeType), aIsAdd ); @@ -354,13 +354,7 @@ CMdEObject& mdeObject = aHD->MdeObject(); const TDesC& uri = mdeObject.Uri(); - if( !iPropDefs ) - { - CMdEObjectDef& audioObjectDef = mdeObject.Def(); - iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL( audioObjectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + InitPropDefsL( mdeObject.Def() ); TBool possiblyProtectedContent( EFalse ); if( aMimeType.Length() > 0 ) @@ -534,6 +528,7 @@ CleanupStack::Pop(); // jpegBuf iTNM->CreateThumbnails( *tnmSource ); delete tnmSource; + tnmSource = NULL; TBool thumbnailPresent( ETrue ); CMdeObjectWrapper::HandleObjectPropertyL( mdeObject, *iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd ); @@ -553,5 +548,15 @@ #endif } +void CHarvesterAudioPlugin::InitPropDefsL(CMdEObjectDef& aObjectDef) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + // Prefetch max text lengt for validity checking + iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); + } + } + // End of file diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp --- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -74,6 +74,7 @@ CAudioMDParser::~CAudioMDParser() { delete iMetaDataUtility; + iMetaDataUtility = NULL; iMimeTypeMappings.Close(); iWantedMetadataFields.Close(); diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h --- a/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -102,10 +102,11 @@ private: CHarvesterImagePluginPropertyDefs(); - void ConstructL(CMdEObjectDef& aObjectDef); + void ConstructL( CMdEObjectDef& aObjectDef ); public: - static CHarvesterImagePluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterImagePluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef) ; }; class CHarvesterImagePlugin : public CHarvesterPlugin @@ -168,7 +169,9 @@ // 2nd phase constructor void ConstructL(); - + + void InitPropDefsL( CMdEObjectDef& aObjectDef ); + private: enum TImageMetadataHandling diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp --- a/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -69,87 +69,90 @@ const TUid KBGPSUid = { 0x0ADC2480 }; #endif -CHarvesterImagePluginPropertyDefs::CHarvesterImagePluginPropertyDefs() : CBase() +CHarvesterImagePluginPropertyDefs::CHarvesterImagePluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } -void CHarvesterImagePluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) +void CHarvesterImagePluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) { - CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); - - // Image property definitions - CMdEObjectDef& objectDef = nsDef.GetObjectDefL( Object::KBaseObject ); - iCreationDatePropertyDef = &objectDef.GetPropertyDefL( Object::KCreationDateProperty ); - iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( Object::KLastModifiedDateProperty ); - iSizePropertyDef = &objectDef.GetPropertyDefL( Object::KSizeProperty ); - iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); - iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); - iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); - - // Media property definitions - CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); - iWidthPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KWidthProperty ); - iHeightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KHeightProperty ); - iDescriptionPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDescriptionProperty ); - iCommentPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCommentProperty ); - iReleaseDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KReleaseDateProperty ); - iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCopyrightProperty ); - iCaptureDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCaptureDateProperty ); - iResolutionUnitPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KResolutionUnitProperty ); - iArtistPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KArtistProperty ); - - // Image property definitions - CMdEObjectDef& imageDef = nsDef.GetObjectDefL( Image::KImageObject ); - iPixelYDimensionPropertyDef = &imageDef.GetPropertyDefL( Image::KPixelYDimensionProperty ); - iPixelXDimensionPropertyDef = &imageDef.GetPropertyDefL( Image::KPixelXDimensionProperty ); - iBitsPerSamplePropertyDef = &imageDef.GetPropertyDefL( Image::KBitsPerSampleProperty ); - iFrameCountPropertyDef = &imageDef.GetPropertyDefL( Image::KFrameCountProperty ); - iDateTimeOriginalPropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeOriginalProperty ); - iDateTimeDigitizedPropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeDigitizedProperty ); - iDateTimePropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeProperty ); - iWhiteBalancePropertyDef = &imageDef.GetPropertyDefL( Image::KWhiteBalanceProperty ); - iFlashPropertyDef = &imageDef.GetPropertyDefL( Image::KFlashProperty ); - iExposureProgramPropertyDef = &imageDef.GetPropertyDefL( Image::KExposureProgramProperty ); - iMakePropertyDef = &imageDef.GetPropertyDefL( Image::KMakeProperty ); - iModelPropertyDef = &imageDef.GetPropertyDefL( Image::KModelProperty ); - iOrientationPropertyDef = &imageDef.GetPropertyDefL( Image::KOrientationProperty ); - iXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KXResolutionProperty ); - iYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KYResolutionProperty ); - iYCbCrPositioningPropertyDef = &imageDef.GetPropertyDefL( Image::KYCbCrPositioningProperty ); - iExposureTimePropertyDef = &imageDef.GetPropertyDefL( Image::KExposureTimeProperty ); - iFNumberPropertyDef = &imageDef.GetPropertyDefL( Image::KFNumberProperty ); - iExifVersionPropertyDef = &imageDef.GetPropertyDefL( Image::KExifVersionProperty ); - iShutterSpeedValuePropertyDef = &imageDef.GetPropertyDefL( Image::KShutterSpeedValueProperty ); - iApertureValuePropertyDef = &imageDef.GetPropertyDefL( Image::KApertureValueProperty ); - iFocalLengthPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalLengthProperty ); - iFlashPixVersionPropertyDef = &imageDef.GetPropertyDefL( Image::KFlashPixVersionProperty ); - iColourSpacePropertyDef = &imageDef.GetPropertyDefL( Image::KColourSpaceProperty ); - iISOSpeedRatingsPropertyDef = &imageDef.GetPropertyDefL( Image::KISOSpeedRatingsProperty ); - iComponentsConfigurationPropertyDef = &imageDef.GetPropertyDefL( Image::KComponentsConfigurationProperty ); - iExposureBiasValuePropertyDef = &imageDef.GetPropertyDefL( Image::KExposureBiasValueProperty ); - iSamplesPerPixelPropertyDef = &imageDef.GetPropertyDefL( Image::KSamplesPerPixelProperty ); - iThumbCompressionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbCompressionProperty ); - iThumbXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbXResolutionProperty ); - iThumbYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbYResolutionProperty ); - iThumbResolutionUnitPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbResolutionUnitProperty ); - iFocalLengthIn35mmFilmPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalLengthIn35mmFilmProperty ); - iMeteringModePropertyDef = &imageDef.GetPropertyDefL( Image::KMeteringModeProperty ); - iRelatedSoundFilePropertyDef = &imageDef.GetPropertyDefL( Image::KRelatedSoundFileProperty ); - iFocalPlaneResolutionUnitPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneResolutionUnitProperty ); - iFocalPlaneXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneXResolutionProperty ); - iFocalPlaneYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneYResolutionProperty ); - iDraftPropertyDef = &imageDef.GetPropertyDefL( Image::KDraftProperty ); + SetByObjectDefL( aObjectDef ); } -CHarvesterImagePluginPropertyDefs* CHarvesterImagePluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterImagePluginPropertyDefs* self = - new (ELeave) CHarvesterImagePluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } +CHarvesterImagePluginPropertyDefs* CHarvesterImagePluginPropertyDefs::NewL() + { + CHarvesterImagePluginPropertyDefs* self = + new (ELeave) CHarvesterImagePluginPropertyDefs(); + return self; + } + +void CHarvesterImagePluginPropertyDefs::SetByObjectDefL(CMdEObjectDef& aObjectDef) + { + CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); + + // Image property definitions + CMdEObjectDef& objectDef = nsDef.GetObjectDefL( Object::KBaseObject ); + iCreationDatePropertyDef = &objectDef.GetPropertyDefL( Object::KCreationDateProperty ); + iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( Object::KLastModifiedDateProperty ); + iSizePropertyDef = &objectDef.GetPropertyDefL( Object::KSizeProperty ); + iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); + iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); + + // Media property definitions + CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); + iWidthPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KWidthProperty ); + iHeightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KHeightProperty ); + iDescriptionPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDescriptionProperty ); + iCommentPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCommentProperty ); + iReleaseDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KReleaseDateProperty ); + iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCopyrightProperty ); + iCaptureDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCaptureDateProperty ); + iResolutionUnitPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KResolutionUnitProperty ); + iArtistPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KArtistProperty ); + + // Image property definitions + CMdEObjectDef& imageDef = nsDef.GetObjectDefL( Image::KImageObject ); + iPixelYDimensionPropertyDef = &imageDef.GetPropertyDefL( Image::KPixelYDimensionProperty ); + iPixelXDimensionPropertyDef = &imageDef.GetPropertyDefL( Image::KPixelXDimensionProperty ); + iBitsPerSamplePropertyDef = &imageDef.GetPropertyDefL( Image::KBitsPerSampleProperty ); + iFrameCountPropertyDef = &imageDef.GetPropertyDefL( Image::KFrameCountProperty ); + iDateTimeOriginalPropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeOriginalProperty ); + iDateTimeDigitizedPropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeDigitizedProperty ); + iDateTimePropertyDef = &imageDef.GetPropertyDefL( Image::KDateTimeProperty ); + iWhiteBalancePropertyDef = &imageDef.GetPropertyDefL( Image::KWhiteBalanceProperty ); + iFlashPropertyDef = &imageDef.GetPropertyDefL( Image::KFlashProperty ); + iExposureProgramPropertyDef = &imageDef.GetPropertyDefL( Image::KExposureProgramProperty ); + iMakePropertyDef = &imageDef.GetPropertyDefL( Image::KMakeProperty ); + iModelPropertyDef = &imageDef.GetPropertyDefL( Image::KModelProperty ); + iOrientationPropertyDef = &imageDef.GetPropertyDefL( Image::KOrientationProperty ); + iXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KXResolutionProperty ); + iYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KYResolutionProperty ); + iYCbCrPositioningPropertyDef = &imageDef.GetPropertyDefL( Image::KYCbCrPositioningProperty ); + iExposureTimePropertyDef = &imageDef.GetPropertyDefL( Image::KExposureTimeProperty ); + iFNumberPropertyDef = &imageDef.GetPropertyDefL( Image::KFNumberProperty ); + iExifVersionPropertyDef = &imageDef.GetPropertyDefL( Image::KExifVersionProperty ); + iShutterSpeedValuePropertyDef = &imageDef.GetPropertyDefL( Image::KShutterSpeedValueProperty ); + iApertureValuePropertyDef = &imageDef.GetPropertyDefL( Image::KApertureValueProperty ); + iFocalLengthPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalLengthProperty ); + iFlashPixVersionPropertyDef = &imageDef.GetPropertyDefL( Image::KFlashPixVersionProperty ); + iColourSpacePropertyDef = &imageDef.GetPropertyDefL( Image::KColourSpaceProperty ); + iISOSpeedRatingsPropertyDef = &imageDef.GetPropertyDefL( Image::KISOSpeedRatingsProperty ); + iComponentsConfigurationPropertyDef = &imageDef.GetPropertyDefL( Image::KComponentsConfigurationProperty ); + iExposureBiasValuePropertyDef = &imageDef.GetPropertyDefL( Image::KExposureBiasValueProperty ); + iSamplesPerPixelPropertyDef = &imageDef.GetPropertyDefL( Image::KSamplesPerPixelProperty ); + iThumbCompressionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbCompressionProperty ); + iThumbXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbXResolutionProperty ); + iThumbYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbYResolutionProperty ); + iThumbResolutionUnitPropertyDef = &imageDef.GetPropertyDefL( Image::KThumbResolutionUnitProperty ); + iFocalLengthIn35mmFilmPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalLengthIn35mmFilmProperty ); + iMeteringModePropertyDef = &imageDef.GetPropertyDefL( Image::KMeteringModeProperty ); + iRelatedSoundFilePropertyDef = &imageDef.GetPropertyDefL( Image::KRelatedSoundFileProperty ); + iFocalPlaneResolutionUnitPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneResolutionUnitProperty ); + iFocalPlaneXResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneXResolutionProperty ); + iFocalPlaneYResolutionPropertyDef = &imageDef.GetPropertyDefL( Image::KFocalPlaneYResolutionProperty ); + iDraftPropertyDef = &imageDef.GetPropertyDefL( Image::KDraftProperty ); + } /** * Default constructor @@ -185,17 +188,22 @@ { iDecoder->Reset(); delete iDecoder; + iDecoder = NULL; } if (iExifUtil) { delete iExifUtil; + iExifUtil = NULL; } delete iPropDefs; + iPropDefs = NULL; delete iPhoneImagesPath; + iPhoneImagesPath = NULL; delete iMmcImagesPath; + iMmcImagesPath = NULL; iMimeTypeMappings.Close(); iFbs.Disconnect(); @@ -211,6 +219,8 @@ iExifUtil = CHarvesterExifUtil::NewL(); User::LeaveIfError( iFbs.Connect() ); + iPropDefs = CHarvesterImagePluginPropertyDefs::NewL(); + TLinearOrder< TMimeTypeMapping > cmp( TMimeTypeMapping::CompareFunction); @@ -396,13 +406,8 @@ { CMdEProperty* prop = NULL; CMdEObjectDef& objectDef = *aFileData.iImageDef; - - if( !iPropDefs ) - { - iPropDefs = CHarvesterImagePluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + + InitPropDefsL( objectDef ); aMetadataObject.Property( *iPropDefs->iSizePropertyDef, prop ); if( prop ) @@ -692,13 +697,8 @@ WRITELOG( "CHarvesterImagePlugin::HandleObjectPropertiesL() - New MdE object" ); CMdEObject& mdeObject = aHarvesterData.MdeObject(); - - if( !iPropDefs ) - { - iPropDefs = CHarvesterImagePluginPropertyDefs::NewL( mdeObject.Def() ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + + InitPropDefsL( mdeObject.Def() ); TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset(); @@ -1084,3 +1084,14 @@ return KErrNotSupported; } + +void CHarvesterImagePlugin::InitPropDefsL( CMdEObjectDef& aObjectDef ) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + // Prefetch max text lengt for validity checking + iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); + } + } + diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/MessagePlugin/group/harvestermessageplugin.mmp --- a/harvester/harvesterplugins/MessagePlugin/group/harvestermessageplugin.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/MessagePlugin/group/harvestermessageplugin.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -54,5 +54,5 @@ PAGED BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O3 -OTime +OPTION ARMCC -O2 -OTime diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/MessagePlugin/src/harvestermessageplugin.cpp --- a/harvester/harvesterplugins/MessagePlugin/src/harvestermessageplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/MessagePlugin/src/harvestermessageplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -73,9 +73,13 @@ { WRITELOG("CHarvesterMessagePlugin::~CHarvesterMessagePlugin()"); delete iMmsMtm; + iMmsMtm = NULL; delete iSmsMtm; + iSmsMtm = NULL; delete iMtmReg; - delete iMsvSession; + iMtmReg = NULL; + delete iMsvSession; + iMsvSession = NULL; } /** diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp --- a/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/group/harvesteromadrmplugin.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -47,6 +47,7 @@ LIBRARY euser.lib LIBRARY efsrv.lib +LIBRARY imageconversion.lib LIBRARY caf.lib LIBRARY cafutils.lib LIBRARY harvesterplugininterface.lib diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h --- a/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -18,13 +18,17 @@ #ifndef __CHARVESTEROMADRMPLUGIN_H__ #define __CHARVESTEROMADRMPLUGIN_H__ +#include #include #include -#include "harvesterplugin.h" +#include +#include +#include + // FORWARD DECLARATION -class CMdEObjectDef; -class CMdEObject; +class CFileData; +class CHarvestData; /** * A data transfer class for harvested drm metadata. @@ -84,14 +88,20 @@ CMdEPropertyDef* iAuthorPropertyDef; CMdEPropertyDef* iGenrePropertyDef; CMdEPropertyDef* iDefaultFolderPropertyDef; + CMdEPropertyDef* iWidthPropertyDef; + CMdEPropertyDef* iHeightPropertyDef; + // Image property definitions + CMdEPropertyDef* iFrameCountPropertyDef; + CMdEPropertyDef* iBitsPerSamplePropertyDef; private: CHarvesterOmaDrmPluginPropertyDefs(); void ConstructL(CMdEObjectDef& aObjectDef); public: - static CHarvesterOmaDrmPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterOmaDrmPluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef) ; }; class CHarvesterOMADRMPlugin : public CHarvesterPlugin @@ -126,35 +136,62 @@ private: /** + * Gathers data from file to meta data object. + * + * @param aMetadataObject A reference to meta data object to gather the data. + * @param aDRMharvestData + * @param aFileData + * @param aHarvestData + */ + TInt GatherDataL( CMdEObject& aMetadataObject, CDRMHarvestData& aDRMharvestData, + CFileData& aFileData, CHarvestData& aHarvestData ); + + + + /** + * C++ constructor - not exported; * implicitly called from NewL() * * @return an instance of CHarvesterOMADRMPlugin. */ - CHarvesterOMADRMPlugin(); + + /** + * Handle addition of new mde video objects. + * + * @param aMetadataObject A reference to meta data object to gather the data. + * @param aDRMharvestData + * @param aFileData + * @param aHarvestData + */ + void HandleObjectPropertiesL( CHarvestData& aHarvestData, CDRMHarvestData& aDRMharvestData, CFileData& aFileData, + CHarvesterData& aHarvesterData, TBool aIsAdd ); - /** - * 2nd phase construction, called by NewLC() + // Default constructor + CHarvesterOMADRMPlugin(); + /** + * 2nd phase construction, called by NewLC() */ void ConstructL(); - /** - * Gathers data from file to meta data object. - * - * @param aMetadataObject A reference to meta data object to gather the data. - * @param aHarvestData An object to store harvested video file data. - */ - void GatherDataL( CMdEObject& aMetadataObject, CDRMHarvestData& aHarvestData ); + void InitPropDefsL( CMdEObjectDef& aObjectDef ); + + protected: + /** + * Handle to File server session. + */ + RFs iFs; + + private: + /** + * image decoder + */ + + - /** - * Handle addition of new mde video objects. - * - * @param aMetadataObject A reference to meta data object to gather the data. - * @param aHarvestData An object containing harvested video file data. - */ - void HandleObjectPropertiesL( CHarvesterData& aHD, CDRMHarvestData& aVHD, TBool aIsAdd ); + - private: + CHarvesterOmaDrmPluginPropertyDefs* iPropDefs; TInt iMaxTextLength; @@ -167,6 +204,7 @@ HBufC* iPhoneSoundsPath; HBufC* iMmcSoundsPath; + }; #endif // __CHarvesterOMADRMPlugin_H__ diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp --- a/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -20,6 +20,7 @@ #include #include "mdsutils.h" +#include "harvesterexifutil.h" #include "harvesteromadrmplugin.h" #include "harvesterlog.h" #include "harvestercommon.h" @@ -33,6 +34,9 @@ #include #include #include +#include + +using namespace MdeConstants; _LIT(KImage, "Image"); _LIT(KVideo, "Video"); @@ -44,11 +48,24 @@ _LIT(KInUse, "InUse"); -CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase() +CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } -void CHarvesterOmaDrmPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) +void CHarvesterOmaDrmPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) + { + SetByObjectDefL( aObjectDef ); + } + +CHarvesterOmaDrmPluginPropertyDefs* CHarvesterOmaDrmPluginPropertyDefs::NewL() + { + CHarvesterOmaDrmPluginPropertyDefs* self = + new (ELeave) CHarvesterOmaDrmPluginPropertyDefs(); + return self; + } + +void CHarvesterOmaDrmPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) { CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); @@ -65,17 +82,16 @@ iDrmPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDRMProperty ); iDescriptionPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KDescriptionProperty ); iAuthorPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KAuthorProperty ); - iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty ); - } + + // Media property definitions + iWidthPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KWidthProperty ); + iHeightPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KHeightProperty ); -CHarvesterOmaDrmPluginPropertyDefs* CHarvesterOmaDrmPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterOmaDrmPluginPropertyDefs* self = - new (ELeave) CHarvesterOmaDrmPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; + // Image property definitions + CMdEObjectDef& imageDef = nsDef.GetObjectDefL( MdeConstants::Image::KImageObject ); + iBitsPerSamplePropertyDef = &imageDef.GetPropertyDefL( MdeConstants::Image::KBitsPerSampleProperty ); + iFrameCountPropertyDef = &imageDef.GetPropertyDefL( MdeConstants::Image::KFrameCountProperty ); + iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty ); } /** @@ -108,16 +124,25 @@ { WRITELOG("CHarvesterOMADRMPlugin::~CHarvesterOMADRMPlugin()"); + iFs.Close(); + + delete iPropDefs; + iPropDefs = NULL; + delete iPhoneImagesPath; + iPhoneImagesPath = NULL; delete iMmcImagesPath; + iMmcImagesPath = NULL; delete iPhoneVideosPath; + iPhoneVideosPath = NULL; delete iMmcVideosPath; + iMmcVideosPath = NULL; delete iPhoneSoundsPath; + iPhoneSoundsPath = NULL; delete iMmcSoundsPath; - - delete iPropDefs; + iMmcSoundsPath = NULL; } /** @@ -126,7 +151,12 @@ void CHarvesterOMADRMPlugin::ConstructL() { WRITELOG( "CHarvesterOMADRMPlugin::ConstructL()" ); + SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); + + User::LeaveIfError( iFs.Connect() ); + iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL(); + TFileName phoneRoot = PathInfo::PhoneMemoryRootPath(); TFileName mmcRoot = PathInfo::MemoryCardRootPath(); @@ -161,25 +191,33 @@ iMmcSoundsPath = mmcSoundPath.Right( mmcSoundPath.Length() - 1 ).AllocL(); } -void CHarvesterOMADRMPlugin::HarvestL( CHarvesterData* aHD ) +void CHarvesterOMADRMPlugin::HarvestL( CHarvesterData* aHarvesterData ) { - CMdEObject& mdeObject = aHD->MdeObject(); - CDRMHarvestData* fileData = CDRMHarvestData::NewL(); + WRITELOG( "CHarvesterOMADRMPlugin::HarvestL()" ); + CMdEObject& mdeObject = aHarvesterData->MdeObject(); + CDRMHarvestData* drmHarvestData = CDRMHarvestData::NewL(); + CleanupStack::PushL( drmHarvestData ); + + CFileData* fileData = CFileData::NewL(); CleanupStack::PushL( fileData ); - TRAPD( error, GatherDataL( mdeObject, *fileData ) ); - if ( error == KErrNone || error == KErrCompletion ) - { - TBool isNewObject( mdeObject.Id() == 0 ); + CHarvestData* harvestData = CHarvestData::NewL(); + CleanupStack::PushL( harvestData ); - if ( isNewObject || mdeObject.Placeholder() ) + TInt errorCode( KErrNone ); + + TRAPD( error, errorCode = GatherDataL( mdeObject, *drmHarvestData, *fileData, *harvestData ) ); + + if ( error == KErrNone && (errorCode == KErrNone || errorCode == KErrCompletion ) ) // ok, something got harvested + { + if ( mdeObject.Id() == 0 || mdeObject.Placeholder() ) // is a new object or placeholder { - TRAP( error, HandleObjectPropertiesL( *aHD, *fileData, ETrue ) ); + TRAP_IGNORE( HandleObjectPropertiesL( *harvestData, *drmHarvestData, *fileData, *aHarvesterData, ETrue ) ); mdeObject.SetPlaceholder( EFalse ); } - else + else // not a new object { - TRAP( error, HandleObjectPropertiesL( *aHD, *fileData, EFalse ) ); + TRAP_IGNORE( HandleObjectPropertiesL( *harvestData, *drmHarvestData, *fileData, *aHarvesterData, EFalse ) ); } if ( error != KErrNone ) @@ -189,21 +227,21 @@ } else { - WRITELOG1( "CHarvesterOMADRMPlugin::HarvestL() - TRAP error: %d", error ); + WRITELOG1( "CHarvesterOMADRMPlugin::HarvestL() - TRAP error: %d, errorCode %d", error ); TInt convertedError = KErrNone; MdsUtils::ConvertTrapError( error, convertedError ); - aHD->SetErrorCode( convertedError ); + aHarvesterData->SetErrorCode( convertedError ); } - CleanupStack::PopAndDestroy( fileData ); + CleanupStack::PopAndDestroy( 3, drmHarvestData ); } // --------------------------------------------------------------------------- // GatherDataL // --------------------------------------------------------------------------- // -void CHarvesterOMADRMPlugin::GatherDataL( CMdEObject& aMetadataObject, - CDRMHarvestData& aVHD ) +TInt CHarvesterOMADRMPlugin::GatherDataL( CMdEObject& aMetadataObject, CDRMHarvestData& aDRMharvestData, + CFileData& aFileData, CHarvestData& /*aHarvestData*/ ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL" ); @@ -213,8 +251,8 @@ const TDesC& uri = aMetadataObject.Uri(); User::LeaveIfError( iFs.Entry( uri, *entry ) ); - aVHD.iModified = entry->iModified; - aVHD.iFileSize = (TUint)entry->iSize; + aDRMharvestData.iModified = entry->iModified; + aDRMharvestData.iFileSize = (TUint)entry->iSize; CleanupStack::PopAndDestroy( entry ); ContentAccess::CContent* content = ContentAccess::CContent::NewLC( uri ); @@ -231,106 +269,131 @@ User::LeaveIfError( data->GetStringAttributeSet(attrSet) ); - TInt err = attrSet.GetValue( ContentAccess::EDescription, aVHD.iDescription ); + TInt err = attrSet.GetValue( ContentAccess::EDescription, aDRMharvestData.iDescription ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting description failed %d", err ); } - if ( aVHD.iDescription.Length() <= 0 ) + if ( aDRMharvestData.iDescription.Length() <= 0 ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL - no description" ); } - err = attrSet.GetValue( ContentAccess::EMimeType, aVHD.iMimetype ); + err = attrSet.GetValue( ContentAccess::EMimeType, aDRMharvestData.iMimetype ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting mimetype failed %d", err ); } - if ( aVHD.iMimetype.Length() <= 0 ) + if ( aDRMharvestData.iMimetype.Length() <= 0 ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL - no mimetype" ); } - err = attrSet.GetValue( ContentAccess::ETitle, aVHD.iTitle ); + err = attrSet.GetValue( ContentAccess::ETitle, aDRMharvestData.iTitle ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting title failed %d", err ); } - if ( aVHD.iTitle.Length() <= 0 ) + if ( aDRMharvestData.iTitle.Length() <= 0 ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL - no title" ); } - err = attrSet.GetValue( ContentAccess::EAuthor, aVHD.iAuthor ); + err = attrSet.GetValue( ContentAccess::EAuthor, aDRMharvestData.iAuthor ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting author failed %d", err ); } - if ( aVHD.iAuthor.Length() <= 0 ) + if ( aDRMharvestData.iAuthor.Length() <= 0 ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL - no author" ); } - err = attrSet.GetValue( ContentAccess::EGenre, aVHD.iGenre ); + err = attrSet.GetValue( ContentAccess::EGenre, aDRMharvestData.iGenre ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting genre failed %d", err ); } - if ( aVHD.iGenre.Length() <= 0 ) + if ( aDRMharvestData.iGenre.Length() <= 0 ) { WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL - no genre" ); } - err = content->GetAttribute( ContentAccess::EIsProtected, aVHD.iDrmProtected ); + err = content->GetAttribute( ContentAccess::EIsProtected, aDRMharvestData.iDrmProtected ); if ( err != KErrNone) { WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting protection info failed %d", err ); } - + + if( aMetadataObject.Def().Name() == MdeConstants::Image::KImageObject ) + { + CImageDecoder* decoder = NULL; + + TRAP( err, decoder = CImageDecoder::FileNewL( iFs, uri, ContentAccess::EPeek, + ( CImageDecoder::TOptions )( CImageDecoder::EPreferFastDecode ))); + + CleanupStack::PushL( decoder ); + + if(decoder && !err) + { + WRITELOG( "CHarvesterImagePlugin::GatherData() - Image decoder has opened the file." ); + // Get image width, frame count, height and bits per pixel from image decoder. + const TFrameInfo info = decoder->FrameInfo( 0 ); + const TSize imageSize = info.iOverallSizeInPixels; + const TInt framecount = decoder->FrameCount(); + aFileData.iFrameCount = framecount; + aFileData.iImageWidth = imageSize.iWidth; + aFileData.iImageHeight = imageSize.iHeight; + aFileData.iBitsPerPixel = info.iBitsPerPixel; + } + else + { + WRITELOG1( "CHarvesterImagePlugin::GatherData() - ERROR: decoder %d", err ); + } + CleanupStack::PopAndDestroy( decoder ); + } + + CleanupStack::PopAndDestroy( 3 ); // content, data, attrSet + return KErrNone; } // --------------------------------------------------------------------------- // HandleObjectPropertiesL // --------------------------------------------------------------------------- // -void CHarvesterOMADRMPlugin::HandleObjectPropertiesL( - CHarvesterData& aHD, - CDRMHarvestData& aVHD, - TBool aIsAdd ) +void CHarvesterOMADRMPlugin::HandleObjectPropertiesL( CHarvestData& /*aHarvestData*/, CDRMHarvestData& aDRMharvestData, CFileData& aFileData, + CHarvesterData& aHarvesterData, TBool aIsAdd ) { WRITELOG("CHarvesterOMADRMPlugin - HandleNewObject "); - CMdEObject& mdeObject = aHD.MdeObject(); + CMdEObject& mdeObject = aHarvesterData.MdeObject(); - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL(); - } + InitPropDefsL( mdeObject.Def() ); TTimeIntervalSeconds timeOffset = User::UTCOffset(); + TPtrC objectDefName( mdeObject.Def().Name()); + if( ! mdeObject.Placeholder() ) { // Creation date - TTime localTime = aVHD.iModified + timeOffset; + TTime localTime = aDRMharvestData.iModified + timeOffset; CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iCreationDatePropertyDef, &localTime, aIsAdd ); // Last modified date CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iLastModifiedDatePropertyDef, &aVHD.iModified, aIsAdd ); + *iPropDefs->iLastModifiedDatePropertyDef, &aDRMharvestData.iModified, aIsAdd ); // File size CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iSizePropertyDef, &aVHD.iFileSize, aIsAdd ); + *iPropDefs->iSizePropertyDef, &aDRMharvestData.iFileSize, aIsAdd ); - TPtrC objectDefName( mdeObject.Def().Name() ); + TPtrC objectDefName( mdeObject.Def().Name()); + if( objectDefName == MdeConstants::Image::KImageObject ) { const TDesC& uri = mdeObject.Uri(); @@ -381,7 +444,7 @@ } // Item Type - if(aVHD.iMimetype.Length() > 0) + if(aDRMharvestData.iMimetype.Length() > 0) { TBool isAdd( EFalse ); CMdEProperty* prop = NULL; @@ -391,36 +454,59 @@ isAdd = ETrue; } CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iItemTypePropertyDef, &aVHD.iMimetype, isAdd ); + *iPropDefs->iItemTypePropertyDef, &aDRMharvestData.iMimetype, isAdd ); } // DRM protection CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iDrmPropertyDef, &aVHD.iDrmProtected, aIsAdd ); + *iPropDefs->iDrmPropertyDef, &aDRMharvestData.iDrmProtected, aIsAdd ); // Title (is set from URI by default) - if( aVHD.iTitle.Length() > 0 && aVHD.iTitle.Length() < KMaxTitleFieldLength ) + if( aDRMharvestData.iTitle.Length() > 0 && aDRMharvestData.iTitle.Length() < KMaxTitleFieldLength ) { CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iTitlePropertyDef, &aVHD.iTitle, EFalse ); + *iPropDefs->iTitlePropertyDef, &aDRMharvestData.iTitle, EFalse ); } // Description - if( aVHD.iDescription.Length() > 0 && aVHD.iDescription.Length() < iMaxTextLength ) + if( aDRMharvestData.iDescription.Length() > 0 && aDRMharvestData.iDescription.Length() < iMaxTextLength ) + { + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, + *iPropDefs->iDescriptionPropertyDef, &aDRMharvestData.iDescription, aIsAdd ); + } + // Author + if( aDRMharvestData.iAuthor.Length() > 0 && aDRMharvestData.iAuthor.Length() < iMaxTextLength ) { CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iDescriptionPropertyDef, &aVHD.iDescription, aIsAdd ); - } - // Author - if( aVHD.iAuthor.Length() > 0 && aVHD.iAuthor.Length() < iMaxTextLength ) - { - CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iAuthorPropertyDef, &aVHD.iAuthor, aIsAdd ); + *iPropDefs->iAuthorPropertyDef, &aDRMharvestData.iAuthor, aIsAdd ); } // Genre - if( aVHD.iGenre.Length() > 0 && aVHD.iGenre.Length() < iMaxTextLength ) + if( aDRMharvestData.iGenre.Length() > 0 && aDRMharvestData.iGenre.Length() < iMaxTextLength ) { CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, - *iPropDefs->iGenrePropertyDef, &aVHD.iGenre, aIsAdd ); + *iPropDefs->iGenrePropertyDef, &aDRMharvestData.iGenre, aIsAdd ); + } + + if( objectDefName == MdeConstants::Image::KImageObject ) + { + // Image - Bits per Sample + if (aFileData.iBitsPerPixel != 0) + { + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iBitsPerSamplePropertyDef, &aFileData.iBitsPerPixel, aIsAdd ); + } + + // Image - Framecount + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iFrameCountPropertyDef, &aFileData.iFrameCount, aIsAdd ); + + // MediaObject - Width + if (aFileData.iImageWidth != 0) + { + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iWidthPropertyDef, &aFileData.iImageWidth, aIsAdd ); + } + + if (aFileData.iImageHeight != 0) + { + CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iHeightPropertyDef, &aFileData.iImageHeight, aIsAdd ); + } } } @@ -438,6 +524,7 @@ { err = content->GetStringAttribute( ContentAccess::EMimeType, mime ); delete content; + content = NULL; } #ifdef _DEBUG @@ -558,6 +645,17 @@ { err = content->GetStringAttribute( ContentAccess::EMimeType, aMimeType ); delete content; + content = NULL; } } +void CHarvesterOMADRMPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef ) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + // Prefetch max text lengt for validity checking + iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL(); + } + } + diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h --- a/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -59,7 +59,8 @@ void ConstructL(CMdEObjectDef& aObjectDef); public: - static CHarvesterRtpPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterRtpPluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef) ; }; /** @@ -225,6 +226,8 @@ /** */ void HandleObjectPropertiesL( CHarvesterData& aHD, CHarvesterRtpClipDetails& aClipDetails, TBool aIsAdd); + + void InitPropDefsL( CMdEObjectDef& aObjectDef ); private: // data CHarvesterRtpPluginPropertyDefs* iPropDefs; diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/RTPPlugin/src/harvesterrtpmetadatareader.cpp --- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpmetadatareader.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpmetadatareader.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -46,6 +46,7 @@ { WRITELOG( "CHarvesterRtpMetaDataReader::~CHarvesterRtpMetaDataReader()" ); delete iMetaData; + iMetaData = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp --- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -35,11 +35,24 @@ // Enough size to recognize file and read metaheader const TInt KFileBufferSize( KMaxMetaHeaderLength ); -CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase() +CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } -void CHarvesterRtpPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) +void CHarvesterRtpPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) + { + SetByObjectDefL( aObjectDef ); + } + +CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL() + { + CHarvesterRtpPluginPropertyDefs* self = + new (ELeave) CHarvesterRtpPluginPropertyDefs(); + return self; + } + +void CHarvesterRtpPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) { CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); @@ -61,16 +74,6 @@ iRecordingFlagsPropertyDef = &videoDef.GetPropertyDefL( MdeConstants::Video::KRecordingFlagsProperty ); } -CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterRtpPluginPropertyDefs* self = - new (ELeave) CHarvesterRtpPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } - // ======== MEMBER FUNCTIONS ======== // --------------------------------------------------------------------------- @@ -89,6 +92,7 @@ { WRITELOG( "CHarvesterRtpPlugin::ConstructL()" ); SetPriority( KHarvesterPriorityHarvestingPlugin - 1 ); + iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL(); } // --------------------------------------------------------------------------- @@ -262,12 +266,8 @@ WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" ); CMdEObject& mdeObject = aHD.MdeObject(); - - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL( objectDef ); - } + + InitPropDefsL( mdeObject.Def() ); TTimeIntervalSeconds timeOffset = User::UTCOffset(); TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset; @@ -340,3 +340,13 @@ CMdeObjectWrapper::HandleObjectPropertyL(mdeObject, *iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd ); } + +void CHarvesterRtpPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef ) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + } + } + + diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h --- a/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -101,13 +101,20 @@ ~CVideoHarvestData() { delete iCopyright; + iCopyright = NULL; delete iAuthor; + iAuthor = NULL; delete iGenre; + iGenre = NULL; delete iPerformer; + iPerformer = NULL; delete iDescription; + iDescription = NULL; delete iTitle; + iTitle = NULL; delete iMimeBuf; + iMimeBuf = NULL; } }; @@ -155,7 +162,8 @@ void ConstructL(CMdEObjectDef& aObjectDef); public: - static CHarvesterVideoPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterVideoPluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef ); }; class CHarvesterVideoPlugin : public CHarvesterPlugin @@ -232,6 +240,8 @@ void CheckForCodecSupport( HBufC* aMimeBuffer, CVideoHarvestData& aVHD ); + void InitPropDefsL( CMdEObjectDef& aObjectDef ); + private: RArray iMimeTypeMappings; diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp --- a/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -85,58 +85,61 @@ const TInt KKiloBytes = 1024; const TReal32 KThousandReal = 1000.0; -CHarvesterVideoPluginPropertyDefs::CHarvesterVideoPluginPropertyDefs() : CBase() +CHarvesterVideoPluginPropertyDefs::CHarvesterVideoPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } void CHarvesterVideoPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) { - CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); - - // Common property definitions - CMdEObjectDef& objectDef = nsDef.GetObjectDefL( Object::KBaseObject ); - iCreationDatePropertyDef = &objectDef.GetPropertyDefL( Object::KCreationDateProperty ); - iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( Object::KLastModifiedDateProperty ); - iSizePropertyDef = &objectDef.GetPropertyDefL( Object::KSizeProperty ); - iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); - iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); - iTitlePropertyDef = &objectDef.GetPropertyDefL( Object::KTitleProperty ); - iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); - - CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); - iReleaseDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KReleaseDateProperty ); - iCaptureDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCaptureDateProperty ); - iDurationPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDurationProperty ); - iWidthPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KWidthProperty ); - iHeightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KHeightProperty ); - iBitratePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KBitrateProperty ); - iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCopyrightProperty ); - iAuthorPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KAuthorProperty ); - iGenrePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KGenreProperty ); - iArtistPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KArtistProperty ); - iDescriptionPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDescriptionProperty ); - iDrmPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDRMProperty ); - - iAudioFourCCDef = &mediaDef.GetPropertyDefL( MediaObject::KAudioFourCCProperty ); - - // Video property definitions - CMdEObjectDef& videoDef = nsDef.GetObjectDefL( Video::KVideoObject ); - iFrameratePropertyDef = &videoDef.GetPropertyDefL( Video::KFramerateProperty ); - - // Audio property definitions - CMdEObjectDef& audioDef = nsDef.GetObjectDefL( Audio::KAudioObject ); - iSamplingFrequencyPropertyDef = &audioDef.GetPropertyDefL( Audio::KSamplingFrequencyProperty ); + SetByObjectDefL( aObjectDef ); } -CHarvesterVideoPluginPropertyDefs* CHarvesterVideoPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterVideoPluginPropertyDefs* self = - new (ELeave) CHarvesterVideoPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } +CHarvesterVideoPluginPropertyDefs* CHarvesterVideoPluginPropertyDefs::NewL() + { + CHarvesterVideoPluginPropertyDefs* self = + new (ELeave) CHarvesterVideoPluginPropertyDefs(); + return self; + } + +void CHarvesterVideoPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) + { + CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); + + // Common property definitions + CMdEObjectDef& objectDef = nsDef.GetObjectDefL( Object::KBaseObject ); + iCreationDatePropertyDef = &objectDef.GetPropertyDefL( Object::KCreationDateProperty ); + iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( Object::KLastModifiedDateProperty ); + iSizePropertyDef = &objectDef.GetPropertyDefL( Object::KSizeProperty ); + iTimeOffsetPropertyDef = &objectDef.GetPropertyDefL( Object::KTimeOffsetProperty ); + iItemTypePropertyDef = &objectDef.GetPropertyDefL( Object::KItemTypeProperty ); + iTitlePropertyDef = &objectDef.GetPropertyDefL( Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( Object::KInDefaultFolder ); + + CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MediaObject::KMediaObject ); + iReleaseDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KReleaseDateProperty ); + iCaptureDatePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCaptureDateProperty ); + iDurationPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDurationProperty ); + iWidthPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KWidthProperty ); + iHeightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KHeightProperty ); + iBitratePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KBitrateProperty ); + iCopyrightPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KCopyrightProperty ); + iAuthorPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KAuthorProperty ); + iGenrePropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KGenreProperty ); + iArtistPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KArtistProperty ); + iDescriptionPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDescriptionProperty ); + iDrmPropertyDef = &mediaDef.GetPropertyDefL( MediaObject::KDRMProperty ); + + iAudioFourCCDef = &mediaDef.GetPropertyDefL( MediaObject::KAudioFourCCProperty ); + + // Video property definitions + CMdEObjectDef& videoDef = nsDef.GetObjectDefL( Video::KVideoObject ); + iFrameratePropertyDef = &videoDef.GetPropertyDefL( Video::KFramerateProperty ); + + // Audio property definitions + CMdEObjectDef& audioDef = nsDef.GetObjectDefL( Audio::KAudioObject ); + iSamplingFrequencyPropertyDef = &audioDef.GetPropertyDefL( Audio::KSamplingFrequencyProperty ); + } /** * Default constructor @@ -165,11 +168,14 @@ CHarvesterVideoPlugin::~CHarvesterVideoPlugin() { delete iPropDefs; + iPropDefs = NULL; iMimeTypeMappings.Close(); RMediaIdUtil::ReleaseInstance(); delete iPhoneVideosPath; + iPhoneVideosPath = NULL; delete iMmcVideosPath; + iMmcVideosPath = NULL; WRITELOG("CHarvesterVideoPlugin::CHarvesterVideoPlugin()"); } @@ -181,6 +187,8 @@ { WRITELOG( "CHarvesterVideoPlugin::ConstructL() - begin" ); + iPropDefs = CHarvesterVideoPluginPropertyDefs::NewL(); + TLinearOrder< THarvestingHandling > cmp( THarvestingHandling::CompareFunction ); // MPEG4 @@ -331,7 +339,7 @@ if ( error != KErrNone ) { WRITELOG1( "CHarvesterVideoPlugin::GetObjectType - File open error: %d", error ); - if( error == KErrInUse ) + if( error == KErrInUse || KErrLocked ) { #ifdef _DEBUG TPtrC fileName( aUri.Mid(2) ); @@ -548,22 +556,41 @@ if( !dataExtracted ) { - TEntry entry; - const TInt errorcode = iFs.Entry( uri, entry ); - - if ( errorcode != KErrNone ) + // If file could be opened, use file handle to fetch base data, otherwise + // attempt to fetch the data from TEntry + if( error == KErrNone ) + { + User::LeaveIfError( file.Modified( aVHD.iModified ) ); + User::LeaveIfError( file.Size( aVHD.iFileSize ) ); + } + else { - WRITELOG1( "CHarvesterVideoPlugin - Error getting entry: %d", errorcode ); - CleanupStack::PopAndDestroy( &file ); - User::Leave( errorcode ); + TEntry entry; + const TInt errorcode = iFs.Entry( uri, entry ); + + if ( errorcode != KErrNone ) + { + WRITELOG1( "CHarvesterVideoPlugin - Error getting entry: %d", errorcode ); + CleanupStack::PopAndDestroy( &file ); + User::Leave( errorcode ); + } + + aVHD.iModified = entry.iModified; + aVHD.iFileSize = (TUint)entry.iSize; } - aVHD.iModified = entry.iModified; - aVHD.iFileSize = (TUint)entry.iSize; - WRITELOG1( "CHarvesterVideoPlugin - File size: %d", aVHD.iFileSize ); } + aVHD.iVideoObject = aMetadataObject.Def().Name().Compare( KVideo ) == 0; + + if( error != KErrNone ) + { + WRITELOG1( "CHarvesterVideoPlugin - File open error: %d", error ); + CleanupStack::PopAndDestroy( &file ); + User::Leave( KErrCompletion ); + } + // now the minimum information has been harvested // from now on the harvested data should always be stored @@ -574,15 +601,6 @@ CleanupStack::PopAndDestroy( &file ); User::Leave( KErrNotFound ); } - - aVHD.iVideoObject = aMetadataObject.Def().Name().Compare( KVideo ) == 0; - - if( error != KErrNone ) - { - WRITELOG1( "CHarvesterVideoPlugin - File open error: %d", error ); - CleanupStack::PopAndDestroy( &file ); - User::Leave( KErrCompletion ); - } if ( mapping->iHandler.iLibrary == TVideoMetadataHandling::EHexilMetadataHandling ) { @@ -591,10 +609,10 @@ CleanupClosePushL( mimes ); TPtrC ext; - MdsUtils::GetExt( uri, ext ); + const TBool exists = MdsUtils::GetExt( uri, ext ); // Check for possibly protected content - if( ext.CompareF( KExtensionWmv ) == 0 ) + if( exists && ext.CompareF( KExtensionWmv ) == 0 ) { ContentAccess::CContent* content = ContentAccess::CContent::NewLC( uri ); ContentAccess::CData* data = content->OpenContentLC( ContentAccess::EPeek ); @@ -607,6 +625,10 @@ CleanupStack::PushL( helixMetadata ); TRAP( error, helixMetadata->OpenFileL( file ) ); + + // No need for the file handle anymore so closing it + WRITELOG( "CHarvesterVideoPlugin - Parsing done, file handle can be closed" ); + file.Close(); if ( error == KErrNone ) { @@ -789,6 +811,7 @@ aVHD.iMimeBuf = mime.Alloc(); } + helixMetadata->ResetL(); CleanupStack::PopAndDestroy( helixMetadata ); // don't destory mime type pointers just clean array @@ -959,12 +982,12 @@ } #endif } - WRITELOG( "CHarvesterVideoPlugin - Closing file" ); + WRITELOG( "CHarvesterVideoPlugin - Closing file, if still open" ); CleanupStack::PopAndDestroy( &file ); #ifdef _DEBUG dStop.UniversalTime(); - WRITELOG1( "CHarvesterVideoPlugin::GatherDataL start %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() ); + WRITELOG1( "CHarvesterVideoPlugin::GatherDataL end %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() ); #endif WRITELOG( "CHarvesterVideoPlugin - Start adding data to object" ); @@ -982,14 +1005,8 @@ WRITELOG("CHarvesterVideoPlugin::HandleObjectPropertiesL "); CMdEObject& mdeObject = aHD.MdeObject(); - - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterVideoPluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); - } + + InitPropDefsL( mdeObject.Def() ); TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset(); TTime localModifiedDate = aVHD.iModified + timeOffsetSeconds; @@ -1217,9 +1234,6 @@ { TBool possibleVideo = EFalse; - CHXMetaDataUtility* helixMetadata = CHXMetaDataUtility::NewL(); - CleanupStack::PushL( helixMetadata ); - TFileName tempName; TUint32 mediaId( 0 ); TInt blackListError( KErrNone ); @@ -1227,10 +1241,14 @@ blackListError = GetFileFullNameAndMediaId( aFile, tempName, mediaId ); if( blackListError == KErrNone ) { - AddFileToBlackList( tempName, mediaId ); + blackListError = AddFileToBlackList( tempName, mediaId ); } + CHXMetaDataUtility* helixMetadata = CHXMetaDataUtility::NewL(); + CleanupStack::PushL( helixMetadata ); + TRAPD( err, helixMetadata->OpenFileL( aFile ) ); + aFile.Close(); if( err == KErrNone ) { @@ -1257,10 +1275,10 @@ const TInt mimeCount = mimes.Count(); - // at least one MIME type must be found + // Set to Video, regardless how badly file is corrupted if( mimeCount == 0 ) { - User::Leave( KErrNotFound ); + aType.Copy( KVideo ); } for( TInt i = 0; i < mimeCount; i++ ) @@ -1313,13 +1331,14 @@ { aType.Copy( KVideo ); } + + helixMetadata->ResetL(); + CleanupStack::PopAndDestroy( helixMetadata ); if( blackListError == KErrNone ) { RemoveFileFromBlackList( tempName, mediaId ); - } - - CleanupStack::PopAndDestroy( helixMetadata ); + } } TInt CHarvesterVideoPlugin::AddFileToBlackList( const TFileName& aFullName, const TUint32& aMediaId ) @@ -1331,7 +1350,7 @@ if( blackListError == KErrNone ) { WRITELOG( "CHarvesterVideoPlugin::AddFileToBlackList - Adding URI to blacklist" ); - iBlacklist->AddFile( aFullName, aMediaId, modified ); + blackListError = iBlacklist->AddFile( aFullName, aMediaId, modified ); } return blackListError; @@ -1429,5 +1448,15 @@ return; } +void CHarvesterVideoPlugin::InitPropDefsL(CMdEObjectDef& aObjectDef) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + // Prefetch max text lengt for validity checking + iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL(); + } + } + // End of file diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h --- a/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -55,7 +55,8 @@ void ConstructL(CMdEObjectDef& aObjectDef); public: - static CHarvesterWmvPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterWmvPluginPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef ); }; /** @@ -180,6 +181,7 @@ CHarvesterWmvClipDetails& aClipDetails, TBool aIsAdd); + void InitPropDefsL( CMdEObjectDef& aObjectDef ); private: // data CHarvesterWmvPluginPropertyDefs* iPropDefs; diff -r aa5a574040a4 -r a3cc46f37772 harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp --- a/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -31,11 +31,24 @@ #include "mdetextproperty.h" #include "mdeobjectwrapper.h" -CHarvesterWmvPluginPropertyDefs::CHarvesterWmvPluginPropertyDefs() : CBase() +CHarvesterWmvPluginPropertyDefs::CHarvesterWmvPluginPropertyDefs() : CBase(), + iCreationDatePropertyDef( NULL ) { } -void CHarvesterWmvPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) +void CHarvesterWmvPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef ) + { + SetByObjectDefL( aObjectDef ); + } + +CHarvesterWmvPluginPropertyDefs* CHarvesterWmvPluginPropertyDefs::NewL() + { + CHarvesterWmvPluginPropertyDefs* self = + new (ELeave) CHarvesterWmvPluginPropertyDefs(); + return self; + } + +void CHarvesterWmvPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef ) { CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); @@ -55,16 +68,6 @@ iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty ); } -CHarvesterWmvPluginPropertyDefs* CHarvesterWmvPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterWmvPluginPropertyDefs* self = - new (ELeave) CHarvesterWmvPluginPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } - // ======== MEMBER FUNCTIONS ======== // --------------------------------------------------------------------------- @@ -89,9 +92,12 @@ { WRITELOG( "CHarvesterWMVPlugin::~CHarvesterWMVPlugin()" ); delete iPropDefs; + iPropDefs = NULL; delete iPhoneVideosPath; + iPhoneVideosPath = NULL; delete iMmcVideosPath; + iMmcVideosPath = NULL; } // --------------------------------------------------------------------------- @@ -151,6 +157,7 @@ { err = content->GetStringAttribute( ContentAccess::EMimeType, aMimeType ); delete content; + content = NULL; } } @@ -170,6 +177,8 @@ { WRITELOG( "CHarvesterWMVPlugin::ConstructL()" ); + iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL(); + TFileName videos = PathInfo::VideosPath(); TFileName phonePath = PathInfo::PhoneMemoryRootPath(); @@ -294,13 +303,7 @@ CMdEObject& mdeObject = aHD.MdeObject(); - if( !iPropDefs ) - { - CMdEObjectDef& objectDef = mdeObject.Def(); - iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL( objectDef ); - // Prefetch max text lengt for validity checking - iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL(); - } + InitPropDefsL( mdeObject.Def() ); if( ! mdeObject.Placeholder() ) { @@ -366,3 +369,13 @@ } } +void CHarvesterWMVPlugin::InitPropDefsL(CMdEObjectDef& aObjectDef) + { + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( aObjectDef ); + // Prefetch max text lengt for validity checking + iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL(); + } + } + diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/group/filemonitorplugin.mmp --- a/harvester/monitorplugins/fileplugin/group/filemonitorplugin.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/group/filemonitorplugin.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -59,6 +59,7 @@ LIBRARY harvesterdata.lib LIBRARY harvestercommon.lib LIBRARY centralrepository.lib +LIBRARY platformenv.lib OPTION ARMCC -O3 -OTime diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/inc/fileeventhandlerao.h --- a/harvester/monitorplugins/fileplugin/inc/fileeventhandlerao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/inc/fileeventhandlerao.h Fri Sep 17 16:54:49 2010 +0300 @@ -172,11 +172,13 @@ void ReadCacheSizeFromCenrepL(); /** - * Set MdE object's title with aNewUrl + * Update MDS objects data if needed */ void SetTitleL( CMdEObject* aOldObject, const TDesC& aNewUrl ); void SetModifiedTimeL( CMdEObject* aOldObject, const TDesC& aNewUrl ); + + void CheckDefaultFolderL( CMdEObject* aOldObject ); private: @@ -237,6 +239,16 @@ CMdEPropertyDef* iOriginPropertyDef; CMdEPropertyDef* iTitlePropertyDef; CMdEPropertyDef* iTimePropertyDef; + CMdEPropertyDef* iDefaultFolderPropertyDef; + + HBufC* iPhoneImagesPath; + HBufC* iMmcImagesPath; + + HBufC* iPhoneVideosPath; + HBufC* iMmcVideosPath; + + HBufC* iPhoneSoundsPath; + HBufC* iMmcSoundsPath; }; #endif // __FILEEVENTHANDLERAO_H__ diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp --- a/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -38,7 +38,9 @@ CRenameItem::~CRenameItem() { delete iOldName; + iOldName = NULL; delete iNewName; + iNewName = NULL; iFileEvents.ResetAndDestroy(); } @@ -63,9 +65,14 @@ { TMdsFSPStatus* event = NULL; event = new TMdsFSPStatus(aEvent); + if (event) { - iFileEvents.Append(event); + if(iFileEvents.Append(event) != KErrNone) + { + delete event; + event = NULL; + } } } @@ -157,7 +164,10 @@ iRenamedFolders.Remove(0); TRAP_IGNORE(currItem->HandleFileEventsL(iCFileEventHandlerAO)); delete currItem; + currItem = NULL; + SetNextRequest(ERenameStateIdle); + if (iRenamedFolders.Count() == 0) { iIsRunning = EFalse; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp --- a/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -16,6 +16,7 @@ #include #include +#include #include "fileeventhandlerao.h" #include "harvesterlog.h" @@ -83,12 +84,46 @@ User::LeaveIfError( error ); TRAP( error, ReadCacheSizeFromCenrepL() ); + if ( error == KErrNone ) { iQueue.Reserve( iCacheSize ); } iEventArray = new (ELeave) CArrayFixSeg< TMdsFSPStatus >( KMaxEventsGranularity ); + + TFileName phoneRoot = PathInfo::PhoneMemoryRootPath(); + TFileName mmcRoot = PathInfo::MemoryCardRootPath(); + + TFileName images = PathInfo::ImagesPath(); + + TFileName phoneImagePath( phoneRoot ); + phoneImagePath.Append( images ); + iPhoneImagesPath = phoneImagePath.AllocL(); + + TFileName mmcImagePath( mmcRoot ); + mmcImagePath.Append( images ); + iMmcImagesPath = mmcImagePath.Right( mmcImagePath.Length() - 1 ).AllocL(); + + TFileName videos = PathInfo::VideosPath(); + + TFileName phoneVideoPath( phoneRoot ); + phoneVideoPath.Append( videos ); + iPhoneVideosPath = phoneVideoPath.AllocL(); + + TFileName mmcVideoPath( mmcRoot ); + mmcVideoPath.Append( videos ); + iMmcVideosPath = mmcVideoPath.Right( mmcVideoPath.Length() - 1 ).AllocL(); + + TFileName sounds = PathInfo::SoundsPath(); + + TFileName phoneSoundPath( phoneRoot ); + phoneSoundPath.Append( sounds ); + iPhoneSoundsPath = phoneSoundPath.AllocL(); + + TFileName mmcSoundPath( mmcRoot ); + mmcSoundPath.Append( sounds ); + iMmcSoundsPath = mmcSoundPath.Right( mmcSoundPath.Length() - 1 ).AllocL(); } // --------------------------------------------------------------------------- @@ -104,16 +139,37 @@ iFs.Close(); delete iMapper; + iMapper = NULL; + delete iMoveTimer; + iMoveTimer = NULL; + delete iFolderRenamer; + iFolderRenamer = NULL; delete iEventArray; + iEventArray = NULL; iQueue.ResetAndDestroy(); iQueue.Close(); iUriArray.ResetAndDestroy(); iUriArray.Close(); + + delete iPhoneImagesPath; + iPhoneImagesPath = NULL; + delete iMmcImagesPath; + iMmcImagesPath = NULL; + + delete iPhoneVideosPath; + iPhoneVideosPath = NULL; + delete iMmcVideosPath; + iMmcVideosPath = NULL; + + delete iPhoneSoundsPath; + iPhoneSoundsPath = NULL; + delete iMmcSoundsPath; + iMmcSoundsPath = NULL; } @@ -146,6 +202,7 @@ ResetEvent(); item->GetAsFspStatus(iEvent); delete item; + item = NULL; if( iEvent.iFileEventType == EMdsFileDeleted ) { @@ -243,8 +300,23 @@ WRITELOG1( "CFileEventHandlerAO::HandleNotificationL - ignored camera origin for %S", &status.iFileName ); return; } + + if( (origin == KOriginIgnoreAttribsChanged || + origin == MdeConstants::Object::ECamera ) && + aEvent.iFileEventType == EMdsFileAttribsChanged ) + { + WRITELOG1( "CFileEventHandlerAO::HandleNotificationL - ignored attribs changed event for %S", &status.iFileName ); + return; + } } + // If internal origin value is used for evaluation, set it default value + if( origin == KOriginIgnoreAttribsChanged || + origin == KOriginFastHarvest ) + { + origin = MdeConstants::Object::EOther; + } + // ignore created file event if extension is not supported by any harverter plugin if( EMdsFileCreated == status.iFileEventType && status.iFileName.Length() > 0 ) @@ -281,6 +353,7 @@ break; case EMdsFileModified: + case EMdsFileAttribsChanged: { WRITELOG1( "CFileEventHandlerAO::HandleNotificationL - EmdsFileModified: %S", &status.iFileName ); ModifyL( status.iFileName, origin, fastHarvest ); @@ -441,6 +514,7 @@ newObject->Id() ); if ( removedId != KNoId ) { + SetTitleL( oldObject , aNewUrl ); oldObject->SetUriL( aNewUrl ); TUint32 mediaId = FSUtil::MediaID( iFs, aNewUrl ); oldObject->SetMediaId( mediaId ); @@ -454,6 +528,7 @@ if ( oldObject ) { + CheckDefaultFolderL( oldObject ); SetModifiedTimeL( oldObject, aNewUrl ); TOrigin origin = OriginFromMdEObjectL( *oldObject ); if( origin == MdeConstants::Object::EOther) @@ -631,8 +706,10 @@ CleanupStack::PushL( oldObject ); SetTitleL( oldObject , aNewUrl ); oldObject->SetUriL( aNewUrl ); + CheckDefaultFolderL( oldObject ); TUint32 mediaId = FSUtil::MediaID( iFs, aNewUrl ); oldObject->SetMediaId( mediaId ); + SetModifiedTimeL( oldObject, aNewUrl ); TOrigin origin = OriginFromMdEObjectL( *oldObject ); if( origin == MdeConstants::Object::EOther) { @@ -653,6 +730,7 @@ CleanupStack::PushL( oldObject ); SetTitleL( oldObject , aNewUrl ); oldObject->SetUriL( aNewUrl ); + CheckDefaultFolderL( oldObject ); TUint32 mediaId = FSUtil::MediaID( iFs, aNewUrl ); oldObject->SetMediaId( mediaId ); SetModifiedTimeL( oldObject, aNewUrl ); @@ -973,3 +1051,60 @@ } } +//--------------------------------------------------------------------------- +// CFileEventHandlerAO::CheckDefaultFolderL() +// --------------------------------------------------------------------------- +// +void CFileEventHandlerAO::CheckDefaultFolderL( CMdEObject* aOldObject ) + { + if( !iDefaultFolderPropertyDef ) + { + iDefaultFolderPropertyDef = &aOldObject->Def().GetPropertyDefL( + MdeConstants::Object::KInDefaultFolder ); + } + + CMdEProperty* folderProp = NULL; + aOldObject->Property( *iDefaultFolderPropertyDef, folderProp ); + + TBool inDefaultFolder( EFalse ); + TPtrC objectDefName( aOldObject->Def().Name() ); + if( objectDefName == MdeConstants::Image::KImageObject ) + { + const TDesC& uri = aOldObject->Uri(); + if( uri.FindF( iMmcImagesPath->Des()) != KErrNotFound || + uri.FindF( iPhoneImagesPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + inDefaultFolder = ETrue; + } + } + else if( objectDefName == MdeConstants::Video::KVideoObject ) + { + const TDesC& uri = aOldObject->Uri(); + if( uri.FindF( iMmcVideosPath->Des()) != KErrNotFound || + uri.FindF( iPhoneVideosPath->Des()) != KErrNotFound || + uri.FindF( KDCIMFolder ) != KErrNotFound ) + { + inDefaultFolder = ETrue; + } + } + else if( objectDefName == MdeConstants::Audio::KAudioObject ) + { + const TDesC& uri = aOldObject->Uri(); + if( uri.FindF( iMmcSoundsPath->Des()) != KErrNotFound || + uri.FindF( iPhoneSoundsPath->Des()) != KErrNotFound ) + { + inDefaultFolder = ETrue; + } + } + + if( folderProp ) + { + folderProp->SetBoolValueL( inDefaultFolder ); + } + else + { + aOldObject->AddBoolPropertyL( *iDefaultFolderPropertyDef, inDefaultFolder ); + } + } + diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/src/filemonitorao.cpp --- a/harvester/monitorplugins/fileplugin/src/filemonitorao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/src/filemonitorao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -71,6 +71,7 @@ StopMonitoring(); delete iMdeSession; + iMdeSession = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/src/filemonitorplugin.cpp --- a/harvester/monitorplugins/fileplugin/src/filemonitorplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/src/filemonitorplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -40,6 +40,7 @@ CFileMonitorPlugin::~CFileMonitorPlugin() { delete iFileMonitor; + iFileMonitor = NULL; } // --------------------------------------------------------------------------- @@ -67,6 +68,7 @@ TRAP( err, cenRepoUtil->AddIgnorePathsToFspL( KDrive, KMonitorPath )); } delete cenRepoUtil; + cenRepoUtil = NULL; } return success && err == KErrNone; } diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/fileplugin/src/processoriginmapper.cpp --- a/harvester/monitorplugins/fileplugin/src/processoriginmapper.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/fileplugin/src/processoriginmapper.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -59,6 +59,7 @@ CProcessOriginMapper::~CProcessOriginMapper() { delete iLineBuffer; + iLineBuffer = NULL; iProcessOriginMap.Close(); iReadStream.Close(); iWriteStream.Close(); @@ -226,7 +227,7 @@ // TInt CProcessOriginMapper::ReadFileL() { - WRITELOG( "CProcessOriginMapper::ReadFileL - reading default file..." ); + WRITELOG( "CProcessOriginMapper::ReadFileL - reading default file" ); iDefaultFileRead = ETrue; const TInt count = ReadFileL( KDefaultMappingFile ); iDefaultFileRead = EFalse; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/inc/mdsfileserverpluginclient.h --- a/harvester/monitorplugins/inc/mdsfileserverpluginclient.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/inc/mdsfileserverpluginclient.h Fri Sep 17 16:54:49 2010 +0300 @@ -50,7 +50,8 @@ EMdsFileDeleted, EMdsDriveFormatted, EMdsFileUnknown, - EMdsDirRenamed + EMdsDirRenamed, + EMdsFileAttribsChanged }; typedef TPckgBuf TMdsFSPStatusPckg; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/inc/mdsfspqueue.inl --- a/harvester/monitorplugins/inc/mdsfspqueue.inl Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/inc/mdsfspqueue.inl Fri Sep 17 16:54:49 2010 +0300 @@ -15,7 +15,7 @@ */ -#include "mdsfspqueue.h" + //----------------------------------------------------------------------------- // CMdsFSPQueueItem::NewL() @@ -67,10 +67,13 @@ if( iFileName ) { delete iFileName; + iFileName = NULL; } + if( iNewFileName ) { delete iNewFileName; + iNewFileName = NULL; } iFileName = aStatus.iFileName.AllocL(); @@ -85,6 +88,8 @@ CMdsFSPQueueItem::~CMdsFSPQueueItem() { delete iFileName; + iFileName = NULL; delete iNewFileName; + iNewFileName = NULL; } - \ No newline at end of file + diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp --- a/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -339,6 +339,7 @@ { fileEventType = EMdsFileCreated; delete iCreatedFiles[i]; + iCreatedFiles[i] = NULL; iCreatedFiles.Remove( i ); //Have to check whether file has been hidden @@ -433,6 +434,7 @@ if ( MdsUtils::Compare( iFileName, *(iModifiedFiles[i]) ) == 0 ) { delete iModifiedFiles[i]; + iModifiedFiles[i] = NULL; iModifiedFiles.Remove( i ); found = ETrue; } @@ -448,7 +450,7 @@ return KErrNone; } - fileEventType = EMdsFileModified; + fileEventType = EMdsFileAttribsChanged; } break; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mdsoomplugin/group/mdsoomplugin.mmp --- a/harvester/monitorplugins/mdsoomplugin/group/mdsoomplugin.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mdsoomplugin/group/mdsoomplugin.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -49,6 +49,6 @@ PAGED BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O2 -OTime +OPTION ARMCC -O3 -OTime diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp --- a/harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -465,6 +465,7 @@ iMdeSession->AddEventL( *event ); delete event; + event = NULL; } WRITELOG( "CMessageMonitorPlugin::RemoveObjectL return" ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/inc/mmcmounttaskao.h --- a/harvester/monitorplugins/mmcplugin/inc/mmcmounttaskao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/inc/mmcmounttaskao.h Fri Sep 17 16:54:49 2010 +0300 @@ -46,16 +46,16 @@ static CMMCMountTaskAO* NewL(); virtual ~CMMCMountTaskAO(); - void StartMount( TMountData& aMountData ); - void StartUnmount( TMountData& aMountData ); + void StartMountL( TMountData& aMountData ); + void StartUnmountL( TMountData& aMountData ); void SetMonitorObserver( MMonitorPluginObserver& aObserver ); void SetMdeSession( CMdEHarvesterSession* aSession ); void SetHarvesterPluginFactory( CHarvesterPluginFactory* aPluginFactory ); /** - * Returns internal hard drive's media id if the device has one. 0 if not or drive is not present + * Returns internal hard drive's media id if the device has one. */ - TUint32 GetInternalDriveMediaId(); + TUint32 GetInternalDriveMediaId( TBool& aPresent ); void SetCachingStatus( TBool aCachingStatus ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -94,7 +94,7 @@ CleanupResetAndDestroyPushL( aEntryArray ); - CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 ); + CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 30 ); CleanupStack::PushL( path ); TFileName firstPath; firstPath.Copy( aDrivePath ); @@ -104,7 +104,7 @@ TUint32 mediaId( 0 ); iMediaIdUtil->GetMediaId( aDrivePath, mediaId ); - WRITELOG1( "CMmcFileList::BuildFileListL - mediaId: %d", mediaId ); + WRITELOG1( "CMmcFileList::BuildFileListL - mediaId: %u", mediaId ); CDir* directory = NULL; TFileName name; @@ -294,7 +294,6 @@ aEntryArray.Compress(); } - WRITELOG( "CMmcFileList::HandleFileEntryL -- cleanupstack" ); CleanupStack::PopAndDestroy( &results ); CleanupStack::PopAndDestroy( &fileInfos ); CleanupStack::PopAndDestroy( &uris ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -124,6 +124,8 @@ return; } + StartNotify(); + iPreviousDriveList.Zero(); iPreviousDriveList.Copy( iDriveList ); @@ -138,8 +140,6 @@ #ifdef _DEBUG PrintAllLists(); #endif - - StartNotify(); } #ifdef _DEBUG @@ -161,7 +161,7 @@ iFs.NotifyChangeCancel( iStatus ); } -CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterPriorityMonitorPlugin ), +CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterServerHighPriority ), iObserver( NULL ) { } @@ -283,7 +283,7 @@ { if ( iMediaIdList[i] != mediaId ) { - WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%d, new=%d", i, iMediaIdList[i], mediaId ); // DEBUG INFO + WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%u, new=%u", i, iMediaIdList[i], mediaId ); // DEBUG INFO // skip mount events if mediaId is 0 if ( iMediaIdList[i] != 0 ) { diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -60,21 +60,26 @@ { iMMCMonitor->StopMonitoring(); delete iMMCMonitor; + iMMCMonitor = NULL; } if (iUsbMonitor) { iUsbMonitor->StopMonitoring(); delete iUsbMonitor; + iUsbMonitor = NULL; } if (iMountTask) { delete iMountTask; + iMountTask = NULL; } delete iMmcScanner; + iMmcScanner = NULL; delete iHddScanner; + iHddScanner = NULL; iFs.Close(); } @@ -111,7 +116,8 @@ TBool presentState( EFalse ); TUint32 hdMediaId( 0 ); - hdMediaId = iMountTask->GetInternalDriveMediaId(); + TBool hdPresent( EFalse ); + hdMediaId = iMountTask->GetInternalDriveMediaId( hdPresent ); for( TInt i = medias.Count() - 1; i >=0; i-- ) { @@ -132,10 +138,10 @@ } } - if( hdMediaId == 0 ) + if( hdMediaId == 0 || !hdPresent ) { // Try to fetch internall mass storage media id again if it was not mounted - hdMediaId = iMountTask->GetInternalDriveMediaId(); + hdMediaId = iMountTask->GetInternalDriveMediaId( hdPresent ); } // scan mass storage to catch all chances even if battery dies during operation that should be catched @@ -144,7 +150,7 @@ TBool exists( EFalse ); TRAP_IGNORE( exists= iMdEClient->GetMediaL( hdMediaId, driveLetter, presentState ) ); - if ( exists ) + if ( exists && hdPresent ) { WRITELOG("CMMCMonitorPlugin::StartMonitoring - start mass storage scan"); @@ -219,6 +225,7 @@ TMountData* mountData = NULL; mountData = new TMountData; + if ( !mountData ) { return; @@ -248,7 +255,62 @@ { WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EMounted" ); mountData->iMountType = TMountData::EMount; - iMountTask->StartMount( *mountData ); + + // If mass storage mounting was delayed in boot so that mount event + // occures in mmc monitor, update the mass storage media id in the + // db in case factory settings were reseted and mass storage formatted + TInt drive( -1 ); + TInt internalMassStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) ); + if( internalMassStorageError == KErrNone ) + { + TVolumeInfo internalMassStorageVolumeInfo; + internalMassStorageError = iFs.Volume( internalMassStorageVolumeInfo, drive ); + if( internalMassStorageError == KErrNone ) + { + const TUint32 massStorageMediaId( internalMassStorageVolumeInfo.iUniqueID ); + if( massStorageMediaId == aMediaID && + massStorageMediaId != 0 ) + { + TUint32 mmcMediaId( 0 ); + TInt mmcDrive( -1 ); + TInt mmcError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, mmcDrive ) ); + if( mmcError == KErrNone ) + { + if( drive != mmcDrive ) + { + TVolumeInfo mmcVolumeInfo; + mmcError = iFs.Volume( mmcVolumeInfo, mmcDrive ); + if( mmcError == KErrNone ) + { + mmcMediaId = mmcVolumeInfo.iUniqueID; + } + } + else + { + mmcMediaId = massStorageMediaId; + } + } + + // If removable storage is not found, assume internal mass storage was mounted + if( mmcError ) + { + iMdEClient->CheckMassStorageMediaId( massStorageMediaId ); + } + else if( massStorageMediaId != mmcMediaId ) + { + iMdEClient->CheckMassStorageMediaId( massStorageMediaId ); + } + } + } + } + + TRAPD(err, iMountTask->StartMountL( *mountData )) + + if(err != KErrNone ) + { + delete mountData; + mountData = NULL; + } } break; @@ -262,7 +324,13 @@ { WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EDismounted" ); mountData->iMountType = TMountData::EUnmount; - iMountTask->StartUnmount( *mountData ); + TRAPD(err, iMountTask->StartUnmountL( *mountData )); + + if(err != KErrNone ) + { + delete mountData; + mountData = NULL; + } } else { @@ -276,7 +344,13 @@ { WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EFormatted" ); mountData->iMountType = TMountData::EFormat; - iMountTask->StartUnmount( *mountData ); + TRAPD(err, iMountTask->StartUnmountL( *mountData )); + + if(err != KErrNone) + { + delete mountData; + mountData = NULL; + } } break; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -79,6 +79,7 @@ iHarvestEntryArray.Close(); delete iMdeSession; + iMdeSession = NULL; Deinitialize(); @@ -88,6 +89,7 @@ } delete iMmcFileList; + iMmcFileList = NULL; iHdArray.ResetAndDestroy(); iHdArray.Close(); } @@ -108,17 +110,38 @@ iHarvesterPluginFactory = aPluginFactory; } -void CMMCMountTaskAO::StartMount( TMountData& aMountData ) +void CMMCMountTaskAO::StartMountL( TMountData& aMountData ) { WRITELOG("CMMCMountTaskAO::StartMount"); - iMountDataQueue.Append( &aMountData ); + + // Remove pending mount request for the same drive + // if for example USB cable is pluged and unpluged + // several times in a row + for( TInt i = iMountDataQueue.Count() - 1; i >=0; i-- ) + { + WRITELOG( "CMMCMountTaskAO::StartUnmountL - checking for pending mount notifications" ); + TMountData* tempData = iMountDataQueue[i]; + if( tempData->iMediaID == aMountData.iMediaID && + tempData->iMountType == TMountData::EMount && + aMountData.iMountType == TMountData::EMount && + tempData->iDrivePath == aMountData.iDrivePath ) + { + WRITELOG( "CMMCMountTaskAO::StartUnmountL - removing obsolite mount notifications" ); + iMountDataQueue.Remove(i); + delete tempData; + tempData = NULL; + } + } + + User::LeaveIfError( iMountDataQueue.Append( &aMountData )); + if ( iNextRequest == ERequestIdle ) { SetNextRequest( ERequestStartTask ); } } -void CMMCMountTaskAO::StartUnmount(TMountData& aMountData) +void CMMCMountTaskAO::StartUnmountL(TMountData& aMountData) { WRITELOG("CMMCMountTaskAO::StartUnmount"); @@ -131,8 +154,28 @@ Deinitialize(); } } + + // Remove pending unmount request for the same drive + // if for example USB cable is pluged and unpluged + // several times in a row + for( TInt i = iMountDataQueue.Count() - 1; i >=0; i-- ) + { + WRITELOG( "CMMCMountTaskAO::StartUnmountL - checking for pending unmount notifications" ); + TMountData* tempData = iMountDataQueue[i]; + if( tempData->iMediaID == aMountData.iMediaID && + tempData->iMountType == TMountData::EUnmount && + aMountData.iMountType == TMountData::EUnmount && + tempData->iDrivePath == aMountData.iDrivePath ) + { + WRITELOG( "CMMCMountTaskAO::StartUnmountL - removing obsolite unmount notifications" ); + iMountDataQueue.Remove(i); + delete tempData; + tempData = NULL; + } + } + + User::LeaveIfError( iMountDataQueue.Append( &aMountData )); - iMountDataQueue.Append( &aMountData ); SetNextRequest( ERequestStartTask ); } @@ -146,7 +189,10 @@ { if ( iMountData ) { - iMountDataQueue.Insert( iMountData, 0 ); + if( iMountDataQueue.Insert( iMountData, 0 ) != KErrNone) + { + delete iMountData; + } iMountData = NULL; } Deinitialize(); @@ -173,7 +219,7 @@ WRITELOG1( "iMountData.iMountType: %d", iMountData->iMountType ); WRITELOG1( "iMountData.iDrivePath: %S", &iMountData->iDrivePath ); - WRITELOG1( "iMountData.iMediaID: %d", iMountData->iMediaID ); + WRITELOG1( "iMountData.iMediaID: %u", iMountData->iMediaID ); if ( iMountData->iMountType == TMountData::EMount ) { @@ -205,7 +251,11 @@ TRAPD( err, iMmcFileList->BuildFileListL( iFs, iMountData->iDrivePath, iEntryArray )); if ( err == KErrNoMemory ) { - iMountDataQueue.Insert( iMountData, 0 ); + if( iMountDataQueue.Insert( iMountData, 0 ) != KErrNone) + { + delete iMountData; + } + iMountData = NULL; Deinitialize(); SetNextRequest( ERequestStartTask ); @@ -284,9 +334,14 @@ { if( err == KErrNoMemory ) { - iMountDataQueue.Insert( iMountData, 0 ); + if(iMountDataQueue.Insert( iMountData, 0 ) != KErrNone) + { + delete iMountData; + } + iMountData = NULL; } + Deinitialize(); SetNextRequest( ERequestStartTask ); break; @@ -376,6 +431,7 @@ { WRITELOG1( "CMMCMountTaskAO::RunError with error code: %d", aError ); Deinitialize(); + SetNextRequest( ERequestStartTask ); return KErrNone; } @@ -398,7 +454,7 @@ void CMMCMountTaskAO::SetNotPresentToMDE() { - WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %d", iMountData->iMediaID); + WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %u", iMountData->iMediaID); if ( iMountData->iMediaID ) { iMdeSession->SetFilesToNotPresent( iMountData->iMediaID ); @@ -437,6 +493,7 @@ hd->SetEventType( EHarvesterEdit ); hd->SetObjectType( ENormal ); delete ei; + ei = NULL; } else { @@ -445,7 +502,12 @@ hd->SetClientData( ei ); } - iHdArray.Append( hd ); + if(iHdArray.Append( hd ) != KErrNone ) + { + delete hd; + hd = NULL; + } + aArray.Remove( i ); } @@ -515,7 +577,7 @@ } } -TUint32 CMMCMountTaskAO::GetInternalDriveMediaId() +TUint32 CMMCMountTaskAO::GetInternalDriveMediaId( TBool& aPresent ) { WRITELOG( "CMMCMountTaskAO::GetInternalDriveMediaId" ); @@ -558,10 +620,15 @@ // check if disk is internal TUint driveStatus; const TInt err = DriveInfo::GetDriveStatus( iFs, i, driveStatus ); - if ( (err == KErrNone ) && ( driveStatus & DriveInfo::EDriveInternal ) ) + if ( ( err == KErrNone ) && + ( driveStatus & DriveInfo::EDriveInternal )) { // get media id hdMediaId = FSUtil::MediaID( iFs, i ); + if( driveStatus & DriveInfo::EDrivePresent ) + { + aPresent = ETrue; + } break; } } diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -82,6 +82,7 @@ // Delete instance variables if any delete iMmcFileList; + iMmcFileList = NULL; iEntryArray.ResetAndDestroy(); iEntryArray.Close(); @@ -107,6 +108,14 @@ { case( EUninitialized ): { + WRITELOG("CMmcScannerAO::RunL - Starting processing"); + if( iMediaId == 0 ) + { + WRITELOG("CMmcScannerAO::RunL - MediaId == 0 -> end"); + SetState( EDone ); + break; + } + WRITELOG("CMmcScannerAO::RunL - Setting files to not present"); iMdEClient->SetFilesToNotPresent( iMediaId, ETrue ); SetState( EReadFiles ); @@ -248,6 +257,7 @@ hd->SetEventType( EHarvesterEdit ); hd->SetObjectType( ENormal ); delete ei; + ei = NULL; } else { @@ -255,7 +265,12 @@ hd->SetObjectType( EPlaceholder ); hd->SetClientData( ei ); } - iHdArray.Append( hd ); + + if(iHdArray.Append( hd ) != KErrNone ) + { + delete hd; + hd = NULL; + } iHarvestEntryArray.Remove( i ); } diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/mmcplugin/src/mmcusbao.cpp --- a/harvester/monitorplugins/mmcplugin/src/mmcusbao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/mmcplugin/src/mmcusbao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -136,7 +136,7 @@ TFileName* fn = new (ELeave) TFileName( driveChar ); _LIT( KIndicator, ":" ); fn->Append( KIndicator ); - WRITELOG1( "CMMCUsbAO::RunL - drive letter: %S", fn ); + WRITELOG1( "CMMCUsbAO::RunL - drive letter: %S", &(*fn) ); PrintDriveStatus( driveStatus ); delete fn; fn = NULL; diff -r aa5a574040a4 -r a3cc46f37772 harvester/monitorplugins/monitorplugininterface/group/monitorplugininterface.mmp --- a/harvester/monitorplugins/monitorplugininterface/group/monitorplugininterface.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/monitorplugins/monitorplugininterface/group/monitorplugininterface.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -43,7 +43,7 @@ #if defined(WINS) deffile ../bwincw/monitorplugininterfacewinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/monitorplugininterfacearm.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/inc/harvesterao.h --- a/harvester/server/inc/harvesterao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/inc/harvesterao.h Fri Sep 17 16:54:49 2010 +0300 @@ -22,6 +22,8 @@ #include #include +#include + #include "contextengine.h" #include "mdeharvestersession.h" @@ -74,7 +76,8 @@ void ConstructL(CMdEObjectDef& aObjectDef); public: - static CHarvesterAoPropertyDefs* NewL(CMdEObjectDef& aObjectDef); + static CHarvesterAoPropertyDefs* NewL(); + void SetByObjectDefL( CMdEObjectDef& aObjectDef ); }; /** @@ -555,8 +558,6 @@ CHarvesterAoPropertyDefs* iPropDefs; - TBool iMassMemoryIdChecked; - // Own. CDesCArray* iCameraExtensionArray; @@ -585,7 +586,11 @@ HBufC* iMmcSoundsPath; TBool iUnmountDetected; + TBool iUnmountHandlingOngoing; TBool iPriorityInterruptDetected; + + RLocationObjectManipulator iLocManipulator; + TBool iLocManipulatorConnected; }; #endif //__CHARVESTERAO_H__ diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/harvesterao.cpp --- a/harvester/server/src/harvesterao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/harvesterao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -53,6 +52,7 @@ const TInt KPlaceholderQueueSize = 99; const TInt KContainerPlaceholderQueueSize = 10; +const TInt KReadyPlaceholderQueueSize = 10; const TInt KObjectDefStrSize = 20; _LIT( KTAGDaemonName, "ThumbAGDaemon" ); @@ -61,7 +61,7 @@ _LIT(KVideo, "Video"); _LIT(KInUse, "InUse"); -_LIT(KUndefinedMime, " "); +_LIT(KUndefined, " "); _LIT( KExtensionMp4, "mp4" ); _LIT( KExtensionMpg4, "mpg4" ); @@ -76,32 +76,34 @@ void CHarvesterAoPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef) { - CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); - - // Common property definitions - CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); - iCreationDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty ); - iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KLastModifiedDateProperty ); - iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); - iOriginPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KOriginProperty ); - iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); - iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); - iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); - - CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); - iPreinstalledPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KPreinstalledProperty ); + SetByObjectDefL( aObjectDef ); } -CHarvesterAoPropertyDefs* CHarvesterAoPropertyDefs::NewL(CMdEObjectDef& aObjectDef) - { - CHarvesterAoPropertyDefs* self = - new (ELeave) CHarvesterAoPropertyDefs(); - CleanupStack::PushL( self ); - self->ConstructL( aObjectDef ); - CleanupStack::Pop( self ); - return self; - } +CHarvesterAoPropertyDefs* CHarvesterAoPropertyDefs::NewL() + { + CHarvesterAoPropertyDefs* self = + new (ELeave) CHarvesterAoPropertyDefs(); + return self; + } + +void CHarvesterAoPropertyDefs::SetByObjectDefL(CMdEObjectDef& aObjectDef) + { + CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef(); + // Common property definitions + CMdEObjectDef& objectDef = nsDef.GetObjectDefL( MdeConstants::Object::KBaseObject ); + iCreationDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KCreationDateProperty ); + iLastModifiedDatePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KLastModifiedDateProperty ); + iSizePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KSizeProperty ); + iOriginPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KOriginProperty ); + iItemTypePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KItemTypeProperty ); + iTitlePropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KTitleProperty ); + iDefaultFolderPropertyDef = &objectDef.GetPropertyDefL( MdeConstants::Object::KInDefaultFolder ); + + CMdEObjectDef& mediaDef = nsDef.GetObjectDefL( MdeConstants::MediaObject::KMediaObject ); + iPreinstalledPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KPreinstalledProperty ); + } + // --------------------------------------------------------------------------- // NewLC // --------------------------------------------------------------------------- @@ -153,7 +155,9 @@ iHarvestingPlaceholders = EFalse; iUnmountDetected = EFalse; + iUnmountHandlingOngoing = EFalse; iPriorityInterruptDetected = EFalse; + iLocManipulatorConnected = EFalse; } // --------------------------------------------------------------------------- @@ -169,6 +173,8 @@ iFs.Close(); + iLocManipulator.Close(); + if (iCtxEngine) { iCtxEngine->ReleaseInstance(); @@ -186,14 +192,18 @@ DeleteComposers(); delete iDiskFullNotifier; + iDiskFullNotifier = NULL; delete iBackupSubscriber; + iBackupSubscriber = NULL; if (iBlacklist) { iBlacklist->CloseDatabase(); delete iBlacklist; + iBlacklist = NULL; } delete iReHarvester; + iReHarvester = NULL; if ( iHarvestFileMessages.Count() > 0 ) { @@ -222,26 +232,43 @@ iTempReadyPHArray.Close(); delete iHarvesterOomAO; + iHarvesterOomAO = NULL; delete iRestoreWatcher; + iRestoreWatcher = NULL; delete iOnDemandAO; + iOnDemandAO = NULL; delete iMdEHarvesterSession; + iMdEHarvesterSession = NULL; delete iMdESession; + iMdESession = NULL; delete iQueue; + iQueue = NULL; delete iHarvesterPluginFactory; + iHarvesterPluginFactory = NULL; delete iMdeObjectHandler; + iMdeObjectHandler = NULL; delete iUnmountHandlerAO; + iUnmountHandlerAO = NULL; delete iPropDefs; + iPropDefs = NULL; delete iCameraExtensionArray; + iCameraExtensionArray = NULL; delete iPhoneImagesPath; + iPhoneImagesPath = NULL; delete iMmcImagesPath; + iMmcImagesPath = NULL; delete iPhoneVideosPath; + iPhoneVideosPath = NULL; delete iMmcVideosPath; + iMmcVideosPath = NULL; delete iPhoneSoundsPath; + iPhoneSoundsPath = NULL; delete iMmcSoundsPath; + iMmcSoundsPath = NULL; RMediaIdUtil::ReleaseInstance(); @@ -293,6 +320,8 @@ // Reset harvesting status for clients in case blacklisted file was handled iHarvesterPluginFactory->SendHarvestingStatusEventL( EFalse ); + iPropDefs = CHarvesterAoPropertyDefs::NewL(); + iCameraExtensionArray = new ( ELeave ) CDesCArraySeg( 6 ); iCameraExtensionArray->InsertIsqL( KExtensionMp4 ); iCameraExtensionArray->InsertIsqL( KExtensionMpg4 ); @@ -354,8 +383,7 @@ CleanupStack::PushL( cleanupItem ); CMonitorPlugin::ListImplementationsL( infoArray ); - TInt count( 0 ); - count = infoArray.Count(); + const TInt count( infoArray.Count() ); CMonitorPlugin* plugin = NULL; for ( TInt i = 0; i < count; i++ ) @@ -410,7 +438,6 @@ { WRITELOG( "CHarvesterAO::StartMonitoring()" ); OstTrace0( TRACE_NORMAL, CHARVESTERAO_STARTMONITORING, "CHarvesterAO::StartMonitoring" ); - const TInt count( iMonitorPluginArray.Count() ); for ( TInt i = 0; i < count; i++ ) @@ -429,10 +456,8 @@ WRITELOG( "CHarvesterAO::StopMonitoring()" ); OstTrace0( TRACE_NORMAL, CHARVESTERAO_STOPMONITORING, "CHarvesterAO::StopMonitoring" ); - - const TInt count( iMonitorPluginArray.Count() ); - for ( TInt i = 0; i < count; i++ ) + for( TInt i = iMonitorPluginArray.Count() - 1; i >=0; i-- ) { iMonitorPluginArray[i]->StopMonitoring(); } @@ -447,12 +472,11 @@ WRITELOG( "CHarvesterAO::PauseMonitoring()" ); OstTrace0( TRACE_NORMAL, CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring" ); - const TInt count( iMonitorPluginArray.Count() ); - - for ( TInt i = 0; i=0; i-- ) { iMonitorPluginArray[i]->PauseMonitoring(); } + OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring - end" ); WRITELOG( "CHarvesterAO::PauseMonitoring() - end" ); } @@ -486,6 +510,7 @@ OstTrace1( TRACE_NORMAL, CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount;aMediaId=%d", aMediaId ); iUnmountDetected = ETrue; + iUnmountHandlingOngoing = ETrue; if( !iServerPaused ) { @@ -518,6 +543,7 @@ WRITELOG1( "CHarvesterAO::HandleUnmount() remove iReadyPHArray %d", i); OstTrace1( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iReadyPHArray %d", i ); + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrCancel ); delete hd; hd = NULL; iReadyPHArray.Remove( i ); @@ -555,6 +581,7 @@ WRITELOG1( "CHarvesterAO::HandleUnmount() remove iPHArray %d", i); OstTrace1( TRACE_NORMAL, DUP5_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iPHArray %d", i ); + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrCancel ); delete hd; hd = NULL; iPHArray.Remove( i ); @@ -591,6 +618,7 @@ WRITELOG1( "CHarvesterAO::HandleUnmount() remove iContainerPHArray %d", i); OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount remove iContainerPHArray %d", i ); + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrCancel ); delete hd; hd = NULL; iContainerPHArray.Remove( i ); @@ -622,6 +650,7 @@ if( err == KErrNone && mediaId == aMediaId ) { WRITELOG1( "CHarvesterAO::HandleUnmount() remove iTempReadyPHArray %d", i); + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrCancel ); delete hd; hd = NULL; iTempReadyPHArray.Remove( i ); @@ -681,6 +710,7 @@ TRAP_IGNORE( iMdESession->CancelObjectL( mdeobj ) ); + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrCancel ); delete hd; hd = NULL; } @@ -705,12 +735,10 @@ iMediaIdUtil->RemoveMediaId( aMediaId ); // resume harvesting from last state - if( !iRamFull && !iDiskFull ) - { - // resume monitoring - ResumeMonitoring(); - TRAP_IGNORE( ResumeHarvesterL() ); - } + iUnmountHandlingOngoing = EFalse; + // resume monitoring + ResumeMonitoring(); + TRAP_IGNORE( ResumeHarvesterL() ); } // --------------------------------------------------------------------------- @@ -821,26 +849,35 @@ { SetPriority( KHarvesterCustomImportantPriority ); } - while( hd != NULL && - iPHArray.Count() < KPlaceholderQueueSize && - hd->ObjectType() == EPlaceholder ) + while( hd && + iPHArray.Count() < KPlaceholderQueueSize && + hd->ObjectType() == EPlaceholder ) { - iPHArray.Append( hd ); - if( hd->Origin() == MdeConstants::Object::ECamera || - hd->ObjectType() == EFastHarvest ) + if(iPHArray.Append( hd ) != KErrNone) + { + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete hd; + hd = NULL; + } + else { - if( !iFastHarvestNeeded ) - { - iFastHarvestNeeded = ETrue; - // Fast harvest event must be handled even if MMC handling would be ongoing - SetPriority( KHarvesterPriorityMonitorPlugin ); - } - break; - } - else if( iFastHarvestNeeded ) - { - iFastHarvestNeeded = EFalse; - SetPriority( KHarvesterCustomImportantPriority ); + if( hd->Origin() == MdeConstants::Object::ECamera || + hd->ObjectType() == EFastHarvest ) + { + if( !iFastHarvestNeeded ) + { + iFastHarvestNeeded = ETrue; + // Fast harvest event must be handled even if MMC handling would be ongoing + SetPriority( KHarvesterPriorityMonitorPlugin ); + } + break; + } + else if( iFastHarvestNeeded ) + { + iFastHarvestNeeded = EFalse; + SetPriority( KHarvesterCustomImportantPriority ); + } } hd = iQueue->GetNextItem(); } @@ -849,11 +886,14 @@ { TRAPD( err, HandlePlaceholdersL( ETrue ) ); - // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared + // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared if ( err != KErrNone ) { - iPHArray.ResetAndDestroy(); - iTempReadyPHArray.ResetAndDestroy(); + if( err != KErrDiskFull ) + { + iPHArray.ResetAndDestroy(); + iTempReadyPHArray.ResetAndDestroy(); + } User::Leave( err ); } @@ -877,16 +917,21 @@ { if( hd->ObjectType() == EPlaceholder ) { - iPHArray.Append( hd ); + if( iPHArray.Append( hd ) != KErrNone ) + { + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete hd; + hd = NULL; + } } else { - CheckFileExtensionAndHarvestL( hd ); - if( iUnmountDetected ) - { - iQueue->Append( hd ); - return; - } + if( iReadyPHArray.Append( hd ) != KErrNone) + { + delete hd; + hd = NULL; + } } } @@ -894,11 +939,14 @@ { TRAPD( err, HandlePlaceholdersL( ETrue ) ); - // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared + // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared if ( err != KErrNone ) { - iPHArray.ResetAndDestroy(); - iTempReadyPHArray.ResetAndDestroy(); + if( err != KErrDiskFull ) + { + iPHArray.ResetAndDestroy(); + iTempReadyPHArray.ResetAndDestroy(); + } User::Leave( err ); } } @@ -911,7 +959,7 @@ } iHarvestingPlaceholders = EFalse; CheckFileExtensionAndHarvestL( hd ); - if( iUnmountDetected ) + if( iUnmountDetected && hd ) { iQueue->Append( hd ); } @@ -932,24 +980,36 @@ TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset(); + CMdENamespaceDef& defNS = iMdESession->GetDefaultNamespaceDefL(); + TInt endindex( iPHArray.Count() ); for( TInt i = 0; i < endindex; i++ ) { CHarvesterData* hd = iPHArray[i]; - if( aCheck && iHarvesterPluginFactory->IsContainerFileL( hd->Uri() ) ) + if( aCheck && + hd->Origin() != MdeConstants::Object::ECamera && + iHarvesterPluginFactory->IsContainerFileL( hd->Uri() ) ) { - iContainerPHArray.Append( hd ); + if( iContainerPHArray.Append( hd ) != KErrNone ) + { + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete hd; + hd = NULL; + } + iPHArray.Remove( i ); - i--; - endindex--; + i--; + endindex--; continue; } + TBuf objDefStr; if( !CheckForCameraItem( hd, objDefStr ) ) { - iHarvesterPluginFactory->GetObjectDefL( *hd, objDefStr ); + iHarvesterPluginFactory->GetObjectDefL( hd, objDefStr ); } // GetObjectDef can cause context switch, and if unmount happens when this execution is @@ -960,8 +1020,15 @@ WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - Unmount detected during execution!" ); for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- ) { - CHarvesterData* hd = iTempReadyPHArray[y]; - iPHArray.Insert( hd, 0 ); + CHarvesterData* tempHd = iTempReadyPHArray[y]; + + if(iPHArray.Insert( tempHd, 0 ) != KErrNone) + { + HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete tempHd; + tempHd = NULL; + } } iTempReadyPHArray.Reset(); CleanupStack::PopAndDestroy( &mdeObjectArray ); @@ -976,26 +1043,69 @@ const TInt currentPHArrayCount( iPHArray.Count() ); for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- ) { - CHarvesterData* hd = iTempReadyPHArray[y]; - if( currentPHArrayCount ) + CHarvesterData* tempHd = iTempReadyPHArray[y]; + if(iPHArray.Insert( tempHd, 0 ) != KErrNone) { - // Leave the first item in the array as it is the priority item - iPHArray.Insert( hd, 1 ); - } - else - { - iPHArray.Insert( hd, 0 ); + HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete tempHd; + tempHd = NULL; } } iTempReadyPHArray.Reset(); CleanupStack::PopAndDestroy( &mdeObjectArray ); return; } + // Check if disk is full + // If disk is detected to be full, no items can be added to MDS db, thus abort the run, and start over + // when disk space is available to make sure the arrays are valid. + else if( iDiskFull ) + { + WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - No disk space available!" ); + for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- ) + { + CHarvesterData* tempHd = iTempReadyPHArray[y]; + + if(iPHArray.Insert( tempHd, 0 ) != KErrNone) + { + HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete tempHd; + tempHd = NULL; + } + } + iTempReadyPHArray.Reset(); + CleanupStack::PopAndDestroy( &mdeObjectArray ); + User::Leave( KErrDiskFull ); + } if( objDefStr.Length() == 0 || ( objDefStr == KInUse ) ) { - WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - no objectDef or in use, failing harvesting" ); +#ifdef _DEBUG + if( objDefStr.Length() == 0 ) + { + WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - no objectDef failing harvesting" ); + } + else + { + WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - in use, failing harvesting" ); + } + WRITELOG1( "CHarvesterAO::HandlePlaceholdersL() - harvesting failed, uri: %S", &(hd->Uri()) ); +#endif + // If object has not been created in the device so that monitors would have + // picked up creation event, and the file is in use, subclose event will + // not trigger the file to be harvester when closed, thus it needs to be moved + // to reharvesting queue + if( objDefStr == KInUse && + !hd->TakeSnapshot() ) + { + iPHArray.Remove( i ); + i--; + endindex--; + iReHarvester->AddItem( hd ); + continue; + } const TInt error( KErrUnknown ); // notify observer, notification is needed even if file is not supported HarvestCompleted( hd->ClientId(), hd->Uri(), error ); @@ -1008,10 +1118,12 @@ continue; } - CMdENamespaceDef& defNS = iMdESession->GetDefaultNamespaceDefL(); CMdEObjectDef& mdeObjectDef = defNS.GetObjectDefL( objDefStr ); - CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, hd->Uri() ); + HBufC* hdUri = hd->Uri().AllocL(); + CleanupStack::PushL( hdUri ); + CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, *hdUri ); + CleanupStack::PopAndDestroy( hdUri ); CleanupStack::PushL( mdeObject ); CPlaceholderData* phData = NULL; @@ -1080,10 +1192,10 @@ // set placeholder mdeObject->SetPlaceholder( ETrue ); - if( !iPropDefs ) - { - iPropDefs = CHarvesterAoPropertyDefs::NewL( defNS.GetObjectDefL( MdeConstants::Object::KBaseObject ) ); - } + if( !iPropDefs->iCreationDatePropertyDef ) + { + iPropDefs->SetByObjectDefL( defNS.GetObjectDefL( MdeConstants::Object::KBaseObject ) ); + } // set file size mdeObject->AddUint32PropertyL( *iPropDefs->iSizePropertyDef, phData->FileSize() ); @@ -1106,7 +1218,7 @@ } else { - mdeObject->AddTextPropertyL( *iPropDefs->iItemTypePropertyDef, KUndefinedMime ); + mdeObject->AddTextPropertyL( *iPropDefs->iItemTypePropertyDef, KUndefined ); } if( hd->Origin() == MdeConstants::Object::ECamera ) @@ -1128,7 +1240,7 @@ } else { - mdeObject->AddTextPropertyL( *iPropDefs->iTitlePropertyDef, KNullDesC ); + mdeObject->AddTextPropertyL( *iPropDefs->iTitlePropertyDef, KUndefined ); } CPlaceholderData* ph = NULL; @@ -1172,33 +1284,68 @@ CleanupStack::Pop( mdeObject ); - iTempReadyPHArray.Append( hd ); + if(iTempReadyPHArray.Append( hd ) != KErrNone) + { + HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory ); + delete hd; + hd = NULL; + } iPHArray.Remove( i ); i--; endindex--; } - const TInt tempArrayCount( iTempReadyPHArray.Count() ); - for( TInt i( 0 ); i < tempArrayCount; i++ ) - { - CHarvesterData* hd = iTempReadyPHArray[i]; - iReadyPHArray.Append( hd ); - } - iTempReadyPHArray.Reset(); - const TInt objectCount = mdeObjectArray.Count(); if( objectCount > 0 ) { // add object to mde iMdEHarvesterSession->AutoLockL( mdeObjectArray ); - const TInt addError( iMdESession->AddObjectsL( mdeObjectArray ) ); + TInt addError( KErrNone ); + TRAPD( addFailure, addError = iMdESession->AddObjectsL( mdeObjectArray ) ); + if( addFailure == KErrDiskFull ) + { + WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - No disk space available!" ); + for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- ) + { + CHarvesterData* tempHd = iTempReadyPHArray[y]; + + if(iPHArray.Insert( tempHd, 0 ) != KErrNone) + { + HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory ); + iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ); + delete tempHd; + tempHd = NULL; + } + } + iTempReadyPHArray.Reset(); + CleanupStack::PopAndDestroy( &mdeObjectArray ); + User::Leave( KErrDiskFull ); + } + else if( addFailure != KErrNone ) + { + User::Leave( addFailure ); + } + if( addError != KErrNone ) { // If some error occures, retry iMdESession->AddObjectsL( mdeObjectArray ); } + const TInt tempArrayCount( iTempReadyPHArray.Count() ); + for( TInt i( 0 ); i < tempArrayCount; i++ ) + { + CHarvesterData* tempHd = iTempReadyPHArray[i]; + if(iReadyPHArray.Append( tempHd ) != KErrNone) + { + HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory ); + delete tempHd; + tempHd = NULL; + } + } + iTempReadyPHArray.Reset(); + iHarvesterEventManager->IncreaseItemCount( EHEObserverTypePlaceholder, objectCount ); iHarvesterEventManager->SendEventL( EHEObserverTypePlaceholder, EHEStateStarted, @@ -1234,17 +1381,17 @@ const TDesC& uri = aHD->Uri(); TBool objectExisted = ETrue; - if( ! mdeObject ) + if( !mdeObject ) { objectExisted = EFalse; WRITELOG1( "CHarvesterAO::CheckFileExtensionAndHarvestL() - no mdeobject. URI: %S", &uri ); TBuf objDefStr; - iHarvesterPluginFactory->GetObjectDefL( *aHD, objDefStr ); + iHarvesterPluginFactory->GetObjectDefL( aHD, objDefStr ); // GetObjectDef can cause context switch, and if unmount happens when this execution is // interrupted, the ph data can be invalid. Thus, abort whole run, and start over to make sure // the data is valid. - if( iUnmountDetected ) + if( !aHD ) { return; } @@ -1349,9 +1496,16 @@ { iMdESession->RemoveObjectL( aHD->Uri() ); } + + // If context swich occures just right due to RemoveObjectL, check aHD for validity + if( !aHD ) + { + return; + } TInt pluginErr = KErrNone; TRAPD( err, pluginErr = iHarvesterPluginFactory->HarvestL( aHD )); + if ( err != KErrNone ) { WRITELOG1( "CHarvesterAO::CheckFileExtensionAndHarvestL() - plugin error: %d", err ); @@ -1381,8 +1535,6 @@ WRITELOG1("CHarvesterAO::CheckFileExtensionAndHarvestL() - ends with error %d", pluginErr ); OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL) - ends with error %d", pluginErr ); - - SetNextRequest( ERequestHarvest ); } // --------------------------------------------------------------------------- @@ -1441,18 +1593,25 @@ WRITELOG( "CHarvesterAO::HarvestingCompleted() - Creating location object. " ); OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Creating location object." ); - RLocationObjectManipulator lo; - - const TInt loError = lo.Connect(); + TInt loError( KErrNone ); + if( !iLocManipulatorConnected ) + { + loError = iLocManipulator.Connect(); + if( loError == KErrNone ) + { + iLocManipulatorConnected = ETrue; + } + } if (loError == KErrNone) { - TInt err = lo.CreateLocationObject( *locData, aHD->MdeObject().Id() ); + TInt err = iLocManipulator.CreateLocationObject( *locData, aHD->MdeObject().Id() ); if( err != KErrNone ) { WRITELOG( "CHarvesterAO::HarvestingCompleted() - Location object creation failed!!!" ); OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Location object creation failed!!!" ); - + iLocManipulator.Close(); + iLocManipulatorConnected = EFalse; } } else @@ -1460,8 +1619,6 @@ WRITELOG( "CHarvesterAO::HarvestingCompleted() - LocationObjectManipulator connect failed!!!" ); OstTrace0( TRACE_NORMAL, DUP8_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - LocationObjectManipulator connect failed!!" ); } - - lo.Close(); } TRAP_IGNORE( iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 ) ); @@ -1512,8 +1669,6 @@ OstTrace0( TRACE_NORMAL, DUP12_CHARVESTERAO_HARVESTINGCOMPLETED, "==============================ERROR done =========================" ); } - - SetNextRequest( ERequestHarvest ); } // --------------------------------------------------------------------------- @@ -1660,25 +1815,48 @@ TRAP_IGNORE( BootPartialRestoreScanL() ); #endif - if( !iMassMemoryIdChecked ) + // Store the internal mass memory media ID to DB, and update data if necessary + TInt drive( -1 ); + TInt internalMassStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) ); + if( internalMassStorageError == KErrNone ) { - TInt drive( -1 ); - TInt massStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) ); - if( massStorageError == KErrNone ) + TVolumeInfo internalMassStorageVolumeInfo; + internalMassStorageError = iFs.Volume( internalMassStorageVolumeInfo, drive ); + if( internalMassStorageError == KErrNone ) { - TVolumeInfo massStorageVolumeInfo; - iFs.Volume( massStorageVolumeInfo, drive ); - const TUint32 massStorageMediaId( massStorageVolumeInfo.iUniqueID ); - massStorageError = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive ); - if( massStorageError == KErrNone ) + const TUint32 massStorageMediaId( internalMassStorageVolumeInfo.iUniqueID ); + if( massStorageMediaId != 0 ) { - iFs.Volume( massStorageVolumeInfo, drive ); - // Update mass storage media id if the mass storage is not memory card - if( massStorageVolumeInfo.iUniqueID != massStorageMediaId && massStorageMediaId != 0 ) + TUint32 mmcMediaId( 0 ); + TInt mmcDrive( -1 ); + TInt mmcError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, mmcDrive ) ); + if( mmcError == KErrNone ) + { + if( drive != mmcDrive ) + { + TVolumeInfo mmcVolumeInfo; + mmcError = iFs.Volume( mmcVolumeInfo, mmcDrive ); + if( mmcError == KErrNone ) + { + mmcMediaId = mmcVolumeInfo.iUniqueID; + } + } + else + { + mmcMediaId = massStorageMediaId; + } + } + + // If removable storage is not found, assume internal mass storage was mounted + if( mmcError ) + { + iMdEHarvesterSession->CheckMassStorageMediaId( massStorageMediaId ); + } + else if( massStorageMediaId != mmcMediaId ) { iMdEHarvesterSession->CheckMassStorageMediaId( massStorageMediaId ); - } - } + } + } } } } @@ -1743,11 +1921,6 @@ iHarvesterPluginFactory->PauseHarvester( ETrue ); iServerPaused = ETrue; - if( !iRamFull && !iDiskFull && !iUnmountDetected ) - { - iManualPauseEnabled = ETrue; - } - // Everything is paused WRITELOG( "CHarvesterAO::PauseHarvester() - Moving paused state paused" ); OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_PAUSEHARVESTER, "CHarvesterAO::PauseHarvester - Moving paused state paused" ); @@ -1763,17 +1936,19 @@ { WRITELOG( "CHarvesterAO::ResumeHarvesterL()" ); OstTrace0( TRACE_NORMAL, CHARVESTERAO_RESUMEHARVESTERL, "CHarvesterAO::ResumeHarvesterL" ); + + if( iRamFull || iDiskFull || iUnmountHandlingOngoing || iManualPauseEnabled ) + { + return; + } iHarvesterPluginFactory->PauseHarvester( EFalse ); iServerPaused = EFalse; - if( !iManualPauseEnabled && - iNextRequest == ERequestIdle ) + if( iNextRequest == ERequestIdle ) { SetNextRequest( ERequestHarvest ); - } - - iManualPauseEnabled = EFalse; + } } // --------------------------------------------------------------------------- @@ -1809,6 +1984,12 @@ iContainerPHArray.Compress(); iPHArray.Compress(); iTempReadyPHArray.Compress(); + + if( iLocManipulatorConnected ) + { + iLocManipulator.Close(); + iLocManipulatorConnected = EFalse; + } } break; @@ -1818,7 +1999,7 @@ WRITELOG( "CHarvesterAO::RunL - ERequestHarvest" ); OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestHarvest" ); - // harvest new items first... + // harvest new items first if ( iQueue->ItemsInQueue() > 0 ) { WRITELOG( "CHarvesterAO::RunL - Items in queue - calling ReadItemFromQueueL()" ); @@ -1831,9 +2012,29 @@ else { WRITELOG( "CHarvesterAO::RunL - No items in main queue" ); + // If interrupts occured, check the normal placeholder array for possible items to + // be handled before moving on to container or ready placeholders + if( iPHArray.Count() > 0 ) + { + WRITELOG( "CHarvesterAO::RunL - Items found in placeholder array" ); + TRAPD( err, HandlePlaceholdersL( ETrue ) ); + + // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared + if ( err != KErrNone ) + { + if( err != KErrDiskFull ) + { + iPHArray.ResetAndDestroy(); + iTempReadyPHArray.ResetAndDestroy(); + } + User::Leave( err ); + } + SetNextRequest( ERequestHarvest ); + break; + } // All registered fast harvested items or placeholders handled at this point // if container files to harvest, handle those next - if( iContainerPHArray.Count() > 0 ) + else if( iContainerPHArray.Count() > 0 ) { WRITELOG( "CHarvesterAO::RunL - Items in iContainterPHArray - requesting ERequestContainerPlaceholder handling" ); iFastHarvestNeeded = EFalse; @@ -1864,8 +2065,8 @@ WRITELOG1("CHarvesterAO::RunL - items in ready pharray: %d", arrayCount ); OstTrace1( TRACE_NORMAL, DUP3_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - items in ready pharray: %d", arrayCount ); #endif - TInt endIndex( KPlaceholderQueueSize ); - if( arrayCount < KPlaceholderQueueSize ) + TInt endIndex( KReadyPlaceholderQueueSize ); + if( arrayCount < KReadyPlaceholderQueueSize ) { endIndex = arrayCount; } @@ -1907,20 +2108,27 @@ while( i < count ) { CHarvesterData* hd = iContainerPHArray[0]; - iPHArray.Append( hd ); + if( iPHArray.Append( hd ) != KErrNone ) + { + delete hd; + hd = NULL; + } iContainerPHArray.Remove( 0 ); i++; } TRAPD( err, HandlePlaceholdersL( EFalse ) ); - // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared - if ( err != KErrNone ) - { - iContainerPHArray.ResetAndDestroy(); - iPHArray.ResetAndDestroy(); - iTempReadyPHArray.ResetAndDestroy(); - User::Leave( err ); - } + // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared + if ( err != KErrNone ) + { + if( err != KErrDiskFull ) + { + iContainerPHArray.ResetAndDestroy(); + iPHArray.ResetAndDestroy(); + iTempReadyPHArray.ResetAndDestroy(); + } + User::Leave( err ); + } SetNextRequest( ERequestHarvest ); } break; @@ -1931,6 +2139,7 @@ WRITELOG( "CHarvesterAO::RunL - ERequestPause" ); OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestPause" ); User::LeaveIfError( PauseHarvester() ); + iManualPauseEnabled = ETrue; iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStatePaused ); if( iHarvesterStatusObserver ) { @@ -1944,6 +2153,19 @@ { WRITELOG( "CHarvesterAO::RunL - ERequestResume" ); OstTrace0( TRACE_NORMAL, DUP7_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestResume" ); + iManualPauseEnabled = EFalse; + // If for some reason, mds session is not (yet) ready, only inform that + // server state is no longer paused, but do not restart actual harvesting + // yet. + if( !iMdeSessionInitialized ) + { + iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateResumed ); + if( iHarvesterStatusObserver ) + { + iHarvesterStatusObserver->ResumeReady( KErrNone ); + } + break; + } ResumeHarvesterL(); iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateResumed ); if( iHarvesterStatusObserver ) @@ -1980,7 +2202,7 @@ // TInt CHarvesterAO::RunError( TInt aError ) { - WRITELOG( "CHarvesterAO::RunError" ); + WRITELOG1( "CHarvesterAO::RunError, error: %d", aError ); OstTrace0( TRACE_NORMAL, CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError" ); switch( iNextRequest ) @@ -1989,6 +2211,21 @@ { WRITELOG( "CHarvesterAO::RunError - state ERequestHarvest" ); OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - state ERequestHarvest" ); + if( aError == KErrDiskFull || aError == KErrNoMemory ) + { + SetNextRequest( ERequestIdle ); + } + } + break; + + case ERequestContainerPlaceholder: + { + WRITELOG( "CHarvesterAO::RunError - state ERequestContainerPlaceholder" ); + OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError - state ERequestContainerPlaceholder" ); + if( aError == KErrDiskFull || aError == KErrNoMemory ) + { + SetNextRequest( ERequestIdle ); + } } break; @@ -2105,14 +2342,14 @@ if( MMdSHarvesterDiskSpaceObserver::EMore == aDiskSpaceDirection ) { - WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk full"); - OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk full" ); + WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk space available"); + OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk space available" ); iDiskFull = EFalse; } else { - WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk space available"); - OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk space available" ); + WRITELOG("CHarvesterAO::HandleDiskSpaceNotificationL() - disk full"); + OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL, "CHarvesterAO::HandleDiskSpaceNotificationL - disk full" ); iDiskFull = ETrue; if( iServerPaused ) { @@ -2126,7 +2363,7 @@ PauseMonitoring(); PauseHarvester(); } - else if( !iRamFull && !iManualPauseEnabled && iServerPaused ) + else if( iServerPaused ) { // resume monitoring ResumeMonitoring(); @@ -2320,6 +2557,7 @@ else { delete hd; + hd = NULL; err = KErrUnknown; } @@ -2327,6 +2565,10 @@ { aMessage.Complete( err ); } + else if( err != KErrNone ) + { + HarvestCompleted( aMessage.Identity(), uri->Des(), err ); + } albumIds.Close(); } @@ -2517,6 +2759,7 @@ else { delete hd; + hd = NULL; err = KErrUnknown; } @@ -2524,6 +2767,10 @@ { aMessage.Complete( err ); } + else if( err != KErrNone ) + { + HarvestCompleted( aMessage.Identity(), uri->Des(), err ); + } albumIds.Close(); } @@ -2687,7 +2934,6 @@ continue; } - //if (aMessage.Identity() == msg.Identity()) if( &req.iSession == &aSession ) { err = KErrNone; @@ -2941,25 +3187,6 @@ { WRITELOG("CHarvesterAO::BootScanL() - begin"); OstTrace0( TRACE_NORMAL, CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - begin" ); - - TInt drive( -1 ); - TInt massStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) ); - if( massStorageError == KErrNone ) - { - TVolumeInfo massStorageVolumeInfo; - iFs.Volume( massStorageVolumeInfo, drive ); - const TUint32 massStorageMediaId( massStorageVolumeInfo.iUniqueID ); - massStorageError = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive ); - if( massStorageError == KErrNone ) - { - iFs.Volume( massStorageVolumeInfo, drive ); - // Update mass storage media id if the mass storage is not memory card - if( massStorageVolumeInfo.iUniqueID != massStorageMediaId && massStorageMediaId != 0 ) - { - iMdEHarvesterSession->CheckMassStorageMediaId( massStorageMediaId ); - } - } - } TVolumeInfo volumeInfo; iFs.Volume( volumeInfo, EDriveC ); @@ -3041,9 +3268,11 @@ WRITELOG("CHarvesterAO::BootScanL() - scanFolders.AppendL"); OstTrace0( TRACE_NORMAL, DUP2_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - scanFolders.AppendL" ); TScanItem* item = new (ELeave) TScanItem(); + CleanupStack::PushL( item ); item->iPath = name->AllocL(); item->iPreinstalled = MdeConstants::MediaObject::ENotPreinstalled; - aScanItems.AppendL( item ); + CleanupStack::Pop( item ); + aScanItems.AppendL( item ); // ownership is transferred } } else @@ -3103,7 +3332,12 @@ hd->SetClientData( phData ); CleanupStack::Pop( phData ); - hdArray.Append( hd ); + + if(hdArray.Append( hd ) != KErrNone ) + { + delete hd; + hd = NULL; + } } CleanupStack::PopAndDestroy( &results ); CleanupStack::PopAndDestroy( &fileInfos ); @@ -3128,8 +3362,6 @@ iMdEHarvesterSession->RemoveFilesNotPresent( volumeInfo.iUniqueID, ETrue ); - iMassMemoryIdChecked = ETrue; - WRITELOG("CHarvesterAO::BootScanL() - end"); OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - end" ); } @@ -3222,9 +3454,10 @@ PauseMonitoring(); PauseHarvester(); - iPHArray.Compress(); - iReadyPHArray.Compress(); - iContainerPHArray.Compress(); + iReadyPHArray.Compress(); + iContainerPHArray.Compress(); + iPHArray.Compress(); + iTempReadyPHArray.Compress(); } void CHarvesterAO::MemoryGood() @@ -3234,7 +3467,7 @@ iRamFull = EFalse; - if( !iDiskFull && !iManualPauseEnabled && iServerPaused ) + if( iServerPaused ) { // resume monitoring ResumeMonitoring(); diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/harvesterqueue.cpp --- a/harvester/server/src/harvesterqueue.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/harvesterqueue.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -144,7 +144,7 @@ WRITELOG( "CHarvesterQueue::Append()" ); TInt err( KErrNone ); - if ( iBlacklist ) + if ( iBlacklist && aItem->Origin() != MdeConstants::Object::ECamera ) { TUint32 mediaId( 0 ); err = iMediaIdUtil->GetMediaId( aItem->Uri(), mediaId ); @@ -174,6 +174,7 @@ if ( aItem->ObjectType() == EFastHarvest || aItem->Origin() == MdeConstants::Object::ECamera ) { err = iItemQueue.Insert( aItem, 0 ); + if( !iHarvesterAO->IsActive() ) { iHarvesterAO->SetPriority( KHarvesterPriorityMonitorPlugin ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/harvesterserver.cpp --- a/harvester/server/src/harvesterserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/harvesterserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -162,7 +162,7 @@ WRITELOG( "CHarvesterServer::NewLC() - begin" ); CHarvesterServer* self = new (ELeave) CHarvesterServer( - CActive::EPriorityUserInput, KHarvesterServerPolicy, + KHarvesterServerHighPriority, KHarvesterServerPolicy, ESharableSessions ); CleanupStack::PushL( self ); self->ConstructL(); @@ -444,8 +444,11 @@ OstTrace0( TRACE_NORMAL, CHARVESTERSERVER_CHARVESTERSERVER, "CHarvesterServer::~CHarvesterServer" ); delete iHarvesterAO; + iHarvesterAO = NULL; delete iPauseObserverAO; + iPauseObserverAO = NULL; delete iShutdownObserver; + iShutdownObserver = NULL; OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERSERVER_CHARVESTERSERVER, "CHarvesterServer::~CHarvesterServer end" ); WRITELOG( "CHarvesterServer::~CHarvesterServer() end" ); diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/mdeobjecthandler.cpp --- a/harvester/server/src/mdeobjecthandler.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/mdeobjecthandler.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -126,7 +126,7 @@ CMdERelation* relation = iMdeSession->NewRelationLC( albumRelationDef, albumId, objectId, 0 ); - relationEventArray.Append( STATIC_CAST( CMdEInstanceItem*, relation ) ); + relationEventArray.AppendL( STATIC_CAST( CMdEInstanceItem*, relation ) ); CleanupStack::Pop(); //relation } } @@ -140,7 +140,7 @@ { CMdEEvent* event = iMdeSession->NewEventLC( *eventDef, objectId, time ); - relationEventArray.Append( STATIC_CAST( CMdEInstanceItem*, event ) ); + relationEventArray.AppendL( STATIC_CAST( CMdEInstanceItem*, event ) ); CleanupStack::Pop(); // event } } diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/ondemandao.cpp --- a/harvester/server/src/ondemandao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/ondemandao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -64,6 +64,7 @@ if( iMdEHarvesterSession ) { delete iMdEHarvesterSession; + iMdEHarvesterSession = NULL; } // Delete instance variables if any } @@ -71,7 +72,7 @@ void COnDemandAO::DoCancel() { WRITELOG("COnDemandAO::DoCancel"); - iMdEHarvesterSession->CancelHarvestingPrioritizationObserver (); + iMdEHarvesterSession->CancelHarvestingPrioritizationObserver(); } void COnDemandAO::StartL() @@ -79,7 +80,7 @@ WRITELOG("COnDemandAO::StartL"); // Cancel any request, just to be sure Cancel (); - iMdEHarvesterSession->SetHarvestingPrioritizationChunkL ( 16384 ); + iMdEHarvesterSession->SetHarvestingPrioritizationChunkL( 16384 ); WaitHarvestingRequest (); } @@ -115,8 +116,14 @@ hd->SetEventType( EHarvesterEdit ); hd->SetObjectType( EFastHarvest ); queue.Remove( k ); - queue.Insert( hd, 0 ); - found = ETrue; + + if(queue.Insert( hd, 0 ) != KErrNone) + { + delete hd; + hd = NULL; + } + + found = ETrue; } } } diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/src/reharvesterao.cpp --- a/harvester/server/src/reharvesterao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/src/reharvesterao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -19,8 +19,8 @@ #include "mdeobject.h" #include "mdsutils.h" -const TInt KResumeTime = 2000000; //microseconds -const TInt KTimeIncrease = 500000; //microseconds +const TInt KResumeTime = 3000000; //microseconds +const TInt KTimeIncrease = 1000000; //microseconds const TInt KTimeLimit = 30000000; //microseconds // --------------------------------------------------------------------------- @@ -165,19 +165,19 @@ WRITELOG1("CReHarvesterAO::AddItem() - %S already exists in re-harvester queue", &aItem->Uri() ); #endif delete aItem; + aItem = NULL; return; } } - CMdEObject* mdeObject = &aItem->MdeObject(); - if( mdeObject ) - { - delete mdeObject; - aItem->SetMdeObject( NULL ); - } + aItem->SetMdeObject( NULL ); - iItems.Append( aItem ); - + if(iItems.Append( aItem ) != KErrNone ) + { + delete aItem; + aItem = NULL; + } + iDelay = KResumeTime; const TTimeIntervalMicroSeconds32 delay = TTimeIntervalMicroSeconds32( iDelay ); @@ -206,6 +206,7 @@ // found matching item iItems.Remove( i ); delete item; + item = NULL; } if ( iItems.Count() == 0 ) diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/traces/fixed_id.definitions --- a/harvester/server/traces/fixed_id.definitions Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/traces/fixed_id.definitions Fri Sep 17 16:54:49 2010 +0300 @@ -1,197 +1,198 @@ #Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]TRACE_NORMAL=0x86 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_BACKUPRESTOREREADY=0x63 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_BACKUPRESTORESTART=0x62 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_BOOTPARTIALRESTORESCANL=0x95 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_BOOTROMSCANL=0x94 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_BOOTSCANL=0x97 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_CHARVESTERAO=0x3 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x26 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_CONSTRUCTL=0x5 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4b -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8c -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_DELETECOMPOSERS=0x1f -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_DELETEMONITORPLUGINS=0x9 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_DOCANCEL=0x5a -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_GETLASTOBSERVERID=0x8b -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x64 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x22 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HANDLESESSIONERROR=0x4a -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HANDLESESSIONOPENED=0x3c -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HANDLEUNMOUNT=0x10 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HARVESTCOMPLETED=0x92 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HARVESTFILE=0x67 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HARVESTFILEWITHUID=0x72 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_HARVESTINGCOMPLETED=0x2f -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_ISCOMPOSINGREADY=0x20 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_ISSERVERPAUSED=0x61 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_LOADMONITORPLUGINSL=0x7 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_MEMORYGOOD=0x9e -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_MEMORYLOW=0x9d -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_NEWL=0x2 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_NEWLC=0x1 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_PAUSEHARVESTER=0x4e -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_PAUSEMONITORING=0xd -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_READITEMFROMQUEUEL=0x21 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_REGISTERHARVESTCOMPLETE=0x87 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_REGISTERHARVESTEREVENT=0x89 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7d -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_RESUMEHARVESTERL=0x50 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_RESUMEMONITORING=0xf -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_RUNERROR=0x5b -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_RUNL=0x51 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_SETNEXTREQUEST=0x60 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_STARTCOMPOSERSL=0x1d -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_STARTMONITORING=0xb -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_STOPCOMPOSERS=0x1e -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_STOPMONITORING=0xc -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_UNREGISTERHARVESTCOMPLETE=0x88 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_UNREGISTERHARVESTEREVENT=0x8a -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x83 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION=0xc0 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_CONSTRUCTL=0xbf -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_DISCONNECT=0xc3 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_NEWL=0xbd -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_NEWLC=0xbe -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVERSESSION_SERVICEL=0xc2 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_CHARVESTERSERVER=0xb1 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_CONSTRUCTL=0x9f -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_HARVESTFILE=0xa9 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_HARVESTFILEWITHUID=0xaa -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_NEWSESSIONL=0xb5 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_PANICCLIENT=0xb3 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_PANICSERVER=0xb4 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_PAUSE=0xa1 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_PAUSEREADY=0xa5 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_REGISTERHARVESTCOMPLETE=0xad -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_REGISTERHARVESTEREVENT=0xaf -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_REGISTERPROCESSORIGIN=0xab -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_RESTARTNOTIFICATION=0xa8 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_RESUME=0xa2 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_RESUMEREADY=0xa6 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_RUNERROR=0xb7 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_SHUTDOWNNOTIFICATION=0xa7 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_THREADFUNCTION=0xba -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_THREADFUNCTIONL=0xb8 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_UNREGISTERHARVESTCOMPLETE=0xae -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_UNREGISTERHARVESTEREVENT=0xb0 -[TRACE]TRACE_NORMAL[0x86]_CHARVESTERSERVER_UNREGISTERPROCESSORIGIN=0xac -[TRACE]TRACE_NORMAL[0x86]_DUP10_CHARVESTERAO_HANDLESESSIONOPENED=0x46 -[TRACE]TRACE_NORMAL[0x86]_DUP10_CHARVESTERAO_HANDLEUNMOUNT=0x19 -[TRACE]TRACE_NORMAL[0x86]_DUP10_CHARVESTERAO_HARVESTFILE=0x71 -[TRACE]TRACE_NORMAL[0x86]_DUP10_CHARVESTERAO_HARVESTFILEWITHUID=0x7c -[TRACE]TRACE_NORMAL[0x86]_DUP10_CHARVESTERAO_HARVESTINGCOMPLETED=0x39 -[TRACE]TRACE_NORMAL[0x86]_DUP11_CHARVESTERAO_HANDLESESSIONOPENED=0x47 -[TRACE]TRACE_NORMAL[0x86]_DUP11_CHARVESTERAO_HANDLEUNMOUNT=0x1a -[TRACE]TRACE_NORMAL[0x86]_DUP11_CHARVESTERAO_HARVESTINGCOMPLETED=0x3a -[TRACE]TRACE_NORMAL[0x86]_DUP12_CHARVESTERAO_HANDLESESSIONOPENED=0x48 -[TRACE]TRACE_NORMAL[0x86]_DUP12_CHARVESTERAO_HANDLEUNMOUNT=0x1b -[TRACE]TRACE_NORMAL[0x86]_DUP12_CHARVESTERAO_HARVESTINGCOMPLETED=0x3b -[TRACE]TRACE_NORMAL[0x86]_DUP13_CHARVESTERAO_HANDLESESSIONOPENED=0x49 -[TRACE]TRACE_NORMAL[0x86]_DUP13_CHARVESTERAO_HANDLEUNMOUNT=0x1c -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_BOOTPARTIALRESTORESCANL=0x96 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_BOOTSCANL=0x98 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_CHARVESTERAO=0x4 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x27 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_CONSTRUCTL=0x6 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4c -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8d -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_DELETEMONITORPLUGINS=0xa -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x65 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x23 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HANDLESESSIONOPENED=0x3d -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HANDLEUNMOUNT=0x11 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HARVESTCOMPLETED=0x93 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HARVESTFILE=0x68 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HARVESTFILEWITHUID=0x73 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_HARVESTINGCOMPLETED=0x38 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_LOADMONITORPLUGINSL=0x8 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_PAUSEHARVESTER=0x4f -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_PAUSEMONITORING=0xe -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7e -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_RUNERROR=0x5c -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_RUNL=0x52 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x84 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION=0xc1 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_CHARVESTERSERVER=0xb2 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_CONSTRUCTL=0xa0 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_NEWSESSIONL=0xb6 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_PAUSE=0xa3 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_RESUME=0xa4 -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_THREADFUNCTION=0xbb -[TRACE]TRACE_NORMAL[0x86]_DUP1_CHARVESTERSERVER_THREADFUNCTIONL=0xb9 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_BOOTSCANL=0x99 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x28 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4d -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8e -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x66 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x24 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HANDLESESSIONOPENED=0x3e -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HANDLEUNMOUNT=0x12 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HARVESTFILE=0x69 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HARVESTFILEWITHUID=0x74 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_HARVESTINGCOMPLETED=0x30 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7f -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_RUNERROR=0x5d -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_RUNL=0x53 -[TRACE]TRACE_NORMAL[0x86]_DUP2_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x85 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_BOOTSCANL=0x9a -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x29 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8f -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x25 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HANDLESESSIONOPENED=0x3f -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HANDLEUNMOUNT=0x13 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HARVESTFILE=0x6a -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HARVESTFILEWITHUID=0x75 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_HARVESTINGCOMPLETED=0x31 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_REGISTERPROCESSORIGIN=0x80 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_RUNERROR=0x5e -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_RUNL=0x54 -[TRACE]TRACE_NORMAL[0x86]_DUP3_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x86 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_BOOTSCANL=0x9b -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2a -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x90 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_HANDLESESSIONOPENED=0x40 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_HANDLEUNMOUNT=0x14 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_HARVESTFILE=0x6b -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_HARVESTFILEWITHUID=0x76 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_HARVESTINGCOMPLETED=0x32 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_REGISTERPROCESSORIGIN=0x81 -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_RUNERROR=0x5f -[TRACE]TRACE_NORMAL[0x86]_DUP4_CHARVESTERAO_RUNL=0x55 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_BOOTSCANL=0x9c -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2b -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x91 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_HANDLESESSIONOPENED=0x41 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_HANDLEUNMOUNT=0x15 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_HARVESTFILE=0x6c -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_HARVESTFILEWITHUID=0x77 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_HARVESTINGCOMPLETED=0x33 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_REGISTERPROCESSORIGIN=0x82 -[TRACE]TRACE_NORMAL[0x86]_DUP5_CHARVESTERAO_RUNL=0x56 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2c -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_HANDLESESSIONOPENED=0x42 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_HANDLEUNMOUNT=0x16 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_HARVESTFILE=0x6d -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_HARVESTFILEWITHUID=0x78 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_HARVESTINGCOMPLETED=0x34 -[TRACE]TRACE_NORMAL[0x86]_DUP6_CHARVESTERAO_RUNL=0x57 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2d -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_HANDLESESSIONOPENED=0x43 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_HANDLEUNMOUNT=0x17 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_HARVESTFILE=0x6e -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_HARVESTFILEWITHUID=0x79 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_HARVESTINGCOMPLETED=0x35 -[TRACE]TRACE_NORMAL[0x86]_DUP7_CHARVESTERAO_RUNL=0x58 -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2e -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_HANDLESESSIONOPENED=0x44 -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_HANDLEUNMOUNT=0x18 -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_HARVESTFILE=0x6f -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_HARVESTFILEWITHUID=0x7a -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_HARVESTINGCOMPLETED=0x36 -[TRACE]TRACE_NORMAL[0x86]_DUP8_CHARVESTERAO_RUNL=0x59 -[TRACE]TRACE_NORMAL[0x86]_DUP9_CHARVESTERAO_HANDLESESSIONOPENED=0x45 -[TRACE]TRACE_NORMAL[0x86]_DUP9_CHARVESTERAO_HARVESTFILE=0x70 -[TRACE]TRACE_NORMAL[0x86]_DUP9_CHARVESTERAO_HARVESTFILEWITHUID=0x7b -[TRACE]TRACE_NORMAL[0x86]_DUP9_CHARVESTERAO_HARVESTINGCOMPLETED=0x37 -[TRACE]TRACE_NORMAL[0x86]__E32MAIN=0xbc +[GROUP]TRACE_NORMAL=0x3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_BACKUPRESTOREREADY=0x63 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_BACKUPRESTORESTART=0x62 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_BOOTPARTIALRESTORESCANL=0x95 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_BOOTROMSCANL=0x94 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_BOOTSCANL=0x97 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_CHARVESTERAO=0x3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x26 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_CONSTRUCTL=0x5 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4b +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8c +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_DELETECOMPOSERS=0x1f +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_DELETEMONITORPLUGINS=0x9 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_DOCANCEL=0x5a +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_GETLASTOBSERVERID=0x8b +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x64 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x22 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HANDLESESSIONERROR=0x4a +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HANDLESESSIONOPENED=0x3c +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HANDLEUNMOUNT=0x10 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HARVESTCOMPLETED=0x92 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HARVESTFILE=0x67 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HARVESTFILEWITHUID=0x72 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_HARVESTINGCOMPLETED=0x2f +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_ISCOMPOSINGREADY=0x20 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_ISSERVERPAUSED=0x61 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_LOADMONITORPLUGINSL=0x7 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_MEMORYGOOD=0x9e +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_MEMORYLOW=0x9d +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_NEWL=0x2 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_NEWLC=0x1 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_PAUSEHARVESTER=0x4e +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_PAUSEMONITORING=0xd +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_READITEMFROMQUEUEL=0x21 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_REGISTERHARVESTCOMPLETE=0x87 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_REGISTERHARVESTEREVENT=0x89 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7d +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_RESUMEHARVESTERL=0x50 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_RESUMEMONITORING=0xf +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_RUNERROR=0x5b +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_RUNL=0x51 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_SETNEXTREQUEST=0x60 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_STARTCOMPOSERSL=0x1d +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_STARTMONITORING=0xb +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_STOPCOMPOSERS=0x1e +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_STOPMONITORING=0xc +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_UNREGISTERHARVESTCOMPLETE=0x88 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_UNREGISTERHARVESTEREVENT=0x8a +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x83 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION=0xc0 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_CONSTRUCTL=0xbf +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_DISCONNECT=0xc3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_NEWL=0xbd +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_NEWLC=0xbe +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVERSESSION_SERVICEL=0xc2 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_CHARVESTERSERVER=0xb1 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_CONSTRUCTL=0x9f +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_HARVESTFILE=0xa9 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_HARVESTFILEWITHUID=0xaa +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_NEWSESSIONL=0xb5 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_PANICCLIENT=0xb3 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_PANICSERVER=0xb4 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_PAUSE=0xa1 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_PAUSEREADY=0xa5 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_REGISTERHARVESTCOMPLETE=0xad +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_REGISTERHARVESTEREVENT=0xaf +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_REGISTERPROCESSORIGIN=0xab +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_RESTARTNOTIFICATION=0xa8 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_RESUME=0xa2 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_RESUMEREADY=0xa6 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_RUNERROR=0xb7 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_SHUTDOWNNOTIFICATION=0xa7 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_THREADFUNCTION=0xba +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_THREADFUNCTIONL=0xb8 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_UNREGISTERHARVESTCOMPLETE=0xae +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_UNREGISTERHARVESTEREVENT=0xb0 +[TRACE]TRACE_NORMAL[0x3]_CHARVESTERSERVER_UNREGISTERPROCESSORIGIN=0xac +[TRACE]TRACE_NORMAL[0x3]_DUP10_CHARVESTERAO_HANDLESESSIONOPENED=0x46 +[TRACE]TRACE_NORMAL[0x3]_DUP10_CHARVESTERAO_HANDLEUNMOUNT=0x19 +[TRACE]TRACE_NORMAL[0x3]_DUP10_CHARVESTERAO_HARVESTFILE=0x71 +[TRACE]TRACE_NORMAL[0x3]_DUP10_CHARVESTERAO_HARVESTFILEWITHUID=0x7c +[TRACE]TRACE_NORMAL[0x3]_DUP10_CHARVESTERAO_HARVESTINGCOMPLETED=0x39 +[TRACE]TRACE_NORMAL[0x3]_DUP11_CHARVESTERAO_HANDLESESSIONOPENED=0x47 +[TRACE]TRACE_NORMAL[0x3]_DUP11_CHARVESTERAO_HANDLEUNMOUNT=0x1a +[TRACE]TRACE_NORMAL[0x3]_DUP11_CHARVESTERAO_HARVESTINGCOMPLETED=0x3a +[TRACE]TRACE_NORMAL[0x3]_DUP12_CHARVESTERAO_HANDLESESSIONOPENED=0x48 +[TRACE]TRACE_NORMAL[0x3]_DUP12_CHARVESTERAO_HANDLEUNMOUNT=0x1b +[TRACE]TRACE_NORMAL[0x3]_DUP12_CHARVESTERAO_HARVESTINGCOMPLETED=0x3b +[TRACE]TRACE_NORMAL[0x3]_DUP13_CHARVESTERAO_HANDLESESSIONOPENED=0x49 +[TRACE]TRACE_NORMAL[0x3]_DUP13_CHARVESTERAO_HANDLEUNMOUNT=0x1c +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_BOOTPARTIALRESTORESCANL=0x96 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_BOOTSCANL=0x98 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_CHARVESTERAO=0x4 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x27 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_CONSTRUCTL=0x6 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4c +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8d +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_DELETEMONITORPLUGINS=0xa +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x65 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x23 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HANDLESESSIONOPENED=0x3d +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HANDLEUNMOUNT=0x11 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HARVESTCOMPLETED=0x93 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HARVESTFILE=0x68 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HARVESTFILEWITHUID=0x73 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_HARVESTINGCOMPLETED=0x38 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_LOADMONITORPLUGINSL=0x8 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_PAUSEHARVESTER=0x4f +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_PAUSEMONITORING=0xe +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7e +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_RUNERROR=0x5c +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_RUNL=0x52 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x84 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION=0xc1 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_CHARVESTERSERVER=0xb2 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_CONSTRUCTL=0xa0 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_NEWSESSIONL=0xb6 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_PAUSE=0xa3 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_RESUME=0xa4 +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_THREADFUNCTION=0xbb +[TRACE]TRACE_NORMAL[0x3]_DUP1_CHARVESTERSERVER_THREADFUNCTIONL=0xb9 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_BOOTSCANL=0x99 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x28 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS=0x4d +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8e +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL=0x66 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x24 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HANDLESESSIONOPENED=0x3e +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HANDLEUNMOUNT=0x12 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HARVESTFILE=0x69 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HARVESTFILEWITHUID=0x74 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_HARVESTINGCOMPLETED=0x30 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_REGISTERPROCESSORIGIN=0x7f +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_RUNERROR=0x5d +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_RUNL=0x53 +[TRACE]TRACE_NORMAL[0x3]_DUP2_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x85 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_BOOTSCANL=0x9a +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x29 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x8f +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HANDLEPLACEHOLDERSL=0x25 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HANDLESESSIONOPENED=0x3f +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HANDLEUNMOUNT=0x13 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HARVESTFILE=0x6a +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HARVESTFILEWITHUID=0x75 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_HARVESTINGCOMPLETED=0x31 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_REGISTERPROCESSORIGIN=0x80 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_RUNERROR=0x5e +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_RUNL=0x54 +[TRACE]TRACE_NORMAL[0x3]_DUP3_CHARVESTERAO_UNREGISTERPROCESSORIGIN=0x86 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_BOOTSCANL=0x9b +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2a +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x90 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_HANDLESESSIONOPENED=0x40 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_HANDLEUNMOUNT=0x14 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_HARVESTFILE=0x6b +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_HARVESTFILEWITHUID=0x76 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_HARVESTINGCOMPLETED=0x32 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_REGISTERPROCESSORIGIN=0x81 +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_RUNERROR=0x5f +[TRACE]TRACE_NORMAL[0x3]_DUP4_CHARVESTERAO_RUNL=0x55 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_BOOTSCANL=0x9c +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2b +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS=0x91 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_HANDLESESSIONOPENED=0x41 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_HANDLEUNMOUNT=0x15 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_HARVESTFILE=0x6c +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_HARVESTFILEWITHUID=0x77 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_HARVESTINGCOMPLETED=0x33 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_REGISTERPROCESSORIGIN=0x82 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_RUNERROR=0xc4 +[TRACE]TRACE_NORMAL[0x3]_DUP5_CHARVESTERAO_RUNL=0x56 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2c +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_HANDLESESSIONOPENED=0x42 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_HANDLEUNMOUNT=0x16 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_HARVESTFILE=0x6d +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_HARVESTFILEWITHUID=0x78 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_HARVESTINGCOMPLETED=0x34 +[TRACE]TRACE_NORMAL[0x3]_DUP6_CHARVESTERAO_RUNL=0x57 +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2d +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_HANDLESESSIONOPENED=0x43 +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_HANDLEUNMOUNT=0x17 +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_HARVESTFILE=0x6e +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_HARVESTFILEWITHUID=0x79 +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_HARVESTINGCOMPLETED=0x35 +[TRACE]TRACE_NORMAL[0x3]_DUP7_CHARVESTERAO_RUNL=0x58 +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL=0x2e +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_HANDLESESSIONOPENED=0x44 +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_HANDLEUNMOUNT=0x18 +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_HARVESTFILE=0x6f +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_HARVESTFILEWITHUID=0x7a +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_HARVESTINGCOMPLETED=0x36 +[TRACE]TRACE_NORMAL[0x3]_DUP8_CHARVESTERAO_RUNL=0x59 +[TRACE]TRACE_NORMAL[0x3]_DUP9_CHARVESTERAO_HANDLESESSIONOPENED=0x45 +[TRACE]TRACE_NORMAL[0x3]_DUP9_CHARVESTERAO_HARVESTFILE=0x70 +[TRACE]TRACE_NORMAL[0x3]_DUP9_CHARVESTERAO_HARVESTFILEWITHUID=0x7b +[TRACE]TRACE_NORMAL[0x3]_DUP9_CHARVESTERAO_HARVESTINGCOMPLETED=0x37 +[TRACE]TRACE_NORMAL[0x3]__E32MAIN=0xbc diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/traces/harvesteraoTraces.h --- a/harvester/server/traces/harvesteraoTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/traces/harvesteraoTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTERAOTRACES_H__ @@ -6,164 +6,165 @@ #define KOstTraceComponentID 0x200009f5 -#define CHARVESTERAO_NEWLC 0x860001 -#define CHARVESTERAO_NEWL 0x860002 -#define CHARVESTERAO_CHARVESTERAO 0x860003 -#define DUP1_CHARVESTERAO_CHARVESTERAO 0x860004 -#define CHARVESTERAO_CONSTRUCTL 0x860005 -#define DUP1_CHARVESTERAO_CONSTRUCTL 0x860006 -#define CHARVESTERAO_LOADMONITORPLUGINSL 0x860007 -#define DUP1_CHARVESTERAO_LOADMONITORPLUGINSL 0x860008 -#define CHARVESTERAO_DELETEMONITORPLUGINS 0x860009 -#define DUP1_CHARVESTERAO_DELETEMONITORPLUGINS 0x86000a -#define CHARVESTERAO_STARTMONITORING 0x86000b -#define CHARVESTERAO_STOPMONITORING 0x86000c -#define CHARVESTERAO_PAUSEMONITORING 0x86000d -#define DUP1_CHARVESTERAO_PAUSEMONITORING 0x86000e -#define CHARVESTERAO_RESUMEMONITORING 0x86000f -#define CHARVESTERAO_HANDLEUNMOUNT 0x860010 -#define DUP1_CHARVESTERAO_HANDLEUNMOUNT 0x860011 -#define DUP2_CHARVESTERAO_HANDLEUNMOUNT 0x860012 -#define DUP3_CHARVESTERAO_HANDLEUNMOUNT 0x860013 -#define DUP4_CHARVESTERAO_HANDLEUNMOUNT 0x860014 -#define DUP5_CHARVESTERAO_HANDLEUNMOUNT 0x860015 -#define DUP6_CHARVESTERAO_HANDLEUNMOUNT 0x860016 -#define DUP7_CHARVESTERAO_HANDLEUNMOUNT 0x860017 -#define DUP8_CHARVESTERAO_HANDLEUNMOUNT 0x860018 -#define DUP10_CHARVESTERAO_HANDLEUNMOUNT 0x860019 -#define DUP11_CHARVESTERAO_HANDLEUNMOUNT 0x86001a -#define DUP12_CHARVESTERAO_HANDLEUNMOUNT 0x86001b -#define DUP13_CHARVESTERAO_HANDLEUNMOUNT 0x86001c -#define CHARVESTERAO_STARTCOMPOSERSL 0x86001d -#define CHARVESTERAO_STOPCOMPOSERS 0x86001e -#define CHARVESTERAO_DELETECOMPOSERS 0x86001f -#define CHARVESTERAO_ISCOMPOSINGREADY 0x860020 -#define CHARVESTERAO_READITEMFROMQUEUEL 0x860021 -#define CHARVESTERAO_HANDLEPLACEHOLDERSL 0x860022 -#define DUP1_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x860023 -#define DUP2_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x860024 -#define DUP3_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x860025 -#define CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x860026 -#define DUP1_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x860027 -#define DUP2_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x860028 -#define DUP3_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x860029 -#define DUP4_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x86002a -#define DUP5_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x86002b -#define DUP6_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x86002c -#define DUP7_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x86002d -#define DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x86002e -#define CHARVESTERAO_HARVESTINGCOMPLETED 0x86002f -#define DUP2_CHARVESTERAO_HARVESTINGCOMPLETED 0x860030 -#define DUP3_CHARVESTERAO_HARVESTINGCOMPLETED 0x860031 -#define DUP4_CHARVESTERAO_HARVESTINGCOMPLETED 0x860032 -#define DUP5_CHARVESTERAO_HARVESTINGCOMPLETED 0x860033 -#define DUP6_CHARVESTERAO_HARVESTINGCOMPLETED 0x860034 -#define DUP7_CHARVESTERAO_HARVESTINGCOMPLETED 0x860035 -#define DUP8_CHARVESTERAO_HARVESTINGCOMPLETED 0x860036 -#define DUP9_CHARVESTERAO_HARVESTINGCOMPLETED 0x860037 -#define DUP1_CHARVESTERAO_HARVESTINGCOMPLETED 0x860038 -#define DUP10_CHARVESTERAO_HARVESTINGCOMPLETED 0x860039 -#define DUP11_CHARVESTERAO_HARVESTINGCOMPLETED 0x86003a -#define DUP12_CHARVESTERAO_HARVESTINGCOMPLETED 0x86003b -#define CHARVESTERAO_HANDLESESSIONOPENED 0x86003c -#define DUP1_CHARVESTERAO_HANDLESESSIONOPENED 0x86003d -#define DUP2_CHARVESTERAO_HANDLESESSIONOPENED 0x86003e -#define DUP3_CHARVESTERAO_HANDLESESSIONOPENED 0x86003f -#define DUP4_CHARVESTERAO_HANDLESESSIONOPENED 0x860040 -#define DUP5_CHARVESTERAO_HANDLESESSIONOPENED 0x860041 -#define DUP6_CHARVESTERAO_HANDLESESSIONOPENED 0x860042 -#define DUP7_CHARVESTERAO_HANDLESESSIONOPENED 0x860043 -#define DUP8_CHARVESTERAO_HANDLESESSIONOPENED 0x860044 -#define DUP9_CHARVESTERAO_HANDLESESSIONOPENED 0x860045 -#define DUP10_CHARVESTERAO_HANDLESESSIONOPENED 0x860046 -#define DUP11_CHARVESTERAO_HANDLESESSIONOPENED 0x860047 -#define DUP12_CHARVESTERAO_HANDLESESSIONOPENED 0x860048 -#define DUP13_CHARVESTERAO_HANDLESESSIONOPENED 0x860049 -#define CHARVESTERAO_HANDLESESSIONERROR 0x86004a -#define CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x86004b -#define DUP1_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x86004c -#define DUP2_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x86004d -#define CHARVESTERAO_PAUSEHARVESTER 0x86004e -#define DUP1_CHARVESTERAO_PAUSEHARVESTER 0x86004f -#define CHARVESTERAO_RESUMEHARVESTERL 0x860050 -#define CHARVESTERAO_RUNL 0x860051 -#define DUP1_CHARVESTERAO_RUNL 0x860052 -#define DUP2_CHARVESTERAO_RUNL 0x860053 -#define DUP3_CHARVESTERAO_RUNL 0x860054 -#define DUP4_CHARVESTERAO_RUNL 0x860055 -#define DUP5_CHARVESTERAO_RUNL 0x860056 -#define DUP6_CHARVESTERAO_RUNL 0x860057 -#define DUP7_CHARVESTERAO_RUNL 0x860058 -#define DUP8_CHARVESTERAO_RUNL 0x860059 -#define CHARVESTERAO_DOCANCEL 0x86005a -#define CHARVESTERAO_RUNERROR 0x86005b -#define DUP1_CHARVESTERAO_RUNERROR 0x86005c -#define DUP2_CHARVESTERAO_RUNERROR 0x86005d -#define DUP3_CHARVESTERAO_RUNERROR 0x86005e -#define DUP4_CHARVESTERAO_RUNERROR 0x86005f -#define CHARVESTERAO_SETNEXTREQUEST 0x860060 -#define CHARVESTERAO_ISSERVERPAUSED 0x860061 -#define CHARVESTERAO_BACKUPRESTORESTART 0x860062 -#define CHARVESTERAO_BACKUPRESTOREREADY 0x860063 -#define CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x860064 -#define DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x860065 -#define DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x860066 -#define CHARVESTERAO_HARVESTFILE 0x860067 -#define DUP1_CHARVESTERAO_HARVESTFILE 0x860068 -#define DUP2_CHARVESTERAO_HARVESTFILE 0x860069 -#define DUP3_CHARVESTERAO_HARVESTFILE 0x86006a -#define DUP4_CHARVESTERAO_HARVESTFILE 0x86006b -#define DUP5_CHARVESTERAO_HARVESTFILE 0x86006c -#define DUP6_CHARVESTERAO_HARVESTFILE 0x86006d -#define DUP7_CHARVESTERAO_HARVESTFILE 0x86006e -#define DUP8_CHARVESTERAO_HARVESTFILE 0x86006f -#define DUP9_CHARVESTERAO_HARVESTFILE 0x860070 -#define DUP10_CHARVESTERAO_HARVESTFILE 0x860071 -#define CHARVESTERAO_HARVESTFILEWITHUID 0x860072 -#define DUP1_CHARVESTERAO_HARVESTFILEWITHUID 0x860073 -#define DUP2_CHARVESTERAO_HARVESTFILEWITHUID 0x860074 -#define DUP3_CHARVESTERAO_HARVESTFILEWITHUID 0x860075 -#define DUP4_CHARVESTERAO_HARVESTFILEWITHUID 0x860076 -#define DUP5_CHARVESTERAO_HARVESTFILEWITHUID 0x860077 -#define DUP6_CHARVESTERAO_HARVESTFILEWITHUID 0x860078 -#define DUP7_CHARVESTERAO_HARVESTFILEWITHUID 0x860079 -#define DUP8_CHARVESTERAO_HARVESTFILEWITHUID 0x86007a -#define DUP9_CHARVESTERAO_HARVESTFILEWITHUID 0x86007b -#define DUP10_CHARVESTERAO_HARVESTFILEWITHUID 0x86007c -#define CHARVESTERAO_REGISTERPROCESSORIGIN 0x86007d -#define DUP1_CHARVESTERAO_REGISTERPROCESSORIGIN 0x86007e -#define DUP2_CHARVESTERAO_REGISTERPROCESSORIGIN 0x86007f -#define DUP3_CHARVESTERAO_REGISTERPROCESSORIGIN 0x860080 -#define DUP4_CHARVESTERAO_REGISTERPROCESSORIGIN 0x860081 -#define DUP5_CHARVESTERAO_REGISTERPROCESSORIGIN 0x860082 -#define CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x860083 -#define DUP1_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x860084 -#define DUP2_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x860085 -#define DUP3_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x860086 -#define CHARVESTERAO_REGISTERHARVESTCOMPLETE 0x860087 -#define CHARVESTERAO_UNREGISTERHARVESTCOMPLETE 0x860088 -#define CHARVESTERAO_REGISTERHARVESTEREVENT 0x860089 -#define CHARVESTERAO_UNREGISTERHARVESTEREVENT 0x86008a -#define CHARVESTERAO_GETLASTOBSERVERID 0x86008b -#define CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x86008c -#define DUP1_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x86008d -#define DUP2_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x86008e -#define DUP3_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x86008f -#define DUP4_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x860090 -#define DUP5_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x860091 -#define CHARVESTERAO_HARVESTCOMPLETED 0x860092 -#define DUP1_CHARVESTERAO_HARVESTCOMPLETED 0x860093 -#define CHARVESTERAO_BOOTROMSCANL 0x860094 -#define CHARVESTERAO_BOOTPARTIALRESTORESCANL 0x860095 -#define DUP1_CHARVESTERAO_BOOTPARTIALRESTORESCANL 0x860096 -#define CHARVESTERAO_BOOTSCANL 0x860097 -#define DUP1_CHARVESTERAO_BOOTSCANL 0x860098 -#define DUP2_CHARVESTERAO_BOOTSCANL 0x860099 -#define DUP3_CHARVESTERAO_BOOTSCANL 0x86009a -#define DUP4_CHARVESTERAO_BOOTSCANL 0x86009b -#define DUP5_CHARVESTERAO_BOOTSCANL 0x86009c -#define CHARVESTERAO_MEMORYLOW 0x86009d -#define CHARVESTERAO_MEMORYGOOD 0x86009e +#define CHARVESTERAO_NEWLC 0x30001 +#define CHARVESTERAO_NEWL 0x30002 +#define CHARVESTERAO_CHARVESTERAO 0x30003 +#define DUP1_CHARVESTERAO_CHARVESTERAO 0x30004 +#define CHARVESTERAO_CONSTRUCTL 0x30005 +#define DUP1_CHARVESTERAO_CONSTRUCTL 0x30006 +#define CHARVESTERAO_LOADMONITORPLUGINSL 0x30007 +#define DUP1_CHARVESTERAO_LOADMONITORPLUGINSL 0x30008 +#define CHARVESTERAO_DELETEMONITORPLUGINS 0x30009 +#define DUP1_CHARVESTERAO_DELETEMONITORPLUGINS 0x3000a +#define CHARVESTERAO_STARTMONITORING 0x3000b +#define CHARVESTERAO_STOPMONITORING 0x3000c +#define CHARVESTERAO_PAUSEMONITORING 0x3000d +#define DUP1_CHARVESTERAO_PAUSEMONITORING 0x3000e +#define CHARVESTERAO_RESUMEMONITORING 0x3000f +#define CHARVESTERAO_HANDLEUNMOUNT 0x30010 +#define DUP1_CHARVESTERAO_HANDLEUNMOUNT 0x30011 +#define DUP2_CHARVESTERAO_HANDLEUNMOUNT 0x30012 +#define DUP3_CHARVESTERAO_HANDLEUNMOUNT 0x30013 +#define DUP4_CHARVESTERAO_HANDLEUNMOUNT 0x30014 +#define DUP5_CHARVESTERAO_HANDLEUNMOUNT 0x30015 +#define DUP6_CHARVESTERAO_HANDLEUNMOUNT 0x30016 +#define DUP7_CHARVESTERAO_HANDLEUNMOUNT 0x30017 +#define DUP8_CHARVESTERAO_HANDLEUNMOUNT 0x30018 +#define DUP10_CHARVESTERAO_HANDLEUNMOUNT 0x30019 +#define DUP11_CHARVESTERAO_HANDLEUNMOUNT 0x3001a +#define DUP12_CHARVESTERAO_HANDLEUNMOUNT 0x3001b +#define DUP13_CHARVESTERAO_HANDLEUNMOUNT 0x3001c +#define CHARVESTERAO_STARTCOMPOSERSL 0x3001d +#define CHARVESTERAO_STOPCOMPOSERS 0x3001e +#define CHARVESTERAO_DELETECOMPOSERS 0x3001f +#define CHARVESTERAO_ISCOMPOSINGREADY 0x30020 +#define CHARVESTERAO_READITEMFROMQUEUEL 0x30021 +#define CHARVESTERAO_HANDLEPLACEHOLDERSL 0x30022 +#define DUP1_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x30023 +#define DUP2_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x30024 +#define DUP3_CHARVESTERAO_HANDLEPLACEHOLDERSL 0x30025 +#define CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x30026 +#define DUP1_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x30027 +#define DUP2_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x30028 +#define DUP3_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x30029 +#define DUP4_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x3002a +#define DUP5_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x3002b +#define DUP6_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x3002c +#define DUP7_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x3002d +#define DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL 0x3002e +#define CHARVESTERAO_HARVESTINGCOMPLETED 0x3002f +#define DUP2_CHARVESTERAO_HARVESTINGCOMPLETED 0x30030 +#define DUP3_CHARVESTERAO_HARVESTINGCOMPLETED 0x30031 +#define DUP4_CHARVESTERAO_HARVESTINGCOMPLETED 0x30032 +#define DUP5_CHARVESTERAO_HARVESTINGCOMPLETED 0x30033 +#define DUP6_CHARVESTERAO_HARVESTINGCOMPLETED 0x30034 +#define DUP7_CHARVESTERAO_HARVESTINGCOMPLETED 0x30035 +#define DUP8_CHARVESTERAO_HARVESTINGCOMPLETED 0x30036 +#define DUP9_CHARVESTERAO_HARVESTINGCOMPLETED 0x30037 +#define DUP1_CHARVESTERAO_HARVESTINGCOMPLETED 0x30038 +#define DUP10_CHARVESTERAO_HARVESTINGCOMPLETED 0x30039 +#define DUP11_CHARVESTERAO_HARVESTINGCOMPLETED 0x3003a +#define DUP12_CHARVESTERAO_HARVESTINGCOMPLETED 0x3003b +#define CHARVESTERAO_HANDLESESSIONOPENED 0x3003c +#define DUP1_CHARVESTERAO_HANDLESESSIONOPENED 0x3003d +#define DUP2_CHARVESTERAO_HANDLESESSIONOPENED 0x3003e +#define DUP3_CHARVESTERAO_HANDLESESSIONOPENED 0x3003f +#define DUP4_CHARVESTERAO_HANDLESESSIONOPENED 0x30040 +#define DUP5_CHARVESTERAO_HANDLESESSIONOPENED 0x30041 +#define DUP6_CHARVESTERAO_HANDLESESSIONOPENED 0x30042 +#define DUP7_CHARVESTERAO_HANDLESESSIONOPENED 0x30043 +#define DUP8_CHARVESTERAO_HANDLESESSIONOPENED 0x30044 +#define DUP9_CHARVESTERAO_HANDLESESSIONOPENED 0x30045 +#define DUP10_CHARVESTERAO_HANDLESESSIONOPENED 0x30046 +#define DUP11_CHARVESTERAO_HANDLESESSIONOPENED 0x30047 +#define DUP12_CHARVESTERAO_HANDLESESSIONOPENED 0x30048 +#define DUP13_CHARVESTERAO_HANDLESESSIONOPENED 0x30049 +#define CHARVESTERAO_HANDLESESSIONERROR 0x3004a +#define CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x3004b +#define DUP1_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x3004c +#define DUP2_CHARVESTERAO_CONTEXTINITIALIZATIONSTATUS 0x3004d +#define CHARVESTERAO_PAUSEHARVESTER 0x3004e +#define DUP1_CHARVESTERAO_PAUSEHARVESTER 0x3004f +#define CHARVESTERAO_RESUMEHARVESTERL 0x30050 +#define CHARVESTERAO_RUNL 0x30051 +#define DUP1_CHARVESTERAO_RUNL 0x30052 +#define DUP2_CHARVESTERAO_RUNL 0x30053 +#define DUP3_CHARVESTERAO_RUNL 0x30054 +#define DUP4_CHARVESTERAO_RUNL 0x30055 +#define DUP5_CHARVESTERAO_RUNL 0x30056 +#define DUP6_CHARVESTERAO_RUNL 0x30057 +#define DUP7_CHARVESTERAO_RUNL 0x30058 +#define DUP8_CHARVESTERAO_RUNL 0x30059 +#define CHARVESTERAO_DOCANCEL 0x3005a +#define CHARVESTERAO_RUNERROR 0x3005b +#define DUP1_CHARVESTERAO_RUNERROR 0x3005c +#define DUP2_CHARVESTERAO_RUNERROR 0x3005d +#define DUP3_CHARVESTERAO_RUNERROR 0x3005e +#define DUP4_CHARVESTERAO_RUNERROR 0x3005f +#define CHARVESTERAO_SETNEXTREQUEST 0x30060 +#define CHARVESTERAO_ISSERVERPAUSED 0x30061 +#define CHARVESTERAO_BACKUPRESTORESTART 0x30062 +#define CHARVESTERAO_BACKUPRESTOREREADY 0x30063 +#define CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x30064 +#define DUP1_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x30065 +#define DUP2_CHARVESTERAO_HANDLEDISKSPACENOTIFICATIONL 0x30066 +#define CHARVESTERAO_HARVESTFILE 0x30067 +#define DUP1_CHARVESTERAO_HARVESTFILE 0x30068 +#define DUP2_CHARVESTERAO_HARVESTFILE 0x30069 +#define DUP3_CHARVESTERAO_HARVESTFILE 0x3006a +#define DUP4_CHARVESTERAO_HARVESTFILE 0x3006b +#define DUP5_CHARVESTERAO_HARVESTFILE 0x3006c +#define DUP6_CHARVESTERAO_HARVESTFILE 0x3006d +#define DUP7_CHARVESTERAO_HARVESTFILE 0x3006e +#define DUP8_CHARVESTERAO_HARVESTFILE 0x3006f +#define DUP9_CHARVESTERAO_HARVESTFILE 0x30070 +#define DUP10_CHARVESTERAO_HARVESTFILE 0x30071 +#define CHARVESTERAO_HARVESTFILEWITHUID 0x30072 +#define DUP1_CHARVESTERAO_HARVESTFILEWITHUID 0x30073 +#define DUP2_CHARVESTERAO_HARVESTFILEWITHUID 0x30074 +#define DUP3_CHARVESTERAO_HARVESTFILEWITHUID 0x30075 +#define DUP4_CHARVESTERAO_HARVESTFILEWITHUID 0x30076 +#define DUP5_CHARVESTERAO_HARVESTFILEWITHUID 0x30077 +#define DUP6_CHARVESTERAO_HARVESTFILEWITHUID 0x30078 +#define DUP7_CHARVESTERAO_HARVESTFILEWITHUID 0x30079 +#define DUP8_CHARVESTERAO_HARVESTFILEWITHUID 0x3007a +#define DUP9_CHARVESTERAO_HARVESTFILEWITHUID 0x3007b +#define DUP10_CHARVESTERAO_HARVESTFILEWITHUID 0x3007c +#define CHARVESTERAO_REGISTERPROCESSORIGIN 0x3007d +#define DUP1_CHARVESTERAO_REGISTERPROCESSORIGIN 0x3007e +#define DUP2_CHARVESTERAO_REGISTERPROCESSORIGIN 0x3007f +#define DUP3_CHARVESTERAO_REGISTERPROCESSORIGIN 0x30080 +#define DUP4_CHARVESTERAO_REGISTERPROCESSORIGIN 0x30081 +#define DUP5_CHARVESTERAO_REGISTERPROCESSORIGIN 0x30082 +#define CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x30083 +#define DUP1_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x30084 +#define DUP2_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x30085 +#define DUP3_CHARVESTERAO_UNREGISTERPROCESSORIGIN 0x30086 +#define CHARVESTERAO_REGISTERHARVESTCOMPLETE 0x30087 +#define CHARVESTERAO_UNREGISTERHARVESTCOMPLETE 0x30088 +#define CHARVESTERAO_REGISTERHARVESTEREVENT 0x30089 +#define CHARVESTERAO_UNREGISTERHARVESTEREVENT 0x3008a +#define CHARVESTERAO_GETLASTOBSERVERID 0x3008b +#define CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x3008c +#define DUP1_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x3008d +#define DUP2_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x3008e +#define DUP3_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x3008f +#define DUP4_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x30090 +#define DUP5_CHARVESTERAO_CONTEXTSNAPSHOTSTATUS 0x30091 +#define CHARVESTERAO_HARVESTCOMPLETED 0x30092 +#define DUP1_CHARVESTERAO_HARVESTCOMPLETED 0x30093 +#define CHARVESTERAO_BOOTROMSCANL 0x30094 +#define CHARVESTERAO_BOOTPARTIALRESTORESCANL 0x30095 +#define DUP1_CHARVESTERAO_BOOTPARTIALRESTORESCANL 0x30096 +#define CHARVESTERAO_BOOTSCANL 0x30097 +#define DUP1_CHARVESTERAO_BOOTSCANL 0x30098 +#define DUP2_CHARVESTERAO_BOOTSCANL 0x30099 +#define DUP3_CHARVESTERAO_BOOTSCANL 0x3009a +#define DUP4_CHARVESTERAO_BOOTSCANL 0x3009b +#define DUP5_CHARVESTERAO_BOOTSCANL 0x3009c +#define CHARVESTERAO_MEMORYLOW 0x3009d +#define CHARVESTERAO_MEMORYGOOD 0x3009e +#define DUP5_CHARVESTERAO_RUNERROR 0x300c4 #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/traces/harvesterserverTraces.h --- a/harvester/server/traces/harvesterserverTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/traces/harvesterserverTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTERSERVERTRACES_H__ @@ -6,36 +6,36 @@ #define KOstTraceComponentID 0x200009f5 -#define CHARVESTERSERVER_CONSTRUCTL 0x86009f -#define DUP1_CHARVESTERSERVER_CONSTRUCTL 0x8600a0 -#define CHARVESTERSERVER_PAUSE 0x8600a1 -#define CHARVESTERSERVER_RESUME 0x8600a2 -#define DUP1_CHARVESTERSERVER_PAUSE 0x8600a3 -#define DUP1_CHARVESTERSERVER_RESUME 0x8600a4 -#define CHARVESTERSERVER_PAUSEREADY 0x8600a5 -#define CHARVESTERSERVER_RESUMEREADY 0x8600a6 -#define CHARVESTERSERVER_SHUTDOWNNOTIFICATION 0x8600a7 -#define CHARVESTERSERVER_RESTARTNOTIFICATION 0x8600a8 -#define CHARVESTERSERVER_HARVESTFILE 0x8600a9 -#define CHARVESTERSERVER_HARVESTFILEWITHUID 0x8600aa -#define CHARVESTERSERVER_REGISTERPROCESSORIGIN 0x8600ab -#define CHARVESTERSERVER_UNREGISTERPROCESSORIGIN 0x8600ac -#define CHARVESTERSERVER_REGISTERHARVESTCOMPLETE 0x8600ad -#define CHARVESTERSERVER_UNREGISTERHARVESTCOMPLETE 0x8600ae -#define CHARVESTERSERVER_REGISTERHARVESTEREVENT 0x8600af -#define CHARVESTERSERVER_UNREGISTERHARVESTEREVENT 0x8600b0 -#define CHARVESTERSERVER_CHARVESTERSERVER 0x8600b1 -#define DUP1_CHARVESTERSERVER_CHARVESTERSERVER 0x8600b2 -#define CHARVESTERSERVER_PANICCLIENT 0x8600b3 -#define CHARVESTERSERVER_PANICSERVER 0x8600b4 -#define CHARVESTERSERVER_NEWSESSIONL 0x8600b5 -#define DUP1_CHARVESTERSERVER_NEWSESSIONL 0x8600b6 -#define CHARVESTERSERVER_RUNERROR 0x8600b7 -#define CHARVESTERSERVER_THREADFUNCTIONL 0x8600b8 -#define DUP1_CHARVESTERSERVER_THREADFUNCTIONL 0x8600b9 -#define CHARVESTERSERVER_THREADFUNCTION 0x8600ba -#define DUP1_CHARVESTERSERVER_THREADFUNCTION 0x8600bb -#define _E32MAIN 0x8600bc +#define CHARVESTERSERVER_CONSTRUCTL 0x3009f +#define DUP1_CHARVESTERSERVER_CONSTRUCTL 0x300a0 +#define CHARVESTERSERVER_PAUSE 0x300a1 +#define CHARVESTERSERVER_RESUME 0x300a2 +#define DUP1_CHARVESTERSERVER_PAUSE 0x300a3 +#define DUP1_CHARVESTERSERVER_RESUME 0x300a4 +#define CHARVESTERSERVER_PAUSEREADY 0x300a5 +#define CHARVESTERSERVER_RESUMEREADY 0x300a6 +#define CHARVESTERSERVER_SHUTDOWNNOTIFICATION 0x300a7 +#define CHARVESTERSERVER_RESTARTNOTIFICATION 0x300a8 +#define CHARVESTERSERVER_HARVESTFILE 0x300a9 +#define CHARVESTERSERVER_HARVESTFILEWITHUID 0x300aa +#define CHARVESTERSERVER_REGISTERPROCESSORIGIN 0x300ab +#define CHARVESTERSERVER_UNREGISTERPROCESSORIGIN 0x300ac +#define CHARVESTERSERVER_REGISTERHARVESTCOMPLETE 0x300ad +#define CHARVESTERSERVER_UNREGISTERHARVESTCOMPLETE 0x300ae +#define CHARVESTERSERVER_REGISTERHARVESTEREVENT 0x300af +#define CHARVESTERSERVER_UNREGISTERHARVESTEREVENT 0x300b0 +#define CHARVESTERSERVER_CHARVESTERSERVER 0x300b1 +#define DUP1_CHARVESTERSERVER_CHARVESTERSERVER 0x300b2 +#define CHARVESTERSERVER_PANICCLIENT 0x300b3 +#define CHARVESTERSERVER_PANICSERVER 0x300b4 +#define CHARVESTERSERVER_NEWSESSIONL 0x300b5 +#define DUP1_CHARVESTERSERVER_NEWSESSIONL 0x300b6 +#define CHARVESTERSERVER_RUNERROR 0x300b7 +#define CHARVESTERSERVER_THREADFUNCTIONL 0x300b8 +#define DUP1_CHARVESTERSERVER_THREADFUNCTIONL 0x300b9 +#define CHARVESTERSERVER_THREADFUNCTION 0x300ba +#define DUP1_CHARVESTERSERVER_THREADFUNCTION 0x300bb +#define _E32MAIN 0x300bc #endif diff -r aa5a574040a4 -r a3cc46f37772 harvester/server/traces/harvesterserversessionTraces.h --- a/harvester/server/traces/harvesterserversessionTraces.h Tue Jul 06 14:44:37 2010 +0300 +++ b/harvester/server/traces/harvesterserversessionTraces.h Fri Sep 17 16:54:49 2010 +0300 @@ -1,4 +1,4 @@ -// Created by TraceCompiler 2.2.3 +// Created by TraceCompiler 1.3.1 // DO NOT EDIT, CHANGES WILL BE LOST #ifndef __HARVESTERSERVERSESSIONTRACES_H__ @@ -6,13 +6,13 @@ #define KOstTraceComponentID 0x200009f5 -#define CHARVESTERSERVERSESSION_NEWL 0x8600bd -#define CHARVESTERSERVERSESSION_NEWLC 0x8600be -#define CHARVESTERSERVERSESSION_CONSTRUCTL 0x8600bf -#define CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION 0x8600c0 -#define DUP1_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION 0x8600c1 -#define CHARVESTERSERVERSESSION_SERVICEL 0x8600c2 -#define CHARVESTERSERVERSESSION_DISCONNECT 0x8600c3 +#define CHARVESTERSERVERSESSION_NEWL 0x300bd +#define CHARVESTERSERVERSESSION_NEWLC 0x300be +#define CHARVESTERSERVERSESSION_CONSTRUCTL 0x300bf +#define CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION 0x300c0 +#define DUP1_CHARVESTERSERVERSESSION_CHARVESTERSERVERSESSION 0x300c1 +#define CHARVESTERSERVERSESSION_SERVICEL 0x300c2 +#define CHARVESTERSERVERSESSION_DISCONNECT 0x300c3 #endif diff -r aa5a574040a4 -r a3cc46f37772 iadstoprestart/src/iadrestart.cpp --- a/iadstoprestart/src/iadrestart.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/iadstoprestart/src/iadrestart.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -55,6 +55,7 @@ TRAP(err, MainL()); delete cleanup; + cleanup = NULL; __UHEAP_MARKEND; return err; } diff -r aa5a574040a4 -r a3cc46f37772 iadstoprestart/src/iadstop.cpp --- a/iadstoprestart/src/iadstop.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/iadstoprestart/src/iadstop.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -158,6 +158,7 @@ TRAP(err, MainL()); delete cleanup; + cleanup = NULL; __UHEAP_MARKEND; return err; } diff -r aa5a574040a4 -r a3cc46f37772 inc/mdcdef.h --- a/inc/mdcdef.h Tue Jul 06 14:44:37 2010 +0300 +++ b/inc/mdcdef.h Fri Sep 17 16:54:49 2010 +0300 @@ -25,7 +25,7 @@ NONSHARABLE_CLASS(TMdCDef) : protected TMdCSerializationType { protected: - TMdCDef(TMdCStructTypes aType) : TMdCSerializationType( aType ) + TMdCDef(TMdCStructTypes aType) : TMdCSerializationType( aType ), iDefId( 0 ) { } diff -r aa5a574040a4 -r a3cc46f37772 inc/mdscommoninternal.h --- a/inc/mdscommoninternal.h Tue Jul 06 14:44:37 2010 +0300 +++ b/inc/mdscommoninternal.h Fri Sep 17 16:54:49 2010 +0300 @@ -45,12 +45,15 @@ const TItemId KSystemFavouritesAlbumId = 1; +_LIT( KSystemFavouritesAlbumUri, "defaultalbum_favourites" ); +_LIT( KSystemCapturedAlbumUri, "defaultalbum_captured" ); + const TInt KMaxUintValueLength = 10; const TInt KMaxUint64ValueLength = 20; const TInt KMaxTitleFieldLength = 255; -const TInt KTriggerDbMaintenanceTreasholdValue( 2500 ); +const TInt KTriggerDbMaintenanceTreasholdValue( 3000 ); _LIT( KMdSServerName,"!MdSServer" ); // Server name _LIT( KMdSServerProcessString,"!MdSServer*" ); @@ -69,7 +72,7 @@ const TUint32 KNokiaVendorId = 52487775; -const TInt64 KDiskFullThreshold = 1024*50; // 50 kB +const TInt64 KDiskFullThreshold = 1024*70; // 70 kB, SQLite default maximum journal size // P&S stuff static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy); diff -r aa5a574040a4 -r a3cc46f37772 inc/mdssqliteconnection.h --- a/inc/mdssqliteconnection.h Tue Jul 06 14:44:37 2010 +0300 +++ b/inc/mdssqliteconnection.h Fri Sep 17 16:54:49 2010 +0300 @@ -237,11 +237,15 @@ /** * cleanup method (from TBase) - * according to status does Commit/Rollback/nothing + * according to status does Rollback or nothing if commit was succesfull */ inline void Close() { - if ( iErrorState != KErrNone ) + // Internal error state is KErrNone if the transaction could be created successfully, + // and the state is resetted if the transaction is committed succesfully. Only if the + // transaction is started succesfully but not committed, it needs to be rolled back + // to close the ongoing transaction + if ( iErrorState == KErrNone ) { TRAP( iErrorState, iConnection.TransactionRollbackL() ); } @@ -259,17 +263,6 @@ } /** - * Rolls back the transaction explicitly - * - possibility to receive leave - * eliminates actions on destructor. - */ - inline void RollbackL() - { - iConnection.TransactionRollbackL(); - Reset(); - } - - /** * Resets the transaction * (does not commit or rollback or do anything) */ diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/data/2002DD11.rss --- a/locationmanager/ReverseGeoCoderPlugin/data/2002DD11.rss Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource file used to register ecom dll's with registry. -* -*/ - -#include - -RESOURCE REGISTRY_INFO theInfo - { - // UID for the DLL - dll_uid = 0x2002DD11; - - // Declare array of interface info - interfaces = - { - INTERFACE_INFO - { - // UID of interface that is implemented - interface_uid = 0x2002DD13; - implementations = - { - // Info for Reverse GeoCoder - IMPLEMENTATION_INFO - { - implementation_uid = 0x2002DD12; - version_no = 1; - display_name = "Reverse GeoCoder"; - default_data = ""; - opaque_data = ""; - } - }; - } - }; - } - -//End of File diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/group/bld.inf --- a/locationmanager/ReverseGeoCoderPlugin/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file provides the information required for building the plugin -* -*/ - -PRJ_PLATFORMS - - -PRJ_EXPORTS - - -PRJ_MMPFILES -reversegeocoderplugin.mmp - - - -//End of File diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/group/reversegeocoderplugin.mmp --- a/locationmanager/ReverseGeoCoderPlugin/group/reversegeocoderplugin.mmp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for ECom ReverseGeoCoderPlugin plug-in -* -*/ - -#include -#include - -TARGET reversegeocoderplugin.dll -TARGETTYPE PLUGIN - -// ECom Dll recognition UID followed by the unique UID for this dll -UID 0x10009D8D 0x2002DD11 -CAPABILITY CAP_ECOM_PLUGIN - -SOURCEPATH ..\src -SOURCE proxy.cpp -SOURCE reversegeocoderplugin.cpp - - -USERINCLUDE ..\inc -USERINCLUDE ..\..\inc -USERINCLUDE ..\..\..\inc -USERINCLUDE ..\..\ReverseGeocode\inc - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/stdapis - - -SOURCEPATH ../data -START RESOURCE 2002DD11.RSS -TARGET reversegeocoderplugin.rsc -END - -LIBRARY euser.lib -LIBRARY ecom.lib -LIBRARY reversegeocode.lib -LIBRARY libc.lib - -PAGED -BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O3 -OTime - -//End of File - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/inc/reversegeocoderplugin.h --- a/locationmanager/ReverseGeoCoderPlugin/inc/reversegeocoderplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The header file for ReverseGeoCoderPlugin that creates the ReverseGeocoder -* -*/ - - -#ifndef __REVERSEGEOCODERPLUGIN_H__ -#define __REVERSEGEOCODERPLUGIN_H__ - -// INCLUDES -#include - -#include "reversegeocode.h" - -/** - * CReverseGeoCoderPlugin - * - * An implementation of the CReverseGeoCoderPlugin definition. - * Encapsulates the reverse goecoding functionality - * This is concrete class, instance of which - * ECOM framework gives to ECOM clients. - */ -class CReverseGeoCoderPlugin : public CBase - { -public: - - /** - * Create instance of concrete implementation. - * @return: Instance of this class. - */ - static CReverseGeoCoderPlugin* NewL(); - - /** - * Static constructor. - * @return: Instance of this class. - */ - static CReverseGeoCoderPlugin* NewLC(); - - /** - * Destructor. - */ - ~CReverseGeoCoderPlugin(); - - -protected: - - /** - * The default constructor - * Perform the first phase of two phase construction - */ - CReverseGeoCoderPlugin(); - - /** - * Perform the second phase construction of a - * CImplementationClassPlus object. - */ - void ConstructL(); - -public: - - /** - * Creates the instance of Reverse Geocoder - * - */ - void CreateReverseGeoCoderL(); - - /** - * Initializes the ReverseGeoCodeObserver - * @param: aObserver The observer class instance that is to be notified when reverse geocoding completes - * - */ - virtual void AddObserverL(MReverseGeocodeObserver& aObserver); - - /** - * A wrapper API to fetch the address from geocoordinates - * Internally calls the ReverseGeoCoder - * @param aLocality A TLocality object that contains the geocoordinate information - * @param aOption Indicates if the connection is silent connection or not - * - */ - virtual void GetAddressByCoordinateL( TLocality aLocality,const TConnectionOption aOption ); - - /** - * Wrapper API to check if the ReverseGeoCoder allows a silent connection - * @return:TBool Indicates if a silent connection is allowed - * - */ - virtual TBool SilentConnectionAllowed(); - -private: - - /** - * iRevGeocoder - * An instance of the CReverseGeocode class to fetch the place name from geocoordinates - */ - CReverseGeocode *iRevGeocoder; - - /* - * iObserver - * An instance of the class that is to be notified once Reverse Geocoding is completed - */ - MReverseGeocodeObserver* iObserver; - /** - * iDtorKey - * Identification of the plugin on cleanup - */ - TUid iDtorKey; - - }; - - -#endif //__REVERSEGEOCODERPLUGIN_H__ - -//End of file - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/src/proxy.cpp --- a/locationmanager/ReverseGeoCoderPlugin/src/proxy.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file is the standard proxy for the ECOM plugin -* -*/ - - -// INCLUDE FILES -#include -#include - -#include "reversegeocoderplugin.h" - - -// ---------------------------------------------------------------------------- -// Provides a key value pair table, this is used to identify -// the correct construction function for the requested interface. -// ---------------------------------------------------------------------------- -// - -const TImplementationProxy ImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY(0x2002DD12, CReverseGeoCoderPlugin::NewL) - }; - -// ---------------------------------------------------------------------------- -// ImplementationGroupProxy -// Function used to return an instance of the proxy table. -// ---------------------------------------------------------------------------- - -EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) - { - aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); - return ImplementationTable; - } - -//End of File diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeoCoderPlugin/src/reversegeocoderplugin.cpp --- a/locationmanager/ReverseGeoCoderPlugin/src/reversegeocoderplugin.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The source file for ReverseGeoCoderPlugin that creates the ReverseGeocoder -* -*/ - -// INCLUDE FILES -#include -#include - - -#include "reversegeocoderplugin.h" -#include "reversegeocode.h" -#include "geotagger.h" -#include "locationmanagerdebug.h" - - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::NewL -// Create instance of concrete ECOM interface implementation -// ---------------------------------------------------------------------------- -// -CReverseGeoCoderPlugin* CReverseGeoCoderPlugin::NewL() - { - LOG( "CReverseGeoCoderPlugin::NewL" ); - CReverseGeoCoderPlugin* self = CReverseGeoCoderPlugin::NewLC(); - CleanupStack::Pop(self); - return self; - } - - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::NewLC -// Create instance of concrete ECOM interface implementation -// ---------------------------------------------------------------------------- -// -CReverseGeoCoderPlugin* CReverseGeoCoderPlugin::NewLC() - { - LOG( "CReverseGeoCoderPlugin::NewLC" ); - CReverseGeoCoderPlugin* self = new (ELeave) CReverseGeoCoderPlugin; - CleanupStack::PushL (self); - self->ConstructL(); - return self; - } - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::CReverseGeoCoderPlugin() -// The default constructor -// ---------------------------------------------------------------------------- -// -CReverseGeoCoderPlugin::CReverseGeoCoderPlugin() - : iRevGeocoder(NULL), - iObserver(NULL) - { - } - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::ConstructL -// Second phase construction. -// ---------------------------------------------------------------------------- -// -void CReverseGeoCoderPlugin::ConstructL() - { - LOG( "CReverseGeoCoderPlugin::ConstructL" ); - } - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin -// Destructor -// ---------------------------------------------------------------------------- -// -CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin() - { - LOG( "CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin,begin" ); - delete iRevGeocoder; - iObserver = NULL; - LOG( "CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin,end" ); - } - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::CreateReverseGeoCoderL -// Creates an instance of the ReverseGeoCoder -// ---------------------------------------------------------------------------- -// -void CReverseGeoCoderPlugin::CreateReverseGeoCoderL() - { - LOG( "CReverseGeoCoderPlugin::CreateReverseGeoCoderL,begin" ); - if(iObserver) - { - iRevGeocoder = CReverseGeocode::NewL(*iObserver); - } - LOG( "CReverseGeoCoderPlugin::CreateReverseGeoCoderL,end" ); - } - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::AddObserverL -// Initializes the ReverseGeoCodeObserver -// ---------------------------------------------------------------------------- -// -void CReverseGeoCoderPlugin::AddObserverL(MReverseGeocodeObserver& aObserver) - { - LOG( "CReverseGeoCoderPlugin::AddObserverL,begin" ); - iObserver = &aObserver; - - if(!iRevGeocoder) - { - CreateReverseGeoCoderL(); - } - LOG( "CReverseGeoCoderPlugin::AddObserverL,end" ); - } - - -// ---------------------------------------------------------------------------- -// CReverseGeoCoderPlugin::GetAddressByCoordinateL -// Gets the address for the given geo-coordinaates. -// ---------------------------------------------------------------------------- -// -void CReverseGeoCoderPlugin::GetAddressByCoordinateL( TLocality aLocality, - const TConnectionOption aOption ) - { - LOG( "CReverseGeoCoderPlugin::GetAddressByCoordinateL,begin" ); - if(iRevGeocoder) - { - iRevGeocoder->GetAddressByCoordinateL(aLocality, aOption); - } - LOG( "CReverseGeoCoderPlugin::GetAddressByCoordinateL,end" ); - } - - - // ---------------------------------------------------------------------------- - // CReverseGeoCoderPlugin::SilentConnectionAllowed - // Wrapper API to check if the ReverseGeoCoder allows a silent connection - // ---------------------------------------------------------------------------- - // -TBool CReverseGeoCoderPlugin::SilentConnectionAllowed() - { - LOG( "CReverseGeoCoderPlugin::SilentConnectionAllowed,begin" ); - TBool ret = EFalse; - if(iRevGeocoder) - { - ret = iRevGeocoder->SilentConnectionAllowed(); - } - LOG1( "CReverseGeoCoderPlugin::SilentConnectionAllowed,end ret - %d", ret ); - return ret; - } - - - - //End of File - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/bwincw/reversegeocodewinscw.def --- a/locationmanager/ReverseGeocode/bwincw/reversegeocodewinscw.def Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CReverseGeocode@@SAPAV1@AAVMReverseGeocodeObserver@@@Z @ 1 NONAME ; class CReverseGeocode * CReverseGeocode::NewL(class MReverseGeocodeObserver &) - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/eabi/reversegeocodearm.def --- a/locationmanager/ReverseGeocode/eabi/reversegeocodearm.def Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - _ZN15CReverseGeocode4NewLER23MReverseGeocodeObserver @ 1 NONAME - _ZTI23CConnectionTimerHandler @ 2 NONAME - _ZTV23CConnectionTimerHandler @ 3 NONAME - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/group/bld.inf --- a/locationmanager/ReverseGeocode/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file -* -*/ - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -ReverseGeocode.mmp diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/group/reversegeocode.mmp --- a/locationmanager/ReverseGeocode/group/reversegeocode.mmp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file -* -*/ - -#include -#include - -#if defined(WINSCW) -deffile ../bwincw/reversegeocodewinscw.def -#elif defined(ARMCC) -deffile ../eabi/reversegeocodearm.def -#endif -nostrictdef - -VERSION 10.0 -TARGET reversegeocode.dll -TARGETTYPE dll -UID 0x1000008d 0xEF7E39A4 - -VENDORID VID_DEFAULT -CAPABILITY CAP_GENERAL_DLL - -USERINCLUDE ../inc -USERINCLUDE ../../inc -USERINCLUDE ../../../inc - - -MW_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/stdapis - -SOURCEPATH ../src - -SOURCE clientengine.cpp -SOURCE xmlhandler.cpp -SOURCE internalreversegeocode.cpp -SOURCE internaladdressinfo.cpp -SOURCE reversegeocode.cpp -SOURCE connectiontimerhandler.cpp - -LIBRARY cone.lib -LIBRARY netmeta.lib -LIBRARY euser.lib -LIBRARY insock.lib -LIBRARY inetprotutil.lib -LIBRARY http.lib -LIBRARY ecom.lib // for HTTP Client API -LIBRARY bafl.lib -LIBRARY commdb.lib -LIBRARY cmmanager.lib // ALR / SNAP -LIBRARY xmlframework.lib -LIBRARY esock.lib -LIBRARY lbs.lib -LIBRARY charconv.lib -LIBRARY extendedconnpref.lib -LIBRARY etel.lib -LIBRARY etelmm.lib -LIBRARY libc.lib - -PAGED -BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O3 -OTime - -// End of file - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/clientengine.h --- a/locationmanager/ReverseGeocode/inc/clientengine.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,302 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HTTP client engine, which takes of doing an Http GET request for -* the maps server. -*/ - -#ifndef __CLIENTENGINE_H__ -#define __CLIENTENGINE_H__ - -#include -#include -#include -#include -#include -#include -#include - -#include "reversegeocode.h" - -class RHTTPSession; -class RHTTPTransaction; - -const TInt KDefaultBufferSize = 256; - -/* - * Enumration for the different states of HTTP GET request. - */ -enum THttpStatus - { - EHttpSessionError =0, - EHttpExitingApp, - EHttpConnecting, - EHttpTxCancelled, - EHttpHdrReceived, - EHttpBytesReceieved, - EHttpBodyReceieved, - EHttpTxCompleted, - EHttpTxSuccess, - EHttpTxFailed, - EHttpConnectionFailure, - EHttpUnknownEvent, - EHttpMhfRunError, - EHttpAuthNote, - EHttpAuthFailed, - EHttpAuthRequired, - }; - -enum TMobileRoamingStatus - { - EMobileNotRegistered = 0x00, - EMobileRegHomeNetwork, // home network - EMobileNationalRoaming, - EMobileInternationalRoaming - }; - -/* -* MClientObserver -* CClientEngine passes events and responses body data with this interface. -* An instance of this class must be provided for construction of CClientEngine. -*/ -class MClientObserver - { - public: - /* - * ClientEvent() - * - * Called when event occurs in CClientEngine. - * - * @params aEvent Status of the event. - */ - virtual void ClientEvent( const THttpStatus& aEvent ) = 0; - - /* - * ClientBodyReceived() - * - * Called when a part of the HTTP body is received. - * - * @param aBodyData Part of the body data received. (e.g. part of - * the received HTML page) - */ - virtual void ClientBodyReceived( const TDesC8& aBodyData ) = 0; - - /* - * Get registrer network country code - * - * @return current register n/w info - */ - virtual RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw() = 0; - - /* - * UE is registered to home network? - * - * @return ETrue if UE is registered at home network else EFalse - */ - virtual TBool IsRegisteredAtHomeNetwork() = 0; - - /* - * Get home network country code - * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse - * @return user home n/w info - */ - virtual const RMobilePhone::TMobilePhoneNetworkInfoV1& - GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) = 0; - }; - - -/* -* Provides simple interface to HTTP Client API. -*/ -NONSHARABLE_CLASS( CClientEngine ): public CActive, - public MHTTPTransactionCallback, - public MMobilityProtocolResp - { - - //Internal Engine state - enum TEngineState - { - EIdle = 0, - EGet - }; - - public: - /* - * Create a CClientEngine object. - * - * @params iObserver refernce to the MClientObservers implementation - * - * @returns A pointer to the created instance of CClientEngine - */ - static CClientEngine* NewL( MClientObserver& iObserver ); - - /* - * Create a CClientEngine object. This leaves the object on the clean up - * stack. - * - * @params iObserver refernce to the MClientObservers implementation - * - * @returns A pointer to the created instance of CClientEngine - */ - static CClientEngine* NewLC( MClientObserver& iObserver ); - - /* - * Destroy the object - * - */ - ~CClientEngine(); - - /* - * Starts a new HTTP GET transaction. - * - * @param aUri URI to get request. (e.g. http://host.org") - */ - void IssueHTTPGetL( const TDesC8& aUri, const TConnectionOption aOption ); - - /* - * Closes currently running transaction and frees resources related to it. - */ - void CancelTransaction(); - - /* - * Closes the connection - */ - void CloseConnection(); - - - /* - * checks if silent connection is allowed - * @return ETrue if silent connection is allowed - */ - TBool SilentConnectionAllowed(); - - private: - /* - * Perform the second phase construction of a CClientEngine object. - */ - void ConstructL(); - - /* - * Performs the first phase of two phase construction. - * @param iObserver The observer that is notified after the HTTP transcation is over - */ - CClientEngine( MClientObserver& iObserver ); - - /* - * Sets header value of an HTTP request. - * - * @param aHeaders Headers of the HTTP request - * @param aHdrField Enumerated HTTP header field, e.g. HTTP::EUserAgent - * @param aHdrValue New value for header field. - */ - void SetHeaderL( RHTTPHeaders aHeaders, TInt aHdrField, - const TDesC8& aHdrValue ); - - /* - * Sets up the connection - * @param aOption The connection option - */ - void SetupConnectionL( const TConnectionOption aOption ); - - private: - //From MHTTPSessionEventCallback - /* - * Called by framework to notify about transaction events. - * - * @param aTransaction Transaction, where the event occured. - * @param aEvent Occured event. - */ - void MHFRunL( RHTTPTransaction aTransaction, const THTTPEvent& aEvent ); - - /* - * Called by framework to notify about transaction events. - * - * @param aTransaction Transaction, where the event occured. - * @param aError Error status code. - * @param aEvent The event that was being processed when leave occured. - * - * @retuen KErrNone, if the error was handled. Otherwise the value of aError, or - * some other error value. Returning error value causes causes - * HTTP-CORE 6 panic. - */ - TInt MHFRunError( TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent ); - - private: - // from MMobilityProtocolResp - void PreferredCarrierAvailable( TAccessPointInfo aOldAPInfo, - TAccessPointInfo aNewAPInfo, - TBool aIsUpgrade, - TBool aIsSeamless ); - void NewCarrierActive( TAccessPointInfo aNewAPInfo, TBool aIsSeamless ); - void Error( TInt aError ); - - TBool IsDataConnectionAskAlwaysL(); - TMobileRoamingStatus UeRegNetworkStatus(); - TBool IsVisitorNetwork(const TMobileRoamingStatus& aRoamingStatus) const; - TBool IsWlanOnly(const TMobileRoamingStatus& aRoamingStatus, - const TCmGenConnSettings& aGenConnSettings) const; - -private: // from CActive - - /** - * RunL - * This method is called on completion of the active object request - */ - - void RunL(); - - /** - * DoCancel - * Cancels any outstanding requests - */ - void DoCancel(); - - /** - * This method is called if the RunL leaves - * @param aError The errcode with which it leaves - */ - TInt RunError(TInt aError); - -private: - - /** - * Submits a HTTP transaction - */ - void DoHTTPGetL(); - -private: - // declare members - RSocketServ iSocketServ; - RConnection iConnection; - TUint32 iSelectedIap; - - RHTTPSession iSession; - RHTTPTransaction iTransaction; - - MClientObserver& iObserver; // Used for passing body data and events to UI - TBool iRunning; // ETrue, if transaction running - TBool iConnectionSetupDone; - - TInt iPrevProfileId; - - CActiveCommsMobilityApiExt* iMobility; - TBool iTransactionOpen; - TEngineState iEngineState; - HBufC8* iUri; - RCmManager iCmManager; - - }; - -#endif // __CLIENTENGINE_H__ - -// End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/connectiontimerhandler.h --- a/locationmanager/ReverseGeocode/inc/connectiontimerhandler.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handle connection close -* -*/ - -#ifndef __CONNECTIONTIMERHANDLER_H__ -#define __CONNECTIONTIMERHANDLER_H__ - - -// INCLUDES -#include -#include - -class MConnectionTimeoutHandlerInterface - { - public: - - /** - * Handles the timedout event - * @param aErrorCode the errcode for time out - */ - virtual void HandleTimedoutEvent(TInt aErrorCode) = 0; - }; - -class CConnectionTimerHandler : public CTimer -{ - -public: - - /** - * @param aConnectionTimeoutHandlerInterface the interace class that handles the timeout events - */ - static CConnectionTimerHandler* NewL(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface); - - /** - * Destructor - */ - ~CConnectionTimerHandler(); - - /** - * starts a timer - * @param aTimeoutVal the time after which the timer will expire - */ - void StartTimer(const TInt aTimeoutVal); - - -protected: - - /** - * RunL - * from CActive - */ - void RunL(); - - private: - - /** - * Second phase construction - */ - void ConstructL(); - - /** - * @param aConnectionTimeoutHandlerInterface the interace class that handles the timeout events - */ - CConnectionTimerHandler(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface); - - - -private: - - /** - * An instance of the interace class that handles the timeout events - */ - MConnectionTimeoutHandlerInterface& iConnectionTimeoutHandlerInterface; -}; - - -#endif /*__CONNECTIONTIMERHANDLER_H__*/ - -// End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/internaladdressinfo.h --- a/locationmanager/ReverseGeocode/inc/internaladdressinfo.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation class from the CAddressInfo abstract class. -*/ - -#ifndef INTERNALADDRESSINFO_H_ -#define INTERNALADDRESSINFO_H_ - -#include "reversegeocode.h" -/* - * Internal implementation class for theCAddressInfo abstract class. - */ -NONSHARABLE_CLASS( CInternalAddressInfo ) : public MAddressInfo - { - public: - //from CAddressInfo class - - /** - * Gets the country name - * @return The country name - */ - virtual TDesC& GetCountryName(); - - /** - * Gets the state name - * @return The state name - */ - virtual TDesC& GetState(); - - /** - * Gets the city name - * @return The city name - */ - virtual TDesC& GetCity(); - - /** - * Gets the district name - * @return The district name - */ - virtual TDesC& GetDistrict(); - - /** - * Gets the pincode - * @return The cpincode - */ - virtual TDesC& GetPincode(); - - /** - * Gets the Thoroughfare name - * @return The Thoroughfare name - */ - virtual TDesC& GetThoroughfareName(); - - /** - * Gets the ThoroughfareNumber - * @return The ThoroughfareNumber - */ - virtual TDesC& GetThoroughfareNumber(); - - protected: - - /** - * Performs the secondphase construction - */ - void ConstructL(); - - /** - * Constructor - */ - CInternalAddressInfo(); - - public: - - - /** - * Factory function to create the instance - * @return A pointer to the CInternalAddressInfo - */ - static CInternalAddressInfo* NewL(); - - - /** - * Destructor - */ - ~CInternalAddressInfo(); - - // internal setter utilities to - // set the different attributes of the address. - - /** - * Sets the country name - * @param aCountryName The country name - */ - void SetCountryName( const TDesC& aCountryName ); - - /** - * Sets the state name - * @param aStateName The state name - */ - void SetState( const TDesC& aStateName ); - - /** - * Sets the City name - * @param aCityName The City name - */ - void SetCity( const TDesC& aCityName ); - - /** - * Sets the District name - * @param aDistrictName The District name - */ - void SetDistrict( const TDesC& aDistrictName ); - - /** - * Sets the Pincode - * @param aPincode The Pincode\ - */ - void SetPincode( const TDesC& aPincode ); - - /** - * Sets the Thoroughfare name - * @param aTFName The Thoroughfare name - */ - void SetThoroughfareName( const TDesC& aTFName ); - /** - * Sets the ThoroughfareNumber - * @param aTFNumber The ThoroughfareNumber - */ - void SetThoroughfareNumber( const TDesC& aTFNumber ); - - /** - * Resets the address info - */ - void ResetAddressInfoL(); - - private: - HBufC* iCountryName; - HBufC* iState; - HBufC* iCity; - HBufC* iDistrict; - HBufC* iPin; - HBufC* iTFName; - HBufC* iTFNumber; - }; -#endif /* INTERNALADDRESSINFO_H_ */ - -// End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/internalreversegeocode.h --- a/locationmanager/ReverseGeocode/inc/internalreversegeocode.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementaion class for the CReverseGeocode class. -*/ -#ifndef _INTERNALREVERSEGEOCODE_H_ -#define _INTERNALREVERSEGEOCODE_H_ - -#include - -#include "reversegeocode.h" -#include "xmlhandler.h" -#include "clientengine.h" -#include "connectiontimerhandler.h" - - -/* - * Internal implementation class for the CReverseGeocode class. - */ -NONSHARABLE_CLASS( CInternalReverseGeocode ) : public CReverseGeocode, - public MClientObserver, - public MXmlHandlerObserver, - public MConnectionTimeoutHandlerInterface - { -public: - /** - * Factory function to create the instance - * @param aObserver The observer instance that is to be notified when reverse geocoding is over - * @return A pointer to the CInternalReverseGeocode instance - */ - static CInternalReverseGeocode* NewL( MReverseGeocodeObserver& aObserver ); - - /** - * Gets the address for the given geo-coordinaates. - * @param aLocality The locality information - * aOption The connection option whether its silent or not - */ - virtual void GetAddressByCoordinateL( TLocality aLocality, const TConnectionOption aOption ); - - /** - * Checks if a silent connection is allowed - * @return ETrue If silentconnection is allowed - */ - virtual TBool SilentConnectionAllowed(); - - - /** - * Helper function to get the appropriate language for the request. - * @param aLanguage The language for the request - */ - void GetLanguageForTheRequest( TDes8& aLanguage ); - - - /** - * destructor - * - */ - ~CInternalReverseGeocode(); - - // MConnectionTimeoutHandlerInterface - /** - * Closes the connection once it times out - * @param aErrorCode The Error code - */ - void HandleTimedoutEvent(TInt aErrorCode); - -protected: - - /** - * Second phase construction - */ - void ConstructL(); - - - /** - * First phase construction. - * @param aObserver The observer instance that is to be notified when reverse geocoding is over - */ - CInternalReverseGeocode( MReverseGeocodeObserver& aObserver ); - - //From MClientObserver - /** - * callback which notifies progess of HTTP request - * @param aEvent The Httpstatus - */ - void ClientEvent( const THttpStatus& aEvent ); - - /** - * callback through which the HTTP body data is recieved. - * @param aBodyData The body recieved - */ - void ClientBodyReceived(const TDesC8& aBodyData); - - /* - * Get registrer network country code - * - * @return current register n/w info - */ - RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw(); - - //From MXmlHandlerObserver - /** - * callback which notifys the completion of parsing. - * @param aError The err code - * aAddressInfo The address info obtained after parsing - */ - void OnParseCompletedL( TInt aError, MAddressInfo& aAddressInfo ); - - /* - * UE is registered to home network? - * - * @return ETrue if UE is registered at home network else EFalse - */ - TBool IsRegisteredAtHomeNetwork(); - - - /* - * Get home network country code - * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse - * @return user home n/w info - */ - const RMobilePhone::TMobilePhoneNetworkInfoV1& - GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag); - -private: - - /** - * Starts the timer - */ - void StartTimer(); - - /** - * Closes the http connection and notifies the observer - */ - void CloseConnection(); - -private: - CXmlHandler *iXmlHandler; - CClientEngine *iClientEngine; - CInternalAddressInfo *iAddressInfo; - HBufC8* iXMLBuf; - MReverseGeocodeObserver& iObserver; - CConnectionTimerHandler* iTimer; - - // Optimize the buffer len..?? - TBuf8 iQueryString; - TBuf8 iAuthCode; - TBuf8 iRefURL; - TBuf8 iLang; - TBool iStartTimerFlag; -}; - -#endif //_INTERNALREVERSEGEOCODE_H_ - -// End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/reversegeocode.h --- a/locationmanager/ReverseGeocode/inc/reversegeocode.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Reverse Geocode utility which converts the geo coordinates in to -* the actual address information. -*/ - -#ifndef REVERSEGEOCODE_H_ -#define REVERSEGEOCODE_H_ - -#include -#include -#include -#include -#include "geotagger.h" - -/* - * Data class to get the address details. An handle to this type will be given to the - * user through MReverseGeocodeObserver::ReverseGeocodeComplete callback, through which - * user can retrieve the address details using the following interfaces. - * - **/ -class MAddressInfo - { - public: - /* - * Gets the reference to the country name. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the Country Name. - */ - virtual TDesC& GetCountryName()= 0; - - /* - * Gets the reference to the State. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the State name. - */ - virtual TDesC& GetState()= 0; - - /* - * Gets the reference to the City. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the City Name. - */ - virtual TDesC& GetCity()= 0; - - /* - * Gets the reference to the District name. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the District Name. - */ - virtual TDesC& GetDistrict()= 0; - - /* - * Gets the reference to the postal code. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the postal code. - */ - virtual TDesC& GetPincode()= 0; - - /* - * Gets the reference to the thoroughfare name. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the thoroughfare name. - */ - virtual TDesC& GetThoroughfareName()= 0; - - /* - * Gets the reference to the thoroughfare number. Scope of this returned reference is limited to - * this perticular call. User has to store it for their further processing. - * - * @return reference to the String which holds the thoroughfare number. - */ - virtual TDesC& GetThoroughfareNumber() = 0; - }; - -/* - * Observer class which exposes callbacks to notify the completion of reversegeocoding event. - * - **/ -class MReverseGeocodeObserver - { - public: - /* - * Callback function which notifys the completion of reverse geocode event. This signals the completion - * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate. - * - * @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes - * in case of failures. - * - * @param aAddressInfo refrence to the address stucture, through which user can access the - * address information. - */ - - virtual void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo ) =0; - - /* - * Get registrer network country code - * - * @return current register n/w info - */ - virtual RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw() = 0; - - - /* - * UE is registered to home network? - * - * @return ETrue if UE is registered at home network else EFalse - */ - virtual TBool IsRegisteredAtHomeNetwork() = 0; - - /* - * Get home network country code - * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse - * @return user home n/w info - */ - virtual const RMobilePhone::TMobilePhoneNetworkInfoV1& - GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) = 0; - }; - -/* - * CReverseGeocode - * Concrete class which exposes interfaces to convert the geo-coordinates information - * in to the address information. - * - **/ -class CReverseGeocode : public CBase - { - public: - /* - * Factory function to create the instance of CReverseGeocode Class. This also registers - * observer for getting the reverse geocode completion notifications. - * - * @param aObserver refrence to the instance MReverseGeocodeObserver's - * implementation class. - * @return pointer to the instance of CReverseGeocode. - */ - IMPORT_C static CReverseGeocode* NewL( MReverseGeocodeObserver& aObserver ); - - /* - * Gets the address information for the given geo coordinates. This is an asynchronous function - * Whose completion will be notified by the MReverseGeocodeObserver::ReverseGeocodeComplete callback. - * - * @param aObserver refrence to the instance MReverseGeocodeObserver's - * implementation class. - */ - virtual void GetAddressByCoordinateL( TLocality aLocality, - const TConnectionOption aOption = ESilent ) = 0; - - /* - * checks if silent connection is allowed - * @return ETrue if silent connection is allowed - */ - virtual TBool SilentConnectionAllowed() = 0; - }; - -#endif /* REVERSEGEOCODE_H_ */ diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/inc/xmlhandler.h --- a/locationmanager/ReverseGeocode/inc/xmlhandler.h Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,217 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: XMLHandler class to parse the resultant reverse geocoded -* information. -*/ - -#ifndef __XMLHANDLER_H__ -#define __XMLHANDLER_H__ - -// INCLUDE FILES -#include -#include // for mcontenthandler -#include // for cparser -using namespace Xml; - -//Forward declarations -class CAddressInfo; -class CInternalAddressInfo; - -/* - * Category of the address information. This is used for - * internal parsing procedure. - */ -namespace xmlhandler - { - enum TLocationInfoType - { - ENone = 0, - ECountryName, - EState, - ECity, - EDistrict, - EPostalCode, - EThoroughfareName, - EThoroughfareNumber - }; - } - -/** - * MXmlHandlerObserver, an observer to CXmlHandler class. - */ -class MXmlHandlerObserver - { - public: - /* - * Signifies the completion of parsing of the output data. - * - * @param aError error status of parsing part. - * @param aLocationInfo reference to the resultant address information structure. - */ - virtual void OnParseCompletedL( TInt aError, MAddressInfo& aLocationInfo ) = 0; - }; - -/** - * CXmlHandler, a class to parse XML file and then output log information - * to a buffer. - */ -NONSHARABLE_CLASS( CXmlHandler ) : public MContentHandler - { - public: // Constructors and destructor - - /** - * 1st phase constructor - * - * @param aObserver The observer class to be notified after xml parsing is done - * aAddressInfo The address info - */ - static CXmlHandler* NewL( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ); - - /** - * 1st phase constructor pushes the object into cleanup stack - * @param aObserver The observer class to be notified after xml parsing is done - * aAddressInfo The address info - */ - static CXmlHandler* NewLC( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ); - - /** - * Destructor - */ - virtual ~CXmlHandler(); - - public: // Public methods - - /** - * Starts parsing the xml content - * @param aBuf The xml data - */ - - void StartParsingL( HBufC8 *aBuf ); - - private: // Constructors - - /** - * @param aObserver The observer class to be notified after xml parsing is done - * @param aAddressInfo The address info - */ - - CXmlHandler( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ); - - /** - * Second phase construction - */ - void ConstructL(); - - private: - // from MContentHandler - - /** - * This method is a callback to indicate the start of the document - * @param aDocParam Specifies the various parameters of the document. - * @param aErrorCode The error code. If this is not KErrNone then special action may be required. - * - */ - void OnStartDocumentL( const RDocumentParameters &aDocParam, TInt aErrorCode ); - - /** - * This method is a callback to indicate the end of the document - * @param aErrorCode The error code. If this is not KErrNone then special action may be required. - */ - void OnEndDocumentL( TInt aErrorCode ); - - /** - * This method is a callback to indicate an element has been parsed. - * @param aElement Is a handle to the element's details. - * @param aAttributes Contains the attributes for the element - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnStartElementL( const RTagInfo &aElement, const RAttributeArray &aAttributes, TInt aErrorCode ); - - /** - * This method is a callback to indicate the end of the element has been reached. - * @param aElement Is a handle to the element's details. - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - - void OnEndElementL( const RTagInfo &aElement, TInt aErrorCode ); - - /** - * This method is a callback that sends the content of the element - * @param aBytes the raw content data for the element - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnContentL( const TDesC8 &aBytes, TInt aErrorCode ); - - /** - * This method is a notification of the beginning of the scope of a prefix-URI Namespace mapping - * @param aPrefix the Namespace prefix being declared - * @param aUri the Namespace URI the prefix is mapped to - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnStartPrefixMappingL( const RString &aPrefix, const RString &aUri, TInt aErrorCode ); - - /** - * This method is a notification of the end of the scope of a prefix-URI mapping - * @param aPrefix the Namespace prefix being declared - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnEndPrefixMappingL( const RString &aPrefix, TInt aErrorCode ); - - /** - * This method is a notification of ignorable whitespace in element content - * @param aBytes the ignored bytes from the document being parsed - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnIgnorableWhiteSpaceL( const TDesC8 &aBytes, TInt aErrorCode ); - - /** - * This method is a notification of a skipped entity - * @param aName the name of the skipped entity. - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnSkippedEntityL( const RString &aName, TInt aErrorCode ); - - /** - * This method is a receive notification of a processing instruction. - * @param aTarget the processing instruction target - * @param aData the processing instruction data - * @param aErrorCode The error code. If this is not KErrNone then special action may be required - */ - void OnProcessingInstructionL( const TDesC8 &aTarget, const TDesC8 &aData, TInt aErrorCode); - - /** - * This method indicates an error has occurred - * @param aErrorCode The error code. - */ - void OnError( TInt aErrorCode ); - - /** - * This method obtains the interface matching the specified uid. - * @param aUid the uid identifying the required interface - */ - TAny *GetExtendedInterface( const TInt32 aUid ); - - private: // Private data - - MXmlHandlerObserver& iObserver; - CParser* iParser; - HBufC8* iBuffer; - CInternalAddressInfo *iAddressInfo; - xmlhandler::TLocationInfoType iCurrentElement; - TBool iThoroughfare ; - }; - -#endif /* __XMLHANDLER_H__ */ - -// End of File diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/clientengine.cpp --- a/locationmanager/ReverseGeocode/src/clientengine.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,670 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of HTTP Client Engine. -*/ - -//Symbian headers -#include -#include -#include -#include -#include -#include // voice call notification -#include // kmmtsymodulename -#include "locationmanagerdebug.h" -#include "clientengine.h" - -// Used user agent for requests -_LIT8(KUserAgent, "SimpleClient 1.0"); - -// This client accepts all content types. -_LIT8(KAccept, "*/*"); - -// ---------------------------------------------------------------------------- -// CClientEngine::NewL() -// ---------------------------------------------------------------------------- -CClientEngine* CClientEngine::NewL( MClientObserver& aObserver) - { - LOG("CClientEngine::NewL ,begin"); - CClientEngine* self = CClientEngine::NewLC( aObserver); - CleanupStack::Pop( self ); - return self; - } - -// ---------------------------------------------------------------------------- -// CClientEngine::NewLC() -// ---------------------------------------------------------------------------- -CClientEngine* CClientEngine::NewLC(MClientObserver& aObserver) - { - LOG("CClientEngine::NewLC ,begin"); - CClientEngine* self = new ( ELeave ) CClientEngine( aObserver); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// ---------------------------------------------------------------------------- -// CClientEngine::CClientEngine() -// ---------------------------------------------------------------------------- -CClientEngine::CClientEngine( MClientObserver& aObserver): - CActive( CActive::EPriorityStandard ), - iObserver( aObserver ), - iConnectionSetupDone( EFalse ), - iPrevProfileId( -1 ), - iMobility(NULL), - iTransactionOpen( EFalse ), - iUri(NULL) - { - } - -// ---------------------------------------------------------------------------- -// CClientEngine::~CClientEngine() -// ---------------------------------------------------------------------------- -CClientEngine::~CClientEngine() - { - LOG("CClientEngine::~CClientEngine ,begin"); - Cancel(); - - if ( iTransactionOpen ) - { - iTransaction.Close(); - iTransactionOpen = EFalse; - } - - if ( iMobility ) - { - iMobility->Cancel(); - } - delete iMobility; - if(iConnectionSetupDone) - { - iSession.Close(); - iConnection.Close(); - iSocketServ.Close(); - } - delete iUri; - - iCmManager.Close(); - - - // DON'T cose RMobilePhone object - - LOG("CClientEngine::~CClientEngine ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::ConstructL() -// ---------------------------------------------------------------------------- -void CClientEngine::ConstructL() - { - LOG("CClientEngine::ConstructL ,begin"); - CActiveScheduler::Add(this); - iCmManager.OpenL(); - LOG("CClientEngine::ConstructL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::CloseConnection() -// ---------------------------------------------------------------------------- -void CClientEngine::CloseConnection() - { - LOG("CClientEngine::CloseConnection ,begin" ); - if ( iTransactionOpen ) - { - iTransaction.Close(); - iTransactionOpen = EFalse; - } - - if ( iMobility ) - { - iMobility->Cancel(); - delete iMobility; - iMobility = NULL; - } - - if(iConnectionSetupDone) - { - iSession.Close(); - iConnection.Close(); - iSocketServ.Close(); - - iConnectionSetupDone = EFalse; - } - LOG("CClientEngine::CloseConnection ,end"); - } - - -// ---------------------------------------------------------------------------- -// CClientEngine::IsVisitorNetwork() -// ---------------------------------------------------------------------------- -TBool CClientEngine::IsVisitorNetwork(const TMobileRoamingStatus& aRegNetworkStatus) const - { - LOG1("CClientEngine::IsVisitorNetwork. reg network status - %d", - (TInt) aRegNetworkStatus); - - return (aRegNetworkStatus == EMobileNationalRoaming || - aRegNetworkStatus== EMobileInternationalRoaming); - - } - -// ---------------------------------------------------------------------------- -// CClientEngine::IsWlanOnly() -// ---------------------------------------------------------------------------- -TBool CClientEngine::IsWlanOnly(const TMobileRoamingStatus& aRoamingStatus, - const TCmGenConnSettings& aGenConnSettings) const - { - LOG1("CClientEngine::IsVisitorNetwork. reg network status - %d",(TInt) aRoamingStatus); - TBool wlanOnlyFlag = EFalse; - switch(aRoamingStatus) - { - case EMobileRegHomeNetwork: - LOG("Home network"); - wlanOnlyFlag = (aGenConnSettings.iCellularDataUsageHome == ECmCellularDataUsageDisabled); - break; - case EMobileNationalRoaming: - case EMobileInternationalRoaming: - LOG("Visitor network"); - wlanOnlyFlag = (aGenConnSettings.iCellularDataUsageVisitor == ECmCellularDataUsageDisabled); - break; - default: - break; - } // end of switch - LOG1("Wlan only flag - %d", wlanOnlyFlag ? 1 : 0); - return wlanOnlyFlag; - } - - -// ---------------------------------------------------------------------------- -// CClientEngine::UeRegNetworkStatus() -// ---------------------------------------------------------------------------- -TMobileRoamingStatus CClientEngine::UeRegNetworkStatus() - { - LOG("CClientEngine::UeRegNetworkStatus() ,begin"); - TMobileRoamingStatus roamingStatus = EMobileNotRegistered; - if(iObserver.IsRegisteredAtHomeNetwork()) - { - // home network. - roamingStatus = EMobileRegHomeNetwork; - LOG("UE registered in home network"); - } - else - { - // roaming network - TBool homeNwInfoAvailableFlag = EFalse; - const RMobilePhone::TMobilePhoneNetworkInfoV1& homeNwInfo = - iObserver.GetHomeNetworkInfo(homeNwInfoAvailableFlag); - if(homeNwInfoAvailableFlag) - { - RMobilePhone::TMobilePhoneNetworkCountryCode countryCode = - iObserver.GetCurrentRegisterNw().iCountryCode; - if(countryCode.Compare(homeNwInfo.iCountryCode) == 0) - { - // national roaming.. - LOG("UE is in nation roaming"); - roamingStatus = EMobileNationalRoaming; - } - else - { - // international roaming. - LOG("UE is in international roaming"); - roamingStatus = EMobileInternationalRoaming; - } - } - } - if(roamingStatus == EMobileNotRegistered) - { - LOG("UE is not registered with the network. Offline mode."); - } - LOG("CClientEngine::UeRegNetworkStatus ,end"); - return roamingStatus; - } - -// ---------------------------------------------------------------------------- -// CClientEngine::IsDataConnectionAskAlwaysL() -// ---------------------------------------------------------------------------- -TBool CClientEngine::IsDataConnectionAskAlwaysL() - { - LOG("CClientEngine::IsDataConnectionAskAlwaysL ,begin"); - TMobileRoamingStatus roamingStatus = UeRegNetworkStatus(); - - TCmGenConnSettings genConnSettings; - TBool retVal = EFalse; - iCmManager.ReadGenConnSettingsL(genConnSettings); - - LOG1("wlan usage - %d", genConnSettings.iUsageOfWlan); - LOG1("Home usage - %d", genConnSettings.iCellularDataUsageHome); - LOG1("Visitor usage - %d", genConnSettings.iCellularDataUsageVisitor); - - if((IsWlanOnly(roamingStatus, genConnSettings) && genConnSettings.iUsageOfWlan == ECmUsageOfWlanManual) // wlan - || (roamingStatus == EMobileRegHomeNetwork && // home - genConnSettings.iCellularDataUsageHome == ECmCellularDataUsageConfirm) - || (IsVisitorNetwork(roamingStatus) && // roaming - genConnSettings.iCellularDataUsageVisitor == ECmCellularDataUsageConfirm) - ) - { - retVal = ETrue; - } - LOG("CClientEngine::IsDataConnectionAskAlwaysL ,end"); - return retVal; - } - -// ---------------------------------------------------------------------------- -// CClientEngine::SetupConnectionL() -// ---------------------------------------------------------------------------- -void CClientEngine::SetupConnectionL( const TConnectionOption aOption ) - { - LOG("CClientEngine::SetupConnectionL ,begin"); - if ( aOption == ESilent && IsDataConnectionAskAlwaysL()) - { - LOG("Silent mode. connection setup is asked always."); - if ( iConnectionSetupDone ) - { - LOG("Already connected. Close the connection\n"); - CloseConnection(); - } - User::Leave(KErrNotSupported); - } - if ( iConnectionSetupDone ) - { - // Connection setup is done - LOG("Already connected.\n"); - User::Leave(KErrAlreadyExists); - } - - - LOG1("SetupConnectionL: connection option: %d\n", aOption ); - - // Open HTTP Session - iSession.OpenL(); - User::LeaveIfError(iSocketServ.Connect()); - User::LeaveIfError(iConnection.Open(iSocketServ)); - - if ( aOption == ESilent ) - { - // Create overrides - TConnPrefList prefList; - TExtendedConnPref prefs; - prefs.SetSnapPurpose( CMManager::ESnapPurposeInternet ); - prefs.SetNoteBehaviour( TExtendedConnPref::ENoteBehaviourConnSilent ); - prefList.AppendL( &prefs ); - - iConnection.Start(prefList, iStatus); - } - else - { - iConnection.Start( iStatus ); - } - - - SetActive(); - LOG("CClientEngine::SetupConnectionL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::SetHeaderL() -// ---------------------------------------------------------------------------- -void CClientEngine::SetHeaderL( RHTTPHeaders aHeaders, TInt aHdrField, const TDesC8& aHdrValue ) - { - LOG("CClientEngine::SetHeaderL ,begin"); - RStringF valStr = iSession.StringPool().OpenFStringL( aHdrValue ); - CleanupClosePushL( valStr ); - THTTPHdrVal val(valStr); - aHeaders.SetFieldL( iSession.StringPool().StringF( aHdrField, RHTTPSession::GetTable()), val); - CleanupStack::PopAndDestroy(); // valStr - LOG("CClientEngine::SetHeaderL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::IssueHTTPGetL() -// ---------------------------------------------------------------------------- -void CClientEngine::IssueHTTPGetL( const TDesC8& aUri, const TConnectionOption aOption ) - { - LOG("CClientEngine::IssueHTTPGetL ,begin"); - if ( IsActive() ) - { - // If there is some request in pending state - // return with out further processing - // Should we leave here !? - LOG("Client engine is already active"); - return; - } - - delete iUri; - iUri = NULL; - - iUri = aUri.AllocL(); - - // Create HTTP connection - TRAPD( err, SetupConnectionL( aOption ) ); - //If the Err is KErrNone, It will lead to RunL and - //hence jump to the DoHTTPGetL() from there. - - if( err == KErrAlreadyExists ) - { - DoHTTPGetL(); - } - else if( err != KErrNone ) - { - LOG("Connection failure. Leaving."); - iObserver.ClientEvent( EHttpConnectionFailure ); - User::Leave(err); - } - iEngineState = EGet; - LOG("CClientEngine::IssueHTTPGetL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::DoHTTPGetL() -// ---------------------------------------------------------------------------- -void CClientEngine::DoHTTPGetL() - { - LOG("CClientEngine::DoHTTPGetL ,begin"); - // Parse string to URI (as defined in RFC2396) - TUriParser8 uri; - uri.Parse( *iUri ); - - // Get request method string for HTTP GET - RStringF method = iSession.StringPool().StringF( HTTP::EGET,RHTTPSession::GetTable() ); - - // Open transaction with previous method and parsed uri. This class will - // receive transaction events in MHFRunL and MHFRunError. - iTransaction = iSession.OpenTransactionL( uri, *this, method ); - iTransactionOpen = ETrue; - - // Set headers for request; user agent and accepted content type - RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection(); - SetHeaderL( hdr, HTTP::EUserAgent, KUserAgent ); - SetHeaderL( hdr, HTTP::EAccept, KAccept ); - - // Submit the transaction. After this the framework will give transaction - // events via MHFRunL and MHFRunError. - iTransaction.SubmitL(); - - iObserver.ClientEvent( EHttpConnecting ); - LOG("CClientEngine::DoHTTPGetL ,end"); -} - -// ---------------------------------------------------------------------------- -// CClientEngine::CancelTransaction() -// ---------------------------------------------------------------------------- -void CClientEngine::CancelTransaction() - { - LOG("CClientEngine::CancelTransaction ,begin"); - iEngineState = EIdle; - delete iUri; - iUri = NULL; - - // Close() also cancels transaction (Cancel() can also be used but - // resources allocated by transaction must be still freed with Close()) - if( iTransactionOpen ) - { - iTransaction.Close(); - iTransactionOpen = EFalse; - - iObserver.ClientEvent( EHttpTxCancelled ); - } - LOG("CClientEngine::CancelTransaction ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::MHFRunL() -// ---------------------------------------------------------------------------- -void CClientEngine::MHFRunL( RHTTPTransaction aTransaction, const THTTPEvent& aEvent ) - { - LOG("CClientEngine::MHFRunL ,begin"); - switch ( aEvent.iStatus ) - { - case THTTPEvent::EGotResponseHeaders: - { - // HTTP response headers have been received. Use - // aTransaction.Response() to get the response. However, it's not - // necessary to do anything with the response when this event occurs. - iObserver.ClientEvent( EHttpHdrReceived ); - break; - } - case THTTPEvent::EGotResponseBodyData: - { - // Part (or all) of response's body data received. Use - // aTransaction.Response().Body()->GetNextDataPart() to get the actual - // body data. - - // Get the body data supplier - MHTTPDataSupplier* body = aTransaction.Response().Body(); - TPtrC8 dataChunk; - - // GetNextDataPart() returns ETrue, if the received part is the last - // one. - TBool isLast = body->GetNextDataPart(dataChunk); - iObserver.ClientBodyReceived(dataChunk); - - iObserver.ClientEvent( EHttpBytesReceieved ); - - // NOTE: isLast may not be ETrue even if last data part received. - // (e.g. multipart response without content length field) - // Use EResponseComplete to reliably determine when body is completely - // received. - if( isLast ) - { - iObserver.ClientEvent( EHttpBodyReceieved ); - } - // Always remember to release the body data. - body->ReleaseData(); - break; - } - case THTTPEvent::EResponseComplete: - { - // Indicates that header & body of response is completely received. - // No further action here needed. - - iObserver.ClientEvent( EHttpTxCompleted ); - break; - } - case THTTPEvent::ESucceeded: - { - // Indicates that transaction succeeded. - iObserver.ClientEvent( EHttpTxSuccess ); - // Transaction can be closed now. It's not needed anymore. - aTransaction.Close(); - iTransactionOpen = EFalse; - break; - } - case THTTPEvent::EFailed: - { - // Transaction completed with failure. - iObserver.ClientEvent( EHttpTxFailed ); - aTransaction.Close(); - iTransactionOpen = EFalse; - break; - } - default: - // There are more events in THTTPEvent, but they are not usually - // needed. However, event status smaller than zero should be handled - // correctly since it's error. - { - if ( aEvent.iStatus < 0 ) - { - iObserver.ClientEvent( EHttpConnectionFailure ); - // Close the transaction on errors - aTransaction.Close(); - iTransactionOpen = EFalse; - } - break; - } - } - LOG("CClientEngine::MHFRunL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::MHFRunError() -// ---------------------------------------------------------------------------- -TInt CClientEngine::MHFRunError( TInt /*aError*/, RHTTPTransaction /*aTransaction*/, const THTTPEvent& /*aEvent*/ ) - { - LOG("CClientEngine::MHFRunError ,begin"); - // Just notify about the error and return KErrNone. - CloseConnection(); - iObserver.ClientEvent(EHttpMhfRunError); - return KErrNone; - } - -// ---------------------------------------------------------------------------- -// CClientEngine::PreferredCarrierAvailable() -// ---------------------------------------------------------------------------- -void CClientEngine::PreferredCarrierAvailable( TAccessPointInfo /*aOldAPInfo*/, - TAccessPointInfo /*aNewAPInfo*/, - TBool /*aIsUpgrade*/, - TBool aIsSeamless ) - { - LOG("CClientEngine::PreferredCarrierAvailable ,begin"); - if( !aIsSeamless && iMobility) - { - iMobility->MigrateToPreferredCarrier(); - } - LOG("CClientEngine::PreferredCarrierAvailable ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::NewCarrierActive() -// ---------------------------------------------------------------------------- -void CClientEngine::NewCarrierActive( TAccessPointInfo /*aNewAPInfo*/, - TBool aIsSeamless ) - { - LOG("CClientEngine::NewCarrierActive ,begin"); - if( !aIsSeamless && iMobility) - { - iMobility->NewCarrierAccepted(); - } - LOG("CClientEngine::NewCarrierActive ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::Error() -// ---------------------------------------------------------------------------- -void CClientEngine::Error(TInt /*aError*/) - { - LOG("CClientEngine::Error"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::DoCancel() -// ---------------------------------------------------------------------------- -void CClientEngine::DoCancel() - { - LOG("CClientEngine::DoCancel"); - iConnection.Stop(); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::DoCancel() -// ---------------------------------------------------------------------------- -TInt CClientEngine::RunError(TInt /*aError*/) - { - LOG("CClientEngine::RunError"); - // Just notify about the error and return KErrNone. - CloseConnection(); - iObserver.ClientEvent( EHttpTxFailed ); - return KErrNone; - } -// ---------------------------------------------------------------------------- -// CClientEngine::RunL() -// ---------------------------------------------------------------------------- -void CClientEngine::RunL() - { - LOG1("CClientEngine::RunL: error is: %d\n", iStatus.Int() ); - TInt statusCode = iStatus.Int(); - if ( statusCode == KErrNone ) - { - // Connection done ok - iConnectionSetupDone = ETrue; - - RStringPool strPool = iSession.StringPool(); - - // Remove first session properties just in case. - RHTTPConnectionInfo connInfo = iSession.ConnectionInfo(); - - // Clear RConnection and Socket Server instances - connInfo.RemoveProperty(strPool.StringF(HTTP::EHttpSocketServ,RHTTPSession::GetTable())); - connInfo.RemoveProperty(strPool.StringF(HTTP::EHttpSocketConnection,RHTTPSession::GetTable())); - - // Clear the proxy settings - connInfo.RemoveProperty(strPool.StringF(HTTP::EProxyUsage,RHTTPSession::GetTable())); - connInfo.RemoveProperty(strPool.StringF(HTTP::EProxyAddress,RHTTPSession::GetTable())); - - // RConnection and Socket Server - connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketServ, - RHTTPSession::GetTable()), - THTTPHdrVal (iSocketServ.Handle()) ); - - TInt connPtr1 = REINTERPRET_CAST(TInt, &iConnection); - connInfo.SetPropertyL ( strPool.StringF(HTTP::EHttpSocketConnection, - RHTTPSession::GetTable() ), THTTPHdrVal (connPtr1) ); - - // Register for mobility API - if(iMobility) - { - delete iMobility; - iMobility = NULL ; - } - iMobility = CActiveCommsMobilityApiExt::NewL( iConnection, *this ); - // Start selected HTTP action - switch( iEngineState ) - { - case EIdle: - { - // - CancelTransaction(); - break; - } - case EGet: - { - DoHTTPGetL(); - break; - } - }; - } - else - { - //handle error - if ( statusCode == KErrPermissionDenied ) - { - iObserver.ClientEvent( EHttpAuthFailed ); - } - else - { - //Throw some general Transaction falure error! - iObserver.ClientEvent( EHttpTxFailed ); - } - CloseConnection(); - } - LOG("CClientEngine::RunL ,end"); - } - -// ---------------------------------------------------------------------------- -// CClientEngine::SilentConnectionAllowed() -// ---------------------------------------------------------------------------- -TBool CClientEngine::SilentConnectionAllowed() - { - LOG("CClientEngine::SilentConnectionAllowed ,begin"); - TBool retVal = EFalse; - TRAPD(err, retVal = IsDataConnectionAskAlwaysL()); - if(err == KErrNone) - { - // data connection is always ask... Silent connection is not allowed - retVal = !retVal; - } - LOG1("CClientEngine::SilentConnectionAllowed ,end. Ret - %d", retVal); - return retVal; - } - -// End of file - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/connectiontimerhandler.cpp --- a/locationmanager/ReverseGeocode/src/connectiontimerhandler.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Connection close timer handler -*/ - -#include "connectiontimerhandler.h" -#include "locationmanagerdebug.h" - - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::CConnectionTimerHandler() -// ---------------------------------------------------------------------------- - - -CConnectionTimerHandler::CConnectionTimerHandler(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface): - CTimer(EPriorityStandard ), - iConnectionTimeoutHandlerInterface(aConnectionTimeoutHandlerInterface) -{ - -} - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::~CConnectionTimerHandler() -// ---------------------------------------------------------------------------- -CConnectionTimerHandler::~CConnectionTimerHandler() - { - } - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::NewL() -// ---------------------------------------------------------------------------- -CConnectionTimerHandler* CConnectionTimerHandler::NewL(MConnectionTimeoutHandlerInterface& aConnectionTimeoutHandlerInterface) - { - LOG("CConnectionTimerHandler::NewL ,begin"); - CConnectionTimerHandler* self = new( ELeave ) CConnectionTimerHandler(aConnectionTimeoutHandlerInterface); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::ConstructL() -// ---------------------------------------------------------------------------- -void CConnectionTimerHandler::ConstructL() - { - LOG("CConnectionTimerHandler::ConstructL ,begin"); - CActiveScheduler::Add(this); - CTimer::ConstructL(); - LOG("CConnectionTimerHandler::ConstructL ,end"); - } - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::StartTimer -// starts a timer -// ---------------------------------------------------------------------------- -void CConnectionTimerHandler::StartTimer(const TInt aTimeoutVal) - { - LOG("CConnectionTimerHandler::StartTimer ,begin"); - if(!IsActive()) - { - // already active. - LOG("Timer started"); - After(aTimeoutVal); - } - LOG("CConnectionTimerHandler::StartTimer ,end"); - } - -// ---------------------------------------------------------------------------- -// CConnectionTimerHandler::RunL -// ---------------------------------------------------------------------------- -void CConnectionTimerHandler::RunL( ) - { - LOG("CConnectionTimerHandler::RunL ,begin"); - iConnectionTimeoutHandlerInterface.HandleTimedoutEvent(iStatus.Int()); - LOG("CConnectionTimerHandler::RunL ,end"); - } - - - -// End of file - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/internaladdressinfo.cpp --- a/locationmanager/ReverseGeocode/src/internaladdressinfo.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,339 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of Internal address info structure. -*/ - -#include "internaladdressinfo.h" -#include "locationmanagerdebug.h" - - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::CInternalAddressInfo() -// Constructor -// ---------------------------------------------------------------------------- -CInternalAddressInfo::CInternalAddressInfo(): iCountryName( NULL ), - iState( NULL ), - iCity( NULL ), - iDistrict( NULL ), - iPin( NULL ), - iTFName( NULL ), - iTFNumber( NULL ) - - { - - - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::~CInternalAddressInfo() -// Destructor -// ---------------------------------------------------------------------------- -CInternalAddressInfo::~CInternalAddressInfo() - { - LOG("CInternalAddressInfo::~CInternalAddressInfo ,begin"); - if (iCountryName) - { - delete iCountryName; - iCountryName = NULL ; - } - if (iState) - { - delete iState; - iState= NULL ; - } - if (iCity) - { - delete iCity; - iCity= NULL ; - } - if (iDistrict) - { - delete iDistrict; - iDistrict = NULL ; - } - if (iPin) - { - delete iPin; - iPin = NULL ; - } - if (iTFName) - { - delete iTFName; - iTFName = NULL ; - } - if (iTFNumber) - { - delete iTFNumber; - iTFNumber = NULL ; - } - - LOG("CInternalAddressInfo::~CInternalAddressInfo ,end"); - } - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::NewL() -// Factory function to create the instance -// ---------------------------------------------------------------------------- -CInternalAddressInfo* CInternalAddressInfo::NewL() - { - LOG("CInternalAddressInfo::NewL ,begin"); - CInternalAddressInfo *self = new (ELeave) CInternalAddressInfo(); - CleanupStack::PushL(self); - self->ConstructL(); - - CleanupStack::Pop( self ); - return self; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::ConstructL() -// Second phase construction. -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::ConstructL() - { - LOG("CInternalAddressInfo::ConstructL ,begin"); - //Copy all with the empty strings; - ResetAddressInfoL(); - LOG("CInternalAddressInfo::ConstructL ,end"); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetCountryName() -// Gets Country name -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetCountryName() - { - return *iCountryName; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetState() -// Gets State name -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetState() - { - return *iState; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetCity() -// Gets City name. -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetCity() - { - return *iCity; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetDistrict() -// Gets District name of the address. -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetDistrict() - { - return *iDistrict; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetPincode() -// Gets the postal code. -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetPincode() - { - return *iPin; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetThoroughfareName() -// Gets thoroughfare name -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetThoroughfareName() - { - return *iTFName; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::GetThoroughfareNumber() -// Gets thoroughfare number -// ---------------------------------------------------------------------------- -TDesC& CInternalAddressInfo::GetThoroughfareNumber() - { - return *iTFNumber; - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetCountryName() -// Sets the country name information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetCountryName( const TDesC& aCountryName ) - { - if( iCountryName ) - { - delete iCountryName; - } - iCountryName = aCountryName.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetState() -// Sets the State name information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetState( const TDesC& aState ) - { - if( iState ) - { - delete iState; - } - iState = aState.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetCity() -// Sets the City name information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetCity( const TDesC& aCity ) - { - if( iCity ) - { - delete iCity; - } - iCity = aCity.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetDistrict() -// Sets the District name information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetDistrict( const TDesC& aDisrict ) - { - if( iDistrict ) - { - delete iDistrict; - } - iDistrict = aDisrict.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetPincode() -// Sets the Postal code information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetPincode( const TDesC& aPincode ) - { - if( iPin ) - { - delete iPin; - } - iPin = aPincode.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetThoroughfareName() -// Sets the thoroughfare name information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetThoroughfareName( const TDesC& aTFName ) - { - if( iTFName ) - { - delete iTFName; - } - iTFName = aTFName.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::SetThoroughfareNumber() -// Sets the thoroughfare number information -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::SetThoroughfareNumber( const TDesC& aTFNumber ) - { - if( iTFNumber ) - { - delete iTFNumber; - } - iTFNumber = aTFNumber.Alloc(); - } - - -// ---------------------------------------------------------------------------- -// CInternalAddressInfo::ResetAddressInfoL() -// resets the address info -// ---------------------------------------------------------------------------- -void CInternalAddressInfo::ResetAddressInfoL() - { - // Allocate empty buffer to avoid crash on get method - - // Free memory - if(iCountryName) - { - delete iCountryName; - iCountryName = NULL; - } - if(iState) - { - delete iState; - iState = NULL; - } - if(iCity) - { - delete iCity; - iCity = NULL; - } - if(iDistrict) - { - delete iDistrict; - iDistrict = NULL; - } - if(iPin) - { - delete iPin; - iPin = NULL; - } - if(iTFName) - { - delete iTFName; - iTFName = NULL; - } - if(iTFNumber) - { - delete iTFNumber; - iTFNumber = NULL; - } - // Allocate empty strings, - iCountryName = KNullDesC().AllocL(); - iCity = KNullDesC().AllocL(); - iState = KNullDesC().AllocL(); - iDistrict = KNullDesC().AllocL(); - iPin = KNullDesC().AllocL(); - iTFName = KNullDesC().AllocL(); - iTFNumber = KNullDesC().AllocL(); - - } - - -//end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/internalreversegeocode.cpp --- a/locationmanager/ReverseGeocode/src/internalreversegeocode.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,454 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of reversegeocodea achieved using HTTP get -* request to the Maps server. -*/ - -#include "internalreversegeocode.h" -#include "internaladdressinfo.h" -#include "locationmanagerdebug.h" - - -//Maximum length for the response buffer size -const int KMaxResponseLength = 2048; -//Authentication token for the Maps server -//This authentication in specific to our photo-tagging feature -_LIT8( KAuthenticationToken, "eb0ae60051e27d3cfcae94e7b47e9eff" ); -//Static RefererURL which shows that request has been made from this app -_LIT8( KRefererURL, "s60_app_photos" ); - -//Language option for the REST request -_LIT8( KDefaultLanguage, "eng" ); - - -//Format of the HTTP request for the reverse geocode -_LIT8( KRequestFormat, "http://loc.mobile.maps.svc.ovi.com/geocoder/rgc/1.0?token=%S&referer=%S&n=10&lat=%f&long=%f&lg=%S&output=xml" ); - - -// http://www.loc.gov/marc/languages/ -// These are the nokia language id converted to MARC language strings. - static const char Marc_Table[ 104 ][ 4 ] = { - " ", // dummy - "ENG", // 1 English - "FRE", // 2 French - "GER", // 3 German - "SPA", // 4 Spanish - "ITA", // 5 Italian - "SWE", // 6 Swedish - "DAN", // 7 Danish - "NOR", // 8 Norwegian - "FIN", // 9 Finnish - "010", // 10 American - "011", // 11 Swiss French - "GSW", // 12 Swiss German - "POR", // 13 Portuguese - "TUR", // 14 Turkish - "ICE", // 15 Icelandic - "RUS", // 16 Russian - "HUN", // 17 Hungarian - "DUT", // 18 Dutch - "019", // 19 Flemish - "020", // 20 Australian English - "021", // 21 Belgian French - "022", // 22 Austrian German - "023", // 23 New Zealand English - "FRE", // 24 International French - "CZE", // 25 Czech - "SLO", // 26 Slovak - "POL", // 27 Polish - "SLV", // 28 Slovenian - "029", // 29 TaiwanChinese - "CHT", // 30 HongKongChinese - "CHI", // 31 PeoplesRepublicOfChina Chinese - "JPN", // 32 Japanese - "THA", // 33 Thai - "AFR", // 34 Afrikaans - "ALB", // 35 Albanian - "AMH", // 36 Amharic - "ARA", // 37 Arabic - "ARM", // 38 Armenian - "TGL", // 39 Tagalog - "BEL", // 40 Belarusian - "BEN", // 41 Bengali - "BUL", // 42 Bulgarian - "BUR", // 43 Burmese - "CAT", // 44 Catalan - "SCR", // 45 Croatian - "046", // 46 Canadian English - "ENG", // 47 International English - "048", // 48 SouthAfrican English - "EST", // 49 Estonian - "PER", // 50 Persian (Farsi) - "051", // 51 Canadian French - "GAE", // 52 Scots Gaelic - "GEO", // 53 Georgian - "GRE", // 54 Greek - "055", // 55 Cyprus Greek - "GUJ", // 56 Gujarati - "HEB", // 57 Hebrew - "HIN", // 58 Hindi - "IND", // 59 Bahasa indonesia - "GLE", // 60 Irish - "061", // 61 Swiss Italian - "KAN", // 62 Kannada - "KAZ", // 63 Kazakh - "KHM", // 64 Khmer - "KOR", // 65 Korean - "LAO", // 66 Lao - "LAV", // 67 Latvian - "LIT", // 68 Lithuanian - "MAC", // 69 Macedonian - "070", // 70 Bahasa Malaysia - "MAL", // 71 Malayalam - "MAR", // 72 Marathi - "MOL", // 73 Moldavian - "MON", // 74 Mongolian - "NNO", // 75 Norwegian Nynorsk - "076", // 76 Brazilian Portuguese - "PAN", // 77 Punjabi - "RUM", // 78 Romanian - "SCC", // 79 Serbian - "SNH", // 80 Sinhalese - "SOM", // 81 Somali - "082", // 82 International Spanish - "083", // 83 LatinAmerican Spanish - "SWA", // 84 Swahili - "085", // 85 Finland Swedish - "TAJ", // 86 Tajik - "TAM", // 87 Tamil - "TEL", // 88 Telugu - "TIB", // 89 Tibetan - "TIR", // 90 Tigrinya - "091", // 91 Cyprus Turkish - "TUK", // 92 Turkmen - "UKR", // 93 Ukrainian - "URD", // 94 Urdu - "UZB", // 95 Uzbek - "VIE", // 96 Vietnamese - "WEL", // 97 Welsh - "ZUL", // 98 Zulu - "UND", // 99 Other - "UND", // 100 Undef - "UND", // 101 Undef - "BAQ", // 102 Basque - "103", // 103 Galician - }; - - // Timer interval - const TInt KInterval = 15000000; // 15 seconds - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::NewL() -// Factory function to create the instance -// ---------------------------------------------------------------------------- -CInternalReverseGeocode* CInternalReverseGeocode::NewL( MReverseGeocodeObserver& aObserver ) - { - LOG( "CInternalReverseGeocode::NewL,begin" ); - CInternalReverseGeocode *self = new (ELeave) CInternalReverseGeocode( aObserver ); - CleanupStack::PushL( self ); - self->ConstructL(); - - CleanupStack::Pop( self ); - return self; - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::CInternalReverseGeocode() -// Constructor -// ---------------------------------------------------------------------------- -CInternalReverseGeocode::CInternalReverseGeocode( MReverseGeocodeObserver& aObserver ): - iXmlHandler ( NULL ), - iClientEngine ( NULL ), - iXMLBuf ( NULL ), - iObserver( aObserver ), - iTimer( NULL ), - iStartTimerFlag(EFalse) - { - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::~CInternalReverseGeocode() -// Destructor -// ---------------------------------------------------------------------------- -CInternalReverseGeocode::~CInternalReverseGeocode() - { - LOG( "CInternalReverseGeocode::~CInternalReverseGeocode,begin" ); - if ( iTimer) - { - iTimer->Cancel(); - delete iTimer; - iTimer = NULL; - } - delete iXMLBuf; - delete iXmlHandler; - delete iClientEngine; - delete iAddressInfo; - LOG( "CInternalReverseGeocode::~CInternalReverseGeocode,end" ); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::GetAddressByCoordinateL() -// Gets the address for the given geo-coordinaates. -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::GetAddressByCoordinateL( TLocality aLocality, - const TConnectionOption aOption ) - { - LOG("CInternalReverseGeocode::GetAddressByCoordinateL ,begin"); - TReal64 latitude = aLocality.Latitude(); - TReal64 longitude = aLocality.Longitude(); - - iAuthCode.Copy( KAuthenticationToken ); - iRefURL.Copy( KRefererURL ); - - - GetLanguageForTheRequest( iLang ); - - //Form the request URI - iQueryString.Format( KRequestFormat, &iAuthCode, &iRefURL, latitude, longitude, &iLang ); - TInt err = KErrNone; - TRAP(err, iClientEngine->IssueHTTPGetL( iQueryString, aOption )); - - if ( iTimer && iTimer->IsActive() ) - { - iTimer->Cancel(); - } - if(err == KErrNone || err == KErrNotSupported) - { - // connection is closed because of data usage is set to manual - iStartTimerFlag = EFalse; - } - LOG("CInternalReverseGeocode::GetAddressByCoordinateL ,end"); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::ConstructL() -// second phase construction. -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::ConstructL() - { - LOG( "CInternalReverseGeocode::ConstructL,begin" ); - iXMLBuf = HBufC8::NewL( KMaxResponseLength ); - - //Address Info - iAddressInfo = CInternalAddressInfo::NewL(); - - iXmlHandler = CXmlHandler::NewL( *this, iAddressInfo ); - - iClientEngine = CClientEngine::NewL( *this ); - - iTimer = CConnectionTimerHandler::NewL(*this); - - LOG( "CInternalReverseGeocode::ConstructL,end" ); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::OnParseCompletedL() -// callback which notifys the completion of parsing. -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::OnParseCompletedL( TInt aError, MAddressInfo& aLocationInfo ) - { - LOG( "CInternalReverseGeocode::OnParseCompletedL,begin" ); - ARG_USED(aLocationInfo); - iStartTimerFlag = ETrue; - iObserver.ReverseGeocodeComplete( aError, *iAddressInfo ); - if(iStartTimerFlag) - { - StartTimer(); - } - LOG( "CInternalReverseGeocode::OnParseCompletedL,end" ); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::ClientEvent() -// callback which notifys progess of HTTP request -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::ClientEvent( const THttpStatus& aEvent ) - { - LOG( "CInternalReverseGeocode::ClientEvent,begin" ); - TInt err; - //Have a Switch here - switch( aEvent ) - { - case EHttpTxCompleted: - //Reading is done - //Parse the String and get the restults - if( iXmlHandler ) - { - TRAP_IGNORE( iXmlHandler->StartParsingL( iXMLBuf ) ); - } - break; - //All these cases will in turn lead to - //generic failure due to connection/Tx related problems - case EHttpConnectionFailure: - // May happen if Socket connection fails - err = KErrCouldNotConnect; - iObserver.ReverseGeocodeComplete( err , *iAddressInfo ); - break; - case EHttpTxFailed: - case EHttpMhfRunError: - // May happen if Socket connection fails - // Complete the RGC with generic error. - err = KErrGeneral; - iObserver.ReverseGeocodeComplete( err , *iAddressInfo ); - break; - case EHttpTxCancelled: - //On Cancellation of request. - err = KErrCancel; - iObserver.ReverseGeocodeComplete( err , *iAddressInfo ); - break; - case EHttpAuthFailed: - //On Cancellation of request. - err = KErrPermissionDenied; - iObserver.ReverseGeocodeComplete( err , *iAddressInfo ); - break; - } - LOG( "CInternalReverseGeocode::ClientEvent,end" ); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::ClientBodyReceived() -// callback through which the HTTP body data is recieved. -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::ClientBodyReceived( const TDesC8& aBodyData ) - { - LOG( "CInternalReverseGeocode::ClientBodyReceived" ); - //Dump the contents here - TPtr8 ptr = iXMLBuf->Des(); - ptr.Zero(); - ptr.Append( aBodyData ); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::GetLanguageForTheRequest() -// Gets the appropriate language based on the Phone language setting -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::GetLanguageForTheRequest( TDes8& aLanguage ) - { - LOG( "CInternalReverseGeocode::GetLanguageForTheRequest,begin" ); - //get the current phone langauge - TInt phoneLangIndex = User::Language(); - - // Get the converted language - if ( phoneLangIndex < sizeof( Marc_Table ) / sizeof( Marc_Table[ 0 ] ) ) - { - aLanguage = (const TUint8*) Marc_Table[ phoneLangIndex ]; - } - else - { - //By default language will be Eng - aLanguage.Copy( KDefaultLanguage ); - } - LOG( "CInternalReverseGeocode::GetLanguageForTheRequest,begin" ); - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::CloseConnection() -// Closes the http connection and notifies the observer -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::CloseConnection() - { - LOG( "CInternalReverseGeocode::CloseConnection ,begin" ); - if(iClientEngine) - { - iClientEngine->CloseConnection(); - LOG( "Connection closed\n" ); - TInt err = KErrCouldNotConnect; - iObserver.ReverseGeocodeComplete( err , *iAddressInfo ); - } - LOG( "CInternalReverseGeocode::CloseConnection,end" ); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::StartTimer() -// starts the timer -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::StartTimer() - { - LOG( "CInternalReverseGeocode::StartTimer ,begin" ); - if(iTimer) - { - iTimer->StartTimer( KInterval); - LOG( "Timer started" ); - } - LOG( "CInternalReverseGeocode::StartTimer,end" ); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::HandleTimedoutEvent() -// Closes the connection once it times out -// ---------------------------------------------------------------------------- -void CInternalReverseGeocode::HandleTimedoutEvent(TInt aErrorCode) - { - LOG( "CInternalReverseGeocode::HandleTimedoutEvent" ); - ARG_USED(aErrorCode); - CloseConnection(); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::SilentConnectionAllowed() -// Checks if a silent connection is allowed -// ---------------------------------------------------------------------------- -TBool CInternalReverseGeocode::SilentConnectionAllowed() - { - LOG( "CInternalReverseGeocode::SilentConnectionAllowed ,begin" ); - TBool retVal = EFalse; - if(iClientEngine) - { - retVal = iClientEngine->SilentConnectionAllowed(); - } - LOG1("Silent connection allowed ,end- %d", (TInt)retVal); - return retVal; - } - - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::GetCurrentRegisterNw() -// ---------------------------------------------------------------------------- -RMobilePhone::TMobilePhoneNetworkInfoV2& CInternalReverseGeocode::GetCurrentRegisterNw() - { - LOG( "CInternalReverseGeocode::GetCurrentRegisterNw ,begin" ); - return iObserver.GetCurrentRegisterNw(); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::IsRegisteredAtHomeNetwork() -// ---------------------------------------------------------------------------- -TBool CInternalReverseGeocode::IsRegisteredAtHomeNetwork() - { - LOG( "CInternalReverseGeocode::IsRegisteredAtHomeNetwork" ); - return iObserver.IsRegisteredAtHomeNetwork(); - } - -// ---------------------------------------------------------------------------- -// CInternalReverseGeocode::GetHomeNetworkInfo() -// ---------------------------------------------------------------------------- -const RMobilePhone::TMobilePhoneNetworkInfoV1& - CInternalReverseGeocode::GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) - { - LOG( "CInternalReverseGeocode::GetHomeNetworkInfo" ); - return iObserver.GetHomeNetworkInfo(aHomeNwInfoAvailableFlag); - } - - -//end of file - diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/reversegeocode.cpp --- a/locationmanager/ReverseGeocode/src/reversegeocode.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of exported interface class of reverse geo-code -*/ - -#include "reversegeocode.h" -#include "internalreversegeocode.h" -#include "locationmanagerdebug.h" - -// -------------------------------------------------------------------------- -// CReverseGeocode::NewL() -// factory class to create the instance -// -------------------------------------------------------------------------- - -EXPORT_C CReverseGeocode* CReverseGeocode::NewL( MReverseGeocodeObserver& aObserver ) - { - LOG("CReverseGeocode::NewL ,begin"); - CInternalReverseGeocode *self = CInternalReverseGeocode::NewL( aObserver ); - - return self; - } - -//End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/ReverseGeocode/src/xmlhandler.cpp --- a/locationmanager/ReverseGeocode/src/xmlhandler.cpp Tue Jul 06 14:44:37 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,389 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Implementation of the Parser -*/ - - - - -#include -#include "internaladdressinfo.h" -#include "xmlhandler.h" -#include "locationmanagerdebug.h" - -using namespace xmlhandler; - -// CONSTANTS -_LIT8( KXmlMimeType, "text/xml" ); -_LIT8( KCountry, "country" ); -_LIT8( KState, "state" ); -_LIT8( KDistrict, "district" ); -_LIT8( KCity, "city" ); -_LIT8( KPostalCode, "postCode" ); -_LIT8( KThoroughfare, "thoroughfare" ); -_LIT8( KNameTag, "name" ); -_LIT8( KNumberTag, "number" ); - -// METHODS DEFINITION - -// -------------------------------------------------------------------------- -// CXmlHandler::NewL -// -------------------------------------------------------------------------- -CXmlHandler* CXmlHandler::NewL( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ) - { - LOG("CXmlHandler::NewL ,begin"); - CXmlHandler* self = CXmlHandler::NewLC( aObserver, aAddressInfo ); - CleanupStack::Pop(); - return self; - } - -// -------------------------------------------------------------------------- -// CXmlHandler::NewLC -// -------------------------------------------------------------------------- - -CXmlHandler* CXmlHandler::NewLC( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ) - { - LOG("CXmlHandler::NewLC ,begin"); - CXmlHandler* self = new ( ELeave ) CXmlHandler( aObserver, aAddressInfo ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// -------------------------------------------------------------------------- -// CXmlHandler::~CXmlHandler -// -------------------------------------------------------------------------- -CXmlHandler::~CXmlHandler() - { - LOG("CXmlHandler::~CXmlHandler"); - delete iParser; - delete iBuffer; - } - -// -------------------------------------------------------------------------- -// CXmlHandler::CXmlHandler -// -------------------------------------------------------------------------- -CXmlHandler::CXmlHandler( MXmlHandlerObserver& aObserver, CInternalAddressInfo *aAddressInfo ): - iObserver( aObserver ), - iParser( NULL ), - iBuffer( NULL ), - iAddressInfo( aAddressInfo ), - iThoroughfare( EFalse ) - { - } - -// -------------------------------------------------------------------------- -// CXmlHandler::ConstructL -// -------------------------------------------------------------------------- -void CXmlHandler::ConstructL() - { - LOG("CXmlHandler::ConstructL ,begin"); - iParser = CParser::NewL( KXmlMimeType, *this ); - - } - -// -------------------------------------------------------------------------- -// CXmlHandler::StartParsingL() -// -------------------------------------------------------------------------- -void CXmlHandler::StartParsingL( HBufC8 *aBuf ) - { - LOG("CXmlHandler::StartParsingL ,begin"); - //Reset the address values before starting new content parsing - iAddressInfo->ResetAddressInfoL(); - - if( iBuffer ) - { - delete iBuffer; - iBuffer = NULL; - } - - iBuffer = HBufC8::NewL( aBuf->Size() ); - TPtr8 ptr = iBuffer->Des(); - ptr.Copy( aBuf->Ptr() , aBuf->Size() ); - - // Now, we have the whole file content in iBuffer. - // We are ready to parse the XML content. - iParser->ParseBeginL(); - iParser->ParseL( *iBuffer ); - - // Since we read the whole file contents within one-shot, - // we can call ParseEndL() right after calling ParseL(). - iParser->ParseEndL(); - LOG("CXmlHandler::StartParsingL ,end"); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnStartDocumentL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnStartDocumentL( const RDocumentParameters& /*aDocParam*/, - TInt aErrorCode ) - { - LOG1("CXmlHandler::OnStartDocumentL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - LOG("CXmlHandler::OnStartDocumentL ,end"); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnEndDocumentL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnEndDocumentL( TInt aErrorCode ) - { - LOG1("CXmlHandler::OnEndDocumentL ,Errcode - %d", aErrorCode); - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnStartElementL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnStartElementL( const RTagInfo& aElement, - const RAttributeArray& /*aAttributes*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnStartElementL , Errorcode - %d", aErrorCode); - if ( KErrNone == aErrorCode ) - { - // If we find the start of an element, we write to the screen, - // for example: "" - - if( !aElement.LocalName().DesC().Compare( KCountry ) ) - { - iCurrentElement = ECountryName; - } - else if( !aElement.LocalName().DesC().Compare( KState ) ) - { - iCurrentElement = EState; - } - else if( !aElement.LocalName().DesC().Compare( KCity ) ) - { - iCurrentElement = ECity; - } - else if( !aElement.LocalName().DesC().Compare( KDistrict ) ) - { - iCurrentElement = EDistrict; - } - else if( !aElement.LocalName().DesC().Compare( KPostalCode ) ) - { - iCurrentElement = EPostalCode; - } - else if( !aElement.LocalName().DesC().Compare( KThoroughfare ) ) - { - iThoroughfare = ETrue; - } - else if( !aElement.LocalName().DesC().Compare( KNameTag ) && iThoroughfare ) - { - iCurrentElement = EThoroughfareName; - } - else if( !aElement.LocalName().DesC().Compare( KNumberTag ) && iThoroughfare ) - { - iCurrentElement = EThoroughfareNumber; - } - else - { - ///Do something - } - } - else - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - LOG("CXmlHandler::OnStartElementL ,end"); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnEndElementL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnEndElementL( const RTagInfo& /*aElement*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnEndElementL ,Error code - %d", aErrorCode); - if( KErrNone == aErrorCode ) - { - // at the end of the tag - //Set it to ENone - iCurrentElement = ENone; - iThoroughfare = EFalse; - } - else - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnContentL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnContentL( const TDesC8 &aBytes, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnContentL ,Errorcode - %d", aErrorCode); - if( KErrNone == aErrorCode ) - { - - if( iCurrentElement == ENone ) - { - //ignore if the current element is not there - return; - } - - // convert the content to UCS-2 - // from UTF-8 - RBuf buffer; - buffer.CreateL( aBytes.Length() ); - CleanupClosePushL(buffer); - CnvUtfConverter::ConvertToUnicodeFromUtf8( buffer , aBytes ); - - if( iCurrentElement == ECountryName ) - { - iAddressInfo->SetCountryName( buffer ); - } - else if( iCurrentElement == EState ) - { - iAddressInfo->SetState( buffer ); - } - else if( iCurrentElement == EDistrict ) - { - iAddressInfo->SetDistrict( buffer ); - } - else if( iCurrentElement == ECity ) - { - iAddressInfo->SetCity( buffer ); - } - else if( iCurrentElement == EPostalCode ) - { - iAddressInfo->SetPincode( buffer ); - } - else if( iCurrentElement == EThoroughfareName ) - { - iAddressInfo->SetThoroughfareName( buffer ); - } - else if( iCurrentElement == EThoroughfareNumber ) - { - iAddressInfo->SetThoroughfareNumber( buffer ); - } - else - { - ///Do something - } - CleanupStack::PopAndDestroy(); // buffer - } - else - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - LOG("CXmlHandler::OnContentL ,end"); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnStartPrefixMappingL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnStartPrefixMappingL( const RString& /*aPrefix*/, - const RString& /*aUri*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnStartPrefixMappingL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnEndPrefixMappingL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnEndPrefixMappingL( const RString& /*aPrefix*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnEndPrefixMappingL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnIgnorableWhiteSpaceL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnIgnorableWhiteSpaceL( const TDesC8& /*aBytes*/,TInt aErrorCode ) - { - LOG1("CXmlHandler::OnIgnorableWhiteSpaceL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnSkippedEntityL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnSkippedEntityL( const RString& /*aName*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnSkippedEntityL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnProcessingInstructionL() -// -------------------------------------------------------------------------- -void CXmlHandler::OnProcessingInstructionL( const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt aErrorCode ) - { - LOG1("CXmlHandler::OnProcessingInstructionL ,Error code - %d", aErrorCode); - if( KErrNone != aErrorCode ) - { - iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ); - } - else - { - // Do nothing - } - } - -// -------------------------------------------------------------------------- -// CXmlHandler::OnError() -// -------------------------------------------------------------------------- -void CXmlHandler::OnError( TInt aErrorCode ) - { - LOG1("CXmlHandler::OnError ,Error code - %d", aErrorCode); - TRAP_IGNORE( iObserver.OnParseCompletedL( aErrorCode, *iAddressInfo ) ); - } - -// -------------------------------------------------------------------------- -// CXmlHandler::GetExtendedInterface() -// -------------------------------------------------------------------------- -TAny* CXmlHandler::GetExtendedInterface( const TInt32 /*aUid*/ ) - { - return 0; - } - -// End of File diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/group/locationmanagerclient.mmp --- a/locationmanager/client/group/locationmanagerclient.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/client/group/locationmanagerclient.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -20,7 +20,7 @@ #if defined(WINSCW) deffile ../bwincw/locationmanagerclientwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/locationmanagerclientarm.def #endif nostrictdef @@ -52,7 +52,6 @@ LIBRARY lbs.lib LIBRARY mdccommon.lib -DEBUGLIBRARY flogger.lib PAGED BYTEPAIRCOMPRESSTARGET OPTION ARMCC -O3 -OTime diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/client/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS LocationManager Client + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/sis/locationmanagerclient_stub.sis Binary file locationmanager/client/sis/locationmanagerclient_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/client/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"LocationManagerClient Patch"},(0x200071BF), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/client/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"LocationManagerClient"}, (0x200071BF), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/src/rlocationmanager.cpp --- a/locationmanager/client/src/rlocationmanager.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/client/src/rlocationmanager.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -33,19 +33,31 @@ { LOG( "RLocationManager::LaunchServer begin" ); - // DLL launch - RProcess server; - TInt ret = server.Create( KLocServerFileName, KNullDesC ); + TFindServer findLocServer( KLocServerName ); + TFullName name; - if ( ret != KErrNone ) // Loading failed. + TInt result = findLocServer.Next( name ); + if ( result == KErrNone ) { - return ret; + LOG( "StartServer() - Server already running" ); + + // Server already running + return KErrNone; } - TRequestStatus status( KErrNone ); - server.Rendezvous( status ); - - if ( status != KRequestPending ) + RProcess server; + result = server.Create( KLocServerFileName, KNullDesC ); + if ( result != KErrNone ) + { + LOG1( "CreateServerProcess() - failed to create server process, error: %d", result ); + return result; + } + + // Process created successfully + TRequestStatus stat( KErrNone ); + server.Rendezvous( stat ); + + if ( stat != KRequestPending ) { LOG( "RLocationManager::LaunchServer Failed" ); server.Kill( 0 ); // Abort startup. @@ -54,15 +66,17 @@ { server.Resume(); // Logon OK - start the server. } - - User::WaitForRequest( status ); // wait for start or death + + User::WaitForRequest( stat ); // wait for start or death // we can't use the 'exit reason' if the server panicked as this // is the panic 'reason' and may be '0' wehich cannot be distinguished // from KErrNone - ret = ( server.ExitType() == EExitPanic ) ? KErrCommsBreak : status.Int(); + result = ( server.ExitType() == EExitPanic ) ? KErrCommsBreak : stat.Int(); server.Close(); + LOG( "RLocationManager::LaunchServer end" ); - return ret; + + return result; } // -------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/src/rlocationobjectmanipulator.cpp --- a/locationmanager/client/src/rlocationobjectmanipulator.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/client/src/rlocationobjectmanipulator.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -114,6 +114,7 @@ } delete paramBuf; + paramBuf = NULL; LOG( "RLocationObject::CopyLocationData end" ); } // -------------------------------------------------------------------------- @@ -146,6 +147,7 @@ { LOG( "RLocationObject::CopyLocationData CMdCSerializationBuffer creation failed" ); delete uriBuffer; + uriBuffer = NULL; CompleteRequest( aStatus, error ); return; } @@ -177,6 +179,7 @@ } delete uriBuffer; + uriBuffer = NULL; LOG( "RLocationObject::CopyLocationData end" ); } diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/client/src/rlocationtrail.cpp --- a/locationmanager/client/src/rlocationtrail.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/client/src/rlocationtrail.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -31,6 +31,7 @@ EXPORT_C RLocationTrail::~RLocationTrail() { delete iCurrentLocData; + iCurrentLocData = NULL; } // -------------------------------------------------------------------------- @@ -148,6 +149,7 @@ LOG( "RLocationTrail::CurrentLocation(), begin" ); delete iCurrentLocData; + iCurrentLocData = NULL; iCurrentLocData = new TPckg( aLocationData ); if ( iHandle && iCurrentLocData ) diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/data/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/data/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,32 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file +* +*/ +#include "../inc/locplatsupport.mmh" + +PRJ_PLATFORMS + DEFAULT + +PRJ_EXPORTS +200071BE.txt /epoc32/data/z/private/10202BE9/200071BE.txt +200071BE.txt /epoc32/WINSCW/C/private/10202BE9/200071BE.txt +../sis/locationmanager_stub.sis /epoc32/data/z/system/install/locationmanager_stub.sis + +PRJ_MMPFILES + +PRJ_TESTMMPFILES + +PRJ_TESTEXPORTS + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/group/bld.inf --- a/locationmanager/geoconverter/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geoconverter/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -2,9 +2,9 @@ * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. @@ -15,6 +15,11 @@ * */ + +#include "../../inc/locplatsupport.mmh" + +#ifdef _LOC_GEOTAGGING_CELLID + PRJ_PLATFORMS DEFAULT @@ -26,3 +31,5 @@ PRJ_TESTEXPORTS + +#endif \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/group/geoconverter.mmp --- a/locationmanager/geoconverter/group/geoconverter.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geoconverter/group/geoconverter.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -30,7 +30,7 @@ #if defined(WINSCW) deffile ../bwincw/geoconverterwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/geoconverterarm.def #endif nostrictdef @@ -58,7 +58,6 @@ LIBRARY lbslocationinfodatatypes.lib #endif LIBRARY lbs.lib -DEBUGLIBRARY flogger.lib LIBRARY libc.lib PAGED diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/inc/cgeoconverter.h --- a/locationmanager/geoconverter/inc/cgeoconverter.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geoconverter/inc/cgeoconverter.h Fri Sep 17 16:54:49 2010 +0300 @@ -63,12 +63,21 @@ IMPORT_C virtual ~CGeoConverter(); IMPORT_C void ConvertL( const CTelephony::TNetworkInfoV1& aNetworkInfo ); - + +#ifdef GEOCONVERTER_UNIT_TESTCASE + public: +#else protected: +#endif // From MLbsLocationInfoConverterObserver void OnConversionComplete( TInt aStatusCode ); -private: +#ifdef GEOCONVERTER_UNIT_TESTCASE + public: +#else + private: +#endif + /** * C++ constructor. */ @@ -78,7 +87,12 @@ */ void ConstructL(); -private: +#ifdef GEOCONVERTER_UNIT_TESTCASE + public: +#else + private: +#endif + MGeoConverterObserver& iObserver; #ifdef LOC_GEOTAGGING_CELLID CLbsLocationInfoConverter* iLocConverter; diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geoconverter/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS GeoConverter + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/sis/geoconverter_stub.sis Binary file locationmanager/geoconverter/sis/geoconverter_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geoconverter/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"GeoConverter Patch"},(0x2002E6A1), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geoconverter/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"geoconverter"}, (0x2002E6A1), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geoconverter/src/cgeoconverter.cpp --- a/locationmanager/geoconverter/src/cgeoconverter.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geoconverter/src/cgeoconverter.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -31,7 +31,7 @@ CGeoConverter* self = new( ELeave ) CGeoConverter( aObserver ); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop(); // self return self; } @@ -59,9 +59,13 @@ LOG("CGeoConverter::~CGeoConverter, begin"); #ifdef LOC_GEOTAGGING_CELLID delete iGsmCellInfo; + iGsmCellInfo = NULL; delete iWcdmaCellInfo; + iWcdmaCellInfo = NULL; delete iLocInfo; + iLocInfo = NULL; delete iLocConverter; + iLocConverter = NULL; #endif LOG("CGeoConverter::~CGeoConverter, end"); } @@ -135,12 +139,12 @@ //Set mobile country code TLex lexer( aNetworkInfo.iCountryCode ); - TUint countryCode; + TUint countryCode = 0; User::LeaveIfError( lexer.Val( countryCode, EDecimal) ); //Set mobile network code lexer = aNetworkInfo.iNetworkId; - TUint networkCode; + TUint networkCode = 0; User::LeaveIfError( lexer.Val( networkCode, EDecimal) ); LOG1("Network mode - %d", aNetworkInfo.iMode); CLbsAreaInfoBase* areaInfoBase = NULL; @@ -185,14 +189,18 @@ default: LOG("Unknown network mode"); User::Leave(KErrNotSupported); - break; } //Add the cell information to the location info class. This class //would be sent to the Location Monitor server that would perform the //requested conversion and update the position estimate if(areaInfoBase != NULL) // self check { + // reset previous one.. to clear the local info. + iLocInfo->ResetAreaInfo(CLbsLocationInfo::ELbsAreaInfoAll); iLocInfo->AddAreaInfoL( areaInfoBase ); + //ownership is transferred. + iWcdmaCellInfo = NULL; + iGsmCellInfo = NULL; //Request conversion of GSM cell information to corresponding coordinate information iLocConverter->ConvertLocationInfoL( *iLocInfo, ELbsConversionSilent, ELbsConversionOutputPosition ); diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/group/geotagger.mmp --- a/locationmanager/geotagger/group/geotagger.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geotagger/group/geotagger.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -28,7 +28,7 @@ CAPABILITY CAP_GENERAL_DLL #if defined(WINSCW) -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/geotaggerarm.def #endif nostrictdef @@ -38,15 +38,15 @@ USERINCLUDE ../../../inc -USERINCLUDE ../../tagcreator/inc - #ifdef _LOC_GEOTAGGING_CELLID MACRO LOC_GEOTAGGING_CELLID USERINCLUDE ../../geoconverter/inc #endif -USERINCLUDE ../../reversegeocode/inc -USERINCLUDE ../../reversegeocoderplugin/inc +#ifdef _LOC_REVERSEGEOCODE +MACRO LOC_REVERSEGEOCODE +USERINCLUDE ../../tagcreator/inc +#endif SOURCEPATH ../src @@ -66,18 +66,16 @@ LIBRARY estor.lib LIBRARY platformenv.lib -DEBUGLIBRARY flogger.lib -LIBRARY tagcreator.lib LIBRARY ecom.lib LIBRARY libc.lib -LIBRARY reversegeocode.lib - - #ifdef _LOC_GEOTAGGING_CELLID LIBRARY geoconverter.lib #endif +#ifdef _LOC_REVERSEGEOCODE +LIBRARY tagcreator.lib +#endif PAGED BYTEPAIRCOMPRESSTARGET diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/inc/cinternalgeotagger.h --- a/locationmanager/geotagger/inc/cinternalgeotagger.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geotagger/inc/cinternalgeotagger.h Fri Sep 17 16:54:49 2010 +0300 @@ -24,7 +24,6 @@ #include #include -#include "reversegeocode.h" #include "mdccommon.h" #include "mdesession.h" #include "mdenamespacedef.h" @@ -32,13 +31,16 @@ #include "mdepropertydef.h" #include "mderelation.h" #include "mdequery.h" -#include "ctagcreator.h" #ifdef LOC_GEOTAGGING_CELLID #include "cgeoconverter.h" #endif -class CReverseGeoCoderPlugin; +#ifdef LOC_REVERSEGEOCODE +#include "ctagcreator.h" +#include +#endif + /** * GeoTagger converts a given cell ID(CGI Info) to geo-coordinates. @@ -49,11 +51,13 @@ class CInternalGeoTagger : public CGeoTagger, public MMdESessionObserver, - public MMdEQueryObserver, - public MReverseGeocodeObserver + public MMdEQueryObserver #ifdef LOC_GEOTAGGING_CELLID ,public MGeoConverterObserver #endif +#ifdef LOC_REVERSEGEOCODE + ,public MReverseGeocodeObserver +#endif { public: @@ -106,8 +110,17 @@ */ void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError); + +#ifdef LOC_REVERSEGEOCODE + /** + * Get location objects, where lat, long not populated. + * @param aCountryTagId The country tagId + * @param aCityTagId The city tagId + */ + void AddressInfoL( const TItemId aCountryTagId, const TItemId aCityTagId ); + + //MReverseGeocodeObserver - /** * This method is called when reverse geocoding is completed *@param aErrorcode Error if any @@ -138,6 +151,7 @@ const RMobilePhone::TMobilePhoneNetworkInfoV1& GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag); +#endif //LOC_REVERSEGEOCODE // From MMdESessionObserver @@ -155,7 +169,7 @@ */ void HandleSessionError(CMdESession& aSession, TInt aError); -#ifdef LOC_GEOTAGGING_CELLID +#ifdef LOC_GEOTAGGING_CELLID public: // MGeoConverterObserver /** * This method is used for notifying completion of geotagging @@ -170,8 +184,15 @@ * @param aError the error code */ void HandleConversionError(TInt aError); + +private: + /** + * Update media object with GPS info. + */ + void UpdateGPSInfoL(const TLocality& aPosition); + +#endif //LOC_GEOTAGGING_CELLID -#endif private: /** @@ -204,13 +225,6 @@ void GetAllLocationsL( ); /** - * Get location objects, where lat, long not populated. - * @param aCountryTagId The country tagId - * @param aCityTagId The city tagId - */ - void AddressInfoL( const TItemId aCountryTagId, const TItemId aCityTagId ); - - /** * checks if the session is ready * @return ETrue If the session is ready */ @@ -267,7 +281,6 @@ TConnectionOption iConnectionOption; - CTagCreator* iTagCreator; /** * An active scheduler wait loop for waiting a session to MdE to open. @@ -275,14 +288,16 @@ CActiveSchedulerWait* iASW; TBool iMdeSessionOwnFlag; TBool iTagPendingHandlerFlag; - CReverseGeoCoderPlugin* iRevGeocoderPlugin; - TUid iDtorKey; #ifdef LOC_GEOTAGGING_CELLID /* * Geo converter */ CGeoConverter* iGeoConverter; #endif +#ifdef LOC_REVERSEGEOCODE + CTagCreator* iTagCreator; + CReverseGeoCoderPlugin* iRevGeocoderPlugin; +#endif //LOC_REVERSEGEOCODE }; #endif // C_CGEOTAGGER_H diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geotagger/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS GeoTagger + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/sis/geotagger_stub.sis Binary file locationmanager/geotagger/sis/geotagger_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geotagger/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"GeoTagger Patch"},(0x2002700E), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/geotagger/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"geotagger"}, (0x2002700E), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/geotagger/src/cinternalgeotagger.cpp --- a/locationmanager/geotagger/src/cinternalgeotagger.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/geotagger/src/cinternalgeotagger.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -24,12 +24,12 @@ #include "mdeconstants.h" #include "mdesession.h" #include "cinternalgeotagger.h" -#include "reversegeocoderplugin.h" using namespace MdeConstants; _LIT ( KCountry, "country:"); // country:india -const TUid KReverseGeoCodeUid = {0x2002DD12}; + +const TReal64 KZeroLatLon (0.000000 ); // -------------------------------------------------------------------------- // CInternalGeoTagger::NewL @@ -59,13 +59,15 @@ iIndex(0), iSessionReady( EFalse ), iObserver( aObserver ), - iTagCreator(NULL), iASW(NULL), - iTagPendingHandlerFlag(EFalse), - iRevGeocoderPlugin(NULL) -#ifdef LOC_GEOTAGGING_CELLID + iTagPendingHandlerFlag(EFalse) +#ifdef LOC_GEOTAGGING_CELLID ,iGeoConverter(NULL) #endif +#ifdef LOC_REVERSEGEOCODE + ,iTagCreator(NULL) + ,iRevGeocoderPlugin(NULL) +#endif { iMdeSessionOwnFlag = (iMdeSession == NULL); } @@ -82,10 +84,12 @@ LOG("Not owning mds session"); iMdeSessionOwnFlag = EFalse; //object is not owning iMdeSession + iSessionReady = ETrue; +#ifdef LOC_REVERSEGEOCODE iTagCreator = CTagCreator::NewL(); - iSessionReady = ETrue; iTagCreator->SetSession( iMdeSession ); +#endif //LOC_REVERSEGEOCODE } else { @@ -93,7 +97,9 @@ iASW = new (ELeave) CActiveSchedulerWait(); iMdeSession = CMdESession::NewL( *this ); //for creating tags +#ifdef LOC_REVERSEGEOCODE iTagCreator = CTagCreator::NewL(); +#endif iASW->Start(); delete iASW; @@ -102,20 +108,18 @@ //for reverse geocoding (geo-tagging) - if (!iRevGeocoderPlugin) - { - - TRAP_IGNORE( - iRevGeocoderPlugin = reinterpret_cast( - REComSession::CreateImplementationL(KReverseGeoCodeUid, iDtorKey));) - - if(iRevGeocoderPlugin) - { - iRevGeocoderPlugin->AddObserverL(*this); - - } - - } +#ifdef LOC_REVERSEGEOCODE + + TInt pluginerr = KErrNone; + TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL()); + + if(pluginerr == KErrNone) + { + iRevGeocoderPlugin->AddObserverL(*this); + } + + +#endif //LOC_REVERSEGEOCODE LOG("CInternalGeoTagger::ConstructL ,end"); } @@ -139,26 +143,35 @@ iRelationQuery->RemoveObserver(*this); iRelationQuery->Cancel(); delete iRelationQuery; + iRelationQuery = NULL; } if(iLocationQuery) { iLocationQuery->RemoveObserver(*this); iLocationQuery->Cancel(); delete iLocationQuery; + iLocationQuery = NULL; } if(iTagQuery) { iTagQuery->RemoveObserver(*this); iTagQuery->Cancel(); delete iTagQuery; + iTagQuery = NULL; } +#ifdef LOC_REVERSEGEOCODE + delete iTagCreator; + iTagCreator = NULL; delete iRevGeocoderPlugin; iRevGeocoderPlugin = NULL; - REComSession::DestroyedImplementation(iDtorKey); + +#endif //LOC_REVERSEGEOCODE if(iMdeSessionOwnFlag) { delete iMdeSession; + iMdeSession = NULL; delete iASW; + iASW = NULL; } LOG("CInternalGeoTagger::~CInternalGeoTagger ,end"); } @@ -189,7 +202,7 @@ void CInternalGeoTagger::HandleSessionOpened(CMdESession& /*aSession*/, TInt aError) { LOG("CInternalGeoTagger::HandleSessionOpened ,begin"); - if ( iMdeSessionOwnFlag && iASW && iASW->IsStarted() ) + if ( iASW && iASW->IsStarted() ) { iASW->AsyncStop(); } @@ -198,9 +211,11 @@ { iSessionReady = ETrue; +#ifdef LOC_REVERSEGEOCODE iTagCreator->SetSession( iMdeSession ); +#endif } - else if(iMdeSessionOwnFlag) + else { delete iMdeSession; iMdeSession = NULL; @@ -215,16 +230,15 @@ void CInternalGeoTagger::HandleSessionError(CMdESession& /*aSession*/, TInt /*aError*/) { LOG("CInternalGeoTagger::HandleSessionError ,begin"); - if ( iMdeSessionOwnFlag && iASW && iASW->IsStarted() ) + if (iASW && iASW->IsStarted() ) { iASW->AsyncStop(); } iSessionReady = EFalse; - if(iMdeSessionOwnFlag) - { - delete iMdeSession; - iMdeSession = NULL; - } + + delete iMdeSession; + iMdeSession = NULL; + LOG("CInternalGeoTagger::HandleSessionError ,end"); } @@ -355,6 +369,7 @@ if(GPSInfoExists()) { // GPS info exist go for reverse geo coding. +#ifdef LOC_REVERSEGEOCODE if(iRevGeocoderPlugin) { TRAP_IGNORE( @@ -362,6 +377,7 @@ ( iLocationData.iPosition, iConnectionOption ) ); } else +#endif //LOC_REVERSEGEOCODE { IterateNextLocation(); //Go through next location } @@ -369,7 +385,6 @@ else { if ( iLocationData.iNetworkInfo.iCellId > 0 && - iLocationData.iNetworkInfo.iLocationAreaCode > 0 && iLocationData.iNetworkInfo.iCountryCode.Length() > 0 && iLocationData.iNetworkInfo.iNetworkId.Length() > 0 ) { @@ -383,8 +398,21 @@ if(err == KErrNone && iGeoConverter != NULL) { + // there is no field to store type of network. + // but it's safe to take decission based on area code. + if(iLocationData.iNetworkInfo.iLocationAreaCode > 0) + { + LOG("Valid areacode. Treat as GSM n/w"); + iLocationData.iNetworkInfo.iAccess = CTelephony::ENetworkAccessGsm; + } + else + { + LOG("Areacode is 0. Treat as 3G n/w"); + iLocationData.iNetworkInfo.iAccess = CTelephony::ENetworkAccessUtran; + } TRAP(err, iGeoConverter->ConvertL(iLocationData.iNetworkInfo);) } + LOG1("Error - %d", err); if(err != KErrNone) { HandleConversionError(err); @@ -415,7 +443,9 @@ LOG("CInternalGeoTagger::GPSInfoExists"); TBool gpsInfoExists = EFalse; if ( !Math::IsNaN( iLocationData.iPosition.Latitude() ) && - !Math::IsNaN( iLocationData.iPosition.Longitude() )) //lat, long is there + !Math::IsNaN( iLocationData.iPosition.Longitude() ) && + KZeroLatLon != iLocationData.iPosition.Latitude() && + KZeroLatLon != iLocationData.iPosition.Longitude() ) //lat, long is there { LOG("Valid lat/lon\n"); @@ -424,6 +454,7 @@ return gpsInfoExists; } + // -------------------------------------------------------------------------- // CInternalGeoTagger::StartGeoTagging() // -------------------------------------------------------------------------- @@ -481,20 +512,43 @@ iLocationData.iPosition.SetCoordinate( latProp->Real64ValueL(), lonProp->Real64ValueL() ); } + else + { + iLocationData.iPosition.SetCoordinate( KZeroLatLon, + KZeroLatLon ); + } locationObject->Property( cellIdDef, cellProp, 0 ); locationObject->Property( lacCodeDef, lacProp, 0 ); locationObject->Property( countryCodeDef, countryProp, 0 ); locationObject->Property( networkCodeDef, networkProp, 0 ); - if ( cellProp && lacProp && countryProp && networkProp) + if ( cellProp && countryProp && networkProp) { iLocationData.iNetworkInfo.iCellId = cellProp->Uint32ValueL(); - iLocationData.iNetworkInfo.iLocationAreaCode = lacProp->Uint32ValueL(); iLocationData.iNetworkInfo.iCountryCode = countryProp->TextValueL(); iLocationData.iNetworkInfo.iNetworkId = networkProp->TextValueL(); - + } + else + { + // set to invalid values. + iLocationData.iNetworkInfo.iCellId = 0; + iLocationData.iNetworkInfo.iAccess = CTelephony::ENetworkAccessUnknown; + iLocationData.iNetworkInfo.iLocationAreaCode = 0; + iLocationData.iNetworkInfo.iAreaKnown = EFalse; + iLocationData.iNetworkInfo.iCountryCode.Zero(); + iLocationData.iNetworkInfo.iNetworkId.Zero(); } + iLocationData.iNetworkInfo.iAreaKnown = EFalse; + if(lacProp) + { + iLocationData.iNetworkInfo.iLocationAreaCode = lacProp->Uint32ValueL(); + if(iLocationData.iNetworkInfo.iLocationAreaCode > 0) + { + iLocationData.iNetworkInfo.iAreaKnown = ETrue; + } + } + delete locationObject; LOG("CInternalGeoTagger::GetLocationInfoL ,end"); } @@ -517,12 +571,16 @@ TItemId tagId = relation.RightObjectId(); CMdEObject* object = NULL; TRAP_IGNORE( object = iMdeSession->GetObjectL( tagId ) ); - - error = object->Uri().Find( KCountry ); - if ( error == KErrNone ) + if(object) { - i = count; - tagFound = ETrue; + error = object->Uri().Find( KCountry ); + delete object; + if ( error == KErrNone ) + { + i = count; + tagFound = ETrue; + break; + } } } @@ -532,36 +590,6 @@ } -// -------------------------------------------------------------------------- -// CInternalGeoTagger::AddressInfo() -// -------------------------------------------------------------------------- -// -void CInternalGeoTagger::AddressInfoL( const TItemId aCountryTagId, const TItemId aCityTagId ) - { - LOG("CInternalGeoTagger::AddressInfoL ,begin"); - - const TInt count = iRelationQuery->Count(); - - for ( TInt i = 0; i < count; i++ ) - { - CMdERelation& relation = iRelationQuery->Result( i ); - TItemId imageId = relation.LeftObjectId(); - - if ( !GPSInfoExists() ) //to update EXIF - { - // update relation timestamp, composer will then update exif data - TTime timestamp( 0 ); - timestamp.UniversalTime(); - relation.SetLastModifiedDate( timestamp ); - iMdeSession->UpdateRelationL( relation ); - } - - iTagCreator->AttachTagsL( imageId, aCountryTagId, aCityTagId ); - } - - LOG("CInternalGeoTagger::AddressInfoL ,end"); - } - // -------------------------------------------------------------------------- // CInternalGeoTagger::IterateNextLocation() @@ -626,42 +654,6 @@ LOG("CInternalGeoTagger::GetAllLocationsL ,end"); } -// -------------------------------------------------------------------------- -// CInternalGeoTagger::ReverseGeocodeComplete() -// Get address details like street, city, state, etc. -// -------------------------------------------------------------------------- -// -void CInternalGeoTagger::ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo ) - { - LOG("CInternalGeoTagger::ReverseGeocodeComplete ,begin"); - TItemId countryTagId(0); - TItemId cityTagId(0); - - // create country and city tags - if( aErrorcode == KErrNone ) - { - TPtrC countryPtr( aAddressInfo.GetCountryName() ); - TPtrC cityPtr( aAddressInfo.GetCity() ); - - TRAP_IGNORE( iTagCreator->CreateLocationTagsL( countryPtr, countryTagId, cityPtr, cityTagId ) ); - - TRAP_IGNORE(AddressInfoL( countryTagId, cityTagId )); - - IterateNextLocation(); - } - else - { - //handle error - if ( iObserver ) - { - iIndex = 0; - iObserver->GeoTaggingCompleted( aErrorcode ); - } - } - - - LOG("CInternalGeoTagger::ReverseGeocodeComplete ,end"); - } // -------------------------------------------------------------------------- // CInternalGeoTagger::GetTagsL() @@ -702,6 +694,82 @@ } #ifdef LOC_GEOTAGGING_CELLID + +// -------------------------------------------------------------------------- +// CInternalGeoTagger::UpdateGPSInfoL() +// -------------------------------------------------------------------------- +// +void CInternalGeoTagger::UpdateGPSInfoL(const TLocality& aPosition) + { + + LOG("CInternalGeoTagger::UpdateGPSInfoL ,start"); + if(Math::IsNaN( aPosition.Latitude()) || + Math::IsNaN( aPosition.Longitude()) ) + { + LOG("Not a valid location info."); + LOG("CInternalGeoTagger::UpdateGPSInfoL ,end"); + return; + } + + CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL(); + CMdEObjectDef& locObjDef = namespaceDef.GetObjectDefL( Location::KLocationObject ); + CMdEObject* location = iMdeSession->OpenObjectL(iLocationId, locObjDef); + CleanupStack::PushL( location ); + + CMdEPropertyDef& propLatDef = locObjDef.GetPropertyDefL( Location::KLatitudeProperty ); + CMdEPropertyDef& propLongDef = locObjDef.GetPropertyDefL( Location::KLongitudeProperty ); + CMdEPropertyDef& propAltDef = locObjDef.GetPropertyDefL( Location::KAltitudeProperty ); + CMdEPropertyDef& qualityDef = locObjDef.GetPropertyDefL( Location::KQualityProperty ); + + if (location->PropertyCount(propLatDef) == 0) + { + location->AddReal64PropertyL(propLatDef, aPosition.Latitude() ); //iLatitude + } + if (location->PropertyCount(propLongDef) == 0) + { + location->AddReal64PropertyL(propLongDef, aPosition.Longitude() ); //iLongitude + } + if (location->PropertyCount(propAltDef) == 0 && + !Math::IsNaN( aPosition.Altitude()) ) + { + location->AddReal64PropertyL(propAltDef, aPosition.Altitude()); + } + LOG1( "Updating quality - %d", aPosition.HorizontalAccuracy()); + if (location->PropertyCount(qualityDef) == 0 ) + { + location->AddReal32PropertyL(qualityDef, aPosition.HorizontalAccuracy()); + } + + CMdEProperty* modProp = NULL; + CMdEObjectDef& objImageDef = namespaceDef.GetObjectDefL( Image::KImageObject ); + CMdEPropertyDef& propModifiedDef = objImageDef.GetPropertyDefL( Object::KLastModifiedDateProperty ); + location->Property( propModifiedDef, modProp, 0 ); + if ( modProp ) + { + TTime timestamp( 0 ); + timestamp.UniversalTime(); + modProp->SetTimeValueL( timestamp ); + } + // commit to DB + iMdeSession->CommitObjectL(*location); + CleanupStack::PopAndDestroy( location ); + + // update the relation + const TInt count = iRelationQuery->Count(); + LOG1("Relation count - %d", count); + for ( TInt i = 0; i < count; i++ ) + { + CMdERelation& relation = iRelationQuery->Result( i ); + // update relation timestamp, composer will then update exif data + + TTime timestamp( 0 ); + timestamp.UniversalTime(); + relation.SetLastModifiedDate( timestamp ); + iMdeSession->UpdateRelationL( relation ); + } + LOG("CInternalGeoTagger::UpdateGPSInfoL ,end"); + } + // -------------------------------------------------------------------------- // CInternalGeoTagger::ConversionCompletedL() // -------------------------------------------------------------------------- @@ -714,13 +782,17 @@ if(aError == KErrNone) { iLocationData.iPosition.SetCoordinate - ( aPosition.Latitude(), aPosition.Longitude()); + ( aPosition.Latitude(), aPosition.Longitude(), aPosition.Altitude()); + iLocationData.iQuality = aPosition.HorizontalAccuracy(); + UpdateGPSInfoL(aPosition); +#ifdef LOC_REVERSEGEOCODE if(iRevGeocoderPlugin) { iRevGeocoderPlugin->GetAddressByCoordinateL ( iLocationData.iPosition, iConnectionOption ) ; } else +#endif //LOC_REVERSEGEOCODE { IterateNextLocation(); //Go through next location } @@ -745,7 +817,7 @@ LOG("CInternalGeoTagger::HandleConversionError, end"); } -#endif +#endif //LOC_GEOTAGGING_CELLID // -------------------------------------------------------------------------- // CInternalGeoTagger::PendingGeoTagsL() @@ -764,7 +836,7 @@ } else { - if(!iTagPendingHandlerFlag) + if(!iTagPendingHandlerFlag && iIndex <= 0) { LOG("Processing the request.\n"); // tag pending request is not going on @@ -781,6 +853,73 @@ LOG("CInternalGeoTagger::PendingGeoTagsL ,end"); } + +#ifdef LOC_REVERSEGEOCODE +// -------------------------------------------------------------------------- +// CInternalGeoTagger::AddressInfo() +// -------------------------------------------------------------------------- +// +void CInternalGeoTagger::AddressInfoL( const TItemId aCountryTagId, const TItemId aCityTagId ) + { + LOG("CInternalGeoTagger::AddressInfoL ,begin"); + + const TInt count = iRelationQuery->Count(); + + for ( TInt i = 0; i < count; i++ ) + { + CMdERelation& relation = iRelationQuery->Result( i ); + TItemId imageId = relation.LeftObjectId(); + + if ( !GPSInfoExists() ) //to update EXIF + { + // update relation timestamp, composer will then update exif data + TTime timestamp( 0 ); + timestamp.UniversalTime(); + relation.SetLastModifiedDate( timestamp ); + iMdeSession->UpdateRelationL( relation ); + } + + iTagCreator->AttachTagsL( imageId, aCountryTagId, aCityTagId ); + } + + LOG("CInternalGeoTagger::AddressInfoL ,end"); + } + + +// -------------------------------------------------------------------------- +// CInternalGeoTagger::ReverseGeocodeComplete() +// Get address details like street, city, state, etc. +// -------------------------------------------------------------------------- +// +void CInternalGeoTagger::ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo ) + { + LOG("CInternalGeoTagger::ReverseGeocodeComplete ,begin"); + TItemId countryTagId(0); + TItemId cityTagId(0); + + // create country and city tags + if( aErrorcode == KErrNone ) + { + TPtrC countryPtr( aAddressInfo.GetCountryName() ); + TPtrC cityPtr( aAddressInfo.GetCity() ); + + TRAP_IGNORE( iTagCreator->CreateLocationTagsL( countryPtr, countryTagId, cityPtr, cityTagId ) ); + + TRAP_IGNORE(AddressInfoL( countryTagId, cityTagId )); + + IterateNextLocation(); + } + else + { + LOG1("Reverse geocode err - %d", aErrorcode); + + IterateNextLocation(); + } + + + LOG("CInternalGeoTagger::ReverseGeocodeComplete ,end"); + } + // ---------------------------------------------------------------------------- // CInternalGeoTagger::GetCurrentRegisterNw() // ---------------------------------------------------------------------------- @@ -809,5 +948,7 @@ return iObserver->GetHomeNetworkInfo(aHomeNwInfoAvailableFlag); } +#endif //LOC_REVERSEGEOCODE + // End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/group/bld.inf --- a/locationmanager/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -14,7 +14,8 @@ * Description: Build information file * */ -#include "../inc/locplatsupport.mmh" + +#include "../data/bld.inf" #ifdef _LOC_GEOTAGGING_CELLID #include "../geoconverter/group/bld.inf" @@ -22,12 +23,9 @@ #ifdef _LOC_REVERSEGEOCODE #include "../tagcreator/group/bld.inf" -#include "../ReverseGeocode/group/bld.inf" -#include "../ReverseGeoCoderPlugin/group/bld.inf" -#include "../geotagger/group/bld.inf" #endif - +#include "../geotagger/group/bld.inf" #include "../locationtrail/group/bld.inf" #include "../server/group/bld.inf" #include "../client/group/bld.inf" @@ -36,9 +34,6 @@ DEFAULT PRJ_EXPORTS -../data/200071BE.txt /epoc32/data/z/private/10202BE9/200071BE.txt -../data/200071BE.txt /epoc32/WINSCW/C/private/10202BE9/200071BE.txt -../sis/locationmanager_stub.sis /epoc32/data/z/system/install/locationmanager_stub.sis PRJ_MMPFILES diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/inc/locationmanagerdefs.h --- a/locationmanager/inc/locationmanagerdefs.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/inc/locationmanagerdefs.h Fri Sep 17 16:54:49 2010 +0300 @@ -18,7 +18,7 @@ #ifndef __LOCATIONMANAGERDEFS_H__ #define __LOCATIONMANAGERDEFS_H__ -_LIT( KLocServerFileName, "LocationManagerServer.exe"); +_LIT( KLocServerFileName, "locationmanagerserver.exe"); _LIT( KLocServerName, "LocationManagerServer" ); const TInt KLocationManagerServerMinor = 0; @@ -66,6 +66,8 @@ EArgumentState }; +const TInt KLocManagerSessionPriority = 5; + #endif // __LOCATIONMANAGERDEFS_H__ // End of file. diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/group/locationtrail.mmp --- a/locationmanager/locationtrail/group/locationtrail.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/group/locationtrail.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,7 @@ #if defined(WINSCW) deffile ../bwincw/locationtrailwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/locationtrailarm.def #endif nostrictdef @@ -41,8 +41,6 @@ #ifdef _LOC_REVERSEGEOCODE MACRO LOC_REVERSEGEOCODE USERINCLUDE ../../tagcreator/inc -USERINCLUDE ../../ReverseGeocode/inc -USERINCLUDE ../../ReverseGeoCoderPlugin/inc #endif #ifdef _LOC_GEOTAGGING_CELLID @@ -77,13 +75,11 @@ LIBRARY ecom.lib LIBRARY commsdat.lib +LIBRARY geotagger.lib +LIBRARY libc.lib -DEBUGLIBRARY flogger.lib -LIBRARY libc.lib #ifdef _LOC_REVERSEGEOCODE -LIBRARY reversegeocode.lib LIBRARY tagcreator.lib -LIBRARY geotagger.lib #endif #ifdef _LOC_GEOTAGGING_CELLID diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/inc/clocationrecord.h --- a/locationmanager/locationtrail/inc/clocationrecord.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/inc/clocationrecord.h Fri Sep 17 16:54:49 2010 +0300 @@ -49,8 +49,7 @@ #ifdef LOC_REVERSEGEOCODE #include #include "ctagcreator.h" -#include "reversegeocode.h" -class CReverseGeoCoderPlugin; +#include #endif typedef RLocationTrail::TTrailState TLocTrailState; @@ -743,10 +742,14 @@ */ CTagCreator *iTagCreator; /* + * Flag to track last reverse geocode failure sceenario + */ + TBool iLastReverseGeocodeFails; + + /* * Reverse geo coder plugin object */ - CReverseGeoCoderPlugin* iRevGeocoderPlugin; - TUid iDtorKey; + CReverseGeoCoderPlugin* iRevGeocoderPlugin; #endif diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/locationtrail/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS LocationTrail + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/sis/locationtrail_stub.sis Binary file locationmanager/locationtrail/sis/locationtrail_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/locationtrail/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"LocationTrail Patch"},(0x200071BD), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\LocationTrail.dll" -"c:\sys\bin\LocationTrail.dll" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/locationtrail/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"locationtrail"}, (0x200071BD), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/src/cgpxconverterao.cpp --- a/locationmanager/locationtrail/src/cgpxconverterao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/src/cgpxconverterao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -82,11 +82,14 @@ iBoundQueue.Close(); delete iTempFile; + iTempFile = NULL; delete iBoundaries; + iBoundaries = NULL; delete iWriteBuf; + iWriteBuf = NULL; delete iFormatBuf; - + iFormatBuf = NULL; LOG( "CGpxConverterAO::~CGpxConverterAO ,end" ); } @@ -179,7 +182,9 @@ TInt err; iFixLost = ETrue; delete iTempFile; + iTempFile = NULL; delete iBoundaries; + iBoundaries = NULL; // get next temp-file from queue iTempFile = iFileQueue[0]; iBoundaries = iBoundQueue[0]; diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/src/clocationrecord.cpp --- a/locationmanager/locationtrail/src/clocationrecord.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/src/clocationrecord.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -21,6 +21,9 @@ #include #include #include +#ifdef LOC_GEOTAGGING_CELLID +#include +#endif //LOC_GEOTAGGING_CELLID #include "rlocationtrail.h" #include "clocationrecord.h" @@ -29,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; @@ -101,6 +101,7 @@ ,iImageQuery(NULL) ,iTagQuery(NULL) ,iTagCreator( NULL ) + ,iLastReverseGeocodeFails(EFalse) ,iRevGeocoderPlugin( NULL ) #endif { @@ -132,17 +133,13 @@ #ifdef LOC_REVERSEGEOCODE iTagCreator = CTagCreator::NewL(); - - if (!iRevGeocoderPlugin) - { - 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 @@ -201,8 +198,11 @@ iLocationItems.Close(); #endif delete iNetworkInfoChangeListener; + iNetworkInfoChangeListener = NULL; delete iPositionInfo; + iPositionInfo = NULL; delete iNetworkInfoTimer; + iNetworkInfoTimer = NULL; #ifdef LOC_GEOTAGGING_CELLID if(iGeoConverter) { @@ -214,6 +214,7 @@ { iRemapper->StopRemapping(); delete iRemapper; + iRemapper = NULL; } if(iLocationQuery) { @@ -251,7 +252,6 @@ // set the pointer to NULL, ECOM will destroy object. delete iRevGeocoderPlugin; iRevGeocoderPlugin = NULL; - REComSession::DestroyedImplementation(iDtorKey); #endif LOG( "CLocationRecord::~CLocationRecord(), end" ); } @@ -355,7 +355,7 @@ LOG1( "CLocationRecord::GetLocationByTimeL - aTime: %Ld", aTime.Int64() ); TBuf str1; aTime.FormatL( str1, KDateTimeFormat ); - // LOG1( "CLocationRecord::GetLocationByTimeL - aTime: %S", &str1 ); + LOG1( "CLocationRecord::GetLocationByTimeL - aTime: %S", &str1 ); #endif TTimeIntervalSeconds interval; @@ -370,7 +370,7 @@ LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %Ld", iTrail[i]->iTimeStamp.Int64() ); TBuf str; iTrail[i]->iTimeStamp.FormatL( str, KDateTimeFormat ); - //LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %S", &str ); + LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %S", &str ); LOG1( "CLocationRecord::GetLocationByTimeL - timeDiff: %d", timeDiff ); #endif @@ -503,7 +503,7 @@ if ( !iTrailStarted || iState == RLocationTrail::ETrailStopped) { - LOG("trail not started/stopped"); + LOG("CLocationRecord::Position(), trail not started/stopped"); iPositionInfo->Stop(); return; } @@ -527,24 +527,24 @@ case KPositionQualityLoss: { // Location is stored, even if it may not be valid. - LOG("Partial update"); + LOG("CLocationRecord::Position(), Partial update"); if ( iState != RLocationTrail::EWaitingGPSData && iState != RLocationTrail::ETrailStopping ) { SetCurrentState( RLocationTrail::EWaitingGPSData ); - LOG("Trail waiting for gps"); + LOG("CLocationRecord::Position(), Trail waiting for gps"); } break; } case KErrNone: { - LOG("Good GPS coordinates"); + LOG("CLocationRecord::Position(), Good GPS coordinates"); iGpsDataAvailableFlag = ETrue; if ( iState != RLocationTrail::ETrailStarted ) { if ( iRemapper ) { - LOG("Start remapping"); + LOG("CLocationRecord::Position(), Start remapping"); iRemapper->StartRemappingObjects( iNewItem.iLocationData ); if( iObserver->WaitForPositioningStopTimeout() && !RemappingNeeded() ) @@ -565,7 +565,7 @@ } default: { - LOG1("Searching GPS, aError %d", aError ); + LOG1("CLocationRecord::Position(), Searching GPS, aError %d", aError ); if ( iState != RLocationTrail::ESearchingGPS && iState != RLocationTrail::ETrailStopping ) { @@ -576,12 +576,12 @@ } } TBool fixState = CheckGPSFix( positionSatelliteInfo ); - LOG1( "fixState %d", fixState ); - LOG1( "iLastGPSFixState %d", iLastGPSFixState ); + LOG1( "CLocationRecord::Position(), fixState %d", fixState ); + LOG1( "CLocationRecord::Position(), iLastGPSFixState %d", iLastGPSFixState ); if ( iObserver && iLastGPSFixState != fixState ) { - LOG("Quality changed"); + LOG("CLocationRecord::Position(), Quality changed"); iObserver->GPSSignalQualityChanged( positionSatelliteInfo ); } @@ -707,10 +707,12 @@ { iNetwork.iLocationAreaCode = 0; } +#ifdef LOC_GEOTAGGING_CELLID if ( iState == RLocationTrail::ETrailStarting && iTrailStarted ) { SetCurrentState( RLocationTrail::ETrailStarted ); } +#endif } else { @@ -797,13 +799,16 @@ if( iTrailStarted ) { // Set the property only when trail is started to avoid icon flickering and wrong icon update in UI - if( iGpsDataAvailableFlag || - iNetwork.iCellId > 0 && + if( iGpsDataAvailableFlag +#ifdef LOC_GEOTAGGING_CELLID + || ( iNetwork.iCellId > 0 && ((iNetwork.iLocationAreaCode == 0 && iNetwork.iAccess == CTelephony::ENetworkAccessUtran) || // 3G (iNetwork.iLocationAreaCode > 0 && (iNetwork.iAccess == CTelephony::ENetworkAccessGsm || // 2G iNetwork.iAccess == CTelephony::ENetworkAccessGsmCompact))) && iNetwork.iCountryCode.Length() > 0 && iNetwork.iNetworkId.Length() > 0 ) +#endif // LOC_GEOTAGGING_CELLID + ) { // set the value 3 to have Geo tag available icon else not available. iProperty.Set( KPSUidLocationTrail, KLocationTrailState, @@ -957,7 +962,7 @@ { // no n/w info... put it into remap. // remove the last appended element. - LOG("No network info (offline mode + no GPS fix), keep for remapping"); + LOG("CLocationRecord::LocationSnapshotL(), No network info (offline mode + no GPS fix), keep for remapping"); TRemapItem remapItem; remapItem.iObjectId = aObjectId; remapItem.iTime = timestamp; @@ -966,7 +971,12 @@ TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1]; iMediaItems.Remove(iMediaItems.Count() - 1); iMediaItems.Compress(); - delete firstPtr; + if( firstPtr == newItem) + { + newItem = NULL; + } + delete firstPtr; + firstPtr = NULL; } else { @@ -977,6 +987,7 @@ else if ( Math::IsNaN( locationData.iPosition.Latitude() ) && Math::IsNaN( locationData.iPosition.Longitude() )) { + LOG("CLocationRecord::LocationSnapshotL(), coordinates empty with or without cellular info") // coordinates empty, with or without cellular info if ( net->iCellId == 0 && @@ -984,7 +995,7 @@ net->iCountryCode.Length() == 0 && net->iNetworkId.Length() == 0 ) { - LOG("No network info (offline mode + no GPS fix), keep for remapping"); + LOG("CLocationRecord::LocationSnapshotL(), No network info (offline mode + no GPS fix), keep for remapping"); TRemapItem remapItem; remapItem.iObjectId = aObjectId; remapItem.iTime = timestamp; @@ -993,7 +1004,12 @@ TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1]; iMediaItems.Remove(iMediaItems.Count() - 1); iMediaItems.Compress(); - delete firstPtr; + if( firstPtr == newItem) + { + newItem = NULL; + } + delete firstPtr; + firstPtr = NULL; } // check match for last created locationobject #ifdef LOC_REVERSEGEOCODE @@ -1003,6 +1019,7 @@ else if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0) #endif //LOC_REVERSEGEOCODE { + LOG("CLocationRecord::LocationSnapshotL(), last created locationobject match" ); TLocationData lastLocationData = iLastMediaItem.iLocationData; CTelephony::TNetworkInfoV1* lastnet = &lastLocationData.iNetworkInfo; @@ -1027,11 +1044,16 @@ TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1]; iMediaItems.Remove(iMediaItems.Count() - 1); iMediaItems.Compress(); - delete firstPtr; + if( firstPtr == newItem) + { + newItem = NULL; + } + delete firstPtr; + firstPtr = NULL; } } - if ( !previousMatch ) + if ( newItem && !previousMatch ) { // go for n/w based newItem->iFlag |= KNetQueryBit; @@ -1042,6 +1064,7 @@ else if ( lastLocationId != 0 && ((iLastMediaItem.iFlag & KSnapMediaFile) > 0)) { + LOG("CLocationRecord::LocationSnapshotL(), valid coordinates found"); TLocationData lastLocationData = iLastMediaItem.iLocationData; CTelephony::TNetworkInfoV1* lastnet = &lastLocationData.iNetworkInfo; @@ -1053,7 +1076,11 @@ { // if both locations have valid coordinates, calculate distance between points - if ( !Math::IsNaN( lastLocationData.iPosition.Latitude() ) && + if ( +#ifdef LOC_REVERSEGEOCODE + !iLastReverseGeocodeFails && +#endif //LOC_REVERSEGEOCODE + !Math::IsNaN( lastLocationData.iPosition.Latitude() ) && !Math::IsNaN( lastLocationData.iPosition.Longitude() ) && !Math::IsNaN( locationData.iPosition.Latitude() ) && !Math::IsNaN( locationData.iPosition.Longitude() )) @@ -1063,7 +1090,7 @@ if ( distance < iLocationDelta ) { - LOG("location close to the previous one"); + LOG("CLocationRecord::LocationSnapshotL(), location close to the previous one"); previousMatch = ETrue; CreateRelationL( aObjectId, lastLocationId ); @@ -1076,9 +1103,15 @@ TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1]; iMediaItems.Remove(iMediaItems.Count() - 1); iMediaItems.Compress(); - delete firstPtr; + if( firstPtr == newItem) + { + newItem = NULL; + } + delete firstPtr; + firstPtr = NULL; } - else + //check newItem for validity + else if (newItem) { // country tag not found.. go for reverse geocoding.. newItem->iLocationId = lastLocationId; @@ -1102,7 +1135,12 @@ TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1]; iMediaItems.Remove(iMediaItems.Count() - 1); iMediaItems.Compress(); - delete firstPtr; + if( firstPtr == newItem) + { + newItem = NULL; + } + delete firstPtr; + firstPtr = NULL; #endif //LOC_REVERSEGEOCODE } @@ -1178,7 +1216,7 @@ || (iMediaItems.Count() <= 0)) { // query is in progress or queue is empty - LOG1( "query is in progress or queue is empty. Count - %d", iMediaItems.Count() ); + LOG1( "CLocationRecord::FindLocationFromDBL(), Count - %d", iMediaItems.Count() ); return; } if ( (iMediaItems[0]->iFlag & KNetQueryBit) > 0 ) @@ -1191,8 +1229,6 @@ const TReal64 KMeterInDegrees = 0.000009; const TReal64 KPi = 3.14159265358979; const TReal32 K180Degrees = 180.0; - - //TLocationData locationData = iMediaItems[0].iLocationData; TReal64 latitude = iMediaItems[0]->iLocationData.iPosition.Latitude(); TReal64 longitude = iMediaItems[0]->iLocationData.iPosition.Longitude(); @@ -1223,10 +1259,10 @@ CMdELogicCondition& cond = iLocationQuery->Conditions(); cond.SetOperator( ELogicConditionOperatorAnd ); - LOG1( "latitude: %f", latitude); - LOG1( "latdelta: %f", latDelta); - LOG1( "longitude: %f", longitude); - LOG1( "londelta: %f", lonDelta); + LOG1( "CLocationRecord::FindLocationFromDBL(), latitude: %f", latitude); + LOG1( "CLocationRecord::FindLocationFromDBL(), latdelta: %f", latDelta); + LOG1( "CLocationRecord::FindLocationFromDBL(), longitude: %f", longitude); + LOG1( "CLocationRecord::FindLocationFromDBL(), londelta: %f", lonDelta); cond.AddPropertyConditionL( *iLatitudeDef, TMdERealBetween( latitude - latDelta, latitude + latDelta )); @@ -1316,12 +1352,14 @@ locationObject->AddTextPropertyL( itemTypeDef, Location::KLocationItemType ); locationObject->AddInt16PropertyL( offSetDef, timeOffset.Int() / 60 ); - LOG1( "Location created with stamp: %Ld", timestamp.Int64() ); + LOG1( "CLocationRecord::DoCreateLocationL(), Location created with stamp: %Ld", timestamp.Int64() ); // location related properties if ( !Math::IsNaN( aLocationData.iPosition.Latitude() ) && !Math::IsNaN( aLocationData.iPosition.Longitude() )) { + LOG1("CLocationRecord::DoCreateLocationL(), Lan - %f", aLocationData.iPosition.Latitude()); + LOG1("CLocationRecord::DoCreateLocationL(), Lon - %f", aLocationData.iPosition.Longitude()); locationObject->AddReal64PropertyL( *iLatitudeDef, aLocationData.iPosition.Latitude() ); locationObject->AddReal64PropertyL( *iLongitudeDef, aLocationData.iPosition.Longitude() ); @@ -1344,36 +1382,61 @@ } // network related properties - if ( aLocationData.iNetworkInfo.iAreaKnown ) + if ( aLocationData.iNetworkInfo.iAccess != CTelephony::ENetworkAccessUnknown ) + { + LOG1("CLocationRecord::DoCreateLocationL(), Cell id - %d", aLocationData.iNetworkInfo.iCellId); + locationObject->AddUint32PropertyL( cellIdDef, aLocationData.iNetworkInfo.iCellId ); + } + if ( aLocationData.iNetworkInfo.iAreaKnown && + aLocationData.iNetworkInfo.iLocationAreaCode != 0 && + aLocationData.iNetworkInfo.iAccess != CTelephony::ENetworkAccessUnknown ) { - if ( aLocationData.iNetworkInfo.iAccess != CTelephony::ENetworkAccessUnknown ) - { - locationObject->AddUint32PropertyL( cellIdDef, aLocationData.iNetworkInfo.iCellId ); - - } - if ( aLocationData.iNetworkInfo.iLocationAreaCode != 0 && - aLocationData.iNetworkInfo.iAccess != CTelephony::ENetworkAccessUnknown ) - { - locationObject->AddUint32PropertyL( locationCodeDef, - aLocationData.iNetworkInfo.iLocationAreaCode ); - - } - if ( aLocationData.iNetworkInfo.iCountryCode.Length() > 0 ) - { - locationObject->AddTextPropertyL( countryCodeDef, - aLocationData.iNetworkInfo.iCountryCode ); - - } - if ( aLocationData.iNetworkInfo.iNetworkId.Length() > 0 ) - { - locationObject->AddTextPropertyL(networkCodeDef, aLocationData.iNetworkInfo.iNetworkId); - - } + LOG1("CLocationRecord::DoCreateLocationL(), Areacode - %d", aLocationData.iNetworkInfo.iLocationAreaCode); + locationObject->AddUint32PropertyL( locationCodeDef, + aLocationData.iNetworkInfo.iLocationAreaCode ); + } +#ifdef _DEBUG + + if ( aLocationData.iNetworkInfo.iCountryCode.Length() > 0 ) + { + TLex lexer( aLocationData.iNetworkInfo.iCountryCode ); + TUint countryCode = 0; + TRAP_IGNORE(lexer.Val( countryCode, EDecimal)); + LOG1("CLocationRecord::DoCreateLocationL(), Country code - %d", countryCode); + } + else + { + LOG("CLocationRecord::DoCreateLocationL(), No Country code"); + } + + //Set mobile network code + if ( aLocationData.iNetworkInfo.iNetworkId.Length() > 0 ) + { + TLex lexer = aLocationData.iNetworkInfo.iNetworkId; + TUint networkCode = 0; + TRAP_IGNORE(lexer.Val( networkCode, EDecimal)); + LOG1("CLocationRecord::DoCreateLocationL(), Network id - %d", networkCode); + } + else + { + LOG("CLocationRecord::DoCreateLocationL(), No network code"); + } + +#endif + if ( aLocationData.iNetworkInfo.iCountryCode.Length() > 0 ) + { + locationObject->AddTextPropertyL( countryCodeDef, + aLocationData.iNetworkInfo.iCountryCode ); + } + + if ( aLocationData.iNetworkInfo.iNetworkId.Length() > 0 ) + { + locationObject->AddTextPropertyL(networkCodeDef, aLocationData.iNetworkInfo.iNetworkId); } // Add the location object to the database. locationObjectId = iMdeSession->AddObjectL( *locationObject ); - + LOG1("CLocationRecord::DoCreateLocationL(), Location id - %d", locationObjectId); CleanupStack::PopAndDestroy( locationObject ); LOG( "CLocationRecord::DoCreateLocationL(), end" ); @@ -1553,7 +1616,6 @@ LOG( "CLocationRecord::HandleFindLocationFromDB(), begin" ); if ( iMediaItems.Count() > 0 ) { - //TODO: by module owner TInt trapErr = KErrNone; TRAP(trapErr,FindLocationFromDBL()); // no memory, don't proceed further @@ -1753,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 @@ -1824,10 +1887,21 @@ iMediaHandlingFlag &= ~KSnapGeoConvertInPendingState; } #else + // cell id based geo tagging is not supported.. go for remapping. locationId = DoCreateLocationL( iMediaItems[0]->iLocationData ); iMediaItems[0]->iLocationId = locationId; - CreateRelationL( iMediaItems[0]->iObjectId, locationId ); + TItemId relationId = CreateRelationL( iMediaItems[0]->iObjectId, locationId ); TLocationSnapshotItem* firstPtr = iMediaItems[0]; + + // Go for remapping.. get locationdata from trail with object time + TTime timestamp = GetMdeObjectTimeL( iMediaItems[0]->iObjectId ); + TRemapItem remapItem; + remapItem.iObjectId = iMediaItems[0]->iObjectId; + remapItem.iTime = timestamp; + remapItem.iLocationId = locationId; + remapItem.iRelationId = relationId; + iRemapper->Append( remapItem ); + iMediaItems.Remove(0); delete firstPtr; iMediaItems.Compress(); @@ -1881,7 +1955,6 @@ iNewItem.iLocationData.iQuality = aPosition.HorizontalAccuracy(); TItemId locationId = DoCreateLocationL( iNewItem.iLocationData ); iRemapper->UpdateRelationsL( locationId ); - // TODO: remap. #ifdef LOC_REVERSEGEOCODE if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress)) { @@ -1911,7 +1984,17 @@ TLocationSnapshotItem* item = iMediaItems[0]; TItemId locationId = DoCreateLocationL( iMediaItems[0]->iLocationData ); iMediaItems[0]->iLocationId = locationId; - CreateRelationL( iMediaItems[0]->iObjectId, locationId ); + TItemId relationId = CreateRelationL( iMediaItems[0]->iObjectId, locationId ); + + // Go for remapping.. get locationdata from trail with object time + TTime timestamp = GetMdeObjectTimeL( iMediaItems[0]->iObjectId ); + TRemapItem remapItem; + remapItem.iObjectId = iMediaItems[0]->iObjectId; + remapItem.iTime = timestamp; + remapItem.iLocationId = locationId; + remapItem.iRelationId = relationId; + iRemapper->Append( remapItem ); + if((iMediaItems[0]->iFlag & KSnapMediaFile) > 0) { iLastMediaItem = *(iMediaItems[0]); @@ -1952,6 +2035,20 @@ else if ( iMediaItems.Count() > 0 ) { TLocationSnapshotItem* item = iMediaItems[0]; + // Fails may be becuase of n/w reason..create location + relation so that we can handle at 3:00 AM. + TItemId locationId = DoCreateLocationL( iMediaItems[0]->iLocationData ); + iMediaItems[0]->iLocationId = locationId; + TItemId relationId = CreateRelationL( iMediaItems[0]->iObjectId, locationId ); + + // Go for remapping.. get locationdata from trail with object time + TTime timestamp = GetMdeObjectTimeL( iMediaItems[0]->iObjectId ); + TRemapItem remapItem; + remapItem.iObjectId = iMediaItems[0]->iObjectId; + remapItem.iTime = timestamp; + remapItem.iLocationId = locationId; + remapItem.iRelationId = relationId; + iRemapper->Append( remapItem ); + iMediaItems.Remove(0); iMediaItems.Compress(); iMediaHandlingFlag &= ~KLocationQueryInProgress; @@ -2139,6 +2236,11 @@ CMdEProperty* property = NULL; object = iMdeSession->GetObjectL( aObjectId ); + if( !object ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::PushL( object ); object->Property( timeDef, property, 0 ); if ( !property ) @@ -2148,7 +2250,10 @@ const TTime timeValue( property->TimeValueL() ); CleanupStack::PopAndDestroy( object ); + + LOG( "CLocationRecord::GetMdeObjectTimeL(), end" ); return timeValue; + } @@ -2209,7 +2314,6 @@ iNetLocationQuery->FindL(1, 1); iMediaHandlingFlag |= KLocationQueryInProgress; - // iMediaHandlingFlag |= KNetQueryInProgress; } else { @@ -2461,8 +2565,10 @@ iMediaHandlingFlag &= (~KReverseGeoCodingInProgress); TLocationSnapshotItem* snapshotItem = NULL; + LOG1("Error - %d", aErrorcode); if( aErrorcode == KErrNone ) { + iLastReverseGeocodeFails = EFalse; TPtrC countryPtr( aAddressInfo.GetCountryName() ); TPtrC cityPtr( aAddressInfo.GetCity() ); TRAP_IGNORE( iTagCreator->CreateLocationTagsL( countryPtr, countryTagId, @@ -2482,19 +2588,16 @@ TRAP_IGNORE( iTagCreator->AttachTagsL( iLocationItems[0]->iObjectId, countryTagId, cityTagId ) ); + if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0 + && iLastMediaItem.iLocationId == iLastLocationItem.iLocationId ) + { + LOG("Updating country/city\n"); + iLastMediaItem.iCountryTagId = countryTagId; + iLastMediaItem.iCityTagId = cityTagId; + } + } } - if(iLastMediaItem.iFlag == 0) - { - LOG("Last media item is null\n"); - } - if ( iLastMediaItem.iFlag > 0 && iLastMediaItem.iLocationId == iLastLocationItem.iLocationId ) - { - LOG("Updating country/city\n"); - iLastMediaItem.iCountryTagId = countryTagId; - iLastMediaItem.iCityTagId = cityTagId; - } - //check other items in the array has same location for ( TInt index = iLocationItems.Count() - 1; index > 0; index--) { @@ -2512,6 +2615,8 @@ else { //handle error + LOG("Reverse geo coding fails"); + iLastReverseGeocodeFails = ETrue; } //irrespective of error or not, remove current(first) item to proceed further diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/src/ctracklog.cpp --- a/locationmanager/locationtrail/src/ctracklog.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/src/ctracklog.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -68,6 +68,7 @@ EXPORT_C CTrackLog::~CTrackLog() { delete iGpxConverter; + iGpxConverter = NULL; iFs.Close(); } @@ -201,6 +202,7 @@ if ( err == KErrNone ) { delete lastCoords; + lastCoords = NULL; lastCoords = new TCoordinate( aTrailItem.iLocationData.iPosition ); iBoundaries->distance += distance; } @@ -221,6 +223,8 @@ RFile64 file; RFileWriteStream writer; + CleanupClosePushL( writer ); + TInt err; err = file.Open( iFs, iTmpFileName, EFileRead ); if ( err != KErrNone ) @@ -247,8 +251,6 @@ writer.Sink()->SeekL( MStreamBuf::EWrite, TStreamPos( endpos )); } - CleanupClosePushL( writer ); - TInt count = iTrackLogItemArray.Count(); for( TInt i = 0; i < count; i++ ) @@ -306,7 +308,9 @@ } } delete filename; + filename = NULL; delete files; + files = NULL; } void CTrackLog::ReadCenRepValueL(TInt aKey, TInt& aValue) diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/locationtrail/src/locationremappingao.cpp --- a/locationmanager/locationtrail/src/locationremappingao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/locationtrail/src/locationremappingao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -385,12 +385,14 @@ relation = iMdEClient->GetRelationL( iRemapItems[i].iRelationId ); if(relation) - { + { + CleanupStack::PushL(relation); TTime timestamp( 0 ); timestamp.UniversalTime(); relation->SetLastModifiedDate( timestamp ); iMdEClient->UpdateRelationL( *relation ); + CleanupStack::PopAndDestroy(relation); } } @@ -460,14 +462,16 @@ iRemapItems[i].iObjectId, aLocationId, 0 ); iMdEClient->AddRelationL( *relationObject ); CleanupStack::PopAndDestroy( relationObject ); - LOG("CLocationRemappingAO::UpdateRelationsL - new relation created"); + LOG("new relation created"); } else { CMdERelation* relationObject = iMdEClient->GetRelationL( iRemapItems[i].iRelationId ); + CleanupStack::PushL(relationObject); relationObject->SetRightObjectIdL( aLocationId ); iMdEClient->UpdateRelationL( *relationObject ); - LOG("CLocationRemappingAO::UpdateRelationsL - old relation updated"); + CleanupStack::PopAndDestroy(relationObject); + LOG("old relation updated"); } iRemapItems.Remove( i ); } diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/group/locationmanagerserver.mmp --- a/locationmanager/server/group/locationmanagerserver.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/group/locationmanagerserver.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -44,11 +44,13 @@ #ifdef _LOC_REVERSEGEOCODE MACRO LOC_REVERSEGEOCODE USERINCLUDE ../../tagcreator/inc -USERINCLUDE ../../reversegeocode/inc #endif +#ifdef _LOC_GEOTAGGING_CELLID +MACRO LOC_GEOTAGGING_CELLID +USERINCLUDE ../../geoconverter/inc +#endif -USERINCLUDE ../../geoconverter/inc SYSTEMINCLUDE /epoc32/include/platform/lbs SYSTEMINCLUDE /epoc32/include/stdapis @@ -58,9 +60,7 @@ SOURCEPATH ../src SOURCE clocationmanagerserver.cpp SOURCE clocationmanagersession.cpp -#ifdef _LOC_REVERSEGEOCODE SOURCE clocationgeotagtimerao.cpp -#endif SOURCE clocationservertimerhandler.cpp SOURCE nwregistrationstatushandler.cpp @@ -79,9 +79,7 @@ LIBRARY etelmm.lib LIBRARY commsdat.lib -#ifdef _LOC_REVERSEGEOCODE LIBRARY geotagger.lib -#endif PAGED BYTEPAIRCOMPRESSTARGET diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/inc/clocationgeotagtimerao.h --- a/locationmanager/server/inc/clocationgeotagtimerao.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/inc/clocationgeotagtimerao.h Fri Sep 17 16:54:49 2010 +0300 @@ -105,6 +105,8 @@ * @return None. */ CLocationGeoTagTimerAO(CMdESession& aMdeSession, MGeoTaggerObserver& aObserver); + + TBool IsLowBattery(); private: CGeoTagger* iGeoTagger; diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/inc/clocationmanagerserver.h --- a/locationmanager/server/inc/clocationmanagerserver.h Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/inc/clocationmanagerserver.h Fri Sep 17 16:54:49 2010 +0300 @@ -41,9 +41,7 @@ #include "clocationservertimerhandler.h" class CMdESession; -#ifdef LOC_REVERSEGEOCODE class CLocationGeoTagTimerAO; -#endif class CGeoTagger; class REComSession; class CNwRegistrationStatusHandler; @@ -590,6 +588,11 @@ * Retrieve home network */ void RetrieveHomeNetwork(); + + /** + * Stop the server (if possible) + */ + void StopServer(); private: /** @@ -671,8 +674,9 @@ RMobilePhone::TMobilePhoneNetworkInfoV1 iHomeNetwork; TBool iHomeNwInfoAvailableFlag; + CLocationGeoTagTimerAO* iGeoTagTimer; + #ifdef LOC_REVERSEGEOCODE - CLocationGeoTagTimerAO* iGeoTagTimer; CGeoTagger* iGeoTaggingPendingReqObj; RMessage2 iTagPendingMessage; RMessage2 iGeoTaggingMessage; diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/server/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS Location Manager Server + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/sis/locationmanagerserver_stub.sis Binary file locationmanager/server/sis/locationmanagerserver_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/server/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"LocationManagerServer Patch"},(0x200071BE), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/server/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"locationmanagerserver"}, (0x200071BE), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/src/clocationgeotagtimerao.cpp --- a/locationmanager/server/src/clocationgeotagtimerao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/src/clocationgeotagtimerao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -15,14 +15,10 @@ * */ +#include #include "clocationgeotagtimerao.h" -#include -#include -#include #include "locationmanagerdebug.h" - - //Time at which the geotagging should be triggered( 3.00 AM ) const TInt GEOTAGGING_TIME_IN_HOURS = 3; //Hour specified in minutes @@ -36,7 +32,7 @@ // CLocationGeoTagTimerAO::CLocationGeoTagTimerAO(CMdESession& aMdeSession, MGeoTaggerObserver& aObserver): - CTimer(EPriorityStandard ), + CTimer( EPriorityLow ), iGeoTagger(NULL), iMdeSession(aMdeSession), iObserver(aObserver) @@ -70,7 +66,7 @@ new( ELeave ) CLocationGeoTagTimerAO(aMdeSession, aObserver); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop(); //self return self; } @@ -108,11 +104,11 @@ //3 AM in seconds TInt targetTimeInSeconds = GEOTAGGING_TIME_IN_HOURS * HOUR_VALUE_IN_SECONDS; - TInt timeDifference; + TInt timeDifference = 0; //Find the time difference in seconds between current time to 3.00 AM //Either on same day or next day. - if ( currentHr <= GEOTAGGING_TIME_IN_HOURS ) + if ( currentHr < GEOTAGGING_TIME_IN_HOURS ) { timeDifference = targetTimeInSeconds - ( ( currentHr * HOUR_VALUE_IN_SECONDS ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec ); @@ -145,30 +141,34 @@ { LOG ("CLocationGeoTagTimerAO::RunL(), begin"); TInt status = iStatus.Int(); + LOG1 ("Timedout error - %d", status); switch( status ) { - case KErrAbort: - StartTimer(); - break; - case KErrUnderflow: - case KErrOverflow: - StartTimer(); - break; case KErrNone: { + // If battery is low, skip geotagging in the background + // to save power especially if there is a lot of images + // to be handled + if( IsLowBattery() ) + { + StartTimer(); + break; + } //Trigger the reverse geocoding and start the timer again //Create the instance of geotagger class - if(iGeoTagger) + if(iGeoTagger != NULL) { delete iGeoTagger; iGeoTagger = NULL; } iGeoTagger = CGeoTagger::NewL( this, NULL ); iGeoTagger->CreateGeoTagsL(); + LOG ("Started 3:00 AM geotagging."); break; } default: + StartTimer(); break; } LOG ("CLocationGeoTagTimerAO::RunL(), end"); @@ -181,8 +181,6 @@ void CLocationGeoTagTimerAO::GeoTaggingCompleted( const TInt aError ) { LOG ("CLocationGeoTagTimerAO::GeoTaggingCompleted(), begin"); - delete iGeoTagger; - iGeoTagger = NULL; StartTimer(); iObserver.GeoTaggingCompleted(aError); LOG ("CLocationGeoTagTimerAO::GeoTaggingCompleted(), end"); @@ -228,5 +226,26 @@ return iObserver.GetHomeNetworkInfo(aHomeNwInfoAvailableFlag); } +// ---------------------------------------------------------------------------- +// CLocationGeoTagTimerAO::IsLowBattery() +// ---------------------------------------------------------------------------- +TBool CLocationGeoTagTimerAO::IsLowBattery() + { + LOG("CLocationGeoTagTimerAO::IsLowBattery()"); + RProperty batteryProperty; + TInt batteryStatus; + + TInt error = batteryProperty.Get(KPSUidHWRMPowerState, KHWRMBatteryStatus, batteryStatus); + LOG1("CLocationGeoTagTimerAO::IsLowBattery() - battery status %d", batteryStatus ); + if( error != KErrNone || batteryStatus == EBatteryStatusOk ) + { + return EFalse; + } + else + { + return ETrue; + } + } + // End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/src/clocationmanagerserver.cpp --- a/locationmanager/server/src/clocationmanagerserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/src/clocationmanagerserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -33,9 +33,7 @@ #include "mdeobjectdef.h" #include "mdepropertydef.h" #include "mdcserializationbuffer.h" -#ifdef LOC_REVERSEGEOCODE #include "clocationgeotagtimerao.h" -#endif //LOC_REVERSEGEOCODE #include "nwregistrationstatushandler.h" using namespace MdeConstants; @@ -78,6 +76,7 @@ { TRAP( ret, RunServerL() ); delete cleanup; + cleanup = NULL; } return ret; } @@ -101,7 +100,7 @@ // -------------------------------------------------------------------------- // CLocationManagerServer::CLocationManagerServer() - : CPolicyServer( CActive::EPriorityStandard, + : CPolicyServer( KLocManagerSessionPriority, KLocationManagerPolicy, ESharableSessions ), iASW(NULL), @@ -116,9 +115,9 @@ iTelServerIsOpen(EFalse), iPhoneIsOpen(EFalse), iNwRegistrationStatusHandler(NULL), - iHomeNwInfoAvailableFlag(EFalse) + iHomeNwInfoAvailableFlag(EFalse), + iGeoTagTimer(NULL) #ifdef LOC_REVERSEGEOCODE - ,iGeoTagTimer(NULL) ,iGeoTaggingPendingReqObj(NULL) ,iEcomSession(NULL) #endif //LOC_REVERSEGEOCODE @@ -135,10 +134,6 @@ LOG ("CLocationManagerServer::ConstructL() begin"); StartL( KLocServerName ); - - RProcess process; - process.SetPriority( EPriorityBackground ); - process.Close(); // initialize etel InitialisePhoneL(); @@ -151,57 +146,67 @@ iNwRegistrationStatusHandler = CNwRegistrationStatusHandler::NewL(iPhone); - iMdeSession = CMdESession::NewL( *this ); iLocationRecord = CLocationRecord::NewL(*this, iPhone); iTrackLog = CTrackLog::NewL(); + iMdeSession = CMdESession::NewL( *this ); + + iLocationRecord->SetObserver( this ); - iASW->Start(); + iLocationRecord->SetAddObserver( iTrackLog ); + + iTrackLog->AddGpxObserver( this ); + + CRepository* repository = CRepository::NewLC( KRepositoryUid ); + TInt err = repository->Get( KLocationTrailShutdownTimer, iLocManStopDelay ); + + LOG1("iLocManStopDelay:%d", iLocManStopDelay); + + if ( err != KErrNone ) + { + LOG1("iLocManStopDelay err:%d", err); + iLocManStopDelay = KLocationTrailShutdownDelay; + } + + err = repository->Get( KLocationTrailRemapShutdownTimer, iLocManStopRemapDelay ); + CleanupStack::PopAndDestroy( repository ); + + LOG1("iLocManStopRemapDelay:%d", iLocManStopRemapDelay); + + if ( err != KErrNone ) + { + LOG1("iLocManStopRemapDelay err:%d", err); + iLocManStopRemapDelay = KLocationTrailRemapShutdownDelay; + } + + if( !iSessionReady ) + { + iASW->Start(); + } + delete iASW; - iASW = NULL; - if(iSessionReady) + iASW = NULL; + + if( iSessionReady ) { LOG("Session is ready to give service"); - - iLocationRecord->SetObserver( this ); - - iLocationRecord->SetAddObserver( iTrackLog ); - - iTrackLog->AddGpxObserver( this ); - - CRepository* repository = CRepository::NewLC( KRepositoryUid ); - TInt err = repository->Get( KLocationTrailShutdownTimer, iLocManStopDelay ); - - LOG1("CLocationManagerServer::ConstructL, iLocManStopDelay:%d", iLocManStopDelay); - - if ( err != KErrNone ) - { - LOG1("CLocationManagerServer::ConstructL, iLocManStopDelay err:%d", err); - iLocManStopDelay = KLocationTrailShutdownDelay; - } - - err = repository->Get( KLocationTrailRemapShutdownTimer, iLocManStopRemapDelay ); - CleanupStack::PopAndDestroy( repository ); - - LOG1("CLocationManagerServer::ConstructL, iLocManStopRemapDelay:%d", iLocManStopRemapDelay); - - if ( err != KErrNone ) - { - LOG1("CLocationManagerServer::ConstructL, iLocManStopRemapDelay err:%d", err); - iLocManStopRemapDelay = KLocationTrailRemapShutdownDelay; - } - -#ifdef LOC_REVERSEGEOCODE //Create the instance of the geotagging timer object + // Create timer, if n/w or reverse geo code based feature flag is enabled +#if defined(LOC_REVERSEGEOCODE) || defined(LOC_GEOTAGGING_CELLID) iGeoTagTimer = CLocationGeoTagTimerAO::NewL(*iMdeSession, *this); //Schedule a task for geotagging every day at 3.00 AM iGeoTagTimer->StartTimer(); -#endif //LOC_REVERSEGEOCODE +#endif } else { LOG("Unable to open MDE session. Closing.."); - User::Leave(KErrCouldNotConnect); + User::Leave( KErrCouldNotConnect ); } + + RProcess process; + process.SetPriority( EPriorityBackground ); + process.Close(); + LOG ("CLocationManagerServer::ConstructL() end"); } @@ -213,18 +218,29 @@ CLocationManagerServer::~CLocationManagerServer() { LOG("CLocationManagerServer::~CLocationManagerServer ,begin"); - +#if defined(LOC_REVERSEGEOCODE) || defined(LOC_GEOTAGGING_CELLID) + delete iGeoTagTimer; + iGeoTagTimer = NULL; +#endif #ifdef LOC_REVERSEGEOCODE - delete iGeoTagTimer; delete iGeoTaggingPendingReqObj; + iGeoTaggingPendingReqObj = NULL; #endif //LOC_REVERSEGEOCODE delete iLocationRecord; + iLocationRecord = NULL; delete iTrackLog; + iTrackLog = NULL; delete iTimer; + iTimer = NULL; + delete iRelationQuery; + iRelationQuery = NULL; delete iASW; + iASW = NULL; delete iMdeSession; + iMdeSession = NULL; delete iNwRegistrationStatusHandler; + iNwRegistrationStatusHandler = NULL; iTargetObjectIds.Close(); CancelRequests(iNotifReqs); iNotifReqs.Close(); @@ -474,14 +490,9 @@ // void CLocationManagerServer::RemoveSession() { + LOG1( "CLocationManagerServer::RemoveSession. Session count - %d", iSessionCount); iSessionCount--; - if ( !iSessionCount - && iLocationRecord - && !iLocationRecord->TaggingInProgress()) - { - // Nothing in progress. shutdown the server - CActiveScheduler::Stop(); - } + StopServer(); } // -------------------------------------------------------------------------- @@ -1105,6 +1116,7 @@ } iCopyReqs[i].iMessage.Complete( aError ); delete iCopyReqs[i].iQuery; + iCopyReqs[i].iQuery = NULL; iCopyReqs.Remove( i ); break; } @@ -1151,6 +1163,7 @@ { iCopyReqs[i].iMessage.Complete( KErrNone ); delete iCopyReqs[i].iQuery; + iCopyReqs[i].iQuery = NULL; iCopyReqs.Remove( i ); break; } @@ -1657,18 +1670,38 @@ iGeoTaggingMessage = RMessage2 (); } #endif //LOC_REVERSEGEOCODE + StopServer(); + LOG("CLocationManagerServer::GeoTaggingCompleted ,end"); + } + + +// -------------------------------------------------------------------------- +// CLocationManagerServer::StopServer +// -------------------------------------------------------------------------- +// + +void CLocationManagerServer::StopServer() + { + LOG("CLocationManagerServer::StopServer ,begin"); // once geo tagging completed, check whether, we can terminate the server + // dont't stop this process if + // 1. when client are connected. + // 2. 3AM timer is going on. + // 3. Tagging is in progress. if ( !iSessionCount +#if defined(LOC_REVERSEGEOCODE) || defined(LOC_GEOTAGGING_CELLID) + && iGeoTagTimer == NULL +#endif && iLocationRecord && !iLocationRecord->TaggingInProgress()) { // Nothing in progress. shutdown the server + LOG("Stop the schedular"); CActiveScheduler::Stop(); } - LOG("CLocationManagerServer::GeoTaggingCompleted ,end"); + LOG("CLocationManagerServer::StopServer ,end"); } - // -------------------------------------------------------------------------- // CLocationManagerServer::PendingGeoTagReqComplete // -------------------------------------------------------------------------- @@ -1788,7 +1821,7 @@ } aMessage.Complete(KErrNone); #else - aMessage.Complete(KErrNotSupported); + aMessage.Complete(KErrNotSupported); #endif //LOC_REVERSEGEOCODE } diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/src/clocationmanagersession.cpp --- a/locationmanager/server/src/clocationmanagersession.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/src/clocationmanagersession.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -52,8 +52,8 @@ // we are expecting the application to start and stop else on server terminate, we will do the same. // this is not okay when user takes a photograph and then transfer photo using BT/PC . // at this point, it will stop the trail for camera where as camera session is still valid. - // DON"T CALL StopGPSPositioningL METHOD. -// TRAP_IGNORE(Server().StopGPSPositioningL()); + + Server().CancelNotificationRequest( iNotificationHandle ); Server().CancelLocationRequest( iLocationHandle ); Server().CancelTrackLogNotificationRequest( iTrackLogNotificationHandle ); diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/src/clocationservertimerhandler.cpp --- a/locationmanager/server/src/clocationservertimerhandler.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/src/clocationservertimerhandler.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -26,7 +26,7 @@ // CLocationServerTimerHandler::CLocationServerTimerHandler (MLocationServerTimerObserver& aLocationServerTimerObserver): - CTimer(EPriorityStandard ), + CTimer( EPriorityStandard ), iLocationServerTimerObserver(aLocationServerTimerObserver), iLocationServerTimerType(MLocationServerTimerObserver::ELocGeneralPurpose) { @@ -53,7 +53,7 @@ new( ELeave ) CLocationServerTimerHandler(aLocationServerTimerObserver); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop(); //self return self; } diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/server/src/nwregistrationstatushandler.cpp --- a/locationmanager/server/src/nwregistrationstatushandler.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/server/src/nwregistrationstatushandler.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -49,7 +49,7 @@ CNwRegistrationStatusHandler* self = new( ELeave ) CNwRegistrationStatusHandler(aMobilePhone); CleanupStack::PushL( self ); self->ConstructL(); - CleanupStack::Pop(); + CleanupStack::Pop(); //self return self; } diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/sis/locutildebug.pkg --- a/locationmanager/sis/locutildebug.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/sis/locutildebug.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -40,8 +40,6 @@ ;#include "..\inc\locplatsupport.mmh" ;#ifdef _LOC_REVERSEGEOCODE ;MACRO LOC_REVERSEGEOCODE -; Reverse geocode -;"\EPOC32\RELEASE\ARMV5\UDEB\ReverseGeocode.dll" -"!:\sys\bin\ReverseGeocode.dll" ; Tag creator ;"\EPOC32\RELEASE\ARMV5\UDEB\tagcreator.dll" -"!:\sys\bin\tagcreator.dll" @@ -49,13 +47,7 @@ ; Geo tagger ;"\EPOC32\RELEASE\ARMV5\UDEB\geotagger.dll" -"!:\sys\bin\geotagger.dll" -; Reverse geocode plugin -;"\epoc32\RELEASE\armv5\UDEB\ReverseGeoCoderPlugin.dll"-"!:\sys\bin\ReverseGeoCoderPlugin.dll" -;"\epoc32\data\z\resource\plugins\reversegeocoderplugin.rsc"-"!:\resource\plugins\reversegeocoderplugin.rsc" - ;#endif - - ; End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/sis/package_cellid_reverse_geocode_enabled.pkg --- a/locationmanager/sis/package_cellid_reverse_geocode_enabled.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/sis/package_cellid_reverse_geocode_enabled.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -30,9 +30,6 @@ "\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll" "\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe" -; Reverse geocode -"\EPOC32\RELEASE\ARMV5\UREL\ReverseGeocode.dll" -"c:\sys\bin\ReverseGeocode.dll" - ; Tag creator "\EPOC32\RELEASE\ARMV5\UREL\tagcreator.dll" -"c:\sys\bin\tagcreator.dll" @@ -42,12 +39,6 @@ ; Geo converter "\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll" - -; Reverse geocode plugin -"\epoc32\RELEASE\armv5\UREL\ReverseGeoCoderPlugin.dll"-"c:\sys\bin\ReverseGeoCoderPlugin.dll" -"\epoc32\data\z\resource\plugins\reversegeocoderplugin.rsc"-"c:\resource\plugins\reversegeocoderplugin.rsc" - - ; End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/sis/package_cellidenabled.pkg --- a/locationmanager/sis/package_cellidenabled.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/sis/package_cellidenabled.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -33,6 +33,8 @@ ; Geo converter "\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll" +; Geo tagger +"\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll" ; End of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/bwincw/tagcreatorwinscw.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/bwincw/tagcreatorwinscw.def Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,7 @@ +EXPORTS + ?CreateLocationTagsL@CTagCreator@@QAEXABVTPtrC16@@AAK01@Z @ 1 NONAME ; void CTagCreator::CreateLocationTagsL(class TPtrC16 const &, unsigned long &, class TPtrC16 const &, unsigned long &) + ?SetSession@CTagCreator@@QAEXPAVCMdESession@@@Z @ 2 NONAME ; void CTagCreator::SetSession(class CMdESession *) + ?AttachTagsL@CTagCreator@@QAEXKKK@Z @ 3 NONAME ; void CTagCreator::AttachTagsL(unsigned long, unsigned long, unsigned long) + ?NewL@CTagCreator@@SAPAV1@XZ @ 4 NONAME ; class CTagCreator * CTagCreator::NewL(void) + ??1CTagCreator@@UAE@XZ @ 5 NONAME ; CTagCreator::~CTagCreator(void) + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/eabi/tagcreatorarm.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/eabi/tagcreatorarm.def Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,8 @@ +EXPORTS + _ZN11CTagCreator10SetSessionEP11CMdESession @ 1 NONAME + _ZN11CTagCreator11AttachTagsLEmmm @ 2 NONAME + _ZN11CTagCreator19CreateLocationTagsLERK7TPtrC16RmS2_S3_ @ 3 NONAME + _ZN11CTagCreator4NewLEv @ 4 NONAME + _ZTI11CTagCreator @ 5 NONAME + _ZTV11CTagCreator @ 6 NONAME + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/group/bld.inf --- a/locationmanager/tagcreator/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/tagcreator/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -2,9 +2,9 @@ * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" +* under the terms of "Eclipse Public License v1.0" * which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". +* at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. @@ -15,6 +15,11 @@ * */ + +#include "../../inc/locplatsupport.mmh" + +#ifdef _LOC_REVERSEGEOCODE + PRJ_PLATFORMS DEFAULT @@ -27,3 +32,5 @@ PRJ_TESTEXPORTS + +#endif diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/group/tagcreator.mmp --- a/locationmanager/tagcreator/group/tagcreator.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/locationmanager/tagcreator/group/tagcreator.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -27,7 +27,7 @@ #if defined(WINSCW) deffile ../bwincw/tagcreatorwinscw.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/tagcreatorarm.def #endif nostrictdef @@ -35,7 +35,6 @@ USERINCLUDE ../inc USERINCLUDE ../../inc USERINCLUDE ../../../inc -USERINCLUDE ../../reversegeocode/inc @@ -49,7 +48,6 @@ LIBRARY mdeclient.lib LIBRARY estor.lib LIBRARY platformenv.lib -DEBUGLIBRARY flogger.lib PAGED diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/inc/ctagcreator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/inc/ctagcreator.h Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,128 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: A class for creating country and city tags for media files. +* +*/ + + +#ifndef C_TAGCREATOR_H +#define C_TAGCREATOR_H + +#include "mdesession.h" +#include "mdenamespacedef.h" +#include + +/** + * + * @since S60 9.2 + */ +class CTagCreator : public CBase + { +public: + /** + * 2-phased constructor. + */ + IMPORT_C static CTagCreator* NewL( ); + + /** + * C++ destructor. + */ + IMPORT_C virtual ~CTagCreator(); + + /** + * Attach country and city tags to an image file/object. + * @param aObjectId, object Id for image/video to be tagged. + * @param aCountryTagId, a country tag Id. + * @param aCityTagId, a city tag Id. + * @return None. + */ + IMPORT_C void AttachTagsL( const TUint32 aObjectId, const TItemId aCountryTagId, + const TItemId aCityTagId ); + /** + * Creates country and city tags. + * @param aCountry, a country name. + * @param aCountryTagId, reference to a country tag Id. + * @param aCity, a city name. + * @param aCityTagId, a reference to a city tag Id. + * @return None. + */ + IMPORT_C void CreateLocationTagsL( const TPtrC& aCountry, TItemId& aCountryTagId, + const TPtrC& aCity, TItemId& aCityTagId ); + + /** + * Sets the CMdESession for tag creation + * @param aSession the CMdESession object + */ + IMPORT_C void SetSession( CMdESession* aSession ); + +public: + + /** + * Creates a tag for the country + * @param aCountry country name + * @param aCity city name + * @param aCountryTagId The country tag Id + */ + void CreateTagForCountryL( const TPtrC& aCountry, + TItemId& aCountryTagId ); + + /** + * Creates a tag for the city + * @param aCountry The country name + * @param aCity The city name + * @param aCityTagId The city tag Id + */ + void CreateTagForCityL( const TPtrC& aCountry, const TPtrC& aCity, TItemId& aCityTagId); + +private: + /** + * C++ constructor. + */ + CTagCreator( ); + + /** + * 2nd phase constructor. + */ + void ConstructL(); + + /** + * Creates a tag object and adds it to the database + * @param aTitle The title associated with the tag + * @param aUri The uri associated with the tag + * @return The itemId of the newly created tag in the database + */ + TUint32 CreateTagL( const TPtrC& aTitle, + const TPtrC& aUri, + MdeConstants::Tag::TTagType aTagType ); + /** + * Finds if a tag with the given uri exists + * @param aUri The uri by which the tag is to be searched + * @return The ItemId of the tag if it exists,0 otherwise + */ + + TUint32 TagExistsL( const TPtrC& aUri ); + +private: + + /** + * iMdeSession + * an instance of the CMdESession + */ + CMdESession* iMdeSession; + + }; + +#endif // C_TAGCREATOR_H + +// End of file. diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/sis/depends.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/sis/depends.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,24 @@ + + + + + 1 + MdS Location Manager + Upgrade package for MdS Tag Creator + + + + S60 + + 5 + 0 + + 2009 + 16 + + + + + + \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/sis/package.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/sis/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,29 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"TagCreator Patch"},(0x2002701E), 2, 0, 0, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\EPOC32\RELEASE\ARMV5\UREL\tagcreator.dll" -"c:\sys\bin\tagcreator.dll" \ No newline at end of file diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/sis/stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/sis/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,30 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;Header +# {"tagcreator"}, (0x2002701E), 1, 0, 0, TYPE=SA + +;Localised Vendor name +%{"Nokia"} + +;Unique Vendor name +:"Nokia" + +;Files + + diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/sis/tagcreator_stub.sis Binary file locationmanager/tagcreator/sis/tagcreator_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 locationmanager/tagcreator/src/ctagcreator.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/locationmanager/tagcreator/src/ctagcreator.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,307 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: A class for creating country and city tags for media files +* +*/ + +#include "ctagcreator.h" +#include "locationmanagerdebug.h" + +#include "mdccommon.h" +#include "mdeobjectdef.h" +#include "mdepropertydef.h" +#include "mderelation.h" +#include "mdequery.h" +#include "mdeconstants.h" + +using namespace MdeConstants; + +_LIT ( KCountry, "country:"); // country:finland +_LIT ( KCity, "city:"); // city:helsinki|country:finland +_LIT ( KSeparator, "|" ); // Separator for city tag. Separate city and country. + +// -------------------------------------------------------------------------- +// CTagCreator::NewL +// -------------------------------------------------------------------------- +// +EXPORT_C CTagCreator* CTagCreator::NewL( ) + { + LOG( "CTagCreator::NewL(), begin" ); + CTagCreator* self = new (ELeave) CTagCreator( ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + LOG( "CTagCreator::NewL(), end" ); + return self; + } + +// -------------------------------------------------------------------------- +// CTagCreator::CTagCreator +// -------------------------------------------------------------------------- +// +CTagCreator::CTagCreator( ) + { + + } + +// -------------------------------------------------------------------------- +// CTagCreator::ConstructL +// -------------------------------------------------------------------------- +// +void CTagCreator::ConstructL() + { + + } + +// -------------------------------------------------------------------------- +// CTagCreator::~CTagCreator +// -------------------------------------------------------------------------- +// +CTagCreator::~CTagCreator() + { + + } + +// -------------------------------------------------------------------------- +// CTagCreator::SetMdeSession() +// -------------------------------------------------------------------------- +// +EXPORT_C void CTagCreator::SetSession(CMdESession* aSession) + { + iMdeSession = aSession; + } + +// --------------------------------------------------------------------------- +// CTagCreator::CreateTagForCountryL() +// --------------------------------------------------------------------------- +// +void CTagCreator::CreateTagForCountryL( const TPtrC& aCountry, + TItemId& aCountryTagId ) + { + LOG( "CTagCreator::CreateTagForCountryL - begin" ); + + // Crete new string for uri, -> country:India. + TUint totalLength = ( aCountry.Length() + KCountry().Length() ); + HBufC* buf = HBufC::NewLC( totalLength ); + TPtr uriPtr = buf->Des(); + _LIT(KCountryUriFormat, "%S%S"); + uriPtr.Format(KCountryUriFormat, &(KCountry()), &aCountry); + + // Check if there is allready tag for current country. + aCountryTagId = TagExistsL( uriPtr ); + + if( !aCountryTagId ) + { + // No tag, create tag for country. + aCountryTagId = CreateTagL( aCountry, uriPtr, MdeConstants::Tag::ESystemDefineCountryTags); + } + + CleanupStack::PopAndDestroy( buf ); + + LOG( "CTagCreator::CreateTagForCountryL - end" ); + } + +// --------------------------------------------------------------------------- +// CTagCreator::CreateTagForCityL() +// --------------------------------------------------------------------------- +// +void CTagCreator::CreateTagForCityL( const TPtrC& aCountry, const TPtrC& aCity, TItemId& aCityTagId ) + { + LOG( "CTagCreator::CreateTagForCityL - begin" ); + + // Crete new string for uri, -> city:bangalore|country:india + TUint totalLength = ( aCity.Length() + KCity.iTypeLength + + aCountry.Length() + KCountry.iTypeLength + KSeparator.iTypeLength ); + + HBufC* buf = HBufC::NewLC( totalLength ); + TPtr uriPtr = buf->Des(); + _LIT(KCityCountryUriFormat, "%S%S%S%S%S"); + uriPtr.Format(KCityCountryUriFormat, + &(KCity()), + &aCity, + &(KSeparator()), + &(KCountry()), + &aCountry); + + // Check if there is allready tag for current city. + aCityTagId = TagExistsL( uriPtr ); + + if( !aCityTagId ) + { + // No tag, create tag for city. + aCityTagId = CreateTagL( aCity, uriPtr, MdeConstants::Tag::ESystemDefineCityTags); + } + + CleanupStack::PopAndDestroy( buf ); + + LOG( "CTagCreator::CreateTagForCityL - end" ); + } + +// --------------------------------------------------------------------------- +// CTagCreator::CreateTagL +// --------------------------------------------------------------------------- +// +TUint32 CTagCreator::CreateTagL( const TPtrC& aTitle, + const TPtrC& aUri, + MdeConstants::Tag::TTagType aTagType) + { + LOG( "CTagCreator::CreateTagL - begin" ); + + CMdENamespaceDef& defaultNamespace = iMdeSession->GetDefaultNamespaceDefL(); + // Create tag object. + CMdEObjectDef& tagObjectDef = defaultNamespace.GetObjectDefL( Tag::KTagObject ); + + CMdEObject* tagObject = NULL; + tagObject = iMdeSession->NewObjectLC( tagObjectDef, aUri ); + + // Type defs. + CMdEPropertyDef& creationDef = tagObjectDef.GetPropertyDefL( + Object::KCreationDateProperty ); + CMdEPropertyDef& modifiedDef = tagObjectDef.GetPropertyDefL( + Object::KLastModifiedDateProperty ); + CMdEPropertyDef& sizeDef = tagObjectDef.GetPropertyDefL( + Object::KSizeProperty ); + CMdEPropertyDef& itemTypeDef = tagObjectDef.GetPropertyDefL( + Object::KItemTypeProperty ); + CMdEPropertyDef& titleDef = tagObjectDef.GetPropertyDefL( + Object::KTitleProperty ); + + // Set propertys. + TTime universalTime; + universalTime.UniversalTime(); + + // Creation time. + tagObject->AddTimePropertyL( creationDef, universalTime ); + + // Modification time. + tagObject->AddTimePropertyL( modifiedDef, universalTime ); + + // Size + tagObject->AddUint32PropertyL( sizeDef, aTagType); + + // ItemType. + tagObject->AddTextPropertyL( itemTypeDef, Tag::KTagItemType ); + + // Title, for country. + if ( aTitle.Length() > 0 ) + { + tagObject->AddTextPropertyL( titleDef, aTitle ); // Add title + } + + // Finally add to database. + TItemId itemId = iMdeSession->AddObjectL( *tagObject ); + + CleanupStack::PopAndDestroy( tagObject ); + + LOG( "CTagCreator::CreateTagL - end" ); + + return itemId; + } + +// --------------------------------------------------------------------------- +// CTagCreator::TagExistsL +// --------------------------------------------------------------------------- +// +TUint32 CTagCreator::TagExistsL( const TPtrC& aUri ) + { + LOG( "CTagCreator::TagExistsL - begin" ); + + CMdEObject* mdeObject = NULL; + mdeObject = iMdeSession->GetObjectL( aUri ) ; // Just to find out if it exists. + + if( mdeObject ) + { + LOG( "CTagCreator::TagExistsL - returning object id" ); + return mdeObject->Id(); + } + else + { + LOG( "CTagCreator::TagExistsL - No object, return 0" ); + return 0; + } + } + +// --------------------------------------------------------------------------- +// CGeoTagger::AttachTagsL +// Create relationship to country and city tag +// --------------------------------------------------------------------------- +// +EXPORT_C void CTagCreator::AttachTagsL( const TUint32 aObjectId, const TItemId aCountryTagId, + const TItemId aCityTagId ) + { + LOG( "CGeoTagger::AttachTagsL" ); + CMdENamespaceDef& defaultNamespace = iMdeSession->GetDefaultNamespaceDefL(); + // contains relation definition + CMdERelationDef& containsRelDef = defaultNamespace.GetRelationDefL( + Relations::KContains ); + + // Create relation between country tag and media object (image/video). + CMdERelation* relationObject = NULL; + if ( aCountryTagId ) + { + relationObject = iMdeSession->NewRelationLC ( containsRelDef, + aObjectId, aCountryTagId, 0 ); + + if ( !relationObject ) + { + LOG( "CGeoTagger::AttachTagsL - Couldn't create relation object!" ); + User::Leave ( KErrBadHandle ); + } + + iMdeSession->AddRelationL( *relationObject ); + + CleanupStack::PopAndDestroy( relationObject ); + } + + // Create relation between city tag and media object (image/video). + if ( aCityTagId ) + { + relationObject = iMdeSession->NewRelationLC ( containsRelDef, + aObjectId, aCityTagId, 0 ); + + if ( !relationObject) + { + LOG( "CGeoTagger::AttachTagsL - Couldn't create relation object!" ); + User::Leave ( KErrBadHandle ); + } + + iMdeSession->AddRelationL( *relationObject ); + + CleanupStack::PopAndDestroy( relationObject ); + } + + LOG( "CGeoTagger::AttachTagsL - end" ); + } + +// --------------------------------------------------------------------------- +// CGeoTagger::CreateLocationTagsL +// Create country and city tags +// --------------------------------------------------------------------------- +// +EXPORT_C void CTagCreator::CreateLocationTagsL( const TPtrC& aCountry, TItemId& aCountryTagId, + const TPtrC& aCity, TItemId& aCityTagId) + { + LOG( "CGeoTagger::CreateLocationTagsL" ); + if( aCountry.Length() > 0 ) + { + CreateTagForCountryL( aCountry, aCountryTagId ); + } + + if( aCity.Length() > 0 ) + { + CreateTagForCityL( aCountry, aCity, aCityTagId ); + } + } + +// End of file diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/harvester_framework_api/inc/harvesterplugin.h --- a/mds_plat/harvester_framework_api/inc/harvesterplugin.h Tue Jul 06 14:44:37 2010 +0300 +++ b/mds_plat/harvester_framework_api/inc/harvesterplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -160,6 +160,11 @@ * @param aBlacklist Reference to blacklisting component. */ IMPORT_C virtual void SetBlacklist( CHarvesterBlacklist& aBlacklist ); + + /** + * Method to stop harvester plugin if needed. + */ + IMPORT_C virtual void StopHarvest(); protected: @@ -265,6 +270,7 @@ CMdEPropertyDef* iTitlePropertyDef; TBool iHarvesting; + TBool iPaused; }; diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/group/bld.inf --- a/mds_plat/location_manager_api/group/bld.inf Tue Jul 06 14:44:37 2010 +0300 +++ b/mds_plat/location_manager_api/group/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -31,9 +31,9 @@ ../inc/locationeventdef.h MW_LAYER_PLATFORM_EXPORT_PATH(locationeventdef.h) ../inc/geotagobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(geotagobserver.h) ../inc/rlocationgeotagger.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationgeotagger.h) -#ifdef _LOC_REVERSEGEOCODE ../inc/geotagger.h MW_LAYER_PLATFORM_EXPORT_PATH(geotagger.h) -#endif +../inc/reversegeocoderplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.h) +../inc/reversegeocoderplugin.inl MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.inl) PRJ_MMPFILES diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/inc/geotagger.h --- a/mds_plat/location_manager_api/inc/geotagger.h Tue Jul 06 14:44:37 2010 +0300 +++ b/mds_plat/location_manager_api/inc/geotagger.h Fri Sep 17 16:54:49 2010 +0300 @@ -31,7 +31,7 @@ * @since S60 9.2 */ -class CGeoTagger : public CBase +NONSHARABLE_CLASS(CGeoTagger) : public CBase { public: /** diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/inc/reversegeocoderplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mds_plat/location_manager_api/inc/reversegeocoderplugin.h Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,209 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: The header file for ReverseGeoCoderPlugin that creates the ReverseGeocoder +* +*/ + + +#ifndef __REVERSEGEOCODERPLUGIN_H__ +#define __REVERSEGEOCODERPLUGIN_H__ + +// INCLUDES + +#include +#include +#include +#include +#include + +const TUid KReversegeocodeInterfaceUid = {0x2002DD13}; + + +/* + * Data class to get the address details. An handle to this type will be given to the + * user through MReverseGeocodeObserver::ReverseGeocodeComplete callback, through which + * user can retrieve the address details using the following interfaces. + * + **/ +class MAddressInfo + { + public: + /* + * Gets the reference to the country name. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the Country Name. + */ + virtual TDesC& GetCountryName()= 0; + + /* + * Gets the reference to the State. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the State name. + */ + virtual TDesC& GetState()= 0; + + /* + * Gets the reference to the City. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the City Name. + */ + virtual TDesC& GetCity()= 0; + + /* + * Gets the reference to the District name. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the District Name. + */ + virtual TDesC& GetDistrict()= 0; + + /* + * Gets the reference to the postal code. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the postal code. + */ + virtual TDesC& GetPincode()= 0; + + /* + * Gets the reference to the thoroughfare name. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the thoroughfare name. + */ + virtual TDesC& GetThoroughfareName()= 0; + + /* + * Gets the reference to the thoroughfare number. Scope of this returned reference is limited to + * this perticular call. User has to store it for their further processing. + * + * @return reference to the String which holds the thoroughfare number. + */ + virtual TDesC& GetThoroughfareNumber() = 0; + }; +/* + * Observer class which exposes callbacks to notify the completion of reversegeocoding event. + * + **/ +class MReverseGeocodeObserver + { + public: + /* + * Callback function which notifys the completion of reverse geocode event. This signals the completion + * of the asynchronous function CReverseGeoCode::GetAddressByCoordinate. + * + * @param aErrorcode Error status KErrNone in case of success or other system specific errorcodes + * in case of failures. + * + * @param aAddressInfo refrence to the address stucture, through which user can access the + * address information. + */ + + virtual void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo ) =0; + + /* + * Get registrer network country code + * + * @return current register n/w info + */ + virtual RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw() = 0; + + + /* + * UE is registered to home network? + * + * @return ETrue if UE is registered at home network else EFalse + */ + virtual TBool IsRegisteredAtHomeNetwork() = 0; + + /* + * Get home network country code + * @param aHomeNwInfoAvailableFlag ETrue if home n/w info available else EFalse + * @return user home n/w info + */ + virtual const RMobilePhone::TMobilePhoneNetworkInfoV1& + GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag) = 0; + }; + + +/** + * CReverseGeoCoderPlugin + * + * An implementation of the CReverseGeoCoderPlugin definition. + * Encapsulates the reverse goecoding functionality + * This is concrete class, instance of which + * ECOM framework gives to ECOM clients. + */ +class CReverseGeoCoderPlugin : public CBase + { +public: + + /** + * Create instance of concrete implementation. + * @return: Instance of this class. + */ + static CReverseGeoCoderPlugin* NewL(); + + + /** + * Destructor. + */ + virtual ~CReverseGeoCoderPlugin(); + + +public: + + /** + * Creates the instance of Reverse Geocoder + * + */ + virtual void CreateReverseGeoCoderL() = 0; + + /** + * Initializes the ReverseGeoCodeObserver + * @param: aObserver The observer class instance that is to be notified when reverse geocoding completes + * + */ + virtual void AddObserverL(MReverseGeocodeObserver& aObserver)=0; + + /** + * A wrapper API to fetch the address from geocoordinates + * Internally calls the ReverseGeoCoder + * @param aLocality A TLocality object that contains the geocoordinate information + * @param aOption Indicates if the connection is silent connection or not + * + */ + virtual void GetAddressByCoordinateL( TLocality aLocality,const TConnectionOption aOption )=0; + + /** + * Wrapper API to check if the ReverseGeoCoder allows a silent connection + * @return:TBool Indicates if a silent connection is allowed + * + */ + virtual TBool SilentConnectionAllowed() = 0; + +private: + + TUid iDtorKey; + + }; +#include "reversegeocoderplugin.inl" + +#endif //__REVERSEGEOCODERPLUGIN_H__ + +//End of file + diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/inc/reversegeocoderplugin.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mds_plat/location_manager_api/inc/reversegeocoderplugin.inl Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,66 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This is partial interface implementation which is +* used by plugins. +* +*/ + + + +// INCLUDE FILES + +#include // declares E-com framework classes + + +// ----------------------------------------------------------------------------- +// CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin() +// Destroys the plugin implementation +// ----------------------------------------------------------------------------- +// +inline CReverseGeoCoderPlugin::~CReverseGeoCoderPlugin() +{ + REComSession::DestroyedImplementation( iDtorKey ); +} + + +// ----------------------------------------------------------------------------- +// CReverseGeoCoderPlugin::NewL() +// Creates the instance of CReverseGeoCoderPlugin concrete implementation. +// ----------------------------------------------------------------------------- +// +inline CReverseGeoCoderPlugin* CReverseGeoCoderPlugin::NewL() +{ + RImplInfoPtrArray aImplInfoArray; + REComSession::ListImplementationsL(KReversegeocodeInterfaceUid, aImplInfoArray); + + TInt count = aImplInfoArray.Count(); + + if(!count) + { + /* No implementations found for the reverse geocoding functionality */ + User::Leave(KErrNotFound); + } + + /* One or more implementations found. Choose the first one */ + const CImplementationInformation* plugin = aImplInfoArray[0]; + TUid pluginId = plugin->ImplementationUid(); + + CReverseGeoCoderPlugin* self = reinterpret_cast( + REComSession::CreateImplementationL( + pluginId, _FOFF( CReverseGeoCoderPlugin,iDtorKey ) ) ); + + return self; +} + +// End of file diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp --- a/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -27,13 +27,12 @@ CAPABILITY ALL -TCB VENDORID VID_DEFAULT -DEFFILE LocationManagerTestScripter.DEF +DEFFILE LocationManagerTestScripter.def #ifdef _LOC_REVERSEGEOCODE MACRO LOC_REVERSEGEOCODE #endif - SOURCEPATH ../src SOURCE LocationManagerTestScripter.cpp SOURCE LocationManagerTestScripterBlocks.cpp diff -r aa5a574040a4 -r a3cc46f37772 mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h --- a/mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h Tue Jul 06 14:44:37 2010 +0300 +++ b/mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h Fri Sep 17 16:54:49 2010 +0300 @@ -32,7 +32,7 @@ #include "mdesession.h" #ifdef LOC_REVERSEGEOCODE -#include "RLocationGeoTagger.h" +#include "rlocationgeotagger.h" #endif //LOC_REVERSEGEOCODE // CONSTANTS diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/group/mdeclient.mmp --- a/metadataengine/client/group/mdeclient.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/group/mdeclient.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -32,7 +32,7 @@ #if defined(WINSCW) deffile ../bwincw/mdeclientu.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/mdeclientu.def #endif nostrictdef diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeasynchronousfindao.cpp --- a/metadataengine/client/src/mdeasynchronousfindao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeasynchronousfindao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -132,8 +132,10 @@ Cancel(); // Causes call to DoCancel() delete iDistinctResults; + iDistinctResults = NULL; delete iConditionBuffer; + iConditionBuffer = NULL; iResultList.ResetAndDestroy(); iResultList.Close(); diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeevent.cpp --- a/metadataengine/client/src/mdeevent.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeevent.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -70,7 +70,9 @@ CMdEEvent::~CMdEEvent() { delete iSource; + iSource = NULL; delete iParticipant; + iParticipant = NULL; } CMdEEvent* CMdEEvent::NewL(CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef ) diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeeventcondition.cpp --- a/metadataengine/client/src/mdeeventcondition.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeeventcondition.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -94,10 +94,15 @@ CMdEEventCondition::~CMdEEventCondition() { delete iCreationTimeRange; + iCreationTimeRange = NULL; delete iObjectConditions; + iObjectConditions = NULL; delete iSourceConditions; + iSourceConditions = NULL; delete iParticipantConditions; + iParticipantConditions = NULL; delete iURI; + iURI = NULL; } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeharvestersession.cpp --- a/metadataengine/client/src/mdeharvestersession.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeharvestersession.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -45,6 +45,7 @@ { iHarvestingPrioritizationChunk.Close(); delete iHarvestingPrioritizationSerializationBuffer; + iHarvestingPrioritizationSerializationBuffer = NULL; } void CMdEHarvesterSession::ConstructL() @@ -112,12 +113,20 @@ } // Note: CopyLC doesn't push anything to cleanup stack - uri->Des().CopyLC( aUri ); + TRAPD(err, uri->Des().CopyLC( aUri )); + if(err != KErrNone) + { + delete uri; + uri = NULL; + return EFalse; + } + const TBool ret = iSession->EngineSession().DoSetFileToPresent( - aMediaId, *uri, aFileInfo ); + aMediaId, *uri, aFileInfo ); delete uri; + uri = NULL; return ret; } @@ -129,8 +138,10 @@ WRITELOG( "CMdEHarvesterSession::SetFilesToPresentL -- Start" ); if( aUris.Count() != aFileInfos.Count() ) { +#ifdef _DEBUG WRITELOG2( "CMdEHarvesterSession::SetFilesToPresentL -- Leave (%d, %d)", aUris.Count(), aFileInfos.Count() ); +#endif User::Leave( KErrArgument ); } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdenotifierao.cpp --- a/metadataengine/client/src/mdenotifierao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdenotifierao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -66,6 +66,7 @@ { Cancel(); // Causes call to DoCancel() delete iDataBuffer; + iDataBuffer = NULL; iIdArray.Close(); iRelationItemArray.Close(); } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeobject.cpp --- a/metadataengine/client/src/mdeobject.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeobject.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -582,6 +582,7 @@ CMdEProperty* oldProperty = iPropertyArray[f]; iPropertyArray[f] = &aProperty; delete oldProperty; + oldProperty = NULL; } else if (err < KErrNone) { @@ -743,6 +744,7 @@ CMdEProperty* oldProperty = iPropertyArray[f]; iPropertyArray[f] = aObject.iPropertyArray[i]; delete oldProperty; + oldProperty = NULL; } else if (err < KErrNone) { @@ -817,6 +819,7 @@ if ( prop->Removed() ) { delete prop; + prop = NULL; iPropertyArray.Remove( i ); continue; } @@ -1055,6 +1058,7 @@ CMdEProperty* oldProperty = newObject->iPropertyArray[f]; newObject->iPropertyArray[f] = property; delete oldProperty; + oldProperty = NULL; } else if (err < KErrNone) { diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeobjectcondition.cpp --- a/metadataengine/client/src/mdeobjectcondition.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeobjectcondition.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -144,15 +144,18 @@ CMdEObjectCondition::~CMdEObjectCondition() { delete iString; + iString = NULL; if( iObjectIds ) { iObjectIds->Close(); delete iObjectIds; + iObjectIds = NULL; } delete iRange; + iRange = NULL; } EXPORT_C const CMdEObjectDef* CMdEObjectCondition::ObjectDef() const diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdeproperty.cpp --- a/metadataengine/client/src/mdeproperty.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdeproperty.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -95,6 +95,7 @@ if (iDef.PropertyType() == EPropertyText) { delete iValue.iText; + iValue.iText = NULL; } } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdequery.cpp --- a/metadataengine/client/src/mdequery.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdequery.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -46,13 +46,15 @@ // This will destroy the entire conditions tree. delete iConditions; - + iConditions = NULL; + // Destroy all result items this query instance owns. for( TInt i = iResults.Count() - 1; i >=0; i-- ) { if(iResults[i].iOwned) { delete iResults[i].iItem; + iResults[i].iItem = NULL; } } @@ -77,6 +79,7 @@ iObservers.Close(); delete iDistinctResults; + iDistinctResults = NULL; } @@ -154,6 +157,7 @@ if(iResults[i].iOwned) { delete iResults[i].iItem; + iResults[i].iItem = NULL; } } iResults.Reset(); diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdequerycriteriaserialization.cpp --- a/metadataengine/client/src/mdequerycriteriaserialization.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdequerycriteriaserialization.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -86,6 +86,7 @@ if( iOwnSerializedBuffer ) { delete iSerializedBuffer; + iSerializedBuffer = NULL; } } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdequeryimpl.cpp --- a/metadataengine/client/src/mdequeryimpl.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdequeryimpl.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -70,6 +70,7 @@ iAsyncFind->Cancel(); delete iAsyncFind; + iAsyncFind = NULL; } } @@ -152,6 +153,7 @@ CMdERelationQueryImpl::~CMdERelationQueryImpl() { delete iAsyncFind; + iAsyncFind = NULL; } @@ -226,6 +228,7 @@ CMdEEventQueryImpl::~CMdEEventQueryImpl() { delete iAsyncFind; + iAsyncFind = NULL; } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mderelationcondition.cpp --- a/metadataengine/client/src/mderelationcondition.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mderelationcondition.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -85,14 +85,19 @@ CMdERelationCondition::~CMdERelationCondition() { delete iLeftCondition; + iLeftCondition = NULL; delete iRightCondition; + iRightCondition = NULL; delete iParameterRange; + iParameterRange = NULL; delete iLastModifiedDateRange; + iLastModifiedDateRange = NULL; if( iRelationIds ) { iRelationIds->Close(); delete iRelationIds; + iRelationIds = NULL; } } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdesessionimpl.cpp --- a/metadataengine/client/src/mdesessionimpl.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdesessionimpl.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -241,6 +241,7 @@ iSessionObserver = NULL; delete iSchemaBuffer; + iSchemaBuffer = NULL; iNotifiers.ResetAndDestroy(); iNotifiers.Close(); @@ -254,8 +255,10 @@ iNamespaceDefs.Close(); delete iSessionStartupAO; + iSessionStartupAO = NULL; delete iAsyncHandler; + iAsyncHandler = NULL; } void CMdESessionImpl::ConstructL() @@ -359,7 +362,8 @@ { User::Leave( KErrMdENotLocked ); } - items.Append( obj ); + + items.AppendL( obj ); } UpdateItemsL(items); @@ -536,6 +540,7 @@ } delete iSchemaBuffer; + iSchemaBuffer = NULL; iSchemaBuffer = schemaBuffer; @@ -2694,6 +2699,7 @@ { const TInt index = iNotifiers.Find( aNotifier ); delete aNotifier; + aNotifier = NULL; iNotifiers.Remove( index ); } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/client/src/mdetextpropertycondition.cpp --- a/metadataengine/client/src/mdetextpropertycondition.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/client/src/mdetextpropertycondition.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -62,6 +62,7 @@ CMdETextPropertyCondition::~CMdETextPropertyCondition() { delete iText; + iText = NULL; } TUint32 CMdETextPropertyCondition::InternalQueryOptimizationFlags(TUint32& aFlags) diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/common/group/mdccommon.mmp --- a/metadataengine/common/group/mdccommon.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/common/group/mdccommon.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -29,7 +29,7 @@ #if defined(WINSCW) deffile ../bwincw/mdccommonu.def -#elif defined(ARMCC) +#elif defined(EABI) deffile ../eabi/mdccommonu.def #endif nostrictdef @@ -50,5 +50,5 @@ PAGED BYTEPAIRCOMPRESSTARGET -OPTION ARMCC -O3 -OTime +OPTION ARMCC -O2 -OTime diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/common/src/mdcserializationbuffer.cpp --- a/metadataengine/common/src/mdcserializationbuffer.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/common/src/mdcserializationbuffer.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -163,6 +163,7 @@ CMdCSerializationBuffer::~CMdCSerializationBuffer() { delete iHeapBuffer; + iHeapBuffer = NULL; } EXPORT_C TPtr8 CMdCSerializationBuffer::Buffer() const diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/group/mdsserver.mmp --- a/metadataengine/server/group/mdsserver.mmp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/group/mdsserver.mmp Fri Sep 17 16:54:49 2010 +0300 @@ -93,7 +93,6 @@ LIBRARY flogger.lib LIBRARY hash.lib LIBRARY inetprotutil.lib -LIBRARY platformenv.lib UNPAGED diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/inc/mdslogger.h --- a/metadataengine/server/inc/mdslogger.h Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/inc/mdslogger.h Fri Sep 17 16:54:49 2010 +0300 @@ -159,7 +159,7 @@ #define __DEFINE_LOGGER class CMdSLogger* gLogger; #define __USES_LOGGER extern CMdSLogger* gLogger; #define __INIT_LOGGER gLogger = CMdSLogger::NewInstanceL(); - #define __DESTROY_LOGGER {if(gLogger){delete gLogger;gLogger=NULL;}} + #define __DESTROY_LOGGER {if(gLogger){delete gLogger; gLogger=NULL;}} #define __LOGLB(CATEGORY,A) {if (gLogger->IsActive(CATEGORY)) { gLogger->LogLit( _L(A) ); }} #define __LOG(CATEGORY,A) {if (gLogger->IsActive(CATEGORY)) { gLogger->LogLit( A ); }} #ifdef MDE_FILE_LOGGING @@ -177,7 +177,7 @@ {__LOG( ELogQuery, INFO); \ CMdsClauseBuffer* queryText = gLogger->DescribeFullL(BUFFER,ROWDATA); \ if ( queryText ) { __LOG( ELogQuery, queryText->ConstBufferL() ); \ - delete queryText;} } + delete queryText; queryText = NULL;} } #else //LOG_QUERY #define __LOGQUERY_16(INFO, BUFFER, ROWDATA) #endif //LOG_QUERY diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/inc/mdspreferences.h --- a/metadataengine/server/inc/mdspreferences.h Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/inc/mdspreferences.h Fri Sep 17 16:54:49 2010 +0300 @@ -225,7 +225,7 @@ EPreferenceExtraSortAsc | EPreferenceExtraSortDesc; - CMdsClauseBuffer* sortBuffer = CMdsClauseBuffer::NewLC( 8 ); // estimated minimum lenght for sort rules + CMdsClauseBuffer* sortBuffer = CMdsClauseBuffer::NewLC( 12 ); // minimum reserved lenght for sort rules // check if there is some order rules if( KSortFlags & aFlags ) diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/inc/mdsserversession.h --- a/metadataengine/server/inc/mdsserversession.h Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/inc/mdsserversession.h Fri Sep 17 16:54:49 2010 +0300 @@ -427,6 +427,7 @@ ~CNotificationCacheItem() { delete iData; + iData = NULL; } public: diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/inc/mdssqldbmaintenance.h --- a/metadataengine/server/inc/mdssqldbmaintenance.h Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/inc/mdssqldbmaintenance.h Fri Sep 17 16:54:49 2010 +0300 @@ -55,6 +55,11 @@ * Drops and re-creates tables */ void CreateDatabaseL(); + + /** + * Does quick check to the existing database to detect obvious corruption + */ + TBool CheckForCorruptionL(); }; #endif // __MDSSQLDBMAINTENANCE_H__ diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsclausebuffer.cpp --- a/metadataengine/server/src/mdsclausebuffer.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsclausebuffer.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -54,6 +54,7 @@ CMdsClauseBuffer::~CMdsClauseBuffer() { delete iBuffer; + iBuffer = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsfindengine.cpp --- a/metadataengine/server/src/mdsfindengine.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsfindengine.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -133,7 +133,9 @@ CMdSFindEngine::~CMdSFindEngine() { delete iSerializedCriteria; + iSerializedCriteria = NULL; delete iSequence; + iSequence = NULL; } // --------------------------------------------------------------------------- diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsfindsequence.cpp --- a/metadataengine/server/src/mdsfindsequence.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsfindsequence.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -15,6 +15,7 @@ */ #include +#include #include "mdsfindsequence.h" @@ -72,7 +73,7 @@ , iObserver( &aObserver ) , iUserLevel( EUserLevelNone ) { - iNotifyCount = KMaxTUint32; + iNotifyCount = KMdEQueryDefaultMaxCount; iFindOperation = NULL; } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsfindsqlclause.cpp --- a/metadataengine/server/src/mdsfindsqlclause.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsfindsqlclause.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -61,6 +61,7 @@ CMdSFindSqlClause::~CMdSFindSqlClause() { delete iQueryBuf; + iQueryBuf = NULL; iResultRow.Close(); iVariables.Close(); @@ -76,6 +77,7 @@ iSourceObjectDefs->Close(); delete iSourceObjectDefs; + iSourceObjectDefs = NULL; } } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsgetimeiao.cpp --- a/metadataengine/server/src/mdsgetimeiao.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsgetimeiao.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -47,6 +47,7 @@ Cancel(); delete iTelephony; + iTelephony = NULL; } TInt64 CMdsGetImeiAO::GetIMEI() diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsimportexport.cpp --- a/metadataengine/server/src/mdsimportexport.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsimportexport.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -118,6 +118,7 @@ CMdsImportExport::~CMdsImportExport() { delete iConverter; + iConverter = NULL; #ifdef _DEBUG if( iLogEnabled ) @@ -129,8 +130,10 @@ iFs.Close(); delete iBuffer; + iBuffer = NULL; delete iSchema; + iSchema = NULL; } /** diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsitemdef.cpp --- a/metadataengine/server/src/mdsitemdef.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsitemdef.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -52,6 +52,7 @@ CMdsItemDef::~CMdsItemDef() { delete iName; + iName = NULL; } TUint32 CMdsItemDef::RequiredBufferSize() diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsmaintenanceengine.cpp --- a/metadataengine/server/src/mdsmaintenanceengine.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsmaintenanceengine.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -16,8 +16,6 @@ */ // INCLUDE FILES -#include - #include "mdsmaintenanceengine.h" #include "mdslogger.h" #include "mdsmanipulationengine.h" @@ -79,6 +77,7 @@ CMdSMaintenanceEngine::~CMdSMaintenanceEngine() { delete iMaintenance; + iMaintenance = NULL; } // ------------------------------------------------ @@ -117,7 +116,17 @@ void CMdSMaintenanceEngine::InstallL( CMdSManipulationEngine& aManipulate, CMdsSchema& aSchema ) { __LOG1( ELogAlways, "Trying to validate MDS DB, error expected if not created(first boot): %d", 0 ); - if ( !(iMaintenance->ValidateL( ) ) ) + + TBool isValid(EFalse); + TRAPD(err, isValid = iMaintenance->ValidateL( )); + + if( err == KErrCorrupt ) + { + DeleteDatabase(); + User::Leave( err ); + } + + else if ( !isValid ) { // Pump up priority to load the MDS DB up as fast as possible to // enable client side session connections @@ -165,11 +174,6 @@ User::Leave( schemaError ); } } - - if ( FailedImports() != 0 ) - { - User::Leave( KErrBadName ); - } // try to read default import file from C drive TRAPD( err, ImportMetadataL( aManipulate, aSchema, KMdsDefaultImportFile ) ); @@ -179,6 +183,13 @@ // and ignore errors TRAP_IGNORE( ImportMetadataL( aManipulate, aSchema, KMdsDefaultRomImportFile ) ); } + +#ifdef _DEBUG + if ( FailedImports() != 0 ) + { + User::Leave( KErrBadName ); + } +#endif __LOG1( ELogAlways, "MDS DB tables created %d", 0 ); @@ -197,6 +208,12 @@ DeleteDatabase(); User::Leave( err ); } + + if( !iMaintenance->CheckForCorruptionL() ) + { + DeleteDatabase(); + User::Leave( KErrCorrupt ); + } } __LOG1( ELogAlways, "CMdSMaintenanceEngine::InstallL complete: %d", 0 ); } @@ -272,31 +289,6 @@ User::LeaveIfError( fs.Volume( volumeInfo, EDriveC ) ); MMdsPreferences::InsertL( KCMediaIdKey, MMdsPreferences::EPreferenceValueSet, (TUint32) volumeInfo.iUniqueID ); - - TInt drive( -1 ); - TInt massStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) ); - if( massStorageError == KErrNone ) - { - TVolumeInfo massStorageVolumeInfo; - massStorageError = fs.Volume( massStorageVolumeInfo, drive ); - if( massStorageError == KErrNone ) - { - const TUint32 massStorageMediaId( massStorageVolumeInfo.iUniqueID ); - massStorageError = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive ); - if( massStorageError == KErrNone ) - { - massStorageError = fs.Volume( massStorageVolumeInfo, drive ); - // Update mass storage media id if the mass storage is not memory card - if( massStorageError == KErrNone && - massStorageVolumeInfo.iUniqueID != massStorageMediaId && - massStorageMediaId != 0 ) - { - MMdsPreferences::InsertL( KMassStorageMediaIdKey, MMdsPreferences::EPreferenceValueSet, - (TUint32) massStorageMediaId ); - } - } - } - } CleanupStack::PopAndDestroy( &fs ); } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsmanipulationengine.cpp --- a/metadataengine/server/src/mdsmanipulationengine.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsmanipulationengine.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -93,8 +93,10 @@ CMdSManipulationEngine::~CMdSManipulationEngine() { delete iManipulate; + iManipulate = NULL; delete iGarbageCollector; + iGarbageCollector = NULL; } // --------------------------------------------------------------------------- @@ -153,7 +155,7 @@ CleanupClosePushL(objStmt); RMdSTransaction transaction( connection ); - CleanupClosePushL(transaction); + CleanupClosePushL (transaction ); const TInt beginError( transaction.Error() ); if( beginError != KErrNone ) { @@ -850,11 +852,11 @@ #ifdef _DEBUG const TInt64 time = fileInfo.iModifiedTime; - RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) iSize %u, iModified %Ld, uri %S"), + RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) uri %S, iSize %u, iModified %Ld"), i, + &uri, fileInfo.iSize, - time, - &uri); + time ); #endif TFilePresentStates placeHolder; @@ -1072,13 +1074,19 @@ CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); RMdSTransaction transaction( connection ); CleanupClosePushL( transaction ); - User::LeaveIfError( transaction.Error() ); + const TInt beginError( transaction.Error() ); + if( beginError != KErrNone ) + { + CleanupStack::PopAndDestroy( &transaction ); + } iManipulate->CheckMassStorageMediaIdL( aMediaId ); - transaction.CommitL(); - - CleanupStack::PopAndDestroy( &transaction ); + if( beginError == KErrNone ) + { + transaction.CommitL(); + CleanupStack::PopAndDestroy( &transaction ); + } } void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName ) diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsnotifier.cpp --- a/metadataengine/server/src/mdsnotifier.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsnotifier.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -80,6 +80,7 @@ CMdSNotifier::~CMdSNotifier() { delete iComparator; + iComparator = NULL; const TInt count = iEntries.Count(); @@ -586,7 +587,9 @@ } delete e.iSerializedCondition; + e.iSerializedCondition = NULL; delete e.iDataBuffer; + e.iDataBuffer = NULL; iEntries.Remove( i ); } } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsnotifycomparator.cpp --- a/metadataengine/server/src/mdsnotifycomparator.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsnotifycomparator.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -1180,7 +1180,7 @@ { aSerializedCondition.PositionL( aRelationCondition.iRelationIds.iPtr.iOffset ); - for (TInt i = 0; i < aRelationCondition.iRelationIds.iPtr.iCount; ++i) + for (TUint i = 0; i < aRelationCondition.iRelationIds.iPtr.iCount; ++i) { TItemId relationId; aSerializedCondition.ReceiveL( relationId ); diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsschema.cpp --- a/metadataengine/server/src/mdsschema.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsschema.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -78,6 +78,7 @@ iProperties.Close(); delete iBaseObject; + iBaseObject = NULL; } void CMdsSchema::Reset() diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsserver.cpp --- a/metadataengine/server/src/mdsserver.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsserver.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -403,6 +403,7 @@ // TRAP InstallL - first time for if there has been schema update, and // the DB version is too old. Delete the DB and try to recreate it TRAPD( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); + if( error == KErrCorrupt ) { delete iSchema; @@ -419,6 +420,7 @@ // during update, and the first attempt to recreate the DB fails. // Then schema file in rom is used for final attempt to recreate the DB TRAP( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); + if( error == KErrCorrupt ) { delete iSchema; @@ -487,19 +489,30 @@ iClientThread.Close(); delete iBURWatcher; + iBURWatcher = NULL; delete iDiskSpaceGarbageCollectorNotifier; + iDiskSpaceGarbageCollectorNotifier = NULL; delete iDiskFullNotifier; + iDiskFullNotifier = NULL; delete iManipulate; + iManipulate = NULL; delete iSchema; + iSchema = NULL; delete iNotifier; + iNotifier = NULL; delete iLockList; + iLockList = NULL; delete iMaintenance; + iMaintenance = NULL; delete iDefaultDBConnection; + iDefaultDBConnection = NULL; delete iHarvestingPrioritizationSerializationBuffer; + iHarvestingPrioritizationSerializationBuffer = NULL; iHarvestingPrioritizationChunk.Close(); delete iShutdownObserver; + iShutdownObserver = NULL; __LOGLB( ELogAlways, "Server stop" ); __DESTROY_LOGGER; @@ -947,6 +960,7 @@ { TRAP(result, CMdSServer::ThreadFunctionL()); delete cleanup; + cleanup = NULL; } __UHEAP_MARKEND; return result; diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdsserversession.cpp --- a/metadataengine/server/src/mdsserversession.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdsserversession.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -601,7 +601,7 @@ CleanupStack::Pop( find ); - iFindEngines.Append( find ); + iFindEngines.AppendL( find ); } // --------------------------------------------------------------------------- @@ -641,7 +641,7 @@ CleanupStack::Pop( find ); - iFindEngines.Append( find ); + iFindEngines.AppendL( find ); } // --------------------------------------------------------------------------- @@ -678,6 +678,7 @@ else if( findEngine->IsComplete() ) { delete findEngine; + findEngine = NULL; iFindEngines.Remove( feIndex ); @@ -708,6 +709,7 @@ findEngine->Cancel( aError ); delete findEngine; + findEngine = NULL; iFindEngines.Remove( i ); @@ -864,6 +866,7 @@ if ( serverRequest != EAsyncFindSetReady ) { delete findEngine; + findEngine = NULL; iFindEngines.Remove( findEngineIndex ); iFindEngines.Compress(); diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdssqldbmaintenance.cpp --- a/metadataengine/server/src/mdssqldbmaintenance.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdssqldbmaintenance.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -50,15 +50,152 @@ TBool CMdSSqlDbMaintenance::ValidateL( ) { + //validate content of critical tables _LIT( KValidateTableExistence, "SELECT COUNT(*) FROM MdE_Preferences;" ); + _LIT( KValidateObjectDef, "SELECT COUNT(*) FROM ObjectDef;" ); + _LIT( KValidatePropertyDef, "SELECT COUNT(*) FROM PropertyDef;" ); + _LIT( KValidateRelationDef, "SELECT COUNT(*) FROM RelationDef;" ); + _LIT( KValidateCol2Prop, "SELECT COUNT(*) FROM Col2Prop;" ); + TInt test(KErrNone); + TUint32 count(0); + + RRowData emptyRowData; + CleanupClosePushL( emptyRowData ); + RMdsStatement validationQuery; CleanupClosePushL( validationQuery ); - RRowData emptyRowData; - CleanupClosePushL( emptyRowData ); + CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); - TRAPD( test, connection.ExecuteQueryL( KValidateTableExistence, validationQuery, emptyRowData ) ); - CleanupStack::PopAndDestroy( 2, &validationQuery ); + + TRAP( test, connection.ExecuteQueryL( KValidateTableExistence, validationQuery, emptyRowData ) ); + if(test == KErrNone) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(validationQuery, emptyRowData)); + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + { + test = KErrCorrupt; + } + } + } + + CleanupStack::PopAndDestroy( &validationQuery ); + emptyRowData.Reset(); + + RMdsStatement objectDefQuery; + CleanupClosePushL( objectDefQuery ); + + if( test == KErrNone ) + { + TRAP( test, connection.ExecuteQueryL( KValidateObjectDef, objectDefQuery, emptyRowData ) ); + + if(test == KErrNone) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(objectDefQuery, emptyRowData)); + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + { + test = KErrCorrupt; + } + } + } + } + + CleanupStack::PopAndDestroy( &objectDefQuery ); + emptyRowData.Reset(); + + RMdsStatement propertyDefQuery; + CleanupClosePushL( propertyDefQuery ); + + if( test == KErrNone ) + { + TRAP( test, connection.ExecuteQueryL( KValidatePropertyDef, propertyDefQuery, emptyRowData ) ); + if(test == KErrNone) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(propertyDefQuery, emptyRowData)); + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + { + test = KErrCorrupt; + } + } + } + } + + CleanupStack::PopAndDestroy( &propertyDefQuery ); + emptyRowData.Reset(); + + RMdsStatement relationDefQuery; + CleanupClosePushL( relationDefQuery ); + + if( test == KErrNone ) + { + TRAP( test, connection.ExecuteQueryL( KValidateRelationDef, relationDefQuery, emptyRowData ) ); + if(test == KErrNone) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(relationDefQuery, emptyRowData)); + + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + { + test = KErrCorrupt; + } + } + } + } + + CleanupStack::PopAndDestroy( &relationDefQuery ); + emptyRowData.Reset(); + + RMdsStatement col2propQuery; + CleanupClosePushL( col2propQuery ); + + if( test == KErrNone ) + { + TRAP( test, connection.ExecuteQueryL( KValidateCol2Prop, col2propQuery, emptyRowData ) ); + if(test == KErrNone) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(col2propQuery, emptyRowData)); + + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + + { + test = KErrCorrupt; + } + } + } + } + CleanupStack::PopAndDestroy( &col2propQuery ); + + CleanupStack::PopAndDestroy( &emptyRowData ); + + if(test == KErrCorrupt ) + { + User::Leave( test ); + } + return ( test == KErrNone ); } @@ -89,3 +226,49 @@ CleanupStack::PopAndDestroy( &emptyRowData ); } +TBool CMdSSqlDbMaintenance::CheckForCorruptionL() + { + // Check the MDS default namespace main table for validity + // This table should always contain at least 1 default system folder object + _LIT( KValidateData, "SELECT COUNT(*) FROM Object%u;" ); + + RBuf commonClauseOne; + User::LeaveIfError( commonClauseOne.Create( KValidateData.iTypeLength + KMaxUintValueLength ) ); + CleanupClosePushL( commonClauseOne ); + commonClauseOne.Format( KValidateData, KDefaultNamespaceDefId ); + + RRowData emptyRowData; + CleanupClosePushL( emptyRowData ); + + RMdsStatement validationQuery; + CleanupClosePushL( validationQuery ); + + CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL(); + + TInt test( KErrNone ); + TUint32 count( 0 ); + TRAP( test, connection.ExecuteQueryL( commonClauseOne, validationQuery, emptyRowData ) ); + if( test == KErrNone ) + { + emptyRowData.AppendL( TColumn( count ) ); + TRAP( test, connection.NextRowL(validationQuery, emptyRowData)); + if(test == KErrNone) + { + emptyRowData.Column(0).Get( count ); + + if(count <= 0) + { + test = KErrCorrupt; + } + } + } + + CleanupStack::PopAndDestroy( &validationQuery ); + + CleanupStack::PopAndDestroy( &emptyRowData ); + + CleanupStack::PopAndDestroy( &commonClauseOne ); + + return ( test == KErrNone ); + } + diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdssqlfindoperation.cpp --- a/metadataengine/server/src/mdssqlfindoperation.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdssqlfindoperation.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -86,7 +86,9 @@ iQueryId.Close(); delete iResults; + iResults = NULL; delete iFindClause; + iFindClause = NULL; } TInt CMdSSqlFindOperation::ExecuteL() diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdssqliteconnection.cpp --- a/metadataengine/server/src/mdssqliteconnection.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdssqliteconnection.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -48,6 +48,7 @@ CloseDb(); delete iDbFileName; + iDbFileName = NULL; iNotFinishFindQuery = NULL; } @@ -543,6 +544,11 @@ if (err != KErrNone) { _LIT( KMdsTransactionBegin, "Transaction begin error" ); + if( !iNotFinishFindQuery ) + { + iEnableTransaction = ETrue; + } + iTransactionOngoing = EFalse; TraceAndLeaveL( KMdsTransactionBegin, err ); } CleanupStack::PopAndDestroy( &emptyRow ); @@ -581,16 +587,16 @@ RRowData emptyRow; CleanupClosePushL( emptyRow ); TRAPD( err, ExecuteL(KRollback, emptyRow) ); + if (err != KErrNone) + { + _LIT( KMdsTransactionRollback, "Transaction rollback error" ); + TraceAndLeaveL( KMdsTransactionRollback, err ); + } if( !iNotFinishFindQuery ) { iEnableTransaction = ETrue; } iTransactionOngoing = EFalse; - if (err != KErrNone) - { - _LIT( KMdsTransactionRollback, "Transaction rollback error" ); - TraceAndLeaveL( KMdsTransactionRollback, err ); - } CleanupStack::PopAndDestroy( &emptyRow ); } diff -r aa5a574040a4 -r a3cc46f37772 metadataengine/server/src/mdssqlobjectmanipulate.cpp --- a/metadataengine/server/src/mdssqlobjectmanipulate.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/metadataengine/server/src/mdssqlobjectmanipulate.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -71,6 +71,7 @@ CMdSIdentifierGenerator::~CMdSIdentifierGenerator() { delete iDigest; + iDigest = NULL; } void CMdSIdentifierGenerator::ConstructL( ) @@ -178,11 +179,14 @@ for (TInt i = 0; i < count; ++i) { delete iBuffers[i].iBuffer; + iBuffers[i].iBuffer = NULL; } iBuffers.Close(); delete iGenerator; + iGenerator = NULL; delete iUri; + iUri = NULL; } CMdSSqlObjectManipulate::CMdSSqlObjectManipulate( const CMdsSchema& aSchema, @@ -2267,8 +2271,8 @@ TPtrC16 uri = aBuffer.ReceivePtr16L(); objectId = SearchObjectByUriL( uri, flags ); if ( objectId != KNoId && - objectId != KSystemFavouritesAlbumId && - objectId != KSystemCapturedAlbumId ) + uri != KSystemFavouritesAlbumUri && + uri != KSystemCapturedAlbumUri ) { // unlock object, so update is no possible anymore if ( iLockList.IsLocked( *iNamespaceDef, objectId ) ) diff -r aa5a574040a4 -r a3cc46f37772 package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r aa5a574040a4 -r a3cc46f37772 package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,1 @@ + diff -r aa5a574040a4 -r a3cc46f37772 rom/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rom/bld.inf Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,54 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Build information file +* +*/ + + +#include +#include "../locationmanager/inc/locplatsupport.mmh" + +PRJ_PLATFORMS + DEFAULT + +PRJ_EXPORTS + +#if defined(_LOC_GEOTAGGING_CELLID) +#ifdef _LOC_REVERSEGEOCODE +mds_cellid_reverse_geocode_enabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) +#else +mds_cellidenabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) +#endif +#elif defined(_LOC_REVERSEGEOCODE) +#ifdef _LOC_GEOTAGGING_CELLID +mds_cellid_reverse_geocode_enabled.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) +#else +mds_reverse_geocode_enabled_only.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) +#endif +#else +mds.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby) +#endif + +#ifdef RD_MDS_2_5 +ContentListingFramework.iby CORE_MW_LAYER_IBY_EXPORT_PATH( ContentListingFramework.iby ) +#endif + +//Stubs +../sis/mds/mds_stub.sis /epoc32/data/z/system/install/mds_stub.sis + +PRJ_TESTMMPFILES + +PRJ_TESTEXPORTS +mds_testers.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds_testers.iby) + diff -r aa5a574040a4 -r a3cc46f37772 rom/mds_cellid_reverse_geocode_enabled.iby --- a/rom/mds_cellid_reverse_geocode_enabled.iby Tue Jul 06 14:44:37 2010 +0300 +++ b/rom/mds_cellid_reverse_geocode_enabled.iby Fri Sep 17 16:54:49 2010 +0300 @@ -82,11 +82,6 @@ REM locationtrail file=ABI_DIR\BUILD_DIR\locationtrail.dll SHARED_LIB_DIR\locationtrail.dll -REM ReverseGeocode -file=ABI_DIR\BUILD_DIR\ReverseGeocode.dll SHARED_LIB_DIR\ReverseGeocode.dll - -REM Reverse geocoder plugin -ECOM_PLUGIN(ReverseGeoCoderPlugin.dll,reversegeocoderplugin.rsc) REM tagcreator file=ABI_DIR\BUILD_DIR\tagcreator.dll SHARED_LIB_DIR\tagcreator.dll diff -r aa5a574040a4 -r a3cc46f37772 rom/mds_cellidenabled.iby --- a/rom/mds_cellidenabled.iby Tue Jul 06 14:44:37 2010 +0300 +++ b/rom/mds_cellidenabled.iby Fri Sep 17 16:54:49 2010 +0300 @@ -85,6 +85,9 @@ REM geoconverter file=ABI_DIR\BUILD_DIR\geoconverter.dll SHARED_LIB_DIR\geoconverter.dll +REM geotagger +file=ABI_DIR\BUILD_DIR\geotagger.dll SHARED_LIB_DIR\geotagger.dll + REM Location Manager data files data=ZPRIVATE\10202BE9\200071BE.txt "PRIVATE\10202BE9\200071BE.txt" diff -r aa5a574040a4 -r a3cc46f37772 rom/mds_reverse_geocode_enabled_only.iby --- a/rom/mds_reverse_geocode_enabled_only.iby Tue Jul 06 14:44:37 2010 +0300 +++ b/rom/mds_reverse_geocode_enabled_only.iby Fri Sep 17 16:54:49 2010 +0300 @@ -82,11 +82,6 @@ REM locationtrail file=ABI_DIR\BUILD_DIR\locationtrail.dll SHARED_LIB_DIR\locationtrail.dll -REM ReverseGeocode -file=ABI_DIR\BUILD_DIR\ReverseGeocode.dll SHARED_LIB_DIR\ReverseGeocode.dll - -REM Reverse geocoder plugin -ECOM_PLUGIN(ReverseGeoCoderPlugin.dll,reversegeocoderplugin.rsc) REM tagcreator file=ABI_DIR\BUILD_DIR\tagcreator.dll SHARED_LIB_DIR\tagcreator.dll diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/mds_stub.sis Binary file sis/mds/mds_stub.sis has changed diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/package.pkg --- a/sis/mds/package.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/sis/mds/package.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 10, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 13, TYPE=SA, RU ; Localised vendor name %{"Nokia"} diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/package_cellid_reverse_geocode_enabled.pkg --- a/sis/mds/package_cellid_reverse_geocode_enabled.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/sis/mds/package_cellid_reverse_geocode_enabled.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 9, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 13, TYPE=SA, RU ; Localised vendor name %{"Nokia"} @@ -94,11 +94,8 @@ "\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll" "\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe" "\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll" -"\EPOC32\RELEASE\ARMV5\UREL\ReverseGeocode.dll" -"c:\sys\bin\ReverseGeocode.dll" "\EPOC32\RELEASE\ARMV5\UREL\tagcreator.dll" -"c:\sys\bin\tagcreator.dll" "\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll" -"\epoc32\RELEASE\armv5\UREL\ReverseGeoCoderPlugin.dll"-"c:\sys\bin\ReverseGeoCoderPlugin.dll" -"\epoc32\data\z\resource\plugins\reversegeocoderplugin.rsc"-"c:\resource\plugins\reversegeocoderplugin.rsc" ; metadata engine "\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"c:\sys\bin\mdeclient.dll" diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/package_cellidenabled.pkg --- a/sis/mds/package_cellidenabled.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/sis/mds/package_cellidenabled.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 9, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 13, TYPE=SA, RU ; Localised vendor name %{"Nokia"} @@ -94,6 +94,7 @@ "\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll" "\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe" "\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll" +"\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll" ; metadata engine "\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"c:\sys\bin\mdeclient.dll" diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/package_reverse_geocode_enabled_only.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sis/mds/package_reverse_geocode_enabled_only.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -0,0 +1,113 @@ +; +; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +; All rights reserved. +; This component and the accompanying materials are made available +; under the terms of "Eclipse Public License v1.0" +; which accompanies this distribution, and is available +; at the URL "http://www.eclipse.org/legal/epl-v10.html". +; +; Initial Contributors: +; Nokia Corporation - initial contribution. +; +; Contributors: +; +; Description: +; +;Languages +&EN + +;packet-header (name, uid, major, minor, build, type) +#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 13, TYPE=SA, RU + +; Localised vendor name +%{"Nokia"} + +; Unique vendor name +:"Nokia" + +;Files +"\epoc32\release\armv5\udeb\mdsiadstop.exe"-"c:\sys\bin\mdsiadstop.exe",FILERUN,RB,RW + +; CenRep +"..\..\clfwrapper\conf\102828AC.txt"-"c:\private\10202be9\102828AC.txt" +"..\..\harvester\common\data\200009FE.txt"-"c:\private\10202be9\200009FE.txt" +"..\..\locationmanager\data\200071BE.txt"-"c:\private\10202be9\200071BE.txt" + +; contextengine +"\EPOC32\RELEASE\ARMV5\UREL\contextengine.dll" -"c:\sys\bin\contextengine.dll" +"\EPOC32\RELEASE\ARMV5\UREL\contextplugininterface.dll" -"c:\sys\bin\contextplugininterface.dll" +"\EPOC32\RELEASE\ARMV5\UREL\calendarcontextplugin.dll" -"c:\sys\bin\calendarcontextplugin.dll" +"\epoc32\data\z\resource\plugins\calendarcontextplugin.rsc" -"c:\resource\plugins\calendarcontextplugin.rsc" +"\EPOC32\RELEASE\ARMV5\UREL\locationcontextplugin.dll" -"c:\sys\bin\locationcontextplugin.dll" +"\epoc32\data\z\resource\plugins\locationcontextplugin.rsc" -"c:\resource\plugins\locationcontextplugin.rsc" + +; clf wrapper +"\EPOC32\RELEASE\ARMV5\UREL\MediaCollectionManager.dll" -"c:\sys\bin\MediaCollectionManager.dll" +"\EPOC32\RELEASE\ARMV5\UREL\ContentListingFramework.dll" -"c:\sys\bin\ContentListingFramework.dll" + +; blacklist +"\EPOC32\RELEASE\ARMV5\UREL\!blacklistserver.exe" -"c:\sys\bin\!blacklistserver.exe" +"\EPOC32\RELEASE\ARMV5\UREL\blacklistclient.dll" -"c:\sys\bin\blacklistclient.dll" + +; composer plugins +"\epoc32\RELEASE\armv5\UREL\composerplugininterface.dll"-"c:\sys\bin\composerplugininterface.dll" +"\epoc32\RELEASE\armv5\UREL\composerimageplugin.dll"-"c:\sys\bin\composerimageplugin.dll" +"\epoc32\data\z\resource\plugins\composerimageplugin.rsc"-"c:\resource\plugins\composerimageplugin.rsc" + +; harvester +"\epoc32\RELEASE\armv5\UREL\harvesterclient.dll" -"c:\sys\bin\harvesterclient.dll" +"\epoc32\RELEASE\armv5\UREL\harvestercommon.dll" -"c:\sys\bin\harvestercommon.dll" +"\epoc32\RELEASE\armv5\UREL\harvesterdata.dll" -"c:\sys\bin\harvesterdata.dll" +"\epoc32\RELEASE\armv5\UREL\harvesterplugininterface.dll" -"c:\sys\bin\harvesterplugininterface.dll" +"\epoc32\RELEASE\armv5\UREL\harvesterserver.exe" -"c:\sys\bin\harvesterserver.exe" + +; harvester plugins +"\epoc32\RELEASE\armv5\UREL\harvesteraudioplugin.dll"-"c:\sys\bin\harvesteraudioplugin.dll" +"\epoc32\data\z\resource\plugins\harvesteraudioplugin.rsc"-"c:\resource\plugins\harvesteraudioplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvesterimageplugin.dll"-"c:\sys\bin\harvesterimageplugin.dll" +"\epoc32\data\z\resource\plugins\harvesterimageplugin.rsc"-"c:\resource\plugins\harvesterimageplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvestermessageplugin.dll"-"c:\sys\bin\harvestermessageplugin.dll" +"\epoc32\data\z\resource\plugins\harvestermessageplugin.rsc"-"c:\resource\plugins\harvestermessageplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvesteromadrmplugin.dll"-"c:\sys\bin\harvesteromadrmplugin.dll" +"\epoc32\data\z\resource\plugins\harvesteromadrmplugin.rsc"-"c:\resource\plugins\harvesteromadrmplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvesterrtpplugin.dll"-"c:\sys\bin\harvesterrtpplugin.dll" +"\epoc32\data\z\resource\plugins\harvesterrtpplugin.rsc"-"c:\resource\plugins\harvesterrtpplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvestervideoplugin.dll"-"c:\sys\bin\harvestervideoplugin.dll" +"\epoc32\data\z\resource\plugins\harvestervideoplugin.rsc"-"c:\resource\plugins\harvestervideoplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\harvesterwmvplugin.dll"-"c:\sys\bin\harvesterwmvplugin.dll" +"\epoc32\data\z\resource\plugins\harvesterwmvplugin.rsc"-"c:\resource\plugins\harvesterwmvplugin.rsc" + +; monitor plugins +"\epoc32\RELEASE\armv5\UREL\monitorplugininterface.dll"-"c:\sys\bin\monitorplugininterface.dll" +"\epoc32\RELEASE\armv5\UREL\mdsfileserverplugin.pxt"-"c:\sys\bin\mdsfileserverplugin.pxt" +"\epoc32\RELEASE\armv5\UREL\filemonitorplugin.dll"-"c:\sys\bin\filemonitorplugin.dll" +"\epoc32\data\z\resource\plugins\filemonitorplugin.rsc"-"c:\resource\plugins\filemonitorplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\MessageMonitorPlugin.dll"-"c:\sys\bin\MessageMonitorPlugin.dll" +"\epoc32\data\z\resource\plugins\MessageMonitorPlugin.rsc"-"c:\resource\plugins\MessageMonitorPlugin.rsc" +"\epoc32\RELEASE\armv5\UREL\mmcmonitorplugin.dll"-"c:\sys\bin\mmcmonitorplugin.dll" +"\epoc32\data\z\resource\plugins\mmcmonitorplugin.rsc"-"c:\resource\plugins\mmcmonitorplugin.rsc" +"\epoc32\RELEASE\armv5\UREL\mdsoomplugin.dll"-"c:\sys\bin\mdsoomplugin.dll" +"\epoc32\data\z\resource\plugins\mdsoomplugin.rsc"-"c:\resource\plugins\mdsoomplugin.rsc" + +; location manager +"\EPOC32\RELEASE\ARMV5\UREL\LocationTrail.dll" -"c:\sys\bin\LocationTrail.dll" +"\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll" +"\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe" +"\EPOC32\RELEASE\ARMV5\UREL\tagcreator.dll" -"c:\sys\bin\tagcreator.dll" +"\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll" + +; metadata engine +"\EPOC32\RELEASE\ARMV5\UREL\mdeclient.dll" -"c:\sys\bin\mdeclient.dll" +"\EPOC32\RELEASE\ARMV5\UREL\mdccommon.dll" -"c:\sys\bin\mdccommon.dll" +"\EPOC32\RELEASE\ARMV5\UREL\!mdsserver.exe" -"c:\sys\bin\!mdsserver.exe" + +"\epoc32\release\armv5\udeb\mdswatchdog.exe"-"c:\sys\bin\mdswatchdog.exe" + +"\epoc32\data\z\Private\200009F3\schema.mde"-"c:\PRIVATE\200009F3\schema.mde" +"\epoc32\data\z\Private\200009F3\defaultimportfile.mde"-"c:\PRIVATE\200009F3\defaultimportfile.mde" +"\epoc32\data\z\Private\200009F3\backup_registration.xml"-"c:\PRIVATE\200009F3\backup_registration.xml" +"\epoc32\data\z\Private\200009F5\backup_registration.xml"-"c:\PRIVATE\200009F5\backup_registration.xml" +"\epoc32\data\z\Private\200009F5\mappings.db"-"c:\PRIVATE\200009F5\mappings.db" + +"\epoc32\release\armv5\udeb\mdsiadrestart.exe"-"c:\sys\bin\mdsiadrestart.exe",FILERUN,RB,RW + diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/package_separate.pkg --- a/sis/mds/package_separate.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/sis/mds/package_separate.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,7 @@ &EN ;packet-header (name, uid, major, minor, build, type) -#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 10, TYPE=SA, RU +#{"Metadata System Upgrade"},(0x200009F5), 10, 10, 13, TYPE=SA, RU ; Localised vendor name %{"Nokia"} diff -r aa5a574040a4 -r a3cc46f37772 sis/mds/stub.pkg --- a/sis/mds/stub.pkg Tue Jul 06 14:44:37 2010 +0300 +++ b/sis/mds/stub.pkg Fri Sep 17 16:54:49 2010 +0300 @@ -17,7 +17,7 @@ &EN ; Header -#{"Metadata System"}, (0x200009F5), 10, 10, 10, TYPE=SA +#{"Metadata System"}, (0x200009F5), 10, 10, 13, TYPE=SA ; Localised Vendor name %{"Nokia"} diff -r aa5a574040a4 -r a3cc46f37772 watchdog/src/watchdog.cpp --- a/watchdog/src/watchdog.cpp Tue Jul 06 14:44:37 2010 +0300 +++ b/watchdog/src/watchdog.cpp Fri Sep 17 16:54:49 2010 +0300 @@ -161,7 +161,7 @@ // CWatchdog::~CWatchdog() { - delete iShutdownObserver; + delete iShutdownObserver; delete iSelfShutdownObserver; Cancel(); } @@ -304,5 +304,6 @@ } delete cleanupStack; + cleanupStack = NULL; return err; }