--- a/clfwrapper/ClientSrc/CCLFDbItemContainer.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFDbItemContainer.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -65,7 +65,6 @@
CCLFContainerItem::~CCLFContainerItem()
{
delete iMdEObject;
- iMdEObject = NULL;
}
// -----------------------------------------------------------------------------
--- a/clfwrapper/ClientSrc/CCLFDbItemProvider.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFDbItemProvider.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -84,7 +84,6 @@
{
Cancel();
delete iObjectQuery;
- iObjectQuery = NULL;
iItemArray.ResetAndDestroy();
}
--- a/clfwrapper/ClientSrc/CCLFEngineImpl.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFEngineImpl.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -105,21 +105,14 @@
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;
}
// -----------------------------------------------------------------------------
--- a/clfwrapper/ClientSrc/CCLFItemImpl.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFItemImpl.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -521,7 +521,6 @@
for ( HBufC* const* p = hashIter.NextValue(); p; p = hashIter.NextValue() )
{
delete *p;
- p = NULL;
}
iTextMap.Close();
}
--- a/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFItemListModelImpl.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -157,9 +157,7 @@
{
iChangedItemProvider.RemoveChangedItemProviderObserver( this );
delete iMimeTypeArray;
- iMimeTypeArray = NULL;
delete iMediaTypeArray;
- iMediaTypeArray = NULL;
iItemArray.ResetAndDestroy();
delete iItemProvider;
iResultArray.Close();
--- a/clfwrapper/ClientSrc/CCLFQueryAdapter.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFQueryAdapter.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -255,8 +255,8 @@
}
aStatus = KRequestPending;
- iStatusArray.AppendL( &aStatus );
- iQueryArray.AppendL( aQuery );
+ iStatusArray.Append( &aStatus );
+ iQueryArray.Append( aQuery );
// Check that we can actually execute the query. We can if we have at least one query condition.
if ( rootCondition.Count() > 0 )
--- a/clfwrapper/ClientSrc/CCLFServerProxy.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/clfwrapper/ClientSrc/CCLFServerProxy.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -758,9 +758,7 @@
TRAP_IGNORE( iMdESession.RemoveObjectPresentObserverL( *this ));
iUpdateItemsHandlerArray.ResetAndDestroy();
delete iUriArray;
- iUriArray = NULL;
delete iExtensionArray;
- iExtensionArray = NULL;
iFs.Close();
iHC.RemoveHarvesterEventObserver( *this );
--- a/contextengine/group/contextengine.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/contextengine/group/contextengine.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -47,7 +47,7 @@
#if defined(WINS)
deffile ../bwincw/contextenginewinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/contextenginearm.def
#endif
nostrictdef
--- a/contextengine/plugins/calendarplugin/src/CalendarContextPlugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/contextengine/plugins/calendarplugin/src/CalendarContextPlugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -89,15 +89,12 @@
{
WRITELOG( "CCalendarContextPlugin::~CCalendarContextPlugin -- ENTER" );
delete iCalInstanceView;
- iCalInstanceView = NULL;
delete iCalSession;
- iCalSession = NULL;
if( iInitTimer )
{
iInitTimer->Cancel();
delete iInitTimer;
- iInitTimer = NULL;
}
WRITELOG( "CCalendarContextPlugin::~CCalendarContextPlugin -- RETURN" );
@@ -369,15 +366,11 @@
}
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 );
@@ -523,6 +516,7 @@
void CCalendarContextPlugin::StartRetryL()
{
WRITELOG( "CCalendarContextPlugin::StartRetryL() ENTER" );
+ TInt err(KErrNone);
if(iRetryCount++ > KMaxRetryCount)
{
@@ -541,11 +535,10 @@
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 )
@@ -553,13 +546,7 @@
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" );
--- a/contextengine/plugins/contextplugininterface/group/contextplugininterface.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/contextengine/plugins/contextplugininterface/group/contextplugininterface.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -39,7 +39,7 @@
#if defined(WINS)
deffile ../bwincw/contextplugininterfacewinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/contextplugininterfacearm.def
#endif
nostrictdef
--- a/contextengine/plugins/locationplugin/src/locationcontextplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/contextengine/plugins/locationplugin/src/locationcontextplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -138,39 +138,17 @@
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;
- }
+ if ( !iLocationTrailConnected ) // 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;
--- a/contextengine/src/contextengine.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/contextengine/src/contextengine.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -109,7 +109,6 @@
{
// destroy the singleton and free TLS
delete data;
- data = NULL;
UserSvr::DllFreeTls( KContextEngineTLSKey );
}
}
@@ -133,7 +132,6 @@
{
// destroy the singleton and free TLS
delete data;
- data = NULL;
UserSvr::DllFreeTls( KContextEngineTLSKey );
}
}
@@ -146,7 +144,6 @@
{
WRITELOG( "CContextEngine::~CContextEngine" ); // DEBUG INFO
delete iContextEngineAO;
- iContextEngineAO = NULL;
MdsUtils::CleanupPtrArray<CContextSnapshotItem>( &iSnapshotQueue );
REComSession::FinalClose(); // we are done
@@ -282,7 +279,6 @@
if ( iSnapshotQueue.Append( aItem ) != KErrNone )
{
delete aItem;
- aItem = NULL;
return;
}
--- a/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ b/group/bld.inf Wed Oct 13 15:02:02 2010 +0300
@@ -17,7 +17,6 @@
#include <platform_paths.hrh>
-#include "../locationmanager/inc/locplatsupport.mmh"
#include "../metadataengine/group/bld.inf"
#include "../locationmanager/group/bld.inf"
@@ -35,22 +34,7 @@
DEFAULT
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
+../rom/mds.iby CORE_MW_LAYER_IBY_EXPORT_PATH(mds.iby)
#ifdef RD_MDS_2_5
../rom/ContentListingFramework.iby CORE_MW_LAYER_IBY_EXPORT_PATH( ContentListingFramework.iby )
--- a/harvester/blacklistclient/group/blacklistclient.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistclient/group/blacklistclient.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -44,7 +44,7 @@
deffile ../bwincw/blacklistclientwinscw.def
#else
-#if defined(EABI)
+#if defined(ARMCC)
deffile ../eabi/blacklistclientarm.def
#endif
--- a/harvester/blacklistclient/src/blacklistclient.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistclient/src/blacklistclient.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -278,7 +278,6 @@
if ( err != KErrNone )
{
delete item;
- item = NULL;
}
@@ -301,7 +300,6 @@
{
CBlacklistItem* item = iBlacklistMemoryTable[index];
delete item;
- item = NULL;
iBlacklistMemoryTable.Remove( index );
}
--- a/harvester/blacklistclient/traces/OstTraceDefinitions.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistclient/traces/OstTraceDefinitions.h Wed Oct 13 15:02:02 2010 +0300
@@ -3,5 +3,5 @@
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
#define OST_TRACE_COMPILER_IN_USE
-#include <opensystemtrace.h>
+#include <OpenSystemTrace.h>
#endif
--- a/harvester/blacklistserver/group/blacklistserver.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistserver/group/blacklistserver.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -50,6 +50,6 @@
PAGED
BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O3 -OTime
+OPTION ARMCC -O2 -OTime
EPOCPROCESSPRIORITY background
--- a/harvester/blacklistserver/src/blacklistserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistserver/src/blacklistserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -217,7 +217,6 @@
iBlacklistServerChunk.Close();
delete iSqLiteConnection;
- iSqLiteConnection = NULL;
WRITELOG( "CBlacklistServer::~CBlacklistServer - end" );
OstTrace0( TRACE_NORMAL, DUP1_CBLACKLISTSERVER_CBLACKLISTSERVER, "CBlacklistServer::~CBlacklistServer -end " );
@@ -292,7 +291,6 @@
{
TRAP(result, CBlacklistServer::ExeMainL());
delete cleanup;
- cleanup = NULL;
}
__UHEAP_MARKEND;
WRITELOG( "CBlacklistServer::E32Main - end" );
@@ -497,7 +495,6 @@
if ( err != KErrNone )
{
delete item;
- item = NULL;
}
WRITELOG( "CBlacklistServer::AddToMemoryTableL - end" );
@@ -521,7 +518,6 @@
{
CBlacklistItem * item = iBlacklistMemoryTable[index];
delete item;
- item = NULL;
iBlacklistMemoryTable.Remove( index );
}
@@ -727,7 +723,7 @@
variables->AppendL( TColumn( lcBuf ) );
variables->AppendL( TColumn( aMediaId ) );
- iBufferedRemoveItems.AppendL( variables ); // transfer ownership
+ iBufferedRemoveItems.Append( variables ); // transfer ownership
iDBUpdateNeeded = ETrue;
CleanupStack::Pop( lcBuf );
CleanupStack::Pop( 2, variables );
@@ -772,7 +768,7 @@
rowData->AppendL( TColumn( lcBuf ) );
rowData->AppendL( TColumn( aMediaId ) );
- iBufferedAddedItems.AppendL( rowData ); // transfer ownership
+ iBufferedAddedItems.Append( rowData ); // transfer ownership
iDBUpdateNeeded = ETrue;
CleanupStack::Pop( lcBuf );
CleanupStack::Pop( 2, rowData );
--- a/harvester/blacklistserver/src/blacklistsession.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistserver/src/blacklistsession.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -118,7 +118,7 @@
aMessage.ReadL( 0, mediaIdPckg );
RBuf uri;
- User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) );
+ uri.Create( aMessage.GetDesLength( 1 ) );
CleanupClosePushL( uri );
aMessage.ReadL( 1, uri );
@@ -140,7 +140,7 @@
void CBlacklistSession::RemoveL( const RMessage2& aMessage )
{
RBuf uri;
- User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) );
+ uri.Create( aMessage.GetDesLength( 1 ) );
CleanupClosePushL( uri );
aMessage.ReadL( 1, uri );
@@ -162,7 +162,7 @@
void CBlacklistSession::RemoveFromDBL( const RMessage2& aMessage )
{
RBuf uri;
- User::LeaveIfError( uri.Create( aMessage.GetDesLength( 1 ) ) );
+ uri.Create( aMessage.GetDesLength( 1 ) );
CleanupClosePushL( uri );
aMessage.ReadL( 1, uri );
--- a/harvester/blacklistserver/traces/OstTraceDefinitions.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/blacklistserver/traces/OstTraceDefinitions.h Wed Oct 13 15:02:02 2010 +0300
@@ -3,5 +3,5 @@
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
#define OST_TRACE_COMPILER_IN_USE
-#include <opensystemtrace.h>
+#include <OpenSystemTrace.h>
#endif
--- a/harvester/client/group/harvesterclient.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/group/harvesterclient.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -29,7 +29,7 @@
#if defined(WINSCW)
deffile ../bwincw/harvesterclientwinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/harvesterclientarm.def
#endif
nostrictdef
--- a/harvester/client/inc/harvesterclientao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/inc/harvesterclientao.h Wed Oct 13 15:02:02 2010 +0300
@@ -61,8 +61,6 @@
*/
void Active();
- void CancelRequest();
-
protected:
/**
@@ -113,8 +111,6 @@
* Harvester server assigned file name
*/
TFileName iURI;
-
- TBool iCancelled;
};
#endif // __CHARVESTERCLIENTAO_H__
--- a/harvester/client/src/harvesterclient.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/src/harvesterclient.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -183,23 +183,20 @@
delete iSessionWatcher;
iSessionWatcher = NULL;
-
- WRITELOG( "RHarvesterClient::Close() - cancelling pending harvesting requests" );
+
if( iRequestQueue && iRequestQueue->RequestsPending() )
{
iRequestQueue->Cancel();
}
- WRITELOG( "RHarvesterClient::Close() - removing harvester client observer" );
+ // cancels Harvest Complete request if it exist at server
if( iObserver )
{
RemoveObserver( iObserver );
}
- UnregisterHarvestComplete();
WRITELOG( "RHarvesterClient::Close() - UnregisterHarvest done" );
- WRITELOG( "RHarvesterClient::Close() - forcing remaining harvesting requests" );
if( iRequestQueue && iRequestQueue->RequestsPending() )
{
WRITELOG( "RHarvesterClient::Close() - Pending harvesting requests detected -> ForceHarvest" );
@@ -214,7 +211,6 @@
delete iHEO;
iHEO = NULL;
- WRITELOG( "RHarvesterClient::Close() - deleting harvester client AO" );
delete iHarvesterClientAO;
iHarvesterClientAO = NULL;
@@ -254,7 +250,6 @@
if ( iHarvesterClientAO )
{
- WRITELOG( "RHarvesterClient::RemoveObserver() - calling iHarvesterClientAO->RemoveObserver" );
iHarvesterClientAO->RemoveObserver( aObserver );
}
--- a/harvester/client/src/harvesterclientao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/src/harvesterclientao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -51,7 +51,7 @@
OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::~CHarvesterClientAO" );
WRITELOG( "CHarvesterClientAO::~CHarvesterClientAO()" );
- CancelRequest();
+ Cancel();
}
// ---------------------------------------------------------------------------
@@ -60,10 +60,9 @@
// ---------------------------------------------------------------------------
//
CHarvesterClientAO::CHarvesterClientAO( RHarvesterClient& aHarvesterClient )
- : CActive( CActive::EPriorityUserInput ),
+ : CActive( CActive::EPriorityStandard ),
iObserver( NULL ),
- iHarvesterClient( aHarvesterClient ),
- iCancelled( EFalse )
+ iHarvesterClient( aHarvesterClient )
{
OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERCLIENTAO_CHARVESTERCLIENTAO, "CHarvesterClientAO::CHarvesterClientAO" );
@@ -101,14 +100,13 @@
void CHarvesterClientAO::RemoveObserver( MHarvestObserver* /*aObserver*/ )
{
WRITELOG( "CHarvesterClientAO::RemoveObserver()" );
- OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_REMOVEOBSERVER, "CHarvesterClientAO::RemoveObserver" );
if ( iObserver )
{
WRITELOG( "CHarvesterClientAO::RemoveObserver() - deleting observer" );
iObserver = NULL;
}
- CancelRequest();
+ Cancel();
}
// ---------------------------------------------------------------------------
@@ -120,7 +118,6 @@
WRITELOG( "CHarvesterClientAO::DoCancel()" );
OstTrace0( TRACE_NORMAL, CHARVESTERCLIENTAO_DOCANCEL, "CHarvesterClientAO::DoCancel" );
iHarvesterClient.UnregisterHarvestComplete();
- WRITELOG( "CHarvesterClientAO::DoCancel() - end" );
}
// ---------------------------------------------------------------------------
@@ -129,12 +126,9 @@
//
void CHarvesterClientAO::Active()
{
- WRITELOG( "CHarvesterClientAO::Active" );
if ( iObserver && !IsActive())
{
- WRITELOG( "CHarvesterClientAO::Active - calling RegisterHarvestComplete" );
iHarvesterClient.RegisterHarvestComplete(iURI, iStatus);
- iCancelled = EFalse;
SetActive();
}
}
@@ -163,12 +157,10 @@
}
// if the request was not canceled or server is not terminated, Activating AO again
- if ( status != KErrCancel && status != KErrServerTerminated && iObserver && !iCancelled )
+ if ( status != KErrCancel && status != KErrServerTerminated && iObserver )
{
- WRITELOG( "CHarvesterClientAO::RunL() - not cancelled or terminated, calling Active" );
Active();
}
- WRITELOG( "CHarvesterClientAO::RunL() - end" );
}
// ---------------------------------------------------------------------------
@@ -185,24 +177,3 @@
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 );
- }
- }
-
--- a/harvester/client/traces/fixed_id.definitions Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/traces/fixed_id.definitions Wed Oct 13 15:02:02 2010 +0300
@@ -4,7 +4,6 @@
[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
--- a/harvester/client/traces/harvesterclientaoTraces.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/client/traces/harvesterclientaoTraces.h Wed Oct 13 15:02:02 2010 +0300
@@ -13,7 +13,6 @@
#define CHARVESTERCLIENTAO_SETOBSERVER 0x30011
#define CHARVESTERCLIENTAO_DOCANCEL 0x30013
#define CHARVESTERCLIENTAO_RUNL 0x30014
-#define CHARVESTERCLIENTAO_REMOVEOBSERVER 0x30015
#endif
--- a/harvester/common/bwincw/harvestercommonwinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/bwincw/harvestercommonwinscw.def Wed Oct 13 15:02:02 2010 +0300
@@ -66,5 +66,4 @@
?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 &)
--- a/harvester/common/bwincw/harvesterplugininterfacewinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/bwincw/harvesterplugininterfacewinscw.def Wed Oct 13 15:02:02 2010 +0300
@@ -13,5 +13,4 @@
?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)
--- a/harvester/common/eabi/harvestercommonarm.def Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/eabi/harvestercommonarm.def Wed Oct 13 15:02:02 2010 +0300
@@ -86,5 +86,4 @@
_ZN18CHarvesterExifUtilD1Ev @ 85 NONAME
_ZN18CHarvesterExifUtilD2Ev @ 86 NONAME
_ZN23CHarvesterPluginFactory14PauseHarvesterEi @ 87 NONAME
- _ZN23CHarvesterPluginFactory13GetObjectDefLEP14CHarvesterDataR6TDes16 @ 88 NONAME
--- a/harvester/common/eabi/harvesterplugininterfacearm.def Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/eabi/harvesterplugininterfacearm.def Wed Oct 13 15:02:02 2010 +0300
@@ -17,5 +17,4 @@
_ZN16CHarvesterPlugin11GetMimeTypeERK7TDesC16R6TDes16 @ 16 NONAME
_ZN16CHarvesterPlugin25SetHarvesterPluginFactoryER23CHarvesterPluginFactory @ 17 NONAME
_ZN16CHarvesterPlugin17PluginInIdleStateEv @ 18 NONAME
- _ZN16CHarvesterPlugin11StopHarvestEv @ 19 NONAME
--- a/harvester/common/group/harvestercommon.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/group/harvestercommon.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -29,7 +29,7 @@
#if defined(WINSCW)
deffile ../bwincw/harvestercommonwinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/harvestercommonarm.def
#endif
nostrictdef
--- a/harvester/common/group/harvesterdata.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/group/harvesterdata.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -29,7 +29,7 @@
#if defined(WINSCW)
deffile ../bwincw/harvesterdatawinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/harvesterdataarm.def
#endif
nostrictdef
--- a/harvester/common/group/harvesterplugininterface.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/group/harvesterplugininterface.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -46,7 +46,7 @@
#if defined(WINS)
deffile ../bwincw/harvesterplugininterfacewinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/harvesterplugininterfacearm.def
#endif
nostrictdef
--- a/harvester/common/inc/harvestdata.inl Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvestdata.inl Wed Oct 13 15:02:02 2010 +0300
@@ -80,55 +80,9 @@
//
void CObjectDataArray::Append( CMdEObject* aMdeObject, CLocationData* aLocationData, CMdEQuery* 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;
- }
- }
- }
+ iMdeObjectArray.Append( aMdeObject );
+ iLocationArray.Append( aLocationData );
+ iQueryArray.Append( aQuery );
}
// ---------------------------------------------------------------------------
@@ -142,14 +96,8 @@
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 );
--- a/harvester/common/inc/harvestercenreputil.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvestercenreputil.h Wed Oct 13 15:02:02 2010 +0300
@@ -28,7 +28,7 @@
{
TUint32 iPreinstalled;
HBufC* iPath;
- ~TScanItem() { delete iPath; iPath = NULL;}
+ ~TScanItem() { delete iPath; }
};
// CLASS DECLARATION
--- a/harvester/common/inc/harvestercommon.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvestercommon.h Wed Oct 13 15:02:02 2010 +0300
@@ -107,8 +107,6 @@
// 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
--- a/harvester/common/inc/harvestereventmanager.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvestereventmanager.h Wed Oct 13 15:02:02 2010 +0300
@@ -154,7 +154,6 @@
virtual ~CHarvesterEventManagerStaticData()
{
delete iHEM;
- iHEM = NULL;
}
protected:
--- a/harvester/common/inc/harvesterpluginfactory.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvesterpluginfactory.h Wed Oct 13 15:02:02 2010 +0300
@@ -44,8 +44,6 @@
IMPORT_C void SendHarvestingStatusEventL( TBool aStarted );
IMPORT_C void PauseHarvester( TBool aPaused );
-
- IMPORT_C void GetObjectDefL( CHarvesterData* aHD, TDes& aObjectDef );
private:
CHarvesterPluginFactory();
@@ -61,9 +59,6 @@
TBool iHarvesting;
CHarvesterEventManager* iHarvesterEventManager;
-
- HBufC* iLastConfirmedContainerExt;
- HBufC* iLastConfirmedSupportedExt;
};
#endif
--- a/harvester/common/inc/harvesterplugininfo.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/inc/harvesterplugininfo.h Wed Oct 13 15:02:02 2010 +0300
@@ -27,7 +27,6 @@
virtual ~CHarvesterPluginInfo()
{
delete iPlugin;
- iPlugin = NULL;
iExtensions.ResetAndDestroy();
iExtensions.Close();
iObjectTypes.ResetAndDestroy();
--- a/harvester/common/src/blacklistitem.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/blacklistitem.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -51,7 +51,6 @@
CBlacklistItem::~CBlacklistItem()
{
delete iUri;
- iUri = NULL;
}
// ---------------------------------------------------------------------------
--- a/harvester/common/src/harvestercenreputil.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvestercenreputil.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -198,9 +198,7 @@
continue;
}
HBufC* pathBuf = path.AllocL();
- CleanupStack::PushL( pathBuf );
- aPaths.AppendL( pathBuf );
- CleanupStack::Pop( pathBuf );
+ aPaths.Append( pathBuf );
}
CleanupStack::PopAndDestroy( &scanPathKeys );
@@ -216,17 +214,14 @@
repo->FindL( aPartialKey, KSearchMask, scanPathKeys );
TBuf<KMaxFileName> 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 ) );
@@ -236,7 +231,7 @@
item->iPath = path.AllocL();
item->iPreinstalled = preinstalled;
CleanupStack::Pop( item );
- aItems.AppendL( item ); // ownership is transferred
+ aItems.Append( item ); // ownership is transferred
}
CleanupStack::PopAndDestroy( &scanPathKeys );
--- a/harvester/common/src/harvesterdata.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvesterdata.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -29,11 +29,7 @@
CHarvesterData::CHarvesterData( const HBufC* aUri )
{
iUri = aUri;
- iClientData = NULL;
- iMdeObject = NULL;
- iLocationData = NULL;
iIsBinary = ETrue;
- iClientId = KNullUid;
}
//==========================================================================
@@ -43,13 +39,9 @@
CHarvesterData::~CHarvesterData()
{
delete iUri;
- iUri = NULL;
delete iClientData;
- iClientData = NULL;
delete iMdeObject;
- iMdeObject = NULL;
delete iLocationData;
- iLocationData = NULL;
}
//==========================================================================
@@ -233,11 +225,6 @@
//
EXPORT_C void CHarvesterData::SetMdeObject( CMdEObject* aMdeObject )
{
- if( iMdeObject )
- {
- delete iMdeObject;
- iMdeObject = NULL;
- }
iMdeObject = aMdeObject;
}
--- a/harvester/common/src/harvestereventmanager.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvestereventmanager.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -93,7 +93,6 @@
{
// destroy the singleton and free TLS
delete data;
- data = NULL;
UserSvr::DllFreeTls( KHarvesterEventManagerTLSKey );
}
}
@@ -440,7 +439,6 @@
iRegisteredObservers.Remove( i );
delete observer;
- observer = NULL;
}
// Find if any other observer is using the same queue
else
@@ -470,7 +468,6 @@
iEventQueues.Remove( mid );
queue->Close();
delete queue;
- queue = NULL;
break;
}
else if( compare > 0 )
--- a/harvester/common/src/harvesterexifutil.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvesterexifutil.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -156,7 +156,6 @@
}
delete reader;
- reader = NULL;
WRITELOG( "CHarvesterExifUtil::IsValidExifData end" );
OstTrace0( TRACE_NORMAL, DUP2_CHARVESTEREXIFUTIL_ISVALIDEXIFDATA, "CHarvesterExifUtil::IsValidExifData end" );
@@ -433,7 +432,7 @@
EXPORT_C TTime CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL(
const TDesC8& aDateTime )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL()" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL()" );
OstTrace0( TRACE_NORMAL, CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL" );
TDateTime datetime( 0, EJanuary, 0, 0, 0, 0, 0 );
@@ -446,7 +445,7 @@
TInt error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get year" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get year" );
OstTrace0( TRACE_NORMAL, DUP1_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get year" );
User::Leave( error );
@@ -459,7 +458,7 @@
error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get month" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get month" );
OstTrace0( TRACE_NORMAL, DUP2_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get month" );
User::Leave( error );
@@ -474,7 +473,7 @@
error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get date" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get date" );
OstTrace0( TRACE_NORMAL, DUP3_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get date" );
User::Leave( error );
@@ -487,7 +486,7 @@
error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get hours" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get hours" );
OstTrace0( TRACE_NORMAL, DUP4_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get hours" );
User::Leave( error );
@@ -500,7 +499,7 @@
error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get minutes" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get minutes" );
OstTrace0( TRACE_NORMAL, DUP5_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get minutes" );
User::Leave( error );
@@ -513,7 +512,7 @@
error = lex.Val( number );
if ( error != KErrNone )
{
- WRITELOG( "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL() - couldn't get seconds" );
+ WRITELOG( "CHarvesterImagePluginAO::ConvertExifDateTimeToSymbianTimeL() - couldn't get seconds" );
OstTrace0( TRACE_NORMAL, DUP6_CHARVESTEREXIFUTIL_CONVERTEXIFDATETIMETOSYMBIANTIMEL, "CHarvesterExifUtil::ConvertExifDateTimeToSymbianTimeL - couldn't get seconds" );
User::Leave( error );
@@ -829,9 +828,7 @@
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 );
--- a/harvester/common/src/harvestermediaidutil.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvestermediaidutil.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -136,10 +136,8 @@
if (data->iRefCount <= 0)
{
delete data->iMediaIdUtil;
- data->iMediaIdUtil = NULL;
delete data;
- data = NULL;
UserSvr::DllFreeTls(KHarvesterMediaIdTLSKey);
}
}
--- a/harvester/common/src/harvesterplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvesterplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -65,8 +65,7 @@
iDtor_ID_Key( KNullUid ),
iOriginPropertyDef( NULL ),
iTitlePropertyDef( NULL ),
- iHarvesting( EFalse ),
- iPaused( EFalse )
+ iHarvesting( EFalse )
{
}
@@ -110,7 +109,6 @@
{
if( iState == EHarvesterIdle )
{
- iPaused = EFalse;
SetNextRequest( EHarvesterGathering );
}
}
@@ -146,17 +144,16 @@
{
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 ) );
@@ -165,11 +162,6 @@
CHarvesterData* hd = (*iQueue)[0];
iQueue->Remove( 0 );
- if( !hd )
- {
- SetNextRequest( EHarvesterGathering );
- break;
- }
const TDesC& uri = hd->Uri();
TUint32 mediaId = hd->MdeObject().MediaId();
@@ -202,7 +194,7 @@
TRAP_IGNORE( SetDefaultPropertiesL( *hd ) );
WRITELOG1("CHarvesterPlugin::RunL - Calling HarvestL for file: %S", &uri);
- TRAPD( err, HarvestL( hd ) );
+ TRAPD(err, HarvestL( hd ) );
if ( iBlacklist )
{
@@ -247,28 +239,12 @@
}
// ---------------------------------------------------------------------------
-// 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() && !iPaused )
+ if ( ! IsActive() )
{
iState = aState;
SetActive();
--- a/harvester/common/src/harvesterpluginfactory.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/harvesterpluginfactory.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -68,12 +68,6 @@
{
WRITELOG( "CHarvesterPluginFactory::~CHarvesterPluginFactory()" );
- delete iLastConfirmedContainerExt;
- iLastConfirmedContainerExt = NULL;
-
- delete iLastConfirmedSupportedExt;
- iLastConfirmedSupportedExt = NULL;
-
if (iHarvesterEventManager)
{
iHarvesterEventManager->ReleaseInstance();
@@ -99,9 +93,50 @@
// GetObjectDef
// ---------------------------------------------------------------------------
//
-EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData& /*aHD*/, TDes& aObjectDef )
+EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData& aHD, TDes& aObjectDef )
{
- aObjectDef.Zero();
+ TPtrC extPtr;
+ if( MdsUtils::GetExt( aHD.Uri(), extPtr ) )
+ {
+ RPointerArray<CHarvesterPluginInfo> 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();
+ }
}
// ---------------------------------------------------------------------------
@@ -174,8 +209,7 @@
if( aHD->ObjectType() == EFastHarvest || aHD->Origin() == MdeConstants::Object::ECamera )
{
- hpi->iQueue.InsertL( aHD, 0 );
-
+ hpi->iQueue.Insert( aHD, 0 );
if( !hpi->iPlugin->IsActive() )
{
hpi->iPlugin->SetPriority( KHarvesterPriorityHarvestingPlugin + 1 );
@@ -294,9 +328,11 @@
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 );
@@ -336,13 +372,6 @@
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; )
@@ -356,9 +385,6 @@
TInt result = MdsUtils::Compare( *ext, extPtr );
if ( result == 0 )
{
- delete iLastConfirmedSupportedExt;
- iLastConfirmedSupportedExt = NULL;
- iLastConfirmedSupportedExt = extPtr.Alloc();
return ETrue;
}
}
@@ -374,14 +400,6 @@
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<CHarvesterPluginInfo> supportedPlugins;
CleanupClosePushL( supportedPlugins );
GetSupportedPluginsL( supportedPlugins, extPtr );
@@ -391,9 +409,6 @@
if( info->iObjectTypes.Count() > 1 )
{
isContainerFile = ETrue;
- delete iLastConfirmedContainerExt;
- iLastConfirmedContainerExt = NULL;
- iLastConfirmedContainerExt = extPtr.Alloc();
break;
}
}
@@ -422,7 +437,6 @@
EXPORT_C void CHarvesterPluginFactory::SendHarvestingStatusEventL( TBool aStarted )
{
- WRITELOG( "CHarvesterPluginFactory::SendHarvestingStatusEventL" );
const TInt pluginInfoCount = iHarvesterPluginInfoArray.Count();
TBool itemsLeft( EFalse );
TBool allPluginsOnIdle( ETrue );
@@ -446,7 +460,6 @@
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
@@ -456,7 +469,6 @@
}
else if( iHarvesting && (!itemsLeft || allPluginsOnIdle) && !aStarted )
{
- WRITELOG( "CHarvesterPluginFactory::SendHarvestingStatusEventL - overall finished" );
iHarvesting = EFalse;
iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStateFinished );
iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeOverall, KCacheItemCountForEventCaching );
@@ -470,7 +482,7 @@
{
if( iHarvesterPluginInfoArray[i]->iPlugin && aPaused )
{
- iHarvesterPluginInfoArray[i]->iPlugin->StopHarvest();
+ iHarvesterPluginInfoArray[i]->iPlugin->Cancel();
}
else if( iHarvesterPluginInfoArray[i]->iPlugin )
{
@@ -479,56 +491,3 @@
}
}
-EXPORT_C void CHarvesterPluginFactory::GetObjectDefL( CHarvesterData* aHD, TDes& aObjectDef )
- {
- TPtrC extPtr;
- if( MdsUtils::GetExt( aHD->Uri(), extPtr ) )
- {
- RPointerArray<CHarvesterPluginInfo> 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();
- }
- }
-
-
--- a/harvester/common/src/mdeobjectwrapper.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/mdeobjectwrapper.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -157,7 +157,7 @@
case EPropertyReal32:
{
TReal32* value = static_cast<TReal32*>( aData );
- WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %f", &aPropertyDef.Name(), *value );
+ WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %d", &aPropertyDef.Name(), *value );
property->SetReal32ValueL( *value );
}
break;
@@ -173,7 +173,9 @@
case EPropertyTime:
{
TTime* value = static_cast<TTime*>( aData );
- WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %u", &aPropertyDef.Name(), value->Int64() );
+#ifdef _DEBUG
+ WRITELOG2("CMdeObjectWrapper::HandleObjectPropertyL - Edit property: %S with value %d", &aPropertyDef.Name(), value->Int64() );
+#endif
property->SetTimeValueL( *value );
}
break;
--- a/harvester/common/src/placeholderdata.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/placeholderdata.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -50,7 +50,6 @@
CPlaceholderData::~CPlaceholderData()
{
delete iUri;
- iUri = NULL;
}
//==========================================================================
@@ -87,7 +86,6 @@
EXPORT_C void CPlaceholderData::SetUri( const TDesC& aUri )
{
delete iUri;
- iUri = NULL;
iUri = aUri.Alloc();
}
--- a/harvester/common/src/propertywatcher.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/src/propertywatcher.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -66,7 +66,6 @@
if ( me )
{
delete me;
- me = NULL;
Dll::SetTls( NULL ); // Free TLS.
}
--- a/harvester/common/traces/OstTraceDefinitions.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/common/traces/OstTraceDefinitions.h Wed Oct 13 15:02:02 2010 +0300
@@ -3,5 +3,5 @@
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
#define OST_TRACE_COMPILER_IN_USE
-#include <opensystemtrace.h>
+#include <OpenSystemTrace.h>
#endif
--- a/harvester/composerplugins/composerplugininterface/group/composerplugininterface.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/composerplugininterface/group/composerplugininterface.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -39,7 +39,7 @@
#if defined(WINS)
deffile ../bwincw/composerplugininterfacewinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/composerplugininterfacearm.def
#endif
nostrictdef
--- a/harvester/composerplugins/imagecomposer/inc/imagecomposerao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/inc/imagecomposerao.h Wed Oct 13 15:02:02 2010 +0300
@@ -267,8 +267,6 @@
CHarvesterExifUtil* iExifUtil;
RFs iFs;
-
- TBool iFastModeEnabled;
};
#endif // __CIMAGECOMPOSERAO_H__
--- a/harvester/composerplugins/imagecomposer/src/composerimageplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/src/composerimageplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -48,13 +48,10 @@
WRITELOG( "CComposerImagePlugin::~CComposerImagePlugin()" );
delete iImageComposerAO;
- iImageComposerAO = NULL;
delete iLocationRelationObserver;
- iLocationRelationObserver = NULL;
delete iImagePresentObserver;
- iImagePresentObserver = NULL;
+
delete iMdEHarvesterSession;
- iMdEHarvesterSession = NULL;
}
// ---------------------------------------------------------------------------
@@ -88,15 +85,11 @@
{
WRITELOG( "CComposerImagePlugin::SetObservers()" );
-#ifdef _DEBUG
TRAPD( err, SetObserversL() );
if ( err != KErrNone )
{
WRITELOG1( "CComposerImagePlugin::SetObservers Error: %d", err );
}
-#else
- TRAP_IGNORE( SetObserversL() );
-#endif
}
// ---------------------------------------------------------------------------
--- a/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/src/imagecomposerao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -71,20 +71,16 @@
if ( iMdeObject )
{
delete iMdeObject;
- iMdeObject = NULL;
}
if ( iExifUtil )
{
delete iExifUtil;
- iExifUtil = NULL;
}
delete iRelationQuery;
- iRelationQuery = NULL;
iFs.Close();
delete iMdEHarvesterSession;
- iMdEHarvesterSession = NULL;
}
// ---------------------------------------------------------------------------
@@ -114,7 +110,6 @@
CActiveScheduler::Add( this );
iExifUtil = CHarvesterExifUtil::NewL();
- iFastModeEnabled = EFalse;
User::LeaveIfError( iFs.Connect() );
}
@@ -246,10 +241,6 @@
if( iItemQueue.Count() <= 0 )
{
iItemQueue.Compress();
- if( iFastModeEnabled )
- {
- SetPriority( KHarvesterPriorityComposerPlugin );
- }
SetNextRequest( ERequestReady );
}
else
@@ -259,23 +250,9 @@
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, or data is not modified, find next
+ // if object does not exists, find next
else if ( err == KErrNotFound || err == KErrAbort )
{
if ( err == KErrAbort && mdeObjectId != KNoId )
@@ -423,7 +400,6 @@
if( error != KErrNone || entry.iModified == time )
{
- WRITELOG( "CImageComposerAO::GetObjectFromMdeL() - image data has not been modified - abort" );
User::Leave( KErrAbort );
}
}
@@ -770,13 +746,8 @@
// Check whether the file is open
TBool isOpen( EFalse );
- const TInt openError = iFs.IsFileOpen( uri, isOpen );
- if( openError != KErrNone )
- {
- WRITELOG( "CImageComposerAO::DoWriteExifL() - check for open file failed!" );
- User::Leave( openError );
- }
- else if ( isOpen )
+ iFs.IsFileOpen( uri, isOpen );
+ if ( isOpen )
{
WRITELOG( "CImageComposerAO::DoWriteExifL() - file handle is open!" );
User::Leave( KErrInUse );
--- a/harvester/composerplugins/imagecomposer/src/imagepresentobserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/src/imagepresentobserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -87,10 +87,8 @@
void CImagePresentObserver::HandleObjectPresentNotification(CMdESession& /*aSession*/,
TBool aPresent, const RArray<TItemId>& aObjectIdArray)
{
- WRITELOG( "CImagePresentObserver::HandleObjectPresentNotification" );
if ( aPresent )
{
- WRITELOG( "CImagePresentObserver::HandleObjectPresentNotification - objects present" );
if ( !iStarted )
{
CMdEObjectDef* imageObjDef = NULL;
--- a/harvester/composerplugins/imagecomposer/src/locationrelationobserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/composerplugins/imagecomposer/src/locationrelationobserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -47,7 +47,6 @@
{
iQuery->Cancel();
delete iQuery;
- iQuery = NULL;
}
}
@@ -209,7 +208,6 @@
}
delete relation;
- relation = NULL;
}
)
}
--- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudioplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -56,25 +56,20 @@
CMdEPropertyDef* iDatePropertyDef;
CMdEPropertyDef* iDrmPropertyDef;
CMdEPropertyDef* iDefaultFolderPropertyDef;
- CMdEPropertyDef* iTrackPropertyDef;
- CMdEPropertyDef* iBitratePropertyDef;
// Audio property definitions
CMdEPropertyDef* iAlbumPropertyDef;
CMdEPropertyDef* iComposerPropertyDef;
CMdEPropertyDef* iOriginalArtistPropertyDef;
- CMdEPropertyDef* iSampleRatePropertyDef;
- CMdEPropertyDef* iAlbumArtistPropertyDef;
-
+ CMdEPropertyDef* iTrackPropertyDef;
private:
CHarvesterAudioPluginPropertyDefs();
- void ConstructL( CMdEObjectDef& aObjectDef );
+ void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterAudioPluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef );
+ static CHarvesterAudioPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
class CHarvesterAudioPlugin : public CHarvesterPlugin,
@@ -153,8 +148,6 @@
*/
void GetMusicPropertiesL( CHarvesterData* aHD, TBool aIsAdd, TPtrC aMimeType );
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
-
private:
CAudioMDParser* iAudioParser;
--- a/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/inc/harvesteraudiopluginutils.h Wed Oct 13 15:02:02 2010 +0300
@@ -53,11 +53,7 @@
EAudioMDFieldDuration,
EAudioMDFieldCopyright,
EAudioMDFieldDate,
- EAudioMDFieldJpeg,
- EAudioMDFieldProtected,
- EAudioMDFieldSampleRate,
- EAudioMDFieldBitRate,
- EAudioMDFieldAlbumArtist
+ EAudioMDFieldJpeg
};
public:
--- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudioplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -22,6 +22,7 @@
#include <mdeobjectdef.h>
#include <mdeobject.h>
#include <centralrepository.h>
+#include <caf/caf.h>
#include <pathinfo.h>
#include "harvestercommon.h"
@@ -35,60 +36,53 @@
const TInt KMimeLength( 10 );
const TUid KHarvesterRepoUid = { 0x200009FE };
const TUint32 KEnableAlbumArtHarvest = 0x00090001;
-const TInt KKiloBytes = 1024;
-CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterAudioPluginPropertyDefs::CHarvesterAudioPluginPropertyDefs() : CBase()
{
}
void CHarvesterAudioPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
- SetByObjectDefL( aObjectDef );
- }
-
-CHarvesterAudioPluginPropertyDefs* CHarvesterAudioPluginPropertyDefs::NewL()
- {
- CHarvesterAudioPluginPropertyDefs* self =
- new (ELeave) CHarvesterAudioPluginPropertyDefs();
- return self;
- }
+ CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
-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 );
+ // 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 );
- iBitratePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KBitrateProperty );
+
+ // 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 );
+ }
- // 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 );
- iSampleRatePropertyDef = &audioDef.GetPropertyDefL( MdeConstants::Audio::KSamplingFrequencyProperty );
- iAlbumArtistPropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::Audio::KAlbumArtistProperty );
- }
+CHarvesterAudioPluginPropertyDefs* CHarvesterAudioPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef)
+ {
+ CHarvesterAudioPluginPropertyDefs* self =
+ new (ELeave) CHarvesterAudioPluginPropertyDefs();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObjectDef );
+ CleanupStack::Pop( self );
+ return self;
+ }
using namespace MdeConstants;
@@ -125,16 +119,11 @@
WRITELOG( "CHarvesterAudioPlugin::~CHarvesterAudioPlugin()" );
delete iAudioParser;
- iAudioParser = NULL;
delete iPropDefs;
- iPropDefs = NULL;
delete iTNM;
- iTNM = NULL;
delete iPhoneSoundsPath;
- iPhoneSoundsPath = NULL;
delete iMmcSoundsPath;
- iMmcSoundsPath = NULL;
}
// ---------------------------------------------------------------------------
@@ -156,8 +145,6 @@
{
TRAP_IGNORE( iTNM = CThumbnailManager::NewL( *this ) );
}
-
- iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL();
SetPriority( KHarvesterPriorityHarvestingPlugin - 2 );
@@ -302,7 +289,13 @@
TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset();
TTime localModifiedDate = entry.iModified + timeOffsetSeconds;
- InitPropDefsL( mdeObject.Def() );
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
+ }
CMdeObjectWrapper::HandleObjectPropertyL(
mdeObject, *iPropDefs->iCreationDatePropertyDef, &localModifiedDate, aIsAdd );
@@ -331,7 +324,13 @@
if ( mapping && !mdeObject.Placeholder() )
{
- InitPropDefsL( mdeObject.Def() );
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterAudioPluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
+ }
CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
*iPropDefs->iItemTypePropertyDef, (TAny*)&(mapping->iMimeType), aIsAdd );
@@ -345,7 +344,7 @@
// ---------------------------------------------------------------------------
//
void CHarvesterAudioPlugin::GetMusicPropertiesL( CHarvesterData* aHD,
- TBool aIsAdd, TPtrC /*aMimeType*/ )
+ TBool aIsAdd, TPtrC aMimeType )
{
#ifdef _DEBUG
TTime dStart, dStop;
@@ -356,6 +355,38 @@
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();
+ }
+
+ TBool possiblyProtectedContent( EFalse );
+ if( aMimeType.Length() > 0 )
+ {
+ if( aMimeType == KMimeTypeWma )
+ {
+ possiblyProtectedContent = ETrue;
+ }
+ }
+
+ if( possiblyProtectedContent )
+ {
+ ContentAccess::CContent* content = ContentAccess::CContent::NewLC( uri );
+ ContentAccess::CData* data = content->OpenContentLC( ContentAccess::EPeek );
+
+ TBool protectedContent( EFalse );
+ TInt err = data->GetAttribute( ContentAccess::EIsProtected, protectedContent );
+ if( err == KErrNone && protectedContent )
+ {
+ CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
+ *iPropDefs->iDrmPropertyDef, &protectedContent, aIsAdd );
+ }
+ CleanupStack::PopAndDestroy( 2 ); // content, data
+ }
TBool parsed( EFalse );
TRAPD( parseError, parsed = iAudioParser->ParseL( uri ) );
@@ -366,24 +397,18 @@
return;
}
- InitPropDefsL( mdeObject.Def() );
-
// We do not want to get all long text fields at this time
- TPtrC song = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldSong );
- TPtrC artist = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldArtist );
- TPtrC album = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldAlbum );
- TPtrC genre = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldGenre );
- TPtrC composer = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldComposer );
- TPtrC rating = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldRating );
- TPtrC orgArtist = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldOriginalArtist );
- TPtrC track = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldTrack );
- TPtrC duration = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldDuration );
- TPtrC copyright = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldCopyright );
- TPtrC date = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldDate );
- TPtrC prot = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldProtected );
- TPtrC samplerate = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldSampleRate );
- TPtrC bitrate = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldBitRate );
- TPtrC albumartist = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldAlbumArtist );
+ TPtrC song = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldSong );
+ TPtrC artist = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldArtist );
+ TPtrC album = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldAlbum );
+ TPtrC genre = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldGenre );
+ TPtrC composer = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldComposer );
+ TPtrC rating = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldRating );
+ TPtrC orgArtist = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldOriginalArtist );
+ TPtrC track = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldTrack );
+ TPtrC duration = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldDuration );
+ TPtrC copyright = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldCopyright );
+ TPtrC date = iAudioParser->MetaDataFieldL( CAudioMDParser::EAudioMDFieldDate );
TPtrC8 jpeg = iAudioParser->MetaDataField8L( CAudioMDParser::EAudioMDFieldJpeg );
@@ -500,49 +525,6 @@
*iPropDefs->iDatePropertyDef, &releaseDate, aIsAdd );
}
- TLex lex;
-
- if ( prot.Length() > 0 )
- {
- lex.Assign( prot );
- TInt protValue( 0 );
- if( KErrNone == lex.Val( protValue ) && protValue == 1 )
- {
- CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
- *iPropDefs->iDrmPropertyDef, &protValue, aIsAdd );
- }
- }
-
- if ( samplerate.Length() )
- {
- lex.Assign( samplerate );
- TReal32 value( 0 );
- if( KErrNone == lex.Val( value ) && value != 0 )
- {
- CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
- *iPropDefs->iSampleRatePropertyDef, &value, aIsAdd );
- }
- }
-
- if ( bitrate.Length() > 0 )
- {
- lex.Assign( bitrate );
- TInt value( 0 );
- if( KErrNone == lex.Val( value ) && value != 0 )
- {
- value /= KKiloBytes;
- CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
- *iPropDefs->iBitratePropertyDef, &value, aIsAdd );
- }
- }
-
- if ( albumartist.Length() > 0
- && albumartist.Length() < iPropDefs->iDatePropertyDef->MaxTextLengthL() )
- {
- CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
- *iPropDefs->iAlbumArtistPropertyDef, &albumartist, aIsAdd );
- }
-
if( iHarvestAlbumArt && iTNM && jpeg.Length() > 0 )
{
HBufC8* jpegBuf = jpeg.AllocLC();
@@ -554,7 +536,6 @@
CleanupStack::Pop(); // jpegBuf
iTNM->CreateThumbnails( *tnmSource );
delete tnmSource;
- tnmSource = NULL;
TBool thumbnailPresent( ETrue );
CMdeObjectWrapper::HandleObjectPropertyL( mdeObject,
*iPropDefs->iThumbnailPropertyDef, &thumbnailPresent, aIsAdd );
@@ -574,15 +555,5 @@
#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
--- a/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/AudioPlugin/src/harvesteraudiopluginutils.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -74,7 +74,6 @@
CAudioMDParser::~CAudioMDParser()
{
delete iMetaDataUtility;
- iMetaDataUtility = NULL;
iMimeTypeMappings.Close();
iWantedMetadataFields.Close();
@@ -113,10 +112,6 @@
iWantedMetadataFields.AppendL( EMetaDataDuration );
iWantedMetadataFields.AppendL( EMetaDataCopyright );
iWantedMetadataFields.AppendL( EMetaDataDate );
- iWantedMetadataFields.AppendL( EMetaDataProtected );
- iWantedMetadataFields.AppendL( EMetaDataSampleRate );
- iWantedMetadataFields.AppendL( EMetaDataBitRate );
- iWantedMetadataFields.AppendL( EMetaDataAlbumArtist );
if( aAlbumArt )
{
@@ -324,26 +319,7 @@
id = EMetaDataJpeg;
break;
}
- case EAudioMDFieldProtected:
- {
- id = EMetaDataProtected;
- break;
- }
- case EAudioMDFieldSampleRate:
- {
- id = EMetaDataSampleRate;
- break;
- }
- case EAudioMDFieldBitRate:
- {
- id = EMetaDataBitRate;
- break;
- }
- case EAudioMDFieldAlbumArtist:
- {
- id = EMetaDataAlbumArtist;
- break;
- }
+
default:
{
#ifdef _DEBUG
--- a/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/ImagePlugin/inc/harvesterimageplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -102,11 +102,10 @@
private:
CHarvesterImagePluginPropertyDefs();
- void ConstructL( CMdEObjectDef& aObjectDef );
+ void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterImagePluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef) ;
+ static CHarvesterImagePluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
class CHarvesterImagePlugin : public CHarvesterPlugin
@@ -169,9 +168,7 @@
// 2nd phase constructor
void ConstructL();
-
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
-
+
private:
enum TImageMetadataHandling
--- a/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/ImagePlugin/src/harvesterimageplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -69,90 +69,87 @@
const TUid KBGPSUid = { 0x0ADC2480 };
#endif
-CHarvesterImagePluginPropertyDefs::CHarvesterImagePluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterImagePluginPropertyDefs::CHarvesterImagePluginPropertyDefs() : CBase()
{
}
-void CHarvesterImagePluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef )
+void CHarvesterImagePluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
- SetByObjectDefL( 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 );
}
-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 );
- }
+CHarvesterImagePluginPropertyDefs* CHarvesterImagePluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef)
+ {
+ CHarvesterImagePluginPropertyDefs* self =
+ new (ELeave) CHarvesterImagePluginPropertyDefs();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObjectDef );
+ CleanupStack::Pop( self );
+ return self;
+ }
/**
* Default constructor
@@ -188,22 +185,17 @@
{
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();
@@ -219,8 +211,6 @@
iExifUtil = CHarvesterExifUtil::NewL();
User::LeaveIfError( iFbs.Connect() );
- iPropDefs = CHarvesterImagePluginPropertyDefs::NewL();
-
TLinearOrder< TMimeTypeMapping<TImageMetadataHandling> > cmp(
TMimeTypeMapping<TImageMetadataHandling>::CompareFunction);
@@ -406,8 +396,13 @@
{
CMdEProperty* prop = NULL;
CMdEObjectDef& objectDef = *aFileData.iImageDef;
-
- InitPropDefsL( objectDef );
+
+ if( !iPropDefs )
+ {
+ iPropDefs = CHarvesterImagePluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
+ }
aMetadataObject.Property( *iPropDefs->iSizePropertyDef, prop );
if( prop )
@@ -697,8 +692,13 @@
WRITELOG( "CHarvesterImagePlugin::HandleObjectPropertiesL() - New MdE object" );
CMdEObject& mdeObject = aHarvesterData.MdeObject();
-
- InitPropDefsL( mdeObject.Def() );
+
+ if( !iPropDefs )
+ {
+ iPropDefs = CHarvesterImagePluginPropertyDefs::NewL( mdeObject.Def() );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
+ }
TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset();
@@ -1084,14 +1084,3 @@
return KErrNotSupported;
}
-
-void CHarvesterImagePlugin::InitPropDefsL( CMdEObjectDef& aObjectDef )
- {
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( aObjectDef );
- // Prefetch max text lengt for validity checking
- iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
- }
- }
-
--- a/harvester/harvesterplugins/MessagePlugin/group/harvestermessageplugin.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/MessagePlugin/group/harvestermessageplugin.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -54,5 +54,5 @@
PAGED
BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O2 -OTime
+OPTION ARMCC -O3 -OTime
--- a/harvester/harvesterplugins/MessagePlugin/src/harvestermessageplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/MessagePlugin/src/harvestermessageplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -73,13 +73,9 @@
{
WRITELOG("CHarvesterMessagePlugin::~CHarvesterMessagePlugin()");
delete iMmsMtm;
- iMmsMtm = NULL;
delete iSmsMtm;
- iSmsMtm = NULL;
delete iMtmReg;
- iMtmReg = NULL;
- delete iMsvSession;
- iMsvSession = NULL;
+ delete iMsvSession;
}
/**
--- a/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/inc/harvesteromadrmplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -100,8 +100,7 @@
void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterOmaDrmPluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef) ;
+ static CHarvesterOmaDrmPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
class CHarvesterOMADRMPlugin : public CHarvesterPlugin
@@ -174,8 +173,6 @@
*/
void ConstructL();
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
-
protected:
/**
* Handle to File server session.
--- a/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/OMADRMPlugin/src/harvesteromadrmplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -48,24 +48,11 @@
_LIT(KInUse, "InUse");
-CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterOmaDrmPluginPropertyDefs::CHarvesterOmaDrmPluginPropertyDefs() : CBase()
{
}
-void CHarvesterOmaDrmPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef )
- {
- SetByObjectDefL( aObjectDef );
- }
-
-CHarvesterOmaDrmPluginPropertyDefs* CHarvesterOmaDrmPluginPropertyDefs::NewL()
- {
- CHarvesterOmaDrmPluginPropertyDefs* self =
- new (ELeave) CHarvesterOmaDrmPluginPropertyDefs();
- return self;
- }
-
-void CHarvesterOmaDrmPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef )
+void CHarvesterOmaDrmPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
@@ -94,6 +81,16 @@
iGenrePropertyDef = &mediaDef.GetPropertyDefL( MdeConstants::MediaObject::KGenreProperty );
}
+CHarvesterOmaDrmPluginPropertyDefs* CHarvesterOmaDrmPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef)
+ {
+ CHarvesterOmaDrmPluginPropertyDefs* self =
+ new (ELeave) CHarvesterOmaDrmPluginPropertyDefs();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObjectDef );
+ CleanupStack::Pop( self );
+ return self;
+ }
+
/**
* Default constructor
*/
@@ -143,6 +140,9 @@
iPhoneSoundsPath = NULL;
delete iMmcSoundsPath;
iMmcSoundsPath = NULL;
+
+ delete iPropDefs;
+ iPropDefs = NULL;
}
/**
@@ -155,8 +155,6 @@
User::LeaveIfError( iFs.Connect() );
- iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL();
-
TFileName phoneRoot = PathInfo::PhoneMemoryRootPath();
TFileName mmcRoot = PathInfo::MemoryCardRootPath();
@@ -193,7 +191,7 @@
void CHarvesterOMADRMPlugin::HarvestL( CHarvesterData* aHarvesterData )
{
- WRITELOG( "CHarvesterOMADRMPlugin::HarvestL()" );
+ WRITELOG( "CHarvesterImagePlugin::HarvestL()" );
CMdEObject& mdeObject = aHarvesterData->MdeObject();
CDRMHarvestData* drmHarvestData = CDRMHarvestData::NewL();
CleanupStack::PushL( drmHarvestData );
@@ -241,7 +239,7 @@
// ---------------------------------------------------------------------------
//
TInt CHarvesterOMADRMPlugin::GatherDataL( CMdEObject& aMetadataObject, CDRMHarvestData& aDRMharvestData,
- CFileData& aFileData, CHarvestData& /*aHarvestData*/ )
+ CFileData& aFileData, CHarvestData& aHarvestData )
{
WRITELOG( "CHarvesterOMADRMPlugin::GatherDataL" );
@@ -330,36 +328,31 @@
WRITELOG1( "CHarvesterOMADRMPlugin::GatherDataL - ERROR: getting protection info failed %d", err );
}
- if( aMetadataObject.Def().Name() == MdeConstants::Image::KImageObject )
- {
- CImageDecoder* decoder = NULL;
+ CImageDecoder* decoder = NULL;
- TRAP( err, decoder = CImageDecoder::FileNewL( iFs, uri, ContentAccess::EPeek,
- ( CImageDecoder::TOptions )( CImageDecoder::EPreferFastDecode )));
+ TRAP( err, decoder = CImageDecoder::FileNewL( iFs, uri, ContentAccess::EPeek,
+ ( CImageDecoder::TOptions )( CImageDecoder::EPreferFastDecode )));
- CleanupStack::PushL( decoder );
+ 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 );
+ 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( 3 ); // content, data, attrSet
+ CleanupStack::PopAndDestroy( 4 ); // content, data, attrSet, imagedecoder
return KErrNone;
}
@@ -367,13 +360,19 @@
// HandleObjectPropertiesL
// ---------------------------------------------------------------------------
//
-void CHarvesterOMADRMPlugin::HandleObjectPropertiesL( CHarvestData& /*aHarvestData*/, CDRMHarvestData& aDRMharvestData, CFileData& aFileData,
+void CHarvesterOMADRMPlugin::HandleObjectPropertiesL( CHarvestData& aHarvestData, CDRMHarvestData& aDRMharvestData, CFileData& aFileData,
CHarvesterData& aHarvesterData, TBool aIsAdd )
{
WRITELOG("CHarvesterOMADRMPlugin - HandleNewObject ");
CMdEObject& mdeObject = aHarvesterData.MdeObject();
- InitPropDefsL( mdeObject.Def() );
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterOmaDrmPluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL();
+ }
TTimeIntervalSeconds timeOffset = User::UTCOffset();
@@ -649,13 +648,3 @@
}
}
-void CHarvesterOMADRMPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef )
- {
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( aObjectDef );
- // Prefetch max text lengt for validity checking
- iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL();
- }
- }
-
--- a/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/inc/harvesterrtpplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -59,8 +59,7 @@
void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterRtpPluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef) ;
+ static CHarvesterRtpPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
/**
@@ -226,8 +225,6 @@
/** */
void HandleObjectPropertiesL( CHarvesterData& aHD, CHarvesterRtpClipDetails& aClipDetails, TBool aIsAdd);
-
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
private: // data
CHarvesterRtpPluginPropertyDefs* iPropDefs;
--- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpmetadatareader.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpmetadatareader.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -46,7 +46,6 @@
{
WRITELOG( "CHarvesterRtpMetaDataReader::~CHarvesterRtpMetaDataReader()" );
delete iMetaData;
- iMetaData = NULL;
}
// ---------------------------------------------------------------------------
--- a/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/RTPPlugin/src/harvesterrtpplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -35,24 +35,11 @@
// Enough size to recognize file and read metaheader
const TInt KFileBufferSize( KMaxMetaHeaderLength );
-CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterRtpPluginPropertyDefs::CHarvesterRtpPluginPropertyDefs() : CBase()
{
}
-void CHarvesterRtpPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef )
- {
- SetByObjectDefL( aObjectDef );
- }
-
-CHarvesterRtpPluginPropertyDefs* CHarvesterRtpPluginPropertyDefs::NewL()
- {
- CHarvesterRtpPluginPropertyDefs* self =
- new (ELeave) CHarvesterRtpPluginPropertyDefs();
- return self;
- }
-
-void CHarvesterRtpPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef )
+void CHarvesterRtpPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
@@ -74,6 +61,16 @@
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 ========
// ---------------------------------------------------------------------------
@@ -92,7 +89,6 @@
{
WRITELOG( "CHarvesterRtpPlugin::ConstructL()" );
SetPriority( KHarvesterPriorityHarvestingPlugin - 1 );
- iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL();
}
// ---------------------------------------------------------------------------
@@ -266,8 +262,12 @@
WRITELOG( "CHarvesterRtpPlugin::HandleObjectPropertiesL()" );
CMdEObject& mdeObject = aHD.MdeObject();
-
- InitPropDefsL( mdeObject.Def() );
+
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterRtpPluginPropertyDefs::NewL( objectDef );
+ }
TTimeIntervalSeconds timeOffset = User::UTCOffset();
TTime localModifiedTime = aClipDetails.iModifiedDate + timeOffset;
@@ -340,13 +340,3 @@
CMdeObjectWrapper::HandleObjectPropertyL(mdeObject,
*iPropDefs->iRecordingFlagsPropertyDef, &flags, aIsAdd );
}
-
-void CHarvesterRtpPlugin::InitPropDefsL( CMdEObjectDef& aObjectDef )
- {
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( aObjectDef );
- }
- }
-
-
--- a/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/VideoPlugin/inc/harvestervideoplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -101,20 +101,13 @@
~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;
}
};
@@ -162,8 +155,7 @@
void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterVideoPluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef );
+ static CHarvesterVideoPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
class CHarvesterVideoPlugin : public CHarvesterPlugin
@@ -240,8 +232,6 @@
void CheckForCodecSupport( HBufC* aMimeBuffer, CVideoHarvestData& aVHD );
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
-
private:
RArray<THarvestingHandling> iMimeTypeMappings;
--- a/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/VideoPlugin/src/harvestervideoplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -85,61 +85,58 @@
const TInt KKiloBytes = 1024;
const TReal32 KThousandReal = 1000.0;
-CHarvesterVideoPluginPropertyDefs::CHarvesterVideoPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterVideoPluginPropertyDefs::CHarvesterVideoPluginPropertyDefs() : CBase()
{
}
void CHarvesterVideoPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
- SetByObjectDefL( 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 );
}
-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 );
- }
+CHarvesterVideoPluginPropertyDefs* CHarvesterVideoPluginPropertyDefs::NewL(CMdEObjectDef& aObjectDef)
+ {
+ CHarvesterVideoPluginPropertyDefs* self =
+ new (ELeave) CHarvesterVideoPluginPropertyDefs();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObjectDef );
+ CleanupStack::Pop( self );
+ return self;
+ }
/**
* Default constructor
@@ -168,14 +165,11 @@
CHarvesterVideoPlugin::~CHarvesterVideoPlugin()
{
delete iPropDefs;
- iPropDefs = NULL;
iMimeTypeMappings.Close();
RMediaIdUtil::ReleaseInstance();
delete iPhoneVideosPath;
- iPhoneVideosPath = NULL;
delete iMmcVideosPath;
- iMmcVideosPath = NULL;
WRITELOG("CHarvesterVideoPlugin::CHarvesterVideoPlugin()");
}
@@ -187,8 +181,6 @@
{
WRITELOG( "CHarvesterVideoPlugin::ConstructL() - begin" );
- iPropDefs = CHarvesterVideoPluginPropertyDefs::NewL();
-
TLinearOrder< THarvestingHandling > cmp( THarvestingHandling::CompareFunction );
// MPEG4
@@ -339,7 +331,7 @@
if ( error != KErrNone )
{
WRITELOG1( "CHarvesterVideoPlugin::GetObjectType - File open error: %d", error );
- if( error == KErrInUse || KErrLocked )
+ if( error == KErrInUse )
{
#ifdef _DEBUG
TPtrC fileName( aUri.Mid(2) );
@@ -556,32 +548,33 @@
if( !dataExtracted )
{
- // 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
+ TEntry entry;
+ const TInt errorcode = iFs.Entry( uri, entry );
+
+ if ( errorcode != KErrNone )
{
- TEntry entry;
- const TInt errorcode = iFs.Entry( uri, entry );
+ WRITELOG1( "CHarvesterVideoPlugin - Error getting entry: %d", errorcode );
+ CleanupStack::PopAndDestroy( &file );
+ User::Leave( errorcode );
+ }
- 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 );
}
+ // now the minimum information has been harvested
+ // from now on the harvested data should always be stored
+
+ const THarvestingHandling* mapping = FindHandler( uri );
+
+ if( !mapping )
+ {
+ CleanupStack::PopAndDestroy( &file );
+ User::Leave( KErrNotFound );
+ }
+
aVHD.iVideoObject = aMetadataObject.Def().Name().Compare( KVideo ) == 0;
if( error != KErrNone )
@@ -591,17 +584,6 @@
User::Leave( KErrCompletion );
}
- // now the minimum information has been harvested
- // from now on the harvested data should always be stored
-
- const THarvestingHandling* mapping = FindHandler( uri );
-
- if( !mapping )
- {
- CleanupStack::PopAndDestroy( &file );
- User::Leave( KErrNotFound );
- }
-
if ( mapping->iHandler.iLibrary == TVideoMetadataHandling::EHexilMetadataHandling )
{
// doesn't own pointers to MIME types
@@ -609,10 +591,10 @@
CleanupClosePushL( mimes );
TPtrC ext;
- const TBool exists = MdsUtils::GetExt( uri, ext );
+ MdsUtils::GetExt( uri, ext );
// Check for possibly protected content
- if( exists && ext.CompareF( KExtensionWmv ) == 0 )
+ if( ext.CompareF( KExtensionWmv ) == 0 )
{
ContentAccess::CContent* content = ContentAccess::CContent::NewLC( uri );
ContentAccess::CData* data = content->OpenContentLC( ContentAccess::EPeek );
@@ -625,10 +607,6 @@
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 )
{
@@ -811,7 +789,6 @@
aVHD.iMimeBuf = mime.Alloc();
}
- helixMetadata->ResetL();
CleanupStack::PopAndDestroy( helixMetadata );
// don't destory mime type pointers just clean array
@@ -982,12 +959,12 @@
}
#endif
}
- WRITELOG( "CHarvesterVideoPlugin - Closing file, if still open" );
+ WRITELOG( "CHarvesterVideoPlugin - Closing file" );
CleanupStack::PopAndDestroy( &file );
#ifdef _DEBUG
dStop.UniversalTime();
- WRITELOG1( "CHarvesterVideoPlugin::GatherDataL end %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() );
+ WRITELOG1( "CHarvesterVideoPlugin::GatherDataL start %d us", (TInt)dStop.MicroSecondsFrom(dStart).Int64() );
#endif
WRITELOG( "CHarvesterVideoPlugin - Start adding data to object" );
@@ -1005,8 +982,14 @@
WRITELOG("CHarvesterVideoPlugin::HandleObjectPropertiesL ");
CMdEObject& mdeObject = aHD.MdeObject();
-
- InitPropDefsL( mdeObject.Def() );
+
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterVideoPluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iCopyrightPropertyDef->MaxTextLengthL();
+ }
TTimeIntervalSeconds timeOffsetSeconds = User::UTCOffset();
TTime localModifiedDate = aVHD.iModified + timeOffsetSeconds;
@@ -1234,6 +1217,9 @@
{
TBool possibleVideo = EFalse;
+ CHXMetaDataUtility* helixMetadata = CHXMetaDataUtility::NewL();
+ CleanupStack::PushL( helixMetadata );
+
TFileName tempName;
TUint32 mediaId( 0 );
TInt blackListError( KErrNone );
@@ -1241,14 +1227,10 @@
blackListError = GetFileFullNameAndMediaId( aFile, tempName, mediaId );
if( blackListError == KErrNone )
{
- blackListError = AddFileToBlackList( tempName, mediaId );
+ AddFileToBlackList( tempName, mediaId );
}
- CHXMetaDataUtility* helixMetadata = CHXMetaDataUtility::NewL();
- CleanupStack::PushL( helixMetadata );
-
TRAPD( err, helixMetadata->OpenFileL( aFile ) );
- aFile.Close();
if( err == KErrNone )
{
@@ -1275,10 +1257,10 @@
const TInt mimeCount = mimes.Count();
- // Set to Video, regardless how badly file is corrupted
+ // at least one MIME type must be found
if( mimeCount == 0 )
{
- aType.Copy( KVideo );
+ User::Leave( KErrNotFound );
}
for( TInt i = 0; i < mimeCount; i++ )
@@ -1331,14 +1313,13 @@
{
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 )
@@ -1350,7 +1331,7 @@
if( blackListError == KErrNone )
{
WRITELOG( "CHarvesterVideoPlugin::AddFileToBlackList - Adding URI to blacklist" );
- blackListError = iBlacklist->AddFile( aFullName, aMediaId, modified );
+ iBlacklist->AddFile( aFullName, aMediaId, modified );
}
return blackListError;
@@ -1448,15 +1429,5 @@
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
--- a/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/WMVPlugin/inc/harvesterwmvplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -55,8 +55,7 @@
void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterWmvPluginPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef );
+ static CHarvesterWmvPluginPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
/**
@@ -181,7 +180,6 @@
CHarvesterWmvClipDetails& aClipDetails,
TBool aIsAdd);
- void InitPropDefsL( CMdEObjectDef& aObjectDef );
private: // data
CHarvesterWmvPluginPropertyDefs* iPropDefs;
--- a/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/harvesterplugins/WMVPlugin/src/harvesterwmvplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -31,24 +31,11 @@
#include "mdetextproperty.h"
#include "mdeobjectwrapper.h"
-CHarvesterWmvPluginPropertyDefs::CHarvesterWmvPluginPropertyDefs() : CBase(),
- iCreationDatePropertyDef( NULL )
+CHarvesterWmvPluginPropertyDefs::CHarvesterWmvPluginPropertyDefs() : CBase()
{
}
-void CHarvesterWmvPluginPropertyDefs::ConstructL( CMdEObjectDef& aObjectDef )
- {
- SetByObjectDefL( aObjectDef );
- }
-
-CHarvesterWmvPluginPropertyDefs* CHarvesterWmvPluginPropertyDefs::NewL()
- {
- CHarvesterWmvPluginPropertyDefs* self =
- new (ELeave) CHarvesterWmvPluginPropertyDefs();
- return self;
- }
-
-void CHarvesterWmvPluginPropertyDefs::SetByObjectDefL( CMdEObjectDef& aObjectDef )
+void CHarvesterWmvPluginPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
@@ -68,6 +55,16 @@
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 ========
// ---------------------------------------------------------------------------
@@ -92,12 +89,9 @@
{
WRITELOG( "CHarvesterWMVPlugin::~CHarvesterWMVPlugin()" );
delete iPropDefs;
- iPropDefs = NULL;
delete iPhoneVideosPath;
- iPhoneVideosPath = NULL;
delete iMmcVideosPath;
- iMmcVideosPath = NULL;
}
// ---------------------------------------------------------------------------
@@ -157,7 +151,6 @@
{
err = content->GetStringAttribute( ContentAccess::EMimeType, aMimeType );
delete content;
- content = NULL;
}
}
@@ -177,8 +170,6 @@
{
WRITELOG( "CHarvesterWMVPlugin::ConstructL()" );
- iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL();
-
TFileName videos = PathInfo::VideosPath();
TFileName phonePath = PathInfo::PhoneMemoryRootPath();
@@ -303,7 +294,13 @@
CMdEObject& mdeObject = aHD.MdeObject();
- InitPropDefsL( mdeObject.Def() );
+ if( !iPropDefs )
+ {
+ CMdEObjectDef& objectDef = mdeObject.Def();
+ iPropDefs = CHarvesterWmvPluginPropertyDefs::NewL( objectDef );
+ // Prefetch max text lengt for validity checking
+ iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL();
+ }
if( ! mdeObject.Placeholder() )
{
@@ -369,13 +366,3 @@
}
}
-void CHarvesterWMVPlugin::InitPropDefsL(CMdEObjectDef& aObjectDef)
- {
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( aObjectDef );
- // Prefetch max text lengt for validity checking
- iMaxTextLength = iPropDefs->iGenrePropertyDef->MaxTextLengthL();
- }
- }
-
--- a/harvester/monitorplugins/fileplugin/group/filemonitorplugin.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/group/filemonitorplugin.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -59,7 +59,6 @@
LIBRARY harvesterdata.lib
LIBRARY harvestercommon.lib
LIBRARY centralrepository.lib
-LIBRARY platformenv.lib
OPTION ARMCC -O3 -OTime
--- a/harvester/monitorplugins/fileplugin/inc/fileeventhandlerao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/inc/fileeventhandlerao.h Wed Oct 13 15:02:02 2010 +0300
@@ -172,13 +172,11 @@
void ReadCacheSizeFromCenrepL();
/**
- * Update MDS objects data if needed
+ * Set MdE object's title with aNewUrl
*/
void SetTitleL( CMdEObject* aOldObject, const TDesC& aNewUrl );
void SetModifiedTimeL( CMdEObject* aOldObject, const TDesC& aNewUrl );
-
- void CheckDefaultFolderL( CMdEObject* aOldObject );
private:
@@ -239,16 +237,6 @@
CMdEPropertyDef* iOriginPropertyDef;
CMdEPropertyDef* iTitlePropertyDef;
CMdEPropertyDef* iTimePropertyDef;
- CMdEPropertyDef* iDefaultFolderPropertyDef;
-
- HBufC* iPhoneImagesPath;
- HBufC* iMmcImagesPath;
-
- HBufC* iPhoneVideosPath;
- HBufC* iMmcVideosPath;
-
- HBufC* iPhoneSoundsPath;
- HBufC* iMmcSoundsPath;
};
#endif // __FILEEVENTHANDLERAO_H__
--- a/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/FolderRenamer.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -38,9 +38,7 @@
CRenameItem::~CRenameItem()
{
delete iOldName;
- iOldName = NULL;
delete iNewName;
- iNewName = NULL;
iFileEvents.ResetAndDestroy();
}
@@ -65,14 +63,9 @@
{
TMdsFSPStatus* event = NULL;
event = new TMdsFSPStatus(aEvent);
-
if (event)
{
- if(iFileEvents.Append(event) != KErrNone)
- {
- delete event;
- event = NULL;
- }
+ iFileEvents.Append(event);
}
}
@@ -164,10 +157,7 @@
iRenamedFolders.Remove(0);
TRAP_IGNORE(currItem->HandleFileEventsL(iCFileEventHandlerAO));
delete currItem;
- currItem = NULL;
-
SetNextRequest(ERenameStateIdle);
-
if (iRenamedFolders.Count() == 0)
{
iIsRunning = EFalse;
--- a/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/fileeventhandlerao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -16,7 +16,6 @@
#include <collate.h>
#include <mdeobject.h>
-#include <pathinfo.h>
#include "fileeventhandlerao.h"
#include "harvesterlog.h"
@@ -84,46 +83,12 @@
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();
}
// ---------------------------------------------------------------------------
@@ -139,37 +104,16 @@
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;
}
@@ -202,7 +146,6 @@
ResetEvent();
item->GetAsFspStatus(iEvent);
delete item;
- item = NULL;
if( iEvent.iFileEventType == EMdsFileDeleted )
{
@@ -310,13 +253,6 @@
}
}
- // 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 )
@@ -514,7 +450,6 @@
newObject->Id() );
if ( removedId != KNoId )
{
- SetTitleL( oldObject , aNewUrl );
oldObject->SetUriL( aNewUrl );
TUint32 mediaId = FSUtil::MediaID( iFs, aNewUrl );
oldObject->SetMediaId( mediaId );
@@ -528,7 +463,6 @@
if ( oldObject )
{
- CheckDefaultFolderL( oldObject );
SetModifiedTimeL( oldObject, aNewUrl );
TOrigin origin = OriginFromMdEObjectL( *oldObject );
if( origin == MdeConstants::Object::EOther)
@@ -706,10 +640,8 @@
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)
{
@@ -730,7 +662,6 @@
CleanupStack::PushL( oldObject );
SetTitleL( oldObject , aNewUrl );
oldObject->SetUriL( aNewUrl );
- CheckDefaultFolderL( oldObject );
TUint32 mediaId = FSUtil::MediaID( iFs, aNewUrl );
oldObject->SetMediaId( mediaId );
SetModifiedTimeL( oldObject, aNewUrl );
@@ -847,7 +778,7 @@
//
void CFileEventHandlerAO::FormatL( TUint32 aOldMediaId, TBool aSubClose )
{
- WRITELOG2( "CFileEventHandlerAO::FormatL - old media ID %d subclose %d",
+ WRITELOG2( "CFileEventHandlerAO::FormatL - old media ID %u subclose %d",
aOldMediaId, aSubClose );
if ( aOldMediaId )
@@ -1051,60 +982,3 @@
}
}
-//---------------------------------------------------------------------------
-// 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 );
- }
- }
-
--- a/harvester/monitorplugins/fileplugin/src/filemonitorao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/filemonitorao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -71,7 +71,6 @@
StopMonitoring();
delete iMdeSession;
- iMdeSession = NULL;
}
// ---------------------------------------------------------------------------
@@ -207,6 +206,7 @@
status.iFileName.Zero();
status.iNewFileName.Zero();
status.iProcessId = TUid::Null();
+ status.iDriveMediaId = 0;
}
// ---------------------------------------------------------------------------
--- a/harvester/monitorplugins/fileplugin/src/filemonitorplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/filemonitorplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -40,7 +40,6 @@
CFileMonitorPlugin::~CFileMonitorPlugin()
{
delete iFileMonitor;
- iFileMonitor = NULL;
}
// ---------------------------------------------------------------------------
@@ -68,7 +67,6 @@
TRAP( err, cenRepoUtil->AddIgnorePathsToFspL( KDrive, KMonitorPath ));
}
delete cenRepoUtil;
- cenRepoUtil = NULL;
}
return success && err == KErrNone;
}
--- a/harvester/monitorplugins/fileplugin/src/processoriginmapper.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/fileplugin/src/processoriginmapper.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -59,7 +59,6 @@
CProcessOriginMapper::~CProcessOriginMapper()
{
delete iLineBuffer;
- iLineBuffer = NULL;
iProcessOriginMap.Close();
iReadStream.Close();
iWriteStream.Close();
@@ -227,7 +226,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;
--- a/harvester/monitorplugins/inc/mdsfspqueue.inl Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/inc/mdsfspqueue.inl Wed Oct 13 15:02:02 2010 +0300
@@ -15,7 +15,7 @@
*/
-
+#include "mdsfspqueue.h"
//-----------------------------------------------------------------------------
// CMdsFSPQueueItem::NewL()
@@ -52,6 +52,7 @@
aStatus.iNewFileName.Copy( *iNewFileName );
aStatus.iFileEventType = iFileEventType;
aStatus.iProcessId = iProcessId;
+ aStatus.iDriveMediaId = iDriveMediaId;
}
//-----------------------------------------------------------------------------
@@ -67,18 +68,16 @@
if( iFileName )
{
delete iFileName;
- iFileName = NULL;
}
-
if( iNewFileName )
{
delete iNewFileName;
- iNewFileName = NULL;
}
iFileName = aStatus.iFileName.AllocL();
iNewFileName = aStatus.iNewFileName.AllocL();
+ iDriveMediaId = aStatus.iDriveMediaId;
}
//-----------------------------------------------------------------------------
@@ -88,8 +87,6 @@
CMdsFSPQueueItem::~CMdsFSPQueueItem()
{
delete iFileName;
- iFileName = NULL;
delete iNewFileName;
- iNewFileName = NULL;
}
-
+
\ No newline at end of file
--- a/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mdsfileserverplugin/src/mdsfileserverplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -339,7 +339,6 @@
{
fileEventType = EMdsFileCreated;
delete iCreatedFiles[i];
- iCreatedFiles[i] = NULL;
iCreatedFiles.Remove( i );
//Have to check whether file has been hidden
@@ -434,7 +433,6 @@
if ( MdsUtils::Compare( iFileName, *(iModifiedFiles[i]) ) == 0 )
{
delete iModifiedFiles[i];
- iModifiedFiles[i] = NULL;
iModifiedFiles.Remove( i );
found = ETrue;
}
@@ -497,7 +495,7 @@
{
return KErrNone;
}
- drvNumber = iFormatOldMediaId;
+ drvNumber = iFormatDriveNumber;
volInfo.iUniqueID = iFormatOldMediaId;
iFormatOldMediaId = 0;
iFormatDriveNumber = -1;
@@ -546,7 +544,7 @@
queueItem->iFileEventType = fileEventType;
queueItem->iProcessId = processId;
- iQueue.AppendL( queueItem ); // owenership is transferred
+ iQueue.AppendL( queueItem ); // ownership is transferred
CleanupStack::Pop( queueItem );
err = KErrNone;
iPendingEvents++;
--- a/harvester/monitorplugins/mdsoomplugin/group/mdsoomplugin.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mdsoomplugin/group/mdsoomplugin.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -49,6 +49,6 @@
PAGED
BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O3 -OTime
+OPTION ARMCC -O2 -OTime
--- a/harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/messageplugin/src/messagemonitorplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -465,7 +465,6 @@
iMdeSession->AddEventL( *event );
delete event;
- event = NULL;
}
WRITELOG( "CMessageMonitorPlugin::RemoveObjectL return" );
--- a/harvester/monitorplugins/mmcplugin/inc/mmcmounttaskao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/inc/mmcmounttaskao.h Wed Oct 13 15:02:02 2010 +0300
@@ -46,16 +46,16 @@
static CMMCMountTaskAO* NewL();
virtual ~CMMCMountTaskAO();
- void StartMountL( TMountData& aMountData );
- void StartUnmountL( TMountData& aMountData );
+ void StartMount( TMountData& aMountData );
+ void StartUnmount( 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.
+ * Returns internal hard drive's media id if the device has one. 0 if not or drive is not present
*/
- TUint32 GetInternalDriveMediaId( TBool& aPresent );
+ TUint32 GetInternalDriveMediaId();
void SetCachingStatus( TBool aCachingStatus );
--- a/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcfilelist.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -94,7 +94,7 @@
CleanupResetAndDestroyPushL( aEntryArray );
- CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 30 );
+ CDesCArrayFlat* path = new(ELeave) CDesCArrayFlat( 10 );
CleanupStack::PushL( path );
TFileName firstPath;
firstPath.Copy( aDrivePath );
@@ -104,7 +104,7 @@
TUint32 mediaId( 0 );
iMediaIdUtil->GetMediaId( aDrivePath, mediaId );
- WRITELOG1( "CMmcFileList::BuildFileListL - mediaId: %u", mediaId );
+ WRITELOG1( "CMmcFileList::BuildFileListL - mediaId: %d", mediaId );
CDir* directory = NULL;
TFileName name;
@@ -294,6 +294,7 @@
aEntryArray.Compress();
}
+ WRITELOG( "CMmcFileList::HandleFileEntryL -- cleanupstack" );
CleanupStack::PopAndDestroy( &results );
CleanupStack::PopAndDestroy( &fileInfos );
CleanupStack::PopAndDestroy( &uris );
--- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -161,7 +161,7 @@
iFs.NotifyChangeCancel( iStatus );
}
-CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterServerHighPriority ),
+CMMCMonitorAO::CMMCMonitorAO() : CActive( KHarvesterPriorityMonitorPlugin ),
iObserver( NULL )
{
}
@@ -283,7 +283,7 @@
{
if ( iMediaIdList[i] != mediaId )
{
- WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%u, new=%u", i, iMediaIdList[i], mediaId ); // DEBUG INFO
+ WRITELOG3( "CMMCMonitorAO::CompareDriveLists media changed %d, old=%d, new=%d", i, iMediaIdList[i], mediaId ); // DEBUG INFO
// skip mount events if mediaId is 0
if ( iMediaIdList[i] != 0 )
{
--- a/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcmonitorplugin.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -60,26 +60,21 @@
{
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();
}
@@ -116,8 +111,7 @@
TBool presentState( EFalse );
TUint32 hdMediaId( 0 );
- TBool hdPresent( EFalse );
- hdMediaId = iMountTask->GetInternalDriveMediaId( hdPresent );
+ hdMediaId = iMountTask->GetInternalDriveMediaId();
for( TInt i = medias.Count() - 1; i >=0; i-- )
{
@@ -138,10 +132,10 @@
}
}
- if( hdMediaId == 0 || !hdPresent )
+ if( hdMediaId == 0 )
{
// Try to fetch internall mass storage media id again if it was not mounted
- hdMediaId = iMountTask->GetInternalDriveMediaId( hdPresent );
+ hdMediaId = iMountTask->GetInternalDriveMediaId();
}
// scan mass storage to catch all chances even if battery dies during operation that should be catched
@@ -150,7 +144,7 @@
TBool exists( EFalse );
TRAP_IGNORE( exists= iMdEClient->GetMediaL( hdMediaId, driveLetter, presentState ) );
- if ( exists && hdPresent )
+ if ( exists )
{
WRITELOG("CMMCMonitorPlugin::StartMonitoring - start mass storage scan");
@@ -225,7 +219,6 @@
TMountData* mountData = NULL;
mountData = new TMountData;
-
if ( !mountData )
{
return;
@@ -255,62 +248,7 @@
{
WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EMounted" );
mountData->iMountType = TMountData::EMount;
-
- // 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;
- }
+ iMountTask->StartMount( *mountData );
}
break;
@@ -324,13 +262,7 @@
{
WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EDismounted" );
mountData->iMountType = TMountData::EUnmount;
- TRAPD(err, iMountTask->StartUnmountL( *mountData ));
-
- if(err != KErrNone )
- {
- delete mountData;
- mountData = NULL;
- }
+ iMountTask->StartUnmount( *mountData );
}
else
{
@@ -344,13 +276,7 @@
{
WRITELOG( "CMMCMonitorPlugin::MountEvent with parameter EFormatted" );
mountData->iMountType = TMountData::EFormat;
- TRAPD(err, iMountTask->StartUnmountL( *mountData ));
-
- if(err != KErrNone)
- {
- delete mountData;
- mountData = NULL;
- }
+ iMountTask->StartUnmount( *mountData );
}
break;
--- a/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcmounttaskao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -79,7 +79,6 @@
iHarvestEntryArray.Close();
delete iMdeSession;
- iMdeSession = NULL;
Deinitialize();
@@ -89,7 +88,6 @@
}
delete iMmcFileList;
- iMmcFileList = NULL;
iHdArray.ResetAndDestroy();
iHdArray.Close();
}
@@ -110,38 +108,17 @@
iHarvesterPluginFactory = aPluginFactory;
}
-void CMMCMountTaskAO::StartMountL( TMountData& aMountData )
+void CMMCMountTaskAO::StartMount( TMountData& aMountData )
{
WRITELOG("CMMCMountTaskAO::StartMount");
-
- // 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 ));
-
+ iMountDataQueue.Append( &aMountData );
if ( iNextRequest == ERequestIdle )
{
SetNextRequest( ERequestStartTask );
}
}
-void CMMCMountTaskAO::StartUnmountL(TMountData& aMountData)
+void CMMCMountTaskAO::StartUnmount(TMountData& aMountData)
{
WRITELOG("CMMCMountTaskAO::StartUnmount");
@@ -154,28 +131,8 @@
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 );
}
@@ -189,10 +146,7 @@
{
if ( iMountData )
{
- if( iMountDataQueue.Insert( iMountData, 0 ) != KErrNone)
- {
- delete iMountData;
- }
+ iMountDataQueue.Insert( iMountData, 0 );
iMountData = NULL;
}
Deinitialize();
@@ -219,7 +173,7 @@
WRITELOG1( "iMountData.iMountType: %d", iMountData->iMountType );
WRITELOG1( "iMountData.iDrivePath: %S", &iMountData->iDrivePath );
- WRITELOG1( "iMountData.iMediaID: %u", iMountData->iMediaID );
+ WRITELOG1( "iMountData.iMediaID: %d", iMountData->iMediaID );
if ( iMountData->iMountType == TMountData::EMount )
{
@@ -251,11 +205,7 @@
TRAPD( err, iMmcFileList->BuildFileListL( iFs, iMountData->iDrivePath, iEntryArray ));
if ( err == KErrNoMemory )
{
- if( iMountDataQueue.Insert( iMountData, 0 ) != KErrNone)
- {
- delete iMountData;
- }
-
+ iMountDataQueue.Insert( iMountData, 0 );
iMountData = NULL;
Deinitialize();
SetNextRequest( ERequestStartTask );
@@ -334,14 +284,9 @@
{
if( err == KErrNoMemory )
{
- if(iMountDataQueue.Insert( iMountData, 0 ) != KErrNone)
- {
- delete iMountData;
- }
-
+ iMountDataQueue.Insert( iMountData, 0 );
iMountData = NULL;
}
-
Deinitialize();
SetNextRequest( ERequestStartTask );
break;
@@ -454,7 +399,7 @@
void CMMCMountTaskAO::SetNotPresentToMDE()
{
- WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %u", iMountData->iMediaID);
+ WRITELOG1("CMMCMountTaskAO::SetNotPresentToMDE - MediaID %d", iMountData->iMediaID);
if ( iMountData->iMediaID )
{
iMdeSession->SetFilesToNotPresent( iMountData->iMediaID );
@@ -493,7 +438,6 @@
hd->SetEventType( EHarvesterEdit );
hd->SetObjectType( ENormal );
delete ei;
- ei = NULL;
}
else
{
@@ -502,12 +446,7 @@
hd->SetClientData( ei );
}
- if(iHdArray.Append( hd ) != KErrNone )
- {
- delete hd;
- hd = NULL;
- }
-
+ iHdArray.Append( hd );
aArray.Remove( i );
}
@@ -577,7 +516,7 @@
}
}
-TUint32 CMMCMountTaskAO::GetInternalDriveMediaId( TBool& aPresent )
+TUint32 CMMCMountTaskAO::GetInternalDriveMediaId()
{
WRITELOG( "CMMCMountTaskAO::GetInternalDriveMediaId" );
@@ -620,15 +559,10 @@
// 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;
}
}
--- a/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcscannerao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -82,7 +82,6 @@
// Delete instance variables if any
delete iMmcFileList;
- iMmcFileList = NULL;
iEntryArray.ResetAndDestroy();
iEntryArray.Close();
@@ -108,14 +107,6 @@
{
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 );
@@ -257,7 +248,6 @@
hd->SetEventType( EHarvesterEdit );
hd->SetObjectType( ENormal );
delete ei;
- ei = NULL;
}
else
{
@@ -265,12 +255,7 @@
hd->SetObjectType( EPlaceholder );
hd->SetClientData( ei );
}
-
- if(iHdArray.Append( hd ) != KErrNone )
- {
- delete hd;
- hd = NULL;
- }
+ iHdArray.Append( hd );
iHarvestEntryArray.Remove( i );
}
--- a/harvester/monitorplugins/mmcplugin/src/mmcusbao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/mmcplugin/src/mmcusbao.cpp Wed Oct 13 15:02:02 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;
--- a/harvester/monitorplugins/monitorplugininterface/group/monitorplugininterface.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/monitorplugins/monitorplugininterface/group/monitorplugininterface.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -43,7 +43,7 @@
#if defined(WINS)
deffile ../bwincw/monitorplugininterfacewinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/monitorplugininterfacearm.def
#endif
nostrictdef
--- a/harvester/server/inc/harvesterao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/inc/harvesterao.h Wed Oct 13 15:02:02 2010 +0300
@@ -22,8 +22,6 @@
#include <e32base.h>
#include <badesca.h>
-#include <rlocationobjectmanipulator.h>
-
#include "contextengine.h"
#include "mdeharvestersession.h"
@@ -76,8 +74,7 @@
void ConstructL(CMdEObjectDef& aObjectDef);
public:
- static CHarvesterAoPropertyDefs* NewL();
- void SetByObjectDefL( CMdEObjectDef& aObjectDef );
+ static CHarvesterAoPropertyDefs* NewL(CMdEObjectDef& aObjectDef);
};
/**
@@ -558,6 +555,8 @@
CHarvesterAoPropertyDefs* iPropDefs;
+ TBool iMassMemoryIdChecked;
+
// Own.
CDesCArray* iCameraExtensionArray;
@@ -586,11 +585,7 @@
HBufC* iMmcSoundsPath;
TBool iUnmountDetected;
- TBool iUnmountHandlingOngoing;
TBool iPriorityInterruptDetected;
-
- RLocationObjectManipulator iLocManipulator;
- TBool iLocManipulatorConnected;
};
#endif //__CHARVESTERAO_H__
--- a/harvester/server/src/harvesterao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/harvesterao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -19,6 +19,7 @@
#include <caf/caf.h>
#include <driveinfo.h>
+#include <rlocationobjectmanipulator.h>
#include <placeholderdata.h>
#include <harvesterclientdata.h>
#include <pathinfo.h>
@@ -52,7 +53,6 @@
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(KUndefined, " ");
+_LIT(KUndefinedMime, " ");
_LIT( KExtensionMp4, "mp4" );
_LIT( KExtensionMpg4, "mpg4" );
@@ -76,34 +76,32 @@
void CHarvesterAoPropertyDefs::ConstructL(CMdEObjectDef& aObjectDef)
{
- SetByObjectDefL( 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 );
}
-CHarvesterAoPropertyDefs* CHarvesterAoPropertyDefs::NewL()
- {
- CHarvesterAoPropertyDefs* self =
- new (ELeave) CHarvesterAoPropertyDefs();
- return self;
- }
-
-void CHarvesterAoPropertyDefs::SetByObjectDefL(CMdEObjectDef& aObjectDef)
- {
- CMdENamespaceDef& nsDef = aObjectDef.NamespaceDef();
+CHarvesterAoPropertyDefs* CHarvesterAoPropertyDefs::NewL(CMdEObjectDef& aObjectDef)
+ {
+ CHarvesterAoPropertyDefs* self =
+ new (ELeave) CHarvesterAoPropertyDefs();
+ CleanupStack::PushL( self );
+ self->ConstructL( aObjectDef );
+ CleanupStack::Pop( self );
+ 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 );
- 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
// ---------------------------------------------------------------------------
@@ -155,9 +153,7 @@
iHarvestingPlaceholders = EFalse;
iUnmountDetected = EFalse;
- iUnmountHandlingOngoing = EFalse;
iPriorityInterruptDetected = EFalse;
- iLocManipulatorConnected = EFalse;
}
// ---------------------------------------------------------------------------
@@ -173,8 +169,6 @@
iFs.Close();
- iLocManipulator.Close();
-
if (iCtxEngine)
{
iCtxEngine->ReleaseInstance();
@@ -192,18 +186,14 @@
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 )
{
@@ -232,43 +222,26 @@
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();
@@ -320,8 +293,6 @@
// 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 );
@@ -383,7 +354,8 @@
CleanupStack::PushL( cleanupItem );
CMonitorPlugin::ListImplementationsL( infoArray );
- const TInt count( infoArray.Count() );
+ TInt count( 0 );
+ count = infoArray.Count();
CMonitorPlugin* plugin = NULL;
for ( TInt i = 0; i < count; i++ )
@@ -438,6 +410,7 @@
{
WRITELOG( "CHarvesterAO::StartMonitoring()" );
OstTrace0( TRACE_NORMAL, CHARVESTERAO_STARTMONITORING, "CHarvesterAO::StartMonitoring" );
+
const TInt count( iMonitorPluginArray.Count() );
for ( TInt i = 0; i < count; i++ )
@@ -456,8 +429,10 @@
WRITELOG( "CHarvesterAO::StopMonitoring()" );
OstTrace0( TRACE_NORMAL, CHARVESTERAO_STOPMONITORING, "CHarvesterAO::StopMonitoring" );
+
+ const TInt count( iMonitorPluginArray.Count() );
- for( TInt i = iMonitorPluginArray.Count() - 1; i >=0; i-- )
+ for ( TInt i = 0; i < count; i++ )
{
iMonitorPluginArray[i]->StopMonitoring();
}
@@ -472,11 +447,12 @@
WRITELOG( "CHarvesterAO::PauseMonitoring()" );
OstTrace0( TRACE_NORMAL, CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring" );
- for( TInt i = iMonitorPluginArray.Count() - 1; i >=0; i-- )
+ const TInt count( iMonitorPluginArray.Count() );
+
+ for ( TInt i = 0; i<count; i++ )
{
iMonitorPluginArray[i]->PauseMonitoring();
}
-
OstTrace0( TRACE_NORMAL, DUP1_CHARVESTERAO_PAUSEMONITORING, "CHarvesterAO::PauseMonitoring - end" );
WRITELOG( "CHarvesterAO::PauseMonitoring() - end" );
}
@@ -510,7 +486,6 @@
OstTrace1( TRACE_NORMAL, CHARVESTERAO_HANDLEUNMOUNT, "CHarvesterAO::HandleUnmount;aMediaId=%d", aMediaId );
iUnmountDetected = ETrue;
- iUnmountHandlingOngoing = ETrue;
if( !iServerPaused )
{
@@ -735,10 +710,12 @@
iMediaIdUtil->RemoveMediaId( aMediaId );
// resume harvesting from last state
- iUnmountHandlingOngoing = EFalse;
- // resume monitoring
- ResumeMonitoring();
- TRAP_IGNORE( ResumeHarvesterL() );
+ if( !iRamFull && !iDiskFull )
+ {
+ // resume monitoring
+ ResumeMonitoring();
+ TRAP_IGNORE( ResumeHarvesterL() );
+ }
}
// ---------------------------------------------------------------------------
@@ -849,35 +826,26 @@
{
SetPriority( KHarvesterCustomImportantPriority );
}
- while( hd &&
- iPHArray.Count() < KPlaceholderQueueSize &&
- hd->ObjectType() == EPlaceholder )
+ while( hd != NULL &&
+ iPHArray.Count() < KPlaceholderQueueSize &&
+ hd->ObjectType() == EPlaceholder )
{
- if(iPHArray.Append( hd ) != KErrNone)
- {
- HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory );
- iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
- delete hd;
- hd = NULL;
- }
- else
+ iPHArray.Append( hd );
+ if( hd->Origin() == MdeConstants::Object::ECamera ||
+ hd->ObjectType() == EFastHarvest )
{
- 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 );
- }
+ 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();
}
@@ -886,14 +854,11 @@
{
TRAPD( err, HandlePlaceholdersL( ETrue ) );
- // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared
+ // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared
if ( err != KErrNone )
{
- if( err != KErrDiskFull )
- {
- iPHArray.ResetAndDestroy();
- iTempReadyPHArray.ResetAndDestroy();
- }
+ iPHArray.ResetAndDestroy();
+ iTempReadyPHArray.ResetAndDestroy();
User::Leave( err );
}
@@ -917,21 +882,16 @@
{
if( hd->ObjectType() == EPlaceholder )
{
- if( iPHArray.Append( hd ) != KErrNone )
- {
- HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory );
- iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
- delete hd;
- hd = NULL;
- }
+ iPHArray.Append( hd );
}
else
{
- if( iReadyPHArray.Append( hd ) != KErrNone)
- {
- delete hd;
- hd = NULL;
- }
+ CheckFileExtensionAndHarvestL( hd );
+ if( iUnmountDetected )
+ {
+ iQueue->Append( hd );
+ return;
+ }
}
}
@@ -939,14 +899,11 @@
{
TRAPD( err, HandlePlaceholdersL( ETrue ) );
- // make sure that when HandlePlaceholdersL leaves unexpectedly, iPHArray is cleared
+ // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared
if ( err != KErrNone )
{
- if( err != KErrDiskFull )
- {
- iPHArray.ResetAndDestroy();
- iTempReadyPHArray.ResetAndDestroy();
- }
+ iPHArray.ResetAndDestroy();
+ iTempReadyPHArray.ResetAndDestroy();
User::Leave( err );
}
}
@@ -959,7 +916,7 @@
}
iHarvestingPlaceholders = EFalse;
CheckFileExtensionAndHarvestL( hd );
- if( iUnmountDetected && hd )
+ if( iUnmountDetected )
{
iQueue->Append( hd );
}
@@ -980,36 +937,24 @@
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 &&
- hd->Origin() != MdeConstants::Object::ECamera &&
- iHarvesterPluginFactory->IsContainerFileL( hd->Uri() ) )
+ if( aCheck && iHarvesterPluginFactory->IsContainerFileL( hd->Uri() ) )
{
- if( iContainerPHArray.Append( hd ) != KErrNone )
- {
- HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory );
- iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
- delete hd;
- hd = NULL;
- }
-
+ iContainerPHArray.Append( hd );
iPHArray.Remove( i );
- i--;
- endindex--;
+ i--;
+ endindex--;
continue;
}
-
TBuf<KObjectDefStrSize> 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
@@ -1020,15 +965,8 @@
WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - Unmount detected during execution!" );
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;
- }
+ CHarvesterData* hd = iTempReadyPHArray[y];
+ iPHArray.Insert( hd, 0 );
}
iTempReadyPHArray.Reset();
CleanupStack::PopAndDestroy( &mdeObjectArray );
@@ -1043,69 +981,26 @@
const TInt currentPHArrayCount( iPHArray.Count() );
for( TInt y( iTempReadyPHArray.Count() -1 ); y >=0; y-- )
{
- CHarvesterData* tempHd = iTempReadyPHArray[y];
- if(iPHArray.Insert( tempHd, 0 ) != KErrNone)
+ CHarvesterData* hd = iTempReadyPHArray[y];
+ if( currentPHArrayCount )
{
- HarvestCompleted( tempHd->ClientId(), tempHd->Uri(), KErrNoMemory );
- iHarvesterEventManager->DecreaseItemCountL( EHEObserverTypeMMC, 1 );
- delete tempHd;
- tempHd = NULL;
+ // Leave the first item in the array as it is the priority item
+ iPHArray.Insert( hd, 1 );
+ }
+ else
+ {
+ iPHArray.Insert( hd, 0 );
}
}
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 ) )
{
-#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;
- }
+ WRITELOG( "CHarvesterAO::HandlePlaceholdersL() - no objectDef or in use, failing harvesting" );
const TInt error( KErrUnknown );
// notify observer, notification is needed even if file is not supported
HarvestCompleted( hd->ClientId(), hd->Uri(), error );
@@ -1118,12 +1013,10 @@
continue;
}
+ CMdENamespaceDef& defNS = iMdESession->GetDefaultNamespaceDefL();
CMdEObjectDef& mdeObjectDef = defNS.GetObjectDefL( objDefStr );
- HBufC* hdUri = hd->Uri().AllocL();
- CleanupStack::PushL( hdUri );
- CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, *hdUri );
- CleanupStack::PopAndDestroy( hdUri );
+ CMdEObject* mdeObject = iMdESession->NewObjectL( mdeObjectDef, hd->Uri() );
CleanupStack::PushL( mdeObject );
CPlaceholderData* phData = NULL;
@@ -1192,10 +1085,10 @@
// set placeholder
mdeObject->SetPlaceholder( ETrue );
- if( !iPropDefs->iCreationDatePropertyDef )
- {
- iPropDefs->SetByObjectDefL( defNS.GetObjectDefL( MdeConstants::Object::KBaseObject ) );
- }
+ if( !iPropDefs )
+ {
+ iPropDefs = CHarvesterAoPropertyDefs::NewL( defNS.GetObjectDefL( MdeConstants::Object::KBaseObject ) );
+ }
// set file size
mdeObject->AddUint32PropertyL( *iPropDefs->iSizePropertyDef, phData->FileSize() );
@@ -1218,7 +1111,7 @@
}
else
{
- mdeObject->AddTextPropertyL( *iPropDefs->iItemTypePropertyDef, KUndefined );
+ mdeObject->AddTextPropertyL( *iPropDefs->iItemTypePropertyDef, KUndefinedMime );
}
if( hd->Origin() == MdeConstants::Object::ECamera )
@@ -1240,7 +1133,7 @@
}
else
{
- mdeObject->AddTextPropertyL( *iPropDefs->iTitlePropertyDef, KUndefined );
+ mdeObject->AddTextPropertyL( *iPropDefs->iTitlePropertyDef, KNullDesC );
}
CPlaceholderData* ph = NULL;
@@ -1284,68 +1177,33 @@
CleanupStack::Pop( mdeObject );
- if(iTempReadyPHArray.Append( hd ) != KErrNone)
- {
- HarvestCompleted( hd->ClientId(), hd->Uri(), KErrNoMemory );
- delete hd;
- hd = NULL;
- }
+ iTempReadyPHArray.Append( hd );
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 );
- 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 );
- }
-
+ const TInt addError( iMdESession->AddObjectsL( mdeObjectArray ) );
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,
@@ -1381,17 +1239,17 @@
const TDesC& uri = aHD->Uri();
TBool objectExisted = ETrue;
- if( !mdeObject )
+ if( ! mdeObject )
{
objectExisted = EFalse;
WRITELOG1( "CHarvesterAO::CheckFileExtensionAndHarvestL() - no mdeobject. URI: %S", &uri );
TBuf<KObjectDefStrSize> 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( !aHD )
+ if( iUnmountDetected )
{
return;
}
@@ -1496,16 +1354,9 @@
{
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 );
@@ -1535,6 +1386,8 @@
WRITELOG1("CHarvesterAO::CheckFileExtensionAndHarvestL() - ends with error %d", pluginErr );
OstTrace1( TRACE_NORMAL, DUP8_CHARVESTERAO_CHECKFILEEXTENSIONANDHARVESTL, "CHarvesterAO::CheckFileExtensionAndHarvestL) - ends with error %d", pluginErr );
+
+ SetNextRequest( ERequestHarvest );
}
// ---------------------------------------------------------------------------
@@ -1593,25 +1446,18 @@
WRITELOG( "CHarvesterAO::HarvestingCompleted() - Creating location object. " );
OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_HARVESTINGCOMPLETED, "CHarvesterAO::HarvestingCompleted - Creating location object." );
- TInt loError( KErrNone );
- if( !iLocManipulatorConnected )
- {
- loError = iLocManipulator.Connect();
- if( loError == KErrNone )
- {
- iLocManipulatorConnected = ETrue;
- }
- }
+ RLocationObjectManipulator lo;
+
+ const TInt loError = lo.Connect();
if (loError == KErrNone)
{
- TInt err = iLocManipulator.CreateLocationObject( *locData, aHD->MdeObject().Id() );
+ TInt err = lo.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
@@ -1619,6 +1465,8 @@
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 ) );
@@ -1669,6 +1517,8 @@
OstTrace0( TRACE_NORMAL, DUP12_CHARVESTERAO_HARVESTINGCOMPLETED, "==============================ERROR done =========================" );
}
+
+ SetNextRequest( ERequestHarvest );
}
// ---------------------------------------------------------------------------
@@ -1815,48 +1665,25 @@
TRAP_IGNORE( BootPartialRestoreScanL() );
#endif
- // 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 )
+ if( !iMassMemoryIdChecked )
{
- TVolumeInfo internalMassStorageVolumeInfo;
- internalMassStorageError = iFs.Volume( internalMassStorageVolumeInfo, drive );
- if( internalMassStorageError == KErrNone )
+ TInt drive( -1 );
+ TInt massStorageError( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultMassStorage, drive ) );
+ if( massStorageError == KErrNone )
{
- const TUint32 massStorageMediaId( internalMassStorageVolumeInfo.iUniqueID );
- if( massStorageMediaId != 0 )
+ TVolumeInfo massStorageVolumeInfo;
+ iFs.Volume( massStorageVolumeInfo, drive );
+ const TUint32 massStorageMediaId( massStorageVolumeInfo.iUniqueID );
+ massStorageError = DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, drive );
+ if( massStorageError == KErrNone )
{
- 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 )
+ 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 );
- }
- }
+ }
+ }
}
}
}
@@ -1921,6 +1748,11 @@
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" );
@@ -1936,19 +1768,17 @@
{
WRITELOG( "CHarvesterAO::ResumeHarvesterL()" );
OstTrace0( TRACE_NORMAL, CHARVESTERAO_RESUMEHARVESTERL, "CHarvesterAO::ResumeHarvesterL" );
-
- if( iRamFull || iDiskFull || iUnmountHandlingOngoing || iManualPauseEnabled )
- {
- return;
- }
iHarvesterPluginFactory->PauseHarvester( EFalse );
iServerPaused = EFalse;
- if( iNextRequest == ERequestIdle )
+ if( !iManualPauseEnabled &&
+ iNextRequest == ERequestIdle )
{
SetNextRequest( ERequestHarvest );
- }
+ }
+
+ iManualPauseEnabled = EFalse;
}
// ---------------------------------------------------------------------------
@@ -1984,12 +1814,6 @@
iContainerPHArray.Compress();
iPHArray.Compress();
iTempReadyPHArray.Compress();
-
- if( iLocManipulatorConnected )
- {
- iLocManipulator.Close();
- iLocManipulatorConnected = EFalse;
- }
}
break;
@@ -1999,7 +1823,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()" );
@@ -2012,29 +1836,9 @@
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
- else if( iContainerPHArray.Count() > 0 )
+ if( iContainerPHArray.Count() > 0 )
{
WRITELOG( "CHarvesterAO::RunL - Items in iContainterPHArray - requesting ERequestContainerPlaceholder handling" );
iFastHarvestNeeded = EFalse;
@@ -2065,8 +1869,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( KReadyPlaceholderQueueSize );
- if( arrayCount < KReadyPlaceholderQueueSize )
+ TInt endIndex( KPlaceholderQueueSize );
+ if( arrayCount < KPlaceholderQueueSize )
{
endIndex = arrayCount;
}
@@ -2108,27 +1912,20 @@
while( i < count )
{
CHarvesterData* hd = iContainerPHArray[0];
- if( iPHArray.Append( hd ) != KErrNone )
- {
- delete hd;
- hd = NULL;
- }
+ iPHArray.Append( hd );
iContainerPHArray.Remove( 0 );
i++;
}
TRAPD( err, HandlePlaceholdersL( EFalse ) );
- // 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 );
- }
+ // make sure that when HandlePlaceholdersL leaves, iPHArray is cleared
+ if ( err != KErrNone )
+ {
+ iContainerPHArray.ResetAndDestroy();
+ iPHArray.ResetAndDestroy();
+ iTempReadyPHArray.ResetAndDestroy();
+ User::Leave( err );
+ }
SetNextRequest( ERequestHarvest );
}
break;
@@ -2139,7 +1936,6 @@
WRITELOG( "CHarvesterAO::RunL - ERequestPause" );
OstTrace0( TRACE_NORMAL, DUP6_CHARVESTERAO_RUNL, "CHarvesterAO::RunL - ERequestPause" );
User::LeaveIfError( PauseHarvester() );
- iManualPauseEnabled = ETrue;
iHarvesterEventManager->SendEventL( EHEObserverTypeOverall, EHEStatePaused );
if( iHarvesterStatusObserver )
{
@@ -2153,19 +1949,6 @@
{
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 )
@@ -2202,7 +1985,7 @@
//
TInt CHarvesterAO::RunError( TInt aError )
{
- WRITELOG1( "CHarvesterAO::RunError, error: %d", aError );
+ WRITELOG( "CHarvesterAO::RunError" );
OstTrace0( TRACE_NORMAL, CHARVESTERAO_RUNERROR, "CHarvesterAO::RunError" );
switch( iNextRequest )
@@ -2211,21 +1994,6 @@
{
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;
@@ -2342,14 +2110,14 @@
if( MMdSHarvesterDiskSpaceObserver::EMore == aDiskSpaceDirection )
{
- 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 = EFalse;
}
else
{
- 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 = ETrue;
if( iServerPaused )
{
@@ -2363,7 +2131,7 @@
PauseMonitoring();
PauseHarvester();
}
- else if( iServerPaused )
+ else if( !iRamFull && !iManualPauseEnabled && iServerPaused )
{
// resume monitoring
ResumeMonitoring();
@@ -2556,6 +2324,7 @@
}
else
{
+ HarvestCompleted( hd->ClientId(), hd->Uri(), KErrUnknown );
delete hd;
hd = NULL;
err = KErrUnknown;
@@ -2565,10 +2334,6 @@
{
aMessage.Complete( err );
}
- else if( err != KErrNone )
- {
- HarvestCompleted( aMessage.Identity(), uri->Des(), err );
- }
albumIds.Close();
}
@@ -2758,6 +2523,7 @@
}
else
{
+ HarvestCompleted( hd->ClientId(), hd->Uri(), KErrUnknown );
delete hd;
hd = NULL;
err = KErrUnknown;
@@ -2767,10 +2533,6 @@
{
aMessage.Complete( err );
}
- else if( err != KErrNone )
- {
- HarvestCompleted( aMessage.Identity(), uri->Des(), err );
- }
albumIds.Close();
}
@@ -2934,6 +2696,7 @@
continue;
}
+ //if (aMessage.Identity() == msg.Identity())
if( &req.iSession == &aSession )
{
err = KErrNone;
@@ -3187,6 +2950,25 @@
{
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 );
@@ -3268,11 +3050,9 @@
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;
- CleanupStack::Pop( item );
- aScanItems.AppendL( item ); // ownership is transferred
+ aScanItems.AppendL( item );
}
}
else
@@ -3332,12 +3112,7 @@
hd->SetClientData( phData );
CleanupStack::Pop( phData );
-
- if(hdArray.Append( hd ) != KErrNone )
- {
- delete hd;
- hd = NULL;
- }
+ hdArray.Append( hd );
}
CleanupStack::PopAndDestroy( &results );
CleanupStack::PopAndDestroy( &fileInfos );
@@ -3362,6 +3137,8 @@
iMdEHarvesterSession->RemoveFilesNotPresent( volumeInfo.iUniqueID, ETrue );
+ iMassMemoryIdChecked = ETrue;
+
WRITELOG("CHarvesterAO::BootScanL() - end");
OstTrace0( TRACE_NORMAL, DUP5_CHARVESTERAO_BOOTSCANL, "CHarvesterAO::BootScanL - end" );
}
@@ -3454,10 +3231,9 @@
PauseMonitoring();
PauseHarvester();
- iReadyPHArray.Compress();
- iContainerPHArray.Compress();
- iPHArray.Compress();
- iTempReadyPHArray.Compress();
+ iPHArray.Compress();
+ iReadyPHArray.Compress();
+ iContainerPHArray.Compress();
}
void CHarvesterAO::MemoryGood()
@@ -3467,7 +3243,7 @@
iRamFull = EFalse;
- if( iServerPaused )
+ if( !iDiskFull && !iManualPauseEnabled && iServerPaused )
{
// resume monitoring
ResumeMonitoring();
--- a/harvester/server/src/harvesterqueue.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/harvesterqueue.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -144,7 +144,7 @@
WRITELOG( "CHarvesterQueue::Append()" );
TInt err( KErrNone );
- if ( iBlacklist && aItem->Origin() != MdeConstants::Object::ECamera )
+ if ( iBlacklist )
{
TUint32 mediaId( 0 );
err = iMediaIdUtil->GetMediaId( aItem->Uri(), mediaId );
@@ -174,7 +174,6 @@
if ( aItem->ObjectType() == EFastHarvest || aItem->Origin() == MdeConstants::Object::ECamera )
{
err = iItemQueue.Insert( aItem, 0 );
-
if( !iHarvesterAO->IsActive() )
{
iHarvesterAO->SetPriority( KHarvesterPriorityMonitorPlugin );
--- a/harvester/server/src/harvesterserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/harvesterserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -162,7 +162,7 @@
WRITELOG( "CHarvesterServer::NewLC() - begin" );
CHarvesterServer* self = new (ELeave) CHarvesterServer(
- KHarvesterServerHighPriority, KHarvesterServerPolicy,
+ CActive::EPriorityUserInput, KHarvesterServerPolicy,
ESharableSessions );
CleanupStack::PushL( self );
self->ConstructL();
@@ -444,11 +444,8 @@
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" );
--- a/harvester/server/src/mdeobjecthandler.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/mdeobjecthandler.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -126,7 +126,7 @@
CMdERelation* relation =
iMdeSession->NewRelationLC(
albumRelationDef, albumId, objectId, 0 );
- relationEventArray.AppendL( STATIC_CAST( CMdEInstanceItem*, relation ) );
+ relationEventArray.Append( STATIC_CAST( CMdEInstanceItem*, relation ) );
CleanupStack::Pop(); //relation
}
}
@@ -140,7 +140,7 @@
{
CMdEEvent* event = iMdeSession->NewEventLC(
*eventDef, objectId, time );
- relationEventArray.AppendL( STATIC_CAST( CMdEInstanceItem*, event ) );
+ relationEventArray.Append( STATIC_CAST( CMdEInstanceItem*, event ) );
CleanupStack::Pop(); // event
}
}
--- a/harvester/server/src/ondemandao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/ondemandao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -64,7 +64,6 @@
if( iMdEHarvesterSession )
{
delete iMdEHarvesterSession;
- iMdEHarvesterSession = NULL;
}
// Delete instance variables if any
}
@@ -72,7 +71,7 @@
void COnDemandAO::DoCancel()
{
WRITELOG("COnDemandAO::DoCancel");
- iMdEHarvesterSession->CancelHarvestingPrioritizationObserver();
+ iMdEHarvesterSession->CancelHarvestingPrioritizationObserver ();
}
void COnDemandAO::StartL()
@@ -80,7 +79,7 @@
WRITELOG("COnDemandAO::StartL");
// Cancel any request, just to be sure
Cancel ();
- iMdEHarvesterSession->SetHarvestingPrioritizationChunkL( 16384 );
+ iMdEHarvesterSession->SetHarvestingPrioritizationChunkL ( 16384 );
WaitHarvestingRequest ();
}
@@ -116,14 +115,8 @@
hd->SetEventType( EHarvesterEdit );
hd->SetObjectType( EFastHarvest );
queue.Remove( k );
-
- if(queue.Insert( hd, 0 ) != KErrNone)
- {
- delete hd;
- hd = NULL;
- }
-
- found = ETrue;
+ queue.Insert( hd, 0 );
+ found = ETrue;
}
}
}
--- a/harvester/server/src/reharvesterao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/src/reharvesterao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -19,8 +19,8 @@
#include "mdeobject.h"
#include "mdsutils.h"
-const TInt KResumeTime = 3000000; //microseconds
-const TInt KTimeIncrease = 1000000; //microseconds
+const TInt KResumeTime = 2000000; //microseconds
+const TInt KTimeIncrease = 500000; //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;
}
}
- aItem->SetMdeObject( NULL );
+ CMdEObject* mdeObject = &aItem->MdeObject();
+ if( mdeObject )
+ {
+ delete mdeObject;
+ aItem->SetMdeObject( NULL );
+ }
- if(iItems.Append( aItem ) != KErrNone )
- {
- delete aItem;
- aItem = NULL;
- }
-
+ iItems.Append( aItem );
+
iDelay = KResumeTime;
const TTimeIntervalMicroSeconds32 delay = TTimeIntervalMicroSeconds32( iDelay );
@@ -206,7 +206,6 @@
// found matching item
iItems.Remove( i );
delete item;
- item = NULL;
}
if ( iItems.Count() == 0 )
--- a/harvester/server/traces/OstTraceDefinitions.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/traces/OstTraceDefinitions.h Wed Oct 13 15:02:02 2010 +0300
@@ -3,5 +3,5 @@
// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler
// REMOVE BEFORE CHECK-IN TO VERSION CONTROL
#define OST_TRACE_COMPILER_IN_USE
-#include <opensystemtrace.h>
+#include <OpenSystemTrace.h>
#endif
--- a/harvester/server/traces/fixed_id.definitions Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/traces/fixed_id.definitions Wed Oct 13 15:02:02 2010 +0300
@@ -168,7 +168,6 @@
[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
--- a/harvester/server/traces/harvesteraoTraces.h Wed Sep 15 12:40:59 2010 +0300
+++ b/harvester/server/traces/harvesteraoTraces.h Wed Oct 13 15:02:02 2010 +0300
@@ -164,7 +164,6 @@
#define DUP5_CHARVESTERAO_BOOTSCANL 0x3009c
#define CHARVESTERAO_MEMORYLOW 0x3009d
#define CHARVESTERAO_MEMORYGOOD 0x3009e
-#define DUP5_CHARVESTERAO_RUNERROR 0x300c4
#endif
--- a/iadstoprestart/src/iadrestart.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/iadstoprestart/src/iadrestart.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -55,7 +55,6 @@
TRAP(err, MainL());
delete cleanup;
- cleanup = NULL;
__UHEAP_MARKEND;
return err;
}
--- a/iadstoprestart/src/iadstop.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/iadstoprestart/src/iadstop.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -158,7 +158,6 @@
TRAP(err, MainL());
delete cleanup;
- cleanup = NULL;
__UHEAP_MARKEND;
return err;
}
--- a/inc/mdcdef.h Wed Sep 15 12:40:59 2010 +0300
+++ b/inc/mdcdef.h Wed Oct 13 15:02:02 2010 +0300
@@ -25,7 +25,7 @@
NONSHARABLE_CLASS(TMdCDef) : protected TMdCSerializationType
{
protected:
- TMdCDef(TMdCStructTypes aType) : TMdCSerializationType( aType ), iDefId( 0 )
+ TMdCDef(TMdCStructTypes aType) : TMdCSerializationType( aType )
{
}
--- a/inc/mdscommoninternal.h Wed Sep 15 12:40:59 2010 +0300
+++ b/inc/mdscommoninternal.h Wed Oct 13 15:02:02 2010 +0300
@@ -45,15 +45,12 @@
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( 3000 );
+const TInt KTriggerDbMaintenanceTreasholdValue( 2500 );
_LIT( KMdSServerName,"!MdSServer" ); // Server name
_LIT( KMdSServerProcessString,"!MdSServer*" );
@@ -72,7 +69,7 @@
const TUint32 KNokiaVendorId = 52487775;
-const TInt64 KDiskFullThreshold = 1024*70; // 70 kB, SQLite default maximum journal size
+const TInt64 KDiskFullThreshold = 1024*50; // 50 kB
// P&S stuff
static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
--- a/inc/mdssqliteconnection.h Wed Sep 15 12:40:59 2010 +0300
+++ b/inc/mdssqliteconnection.h Wed Oct 13 15:02:02 2010 +0300
@@ -237,15 +237,11 @@
/**
* cleanup method (from TBase)
- * according to status does Rollback or nothing if commit was succesfull
+ * according to status does Commit/Rollback/nothing
*/
inline void Close()
{
- // 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 )
+ if ( iErrorState != KErrNone )
{
TRAP( iErrorState, iConnection.TransactionRollbackL() );
}
@@ -263,6 +259,17 @@
}
/**
+ * 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)
*/
--- a/locationmanager/client/bwincw/locationmanagerclientwinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/bwincw/locationmanagerclientwinscw.def Wed Oct 13 15:02:02 2010 +0300
@@ -29,10 +29,4 @@
?StopTrackLog@RTrackLog@@QAEXXZ @ 28 NONAME ; void RTrackLog::StopTrackLog(void)
?TrackLogName@RTrackLog@@QAEHAAVTDes16@@@Z @ 29 NONAME ; int RTrackLog::TrackLogName(class TDes16 &)
?LocationSnapshot@RLocationObjectManipulator@@QAEHK@Z @ 30 NONAME ; int RLocationObjectManipulator::LocationSnapshot(unsigned long)
- ?GeoTagStaus@RLocationGeoTagger@@QAEXAAVTRequestStatus@@AAW4TGeoTaggingSatus@@@Z @ 31 NONAME ; void RLocationGeoTagger::GeoTagStaus(class TRequestStatus &, enum TGeoTaggingSatus &)
- ?CancelGeoTaggingRequest@RLocationGeoTagger@@QAEXXZ @ 32 NONAME ; void RLocationGeoTagger::CancelGeoTaggingRequest(void)
- ?StartGeoTagging@RLocationGeoTagger@@QAEXAAVTRequestStatus@@W4TConnectionOption@@@Z @ 33 NONAME ; void RLocationGeoTagger::StartGeoTagging(class TRequestStatus &, enum TConnectionOption)
- ??1RLocationGeoTagger@@QAE@XZ @ 34 NONAME ; RLocationGeoTagger::~RLocationGeoTagger(void)
- ??0RLocationGeoTagger@@QAE@XZ @ 35 NONAME ; RLocationGeoTagger::RLocationGeoTagger(void)
- ?CancelTagPendingRequest@RLocationGeoTagger@@QAEXXZ @ 36 NONAME ; void RLocationGeoTagger::CancelTagPendingRequest(void)
--- a/locationmanager/client/eabi/locationmanagerclientarm.def Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/eabi/locationmanagerclientarm.def Wed Oct 13 15:02:02 2010 +0300
@@ -35,12 +35,4 @@
_ZTI19CTrackLogObserverAO @ 34 NONAME ABSENT; #<TI>#
_ZTV19CTrackLogObserverAO @ 35 NONAME ABSENT; #<VT>#
_ZN26RLocationObjectManipulator16LocationSnapshotEm @ 36 NONAME
- _ZN18RLocationGeoTagger11GeoTagStausER14TRequestStatusR16TGeoTaggingSatus @ 37 NONAME
- _ZN18RLocationGeoTagger15StartGeoTaggingER14TRequestStatus17TConnectionOption @ 38 NONAME
- _ZN18RLocationGeoTagger23CancelGeoTaggingRequestEv @ 39 NONAME
- _ZN18RLocationGeoTagger23CancelTagPendingRequestEv @ 40 NONAME
- _ZN18RLocationGeoTaggerC1Ev @ 41 NONAME
- _ZN18RLocationGeoTaggerC2Ev @ 42 NONAME
- _ZN18RLocationGeoTaggerD1Ev @ 43 NONAME
- _ZN18RLocationGeoTaggerD2Ev @ 44 NONAME
--- a/locationmanager/client/group/locationmanagerclient.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/group/locationmanagerclient.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -20,7 +20,7 @@
#if defined(WINSCW)
deffile ../bwincw/locationmanagerclientwinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/locationmanagerclientarm.def
#endif
nostrictdef
@@ -40,10 +40,9 @@
SOURCEPATH ../src
SOURCE rlocationmanager.cpp
SOURCE rlocationtrail.cpp
-SOURCE rlocationobjectmanipulator.cpp
-SOURCE CTrackLogObserverAO.cpp
-SOURCE rtracklog.cpp
-SOURCE rlocationgeotagger.cpp
+SOURCE rlocationobjectmanipulator.cpp
+SOURCE CTrackLogObserverAO.cpp
+SOURCE rtracklog.cpp
MW_LAYER_SYSTEMINCLUDE
@@ -56,5 +55,3 @@
BYTEPAIRCOMPRESSTARGET
OPTION ARMCC -O3 -OTime
-// End of file
-
--- a/locationmanager/client/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS LocationManager Client</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
Binary file locationmanager/client/sis/locationmanagerclient_stub.sis has changed
--- a/locationmanager/client/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/client/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"LocationManagerClient"}, (0x200071BF), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
--- a/locationmanager/client/src/rlocationgeotagger.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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:An interface to Location Manager geo tagger
-*
-*/
-
-#include <f32file.h>
-#include <s32mem.h>
-#include <data_caging_path_literals.hrh>
-
-#include <locationeventdef.h>
-#include "rlocationgeotagger.h"
-#include "locationmanagerdefs.h"
-#include "locationmanagerdebug.h"
-
-EXPORT_C RLocationGeoTagger::RLocationGeoTagger()
- : iTagPendingData (NULL)
- {
- }
-
-EXPORT_C RLocationGeoTagger::~RLocationGeoTagger()
- {
- delete iTagPendingData;
- }
-
-// --------------------------------------------------------------------------
-// RLocationGeoTagger::IsTagPending
-// --------------------------------------------------------------------------
-//
-EXPORT_C void RLocationGeoTagger::GeoTagStaus( TRequestStatus& aStatus,
- TGeoTaggingSatus& aTagPendingFlag )
- {
- LOG( "RLocationGeoTagger::IsTagPending(), begin" );
-
- delete iTagPendingData;
- iTagPendingData = new TPckg<TGeoTaggingSatus>( aTagPendingFlag);
-
- if ( iHandle && iTagPendingData )
- {
- SendReceive( ELocManTagPending, TIpcArgs( iTagPendingData ), aStatus );
- }
- else
- {
- if ( !iTagPendingData )
- {
- CompleteRequest(aStatus, KErrNoMemory);
- }
- else
- {
- CompleteRequest(aStatus, KErrDisconnected);
- }
- }
- LOG( "RLocationGeoTagger::IsTagPending(), end" );
- }
-
-// --------------------------------------------------------------------------
-// RLocationGeoTagger::StartGeoTagging
-// --------------------------------------------------------------------------
-//
-EXPORT_C void RLocationGeoTagger::StartGeoTagging
- (TRequestStatus& aStatus, const TConnectionOption aConnectionOption )
- {
- LOG( "RLocationGeoTagger::StartGeoTaggingL(), begin" );
-
- if ( iHandle )
- {
- SendReceive( ELocManStartGeoTaging, TIpcArgs( aConnectionOption ), aStatus);
- }
- LOG( "RLocationGeoTagger::StartGeoTaggingL(), end" );
- }
-
-// --------------------------------------------------------------------------
-// RLocationGeoTagger::CancelTagPendingRequest
-// --------------------------------------------------------------------------
-//
-EXPORT_C void RLocationGeoTagger::CancelTagPendingRequest()
- {
- LOG( "RLocationGeoTagger::CancelTagPendingRequest(), begin" );
-
- if ( iHandle )
- {
- SendReceive( ELocManCancelTagPendingReq);
- }
- LOG( "RLocationGeoTagger::CancelTagPendingRequest(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// RLocationGeoTagger::CancelTagPendingRequest
-// --------------------------------------------------------------------------
-//
-EXPORT_C void RLocationGeoTagger::CancelGeoTaggingRequest()
- {
- LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), begin" );
- if ( iHandle )
- {
- SendReceive( ELocManCancelGeoTaggingReq);
- }
- LOG( "RLocationGeoTagger::CancelGeoTaggingRequest(), end" );
- }
-
-
-//End of File
--- a/locationmanager/client/src/rlocationmanager.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/src/rlocationmanager.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -33,31 +33,19 @@
{
LOG( "RLocationManager::LaunchServer begin" );
- TFindServer findLocServer( KLocServerName );
- TFullName name;
+ // DLL launch
+ RProcess server;
+ TInt ret = server.Create( KLocServerFileName, KNullDesC );
- TInt result = findLocServer.Next( name );
- if ( result == KErrNone )
+ if ( ret != KErrNone ) // Loading failed.
{
- LOG( "StartServer() - Server already running" );
-
- // Server already running
- return KErrNone;
+ return ret;
}
- 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 )
+ TRequestStatus status( KErrNone );
+ server.Rendezvous( status );
+
+ if ( status != KRequestPending )
{
LOG( "RLocationManager::LaunchServer Failed" );
server.Kill( 0 ); // Abort startup.
@@ -66,17 +54,15 @@
{
server.Resume(); // Logon OK - start the server.
}
-
- User::WaitForRequest( stat ); // wait for start or death
+
+ User::WaitForRequest( status ); // 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
- result = ( server.ExitType() == EExitPanic ) ? KErrCommsBreak : stat.Int();
+ ret = ( server.ExitType() == EExitPanic ) ? KErrCommsBreak : status.Int();
server.Close();
-
LOG( "RLocationManager::LaunchServer end" );
-
- return result;
+ return ret;
}
// --------------------------------------------------------------------------
--- a/locationmanager/client/src/rlocationobjectmanipulator.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/src/rlocationobjectmanipulator.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -114,7 +114,6 @@
}
delete paramBuf;
- paramBuf = NULL;
LOG( "RLocationObject::CopyLocationData end" );
}
// --------------------------------------------------------------------------
@@ -147,7 +146,6 @@
{
LOG( "RLocationObject::CopyLocationData CMdCSerializationBuffer creation failed" );
delete uriBuffer;
- uriBuffer = NULL;
CompleteRequest( aStatus, error );
return;
}
@@ -179,7 +177,6 @@
}
delete uriBuffer;
- uriBuffer = NULL;
LOG( "RLocationObject::CopyLocationData end" );
}
--- a/locationmanager/client/src/rlocationtrail.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/client/src/rlocationtrail.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -31,7 +31,6 @@
EXPORT_C RLocationTrail::~RLocationTrail()
{
delete iCurrentLocData;
- iCurrentLocData = NULL;
}
// --------------------------------------------------------------------------
@@ -149,7 +148,6 @@
LOG( "RLocationTrail::CurrentLocation(), begin" );
delete iCurrentLocData;
- iCurrentLocData = NULL;
iCurrentLocData = new TPckg<TLocationData>( aLocationData );
if ( iHandle && iCurrentLocData )
--- a/locationmanager/geoconverter/bwincw/geoconverterwinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- ?ConvertL@CGeoConverter@@QAEXABVTNetworkInfoV1@CTelephony@@@Z @ 1 NONAME ; void CGeoConverter::ConvertL(class CTelephony::TNetworkInfoV1 const &)
- ??1CGeoConverter@@UAE@XZ @ 2 NONAME ; CGeoConverter::~CGeoConverter(void)
- ?NewL@CGeoConverter@@SAPAV1@AAVMGeoConverterObserver@@@Z @ 3 NONAME ; class CGeoConverter * CGeoConverter::NewL(class MGeoConverterObserver &)
-
--- a/locationmanager/geoconverter/eabi/geoconverterarm.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-EXPORTS
- _ZN13CGeoConverter4NewLER21MGeoConverterObserver @ 1 NONAME
- _ZN13CGeoConverter8ConvertLERKN10CTelephony14TNetworkInfoV1E @ 2 NONAME
- _ZN13CGeoConverterD0Ev @ 3 NONAME
- _ZN13CGeoConverterD1Ev @ 4 NONAME
- _ZN13CGeoConverterD2Ev @ 5 NONAME
- _ZTI13CGeoConverter @ 6 NONAME
- _ZTV13CGeoConverter @ 7 NONAME
-
--- a/locationmanager/geoconverter/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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_MMPFILES
-geoconverter.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
-
--- a/locationmanager/geoconverter/group/geoconverter.mmp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +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 <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-VERSION 10.0
-TARGET geoconverter.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x2002E6A1
-
-VENDORID VID_DEFAULT
-CAPABILITY CAP_GENERAL_DLL
-
-
-#if defined(WINSCW)
-deffile ../bwincw/geoconverterwinscw.def
-#elif defined(EABI)
-deffile ../eabi/geoconverterarm.def
-#endif
-nostrictdef
-
-
-USERINCLUDE ../inc
-USERINCLUDE ../../inc
-USERINCLUDE ../../../inc
-
-SYSTEMINCLUDE /epoc32/include/stdapis
-SYSTEMINCLUDE /epoc32/include/platform/lbs
-MW_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH ../src
-SOURCE cgeoconverter.cpp
-
-
-LIBRARY euser.lib
-LIBRARY etel3rdparty.lib
-
-#include "../../inc/locplatsupport.mmh"
-#ifdef _LOC_GEOTAGGING_CELLID
-MACRO LOC_GEOTAGGING_CELLID
-LIBRARY lbslocationinfoconverter.lib
-LIBRARY lbslocationinfodatatypes.lib
-#endif
-LIBRARY lbs.lib
-LIBRARY libc.lib
-
-PAGED
-BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O3 -OTime
-
-// End of file
-
--- a/locationmanager/geoconverter/inc/cgeoconverter.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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: A class for converting CGI Info to lat, long.
-*
-*/
-
-#ifndef C_GEOCONVERTER_H
-#define C_GEOCONVERTER_H
-
-/**
- *
- * @since S60 9.2
- */
-#ifdef LOC_GEOTAGGING_CELLID
-#include <lbslocationinfoconverter.h>
-#include <lbslocationinfo.h>
-#endif
-#include <lbsposition.h>
-#include <etel3rdparty.h>
-
-class MGeoConverterObserver
- {
-public:
- /**
- * This method is used for notifying completion of geotagging
- * @param aError error code
- * @param aPosition position (lat/lon) for the correcponding n/w info
- */
- virtual void ConversionCompletedL( const TInt aError, TLocality& aPosition ) = 0;
-
- /**
- * This method is used to handle any error during conversion
- * @param aError the error code
- */
- virtual void HandleConversionError(TInt aError) = 0;
- };
-
-// Class to handle conversion operations
-class CGeoConverter : public CBase
-#ifdef LOC_GEOTAGGING_CELLID
- , public MLbsLocationInfoConverterObserver
-#endif
- {
-public:
- /**
- * 2-phased constructor.
- */
- IMPORT_C static CGeoConverter* NewL( MGeoConverterObserver& aObserver );
- /**
- * C++ destructor.
- */
- 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 );
-
-#ifdef GEOCONVERTER_UNIT_TESTCASE
- public:
-#else
- private:
-#endif
-
- /**
- * C++ constructor.
- */
- CGeoConverter( MGeoConverterObserver& aObserver );
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
-#ifdef GEOCONVERTER_UNIT_TESTCASE
- public:
-#else
- private:
-#endif
-
- MGeoConverterObserver& iObserver;
-#ifdef LOC_GEOTAGGING_CELLID
- CLbsLocationInfoConverter* iLocConverter;
- CLbsLocationInfo* iLocInfo;
- CLbsGsmCellInfo* iGsmCellInfo;
- CLbsWcdmaCellInfo* iWcdmaCellInfo;
-#endif
- };
-
-#endif // C_GEOCONVERTER_H
-
-// End of file.
--- a/locationmanager/geoconverter/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS GeoConverter</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
Binary file locationmanager/geoconverter/sis/geoconverter_stub.sis has changed
--- a/locationmanager/geoconverter/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/geoconverter/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"geoconverter"}, (0x2002E6A1), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
--- a/locationmanager/geoconverter/src/cgeoconverter.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +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: A class for creating country and city tags for media files
-*
-*/
-
-//#include "locationmanagerdebug.h"
-#include "cgeoconverter.h"
-#include "locationmanagerdebug.h"
-
-
-
-// --------------------------------------------------------------------------
-// CGeoConverter::NewL
-// --------------------------------------------------------------------------
-//
-EXPORT_C CGeoConverter* CGeoConverter::NewL( MGeoConverterObserver& aObserver )
- {
- LOG("CGeoConverter::NewL");
- CGeoConverter* self = new( ELeave ) CGeoConverter( aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); // self
- return self;
- }
-
-// --------------------------------------------------------------------------
-// CGeoConverter::CGeoConverter()
-// --------------------------------------------------------------------------
-//
-CGeoConverter::CGeoConverter( MGeoConverterObserver& aObserver )
- :iObserver( aObserver )
-#ifdef LOC_GEOTAGGING_CELLID
- ,iLocConverter(NULL),
- iLocInfo(NULL),
- iGsmCellInfo(NULL),
- iWcdmaCellInfo(NULL)
-#endif
- {
- }
-
-// --------------------------------------------------------------------------
-// CGeoConverter::~CGeoConverter
-// --------------------------------------------------------------------------
-//
-EXPORT_C CGeoConverter::~CGeoConverter()
- {
- 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");
- }
-
-// --------------------------------------------------------------------------
-// CGeoConverter::OnConversionComplete()
-// --------------------------------------------------------------------------
-//
-void CGeoConverter::OnConversionComplete( TInt aStatusCode )
- {
- LOG("CGeoConverter::OnConversionComplete, begin");
-#ifdef LOC_GEOTAGGING_CELLID
- //16. Retrieve position estimate that is updated by Location Monitor server
- //after a conversion operation is completed successfully.
- RLbsAreaInfoBaseArray posInfoList;
- TLocality position;
-
-
- LOG1("Status Code - %d",aStatusCode);
-
- if( KErrNone == aStatusCode )
- {
- TRAP_IGNORE(iLocInfo->GetAreaInfoL( posInfoList, CLbsLocationInfo::ELbsPosInfo );)
-
- //Get geo-coordinates.
-
- LOG1("PposInfoList Count - %d",posInfoList.Count());
- if ( posInfoList.Count() )
- {
- static_cast<CLbsPositionInfo*>(posInfoList[0])->GetLocality(position);
- }
- else
- {
- aStatusCode = KErrNotFound;
- }
- }
- TRAPD(err,iObserver.ConversionCompletedL( aStatusCode, position);)
- if(err != KErrNone)
- {
- iObserver.HandleConversionError(err);
- }
- posInfoList.Close();
-#endif
- LOG("CGeoConverter::OnConversionComplete, end");
- }
-
-// --------------------------------------------------------------------------
-// CGeoConverter::ConstructL()
-// --------------------------------------------------------------------------
-//
-void CGeoConverter::ConstructL()
- {
- LOG("CGeoConverter::ConstructL, begin");
-#ifdef LOC_GEOTAGGING_CELLID
- iLocInfo = CLbsLocationInfo::NewL();
- TUid pluginUid = TUid::Uid( 0x20027011 );
- LOG("CGeoConverter::ConstructL");
- iLocConverter = CLbsLocationInfoConverter::NewL( *this, pluginUid );
-#endif
- LOG("CGeoConverter::ConstructL, end");
- }
-
-// --------------------------------------------------------------------------
-// CGeoConverter::ConvertL()
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CGeoConverter::ConvertL( const CTelephony::TNetworkInfoV1& aNetworkInfo )
- {
- LOG("CGeoConverter::ConvertL, begin");
-#ifdef LOC_GEOTAGGING_CELLID
-
- //Set mobile country code
- TLex lexer( aNetworkInfo.iCountryCode );
- TUint countryCode = 0;
-
- User::LeaveIfError( lexer.Val( countryCode, EDecimal) );
- //Set mobile network code
- lexer = aNetworkInfo.iNetworkId;
- TUint networkCode = 0;
- User::LeaveIfError( lexer.Val( networkCode, EDecimal) );
- LOG1("Network mode - %d", aNetworkInfo.iMode);
- CLbsAreaInfoBase* areaInfoBase = NULL;
- switch(aNetworkInfo.iAccess)
- {
- case CTelephony::ENetworkAccessGsm:
- case CTelephony::ENetworkAccessGsmCompact:
- {
- LOG("2G network.");
- if(iGsmCellInfo == NULL)
- {
- iGsmCellInfo = CLbsGsmCellInfo::NewL();
- }
- iGsmCellInfo->SetMobileCountryCode( countryCode );
-
- iGsmCellInfo->SetMobileNetworkCode( networkCode );
- //Set cell id
- iGsmCellInfo->SetCellId( aNetworkInfo.iCellId );
-
- if(aNetworkInfo.iAreaKnown)
- {
- //Set location area code
- iGsmCellInfo->SetLocationAreaCode( aNetworkInfo.iLocationAreaCode );
- }
-
- areaInfoBase = iGsmCellInfo;
- }
- break;
- case CTelephony::ENetworkAccessUtran:
- {
- LOG("3G network.");
- if(iWcdmaCellInfo == NULL)
- {
- iWcdmaCellInfo = CLbsWcdmaCellInfo::NewL();
- }
- iWcdmaCellInfo->SetMobileCountryCode(countryCode);
- iWcdmaCellInfo->SetMobileNetworkCode(networkCode);
- iWcdmaCellInfo->SetUniqueCellId(aNetworkInfo.iCellId);
- areaInfoBase = iWcdmaCellInfo;
- }
- break;
- default:
- LOG("Unknown network mode");
- User::Leave(KErrNotSupported);
- }
- //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 );
- }
-#endif
- LOG("CGeoConverter::ConvertL, end");
- }
-
-// End of file
-
--- a/locationmanager/geotagger/bwins/geotagger.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- ?NewL@CInternalGeoTagger@@SAPAV1@PAVCMdESession@@PAVMGeoTaggerObserver@@@Z @ 1 NONAME ; class CInternalGeoTagger * CInternalGeoTagger::NewL(class CMdESession *, class MGeoTaggerObserver *)
- ?NewL@CGeoTagger@@SAPAV1@PAVMGeoTaggerObserver@@PAVCMdESession@@@Z @ 2 NONAME ; class CGeoTagger * CGeoTagger::NewL(class MGeoTaggerObserver *, class CMdESession *)
- ??1CInternalGeoTagger@@UAE@XZ @ 3 NONAME ; CInternalGeoTagger::~CInternalGeoTagger(void)
-
--- a/locationmanager/geotagger/eabi/geotaggerarm.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXPORTS
- _ZN10CGeoTagger4NewLEP18MGeoTaggerObserverP11CMdESession @ 1 NONAME
- _ZN18CInternalGeoTagger4NewLEP11CMdESessionP18MGeoTaggerObserver @ 2 NONAME
- _ZTI18CInternalGeoTagger @ 3 NONAME
- _ZTV18CInternalGeoTagger @ 4 NONAME
-
--- a/locationmanager/geotagger/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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
-geotagger.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
--- a/locationmanager/geotagger/group/geotagger.mmp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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 <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-#include "../../inc/locplatsupport.mmh"
-
-VERSION 10.0
-TARGET geotagger.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x2002700E
-
-VENDORID VID_DEFAULT
-CAPABILITY CAP_GENERAL_DLL
-
-#if defined(WINSCW)
-#elif defined(EABI)
-deffile ../eabi/geotaggerarm.def
-#endif
-nostrictdef
-
-USERINCLUDE ../inc
-USERINCLUDE ../../inc
-USERINCLUDE ../../../inc
-
-
-#ifdef _LOC_GEOTAGGING_CELLID
-MACRO LOC_GEOTAGGING_CELLID
-USERINCLUDE ../../geoconverter/inc
-#endif
-
-#ifdef _LOC_REVERSEGEOCODE
-MACRO LOC_REVERSEGEOCODE
-USERINCLUDE ../../tagcreator/inc
-#endif
-
-
-SOURCEPATH ../src
-SOURCE cgeotagger.cpp
-SOURCE cinternalgeotagger.cpp
-
-MW_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE /epoc32/include/platform/lbs
-SYSTEMINCLUDE /epoc32/include/stdapis
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY lbs.lib
-LIBRARY mdeclient.lib
-LIBRARY etel3rdparty.lib
-LIBRARY estor.lib
-LIBRARY platformenv.lib
-
-LIBRARY ecom.lib
-LIBRARY libc.lib
-
-#ifdef _LOC_GEOTAGGING_CELLID
-LIBRARY geoconverter.lib
-#endif
-
-#ifdef _LOC_REVERSEGEOCODE
-LIBRARY tagcreator.lib
-#endif
-
-PAGED
-BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O3 -OTime
-
-// End of file
-
--- a/locationmanager/geotagger/inc/cinternalgeotagger.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#ifndef C_CINTERNALGEOTAGGER_H
-#define C_CINTERNALGEOTAGGER_H
-
-#include <e32base.h>
-#include <e32property.h>
-#include <lbs.h>
-#include <locationdatatype.h>
-#include <geotagger.h>
-
-#include "mdccommon.h"
-#include "mdesession.h"
-#include "mdenamespacedef.h"
-#include "mdeobjectdef.h"
-#include "mdepropertydef.h"
-#include "mderelation.h"
-#include "mdequery.h"
-
-#ifdef LOC_GEOTAGGING_CELLID
-#include "cgeoconverter.h"
-#endif
-
-#ifdef LOC_REVERSEGEOCODE
-#include "ctagcreator.h"
-#include <reversegeocoderplugin.h>
-#endif
-
-
-/**
- * GeoTagger converts a given cell ID(CGI Info) to geo-coordinates.
- * Does reverse geocoding to get country and city name.
- * Creates country and city tag for image/video files.
- * @since S60 9.2
- */
-
-class CInternalGeoTagger : public CGeoTagger,
- public MMdESessionObserver,
- public MMdEQueryObserver
-#ifdef LOC_GEOTAGGING_CELLID
- ,public MGeoConverterObserver
-#endif
-#ifdef LOC_REVERSEGEOCODE
- ,public MReverseGeocodeObserver
-#endif
- {
-public:
-
- /**
- * 2-phased constructor.
- * @param aMdeSession An instance of the CMdESession
- * @param aObserver The observer that is to be notified when geotagging is over
- */
- IMPORT_C static CInternalGeoTagger* NewL( CMdESession* aMdeSession,
- MGeoTaggerObserver* aObserver );
-
- /**
- * C++ destructor.
- */
- IMPORT_C virtual ~CInternalGeoTagger();
-
-
-public: //exported API
- // CGeoTagger
- /**
- * Harvests location tags.
- * @param aObserver, observer for geotagging.
- * @return None.
- */
- virtual void CreateGeoTagsL( const TConnectionOption = EInteractive );
-
- /**
- * Checks if there is any untagged photos with location info and tags them.
- * @param aTagInProgress, boolean value to indicate if geotagging is in progress.
- * @return None.
- */
- virtual void PendingGeoTagsL( TBool aTagInProgress );
-
-public: //observer methods
-
- // From MMdEQueryObserver
-
- /**
- * @param aQuery the query type
- * @param aFirstNewItemIndex The new item index
- * @param aNewItemCount The new item count
- */
- void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex,
- TInt aNewItemCount);
-
- /**
- * This method is called on completion of a query
- * @param aQuery the query type
- * @param aError Error if any
- */
- 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
- *@param aAddressInfo the reverse geocoded address
- */
- void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo );
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
-
- /*
- * 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);
-
-#endif //LOC_REVERSEGEOCODE
-
- // From MMdESessionObserver
-
- /**
- * Handles session opening
- *@param aSession A reference of the CMdESession
- *@param aError error if any
- */
- void HandleSessionOpened(CMdESession& aSession, TInt aError);
-
- /**
- * Handles any error in session opening
- *@param aSession A reference of the CMdESession
- *@param aError error if any
- */
- void HandleSessionError(CMdESession& aSession, TInt aError);
-
-#ifdef LOC_GEOTAGGING_CELLID
-public: // MGeoConverterObserver
- /**
- * This method is used for notifying completion of geotagging
- * @param aError error code
- * @param aPosition position (lat/lon) for the correcponding n/w info
- */
- void ConversionCompletedL( const TInt aError, TLocality& aPosition );
-
-
- /**
- * This method is used to handle the conversion error
- * @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
-
-private:
-
- /**
- * C++ constructor.
- * @param aMdeSession An instance of the CMdESession
- * @param aObserver The observer that is to be notified when geotagging is over
- */
- CInternalGeoTagger( CMdESession* aMdeSession, MGeoTaggerObserver* aObserver );
-
- /**
- * 2nd phase constructor.
- */
- void ConstructL();
-
- /**
- * Get all relation objects associated with this location
- * @param aLocID The locationId whose relation is to be fetched
- */
- void GetRelationObjectsL(TItemId aLocID);
-
- /**
- * get tags for this image
- * @param aImageID The imageIs whose tag is to be fetched
- */
- void GetTagsL( TItemId aImageID );
-
- /**
- * Get location objects, where lat, long not populated.
- */
- void GetAllLocationsL( );
-
- /**
- * checks if the session is ready
- * @return ETrue If the session is ready
- */
- TBool IsSessionReady();
-
- /**
- * Fetches the location information
- */
- void GetLocationInfoL();
-
- /**
- * starts geotagging of objects
- */
- void StartGeoTaggingL();
-
- /**
- * Checks if Location atg exists for an object
- * @return ETrue if location tag is found
- */
- TBool LocationTagExists();
-
- /**
- * Moves to the next location for reverse geocoding
- */
- void IterateNextLocation();
-
- /**
- * @return ETrue if item had valid lat/lon else EFalse
- */
- TBool GPSInfoExists();
-private:
- /**
- * A session to Metadata Engine for creating and manipulating location objects.
- */
- CMdESession* iMdeSession;
-
- /**
- * This query object is used to find existing locations
- */
- CMdEObjectQuery* iLocationQuery;
- /** @var iRelationQuery. */
- CMdERelationQuery* iRelationQuery;
- CMdERelationQuery* iTagQuery;
-
- TInt iIndex;
-
- TBool iSessionReady;
-
- MGeoTaggerObserver* iObserver;
-
- TLocationData iLocationData;
-
- TItemId iLocationId;
-
- TConnectionOption iConnectionOption;
-
-
- /**
- * An active scheduler wait loop for waiting a session to MdE to open.
- */
- CActiveSchedulerWait* iASW;
- TBool iMdeSessionOwnFlag;
- TBool iTagPendingHandlerFlag;
-#ifdef LOC_GEOTAGGING_CELLID
- /*
- * Geo converter
- */
- CGeoConverter* iGeoConverter;
-#endif
-#ifdef LOC_REVERSEGEOCODE
- CTagCreator* iTagCreator;
- CReverseGeoCoderPlugin* iRevGeocoderPlugin;
-#endif //LOC_REVERSEGEOCODE
- };
-
-#endif // C_CGEOTAGGER_H
-
-// End of file.
--- a/locationmanager/geotagger/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS GeoTagger</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
Binary file locationmanager/geotagger/sis/geotagger_stub.sis has changed
--- a/locationmanager/geotagger/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/geotagger/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"geotagger"}, (0x2002700E), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
--- a/locationmanager/geotagger/src/cgeotagger.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#include <geotagger.h>
-#include "cinternalgeotagger.h"
-#include "locationmanagerdebug.h"
-
-
-// --------------------------------------------------------------------------
-// CGeoTagger::NewL
-// --------------------------------------------------------------------------
-//
-EXPORT_C CGeoTagger* CGeoTagger::NewL( MGeoTaggerObserver* aObserver,
- CMdESession* aMdeSession)
- {
- LOG("CGeoTagger::NewL, begin");
- CInternalGeoTagger* self = CInternalGeoTagger::NewL( aMdeSession, aObserver );
-
- return self;
- }
-
-
-
-// End of file
--- a/locationmanager/geotagger/src/cinternalgeotagger.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,954 +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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#include <e32cmn.h>
-#include <lbserrors.h>
-#include <lbssatellite.h>
-#include <ecom.h>
-
-#include "locationmanagerdebug.h"
-#include "mdeconstants.h"
-#include "mdesession.h"
-#include "cinternalgeotagger.h"
-
-using namespace MdeConstants;
-
-_LIT ( KCountry, "country:"); // country:india
-
-const TReal64 KZeroLatLon (0.000000 );
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::NewL
-// --------------------------------------------------------------------------
-//
-EXPORT_C CInternalGeoTagger* CInternalGeoTagger::NewL( CMdESession* aMdeSession,
- MGeoTaggerObserver* aObserver )
- {
- CInternalGeoTagger* self =
- new (ELeave) CInternalGeoTagger( aMdeSession, aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::CInternalGeoTagger
-// --------------------------------------------------------------------------
-//
-CInternalGeoTagger::CInternalGeoTagger( CMdESession* aMdeSession,
- MGeoTaggerObserver* aObserver )
- : iMdeSession(aMdeSession),
- iLocationQuery(NULL),
- iRelationQuery(NULL),
- iTagQuery(NULL),
- iIndex(0),
- iSessionReady( EFalse ),
- iObserver( aObserver ),
- iASW(NULL),
- iTagPendingHandlerFlag(EFalse)
-#ifdef LOC_GEOTAGGING_CELLID
- ,iGeoConverter(NULL)
-#endif
-#ifdef LOC_REVERSEGEOCODE
- ,iTagCreator(NULL)
- ,iRevGeocoderPlugin(NULL)
-#endif
- {
- iMdeSessionOwnFlag = (iMdeSession == NULL);
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::ConstructL
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::ConstructL()
- {
- LOG("CInternalGeoTagger::ConstructL ,begin");
- if(iMdeSession != NULL)
- {
- LOG("Not owning mds session");
- iMdeSessionOwnFlag = EFalse;
- //object is not owning iMdeSession
- iSessionReady = ETrue;
-#ifdef LOC_REVERSEGEOCODE
- iTagCreator = CTagCreator::NewL();
-
- iTagCreator->SetSession( iMdeSession );
-#endif //LOC_REVERSEGEOCODE
- }
- else
- {
- iMdeSessionOwnFlag = ETrue;
- iASW = new (ELeave) CActiveSchedulerWait();
- iMdeSession = CMdESession::NewL( *this );
- //for creating tags
-#ifdef LOC_REVERSEGEOCODE
- iTagCreator = CTagCreator::NewL();
-#endif
-
- iASW->Start();
- delete iASW;
- iASW = NULL;
- }
-
- //for reverse geocoding (geo-tagging)
-
-#ifdef LOC_REVERSEGEOCODE
-
- TInt pluginerr = KErrNone;
- TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL());
-
- if(pluginerr == KErrNone)
- {
- iRevGeocoderPlugin->AddObserverL(*this);
- }
-
-
-#endif //LOC_REVERSEGEOCODE
-
- LOG("CInternalGeoTagger::ConstructL ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::~CInternalGeoTagger
-// --------------------------------------------------------------------------
-//
-CInternalGeoTagger::~CInternalGeoTagger()
- {
- LOG("CInternalGeoTagger::~CInternalGeoTagger ,begin");
-#ifdef LOC_GEOTAGGING_CELLID
- if(iGeoConverter)
- {
- delete iGeoConverter;
- iGeoConverter = NULL;
- }
-#endif
- if(iRelationQuery)
- {
- 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;
-
-#endif //LOC_REVERSEGEOCODE
- if(iMdeSessionOwnFlag)
- {
- delete iMdeSession;
- iMdeSession = NULL;
- delete iASW;
- iASW = NULL;
- }
- LOG("CInternalGeoTagger::~CInternalGeoTagger ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::CreateGeoTags
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::CreateGeoTagsL( const TConnectionOption aOption )
- {
- LOG("CInternalGeoTagger::CreateGeoTagsL ,begin");
- if ( !IsSessionReady() )
- {
- User::Leave( KErrNotReady );
- }
-
- iConnectionOption = aOption;
- iIndex = 0;
- GetAllLocationsL();
-
- LOG("CInternalGeoTagger::CreateGeoTagsL ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::HandleSessionOpened
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::HandleSessionOpened(CMdESession& /*aSession*/, TInt aError)
- {
- LOG("CInternalGeoTagger::HandleSessionOpened ,begin");
- if ( iASW && iASW->IsStarted() )
- {
- iASW->AsyncStop();
- }
-
- if ( KErrNone == aError )
- {
- iSessionReady = ETrue;
-
-#ifdef LOC_REVERSEGEOCODE
- iTagCreator->SetSession( iMdeSession );
-#endif
- }
- else
- {
- delete iMdeSession;
- iMdeSession = NULL;
- }
- LOG("CInternalGeoTagger::HandleSessionOpened ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::HandleSessionError
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::HandleSessionError(CMdESession& /*aSession*/, TInt /*aError*/)
- {
- LOG("CInternalGeoTagger::HandleSessionError ,begin");
- if (iASW && iASW->IsStarted() )
- {
- iASW->AsyncStop();
- }
- iSessionReady = EFalse;
-
- delete iMdeSession;
- iMdeSession = NULL;
-
- LOG("CInternalGeoTagger::HandleSessionError ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::IsSessionReady
-// --------------------------------------------------------------------------
-//
-TBool CInternalGeoTagger::IsSessionReady()
- {
- return iSessionReady;
- }
-
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::GetRelationObjectsL()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::GetRelationObjectsL(TItemId aLocID)
- {
- LOG("CInternalGeoTagger::GetRelationObjectsL ,begin");
- CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& imageObjDef = namespaceDef.GetObjectDefL( Image::KImageObject );
-
- if(iRelationQuery)
- {
- iRelationQuery->RemoveObserver(*this);
- iRelationQuery->Cancel();
- delete iRelationQuery;
- iRelationQuery = NULL;
- }
-
- iRelationQuery = iMdeSession->NewRelationQueryL( namespaceDef, this );
- User::LeaveIfNull( iRelationQuery );
-
- iRelationQuery->SetResultMode( EQueryResultModeItem );
-
- // both left and right condition must match
- CMdERelationCondition& filterCond = iRelationQuery->Conditions().
- AddRelationConditionL( ERelationConditionSideRight );
-
- // left one must be any image object.
- filterCond.LeftL().AddObjectConditionL( imageObjDef );
-
- // right one must be this location object
- filterCond.RightL().AddObjectConditionL( aLocID );
-
- iRelationQuery->FindL(); // results to a call to HandleQueryCompleted()
- LOG("CInternalGeoTagger::GetRelationObjectsL ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::HandleQueryNewResults()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::HandleQueryNewResults(CMdEQuery& /*aQuery*/, TInt /*aFirstNewItemIndex*/,
- TInt /*aNewItemCount*/)
- {
- LOG("CInternalGeoTagger::HandleQueryNewResults ,begin");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::HandleQueryCompleted()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::HandleQueryCompleted(CMdEQuery& aQuery, TInt aError)
- {
- LOG("CInternalGeoTagger::HandleQueryCompleted ,begin");
-
- TInt count = aQuery.Count();
- LOG1("CInternalGeoTagger::HandleQueryCompleted count: %d", count);
-
- if ( &aQuery == iLocationQuery )
- {
- if ( count )
- {
- iLocationId = iLocationQuery->ResultId( iIndex++ );
- TRAP_IGNORE( GetRelationObjectsL( iLocationId ) );
- }
- else
- {
- iIndex = 0;
- iObserver->GeoTaggingCompleted( aError );
- if(iTagPendingHandlerFlag)
- {
- iTagPendingHandlerFlag = EFalse;
- iObserver->PendingGeoTagReqComplete(KErrNone);
- }
- }
- }
- else if ( &aQuery == iRelationQuery )
- {
- //if it is a relation query, then update gps info of location object.
-
- if ( iRelationQuery->Count() )
- {
- TInt err = KErrNone;
- TRAP(err, StartGeoTaggingL( ) );
- if(err != KErrNone)
- {
- IterateNextLocation();
- }
- }
- else
- {
- IterateNextLocation();
- }
-
- }
-
- else if ( &aQuery == iTagQuery )
- {
-
- if ( LocationTagExists() ) //nothing to do for this location
- {
- IterateNextLocation(); //Go through next location
- }
- else //do reverse geocoding
- {
- if(iTagPendingHandlerFlag)
- {
- iIndex = 0;
- iTagPendingHandlerFlag = EFalse;
- iObserver->PendingGeoTagReqComplete(KErrNotFound);
- return;
- }
-
- //Find the address for this geo-coordinate
- if(GPSInfoExists())
- {
- // GPS info exist go for reverse geo coding.
-#ifdef LOC_REVERSEGEOCODE
- if(iRevGeocoderPlugin)
- {
- TRAP_IGNORE(
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationData.iPosition, iConnectionOption ) );
- }
- else
-#endif //LOC_REVERSEGEOCODE
- {
- IterateNextLocation(); //Go through next location
- }
- }
- else
- {
- if ( iLocationData.iNetworkInfo.iCellId > 0 &&
- iLocationData.iNetworkInfo.iCountryCode.Length() > 0 &&
- iLocationData.iNetworkInfo.iNetworkId.Length() > 0 )
- {
- // valid n/w information.. go for cell id based geo coding.
-#ifdef LOC_GEOTAGGING_CELLID
- TInt err = KErrNone;
- if(iGeoConverter == NULL)
- {
- TRAP(err, iGeoConverter = CGeoConverter::NewL(*this));
- }
-
- 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);
- }
-#else
- IterateNextLocation(); //Go through next location
-#endif
- }
- else
- {
- IterateNextLocation(); //Go through next location
- }
- }
- }
-
- }
-
- LOG("CInternalGeoTagger::HandleQueryCompleted ,end");
- }
-
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::GPSInfoExists()
-// --------------------------------------------------------------------------
-//
-TBool CInternalGeoTagger::GPSInfoExists()
- {
- LOG("CInternalGeoTagger::GPSInfoExists");
- TBool gpsInfoExists = EFalse;
- if ( !Math::IsNaN( iLocationData.iPosition.Latitude() ) &&
- !Math::IsNaN( iLocationData.iPosition.Longitude() ) &&
- KZeroLatLon != iLocationData.iPosition.Latitude() &&
- KZeroLatLon != iLocationData.iPosition.Longitude() ) //lat, long is there
- {
-
- LOG("Valid lat/lon\n");
- gpsInfoExists = ETrue;
- }
- return gpsInfoExists;
- }
-
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::StartGeoTagging()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::StartGeoTaggingL( )
- {
- LOG("CInternalGeoTagger::StartGeoTaggingL ,start");
- GetLocationInfoL();
-
- CMdERelation& relation = iRelationQuery->Result( 0 );
-
- GetTagsL( relation.LeftObjectId() );
-
- LOG("CInternalGeoTagger::StartGeoTaggingL ,end");
- }
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::GetLocationInfoL()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::GetLocationInfoL()
- {
- LOG("CInternalGeoTagger::GetLocationInfoL, begin");
-
- CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
-
- CMdEObjectDef& locationObjectDef = namespaceDef.GetObjectDefL( Location::KLocationObject );
-
- CMdEPropertyDef& latitudeDef = locationObjectDef.GetPropertyDefL(
- Location::KLatitudeProperty );
- CMdEPropertyDef& longitudeDef = locationObjectDef.GetPropertyDefL(
- Location::KLongitudeProperty );
- CMdEPropertyDef& cellIdDef = locationObjectDef.GetPropertyDefL(
- Location::KCellIdProperty );
- CMdEPropertyDef& lacCodeDef = locationObjectDef.GetPropertyDefL(
- Location::KLocationAreaCodeProperty );
- CMdEPropertyDef& countryCodeDef = locationObjectDef.GetPropertyDefL(
- Location::KCountryCodeProperty );
- CMdEPropertyDef& networkCodeDef = locationObjectDef.GetPropertyDefL(
- Location::KNetworkCodeProperty );
-
- CMdEObject* locationObject = NULL;
- CMdEProperty* latProp = NULL;
- CMdEProperty* lonProp = NULL;
- CMdEProperty* cellProp = NULL;
- CMdEProperty* lacProp = NULL;
- CMdEProperty* countryProp = NULL;
- CMdEProperty* networkProp = NULL;
-
- locationObject = iMdeSession->GetObjectL( iLocationId, locationObjectDef );
-
- locationObject->Property( latitudeDef, latProp, 0 );
- locationObject->Property( longitudeDef, lonProp, 0 );
- if ( latProp && lonProp )
- {
- 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 && countryProp && networkProp)
- {
- iLocationData.iNetworkInfo.iCellId = cellProp->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");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::LocationTagExists()
-// --------------------------------------------------------------------------
-//
-TBool CInternalGeoTagger::LocationTagExists()
- {
- LOG("CInternalGeoTagger::LocationTagExists ,begin");
-
- TBool tagFound = EFalse;
- TInt error = KErrNone;
- const TInt count = iTagQuery->Count();
-
- for ( TInt i = 0; i < count; i++ )
- {
- CMdERelation& relation = static_cast<CMdERelation&>( iTagQuery->ResultItem( i ) );
-
- TItemId tagId = relation.RightObjectId();
- CMdEObject* object = NULL;
- TRAP_IGNORE( object = iMdeSession->GetObjectL( tagId ) );
- if(object)
- {
- error = object->Uri().Find( KCountry );
- delete object;
- if ( error == KErrNone )
- {
- i = count;
- tagFound = ETrue;
- break;
- }
- }
- }
-
-
- LOG("CInternalGeoTagger::LocationTagExists ,end");
- return tagFound;
-
- }
-
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::IterateNextLocation()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::IterateNextLocation()
- {
- LOG("CInternalGeoTagger::IterateNextLocation ,begin");
-
- if (iIndex < iLocationQuery->Count())
- {
- iLocationId = iLocationQuery->ResultId( iIndex++ );
- TRAP_IGNORE( GetRelationObjectsL( iLocationId ) );
- }
- else
- {
- if ( iObserver )
- {
- iIndex = 0;
- TInt error = KErrNone;
- iObserver->GeoTaggingCompleted( error );
- if(iTagPendingHandlerFlag)
- {
- iTagPendingHandlerFlag = EFalse;
- iObserver->PendingGeoTagReqComplete(KErrNone);
- }
- }
- }
- LOG("CInternalGeoTagger::IterateNextLocation ,end");
- }
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::GetAllLocationsL()
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::GetAllLocationsL()
- {
- LOG("CInternalGeoTagger::GetAllLocationsL ,begin");
-
- CMdENamespaceDef& defaultNamespaceDef = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& locObjDef = defaultNamespaceDef.GetObjectDefL(
- MdeConstants::Location::KLocationObject );
- CMdEPropertyDef& cellIdPropDef = locObjDef.GetPropertyDefL(
- MdeConstants::Location::KCellIdProperty );
-
- if(iLocationQuery)
- {
- iLocationQuery->RemoveObserver(*this);
- iLocationQuery->Cancel();
- delete iLocationQuery;
- iLocationQuery = NULL;
- }
- // query objects with object definition "Image"
- iLocationQuery = iMdeSession->NewObjectQueryL( defaultNamespaceDef, locObjDef, this );
-
- //Define the result order
- iLocationQuery->AppendOrderRuleL(TMdEOrderRule(cellIdPropDef, ESortAscending));
-
- iLocationQuery->SetResultMode( EQueryResultModeId );
- iLocationQuery->FindL();
-
- LOG("CInternalGeoTagger::GetAllLocationsL ,end");
- }
-
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::GetTagsL()
-// Get tags related to this image/video object
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::GetTagsL( TItemId aImageID )
- {
- LOG("CInternalGeoTagger::GetTagsL ,begin");
- CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
- CMdEObjectDef& tagObjectDef = namespaceDef.GetObjectDefL( Tag::KTagObject );
-
- if(iTagQuery)
- {
- iTagQuery->RemoveObserver(*this);
- iTagQuery->Cancel();
- delete iTagQuery;
- iTagQuery = NULL;
- }
-
- iTagQuery = iMdeSession->NewRelationQueryL( namespaceDef, this );
- User::LeaveIfNull( iTagQuery );
-
- iTagQuery->SetResultMode( EQueryResultModeItem );
-
- // both left and right condition must match
- CMdERelationCondition& filterCond = iTagQuery->Conditions().
- AddRelationConditionL( ERelationConditionSideRight );
-
- // left one must be this image object.
- filterCond.LeftL().AddObjectConditionL( aImageID );
-
- // right one must be tag object
- filterCond.RightL().AddObjectConditionL( tagObjectDef );
-
- iTagQuery->FindL(); // results to a call to HandleQueryCompleted()
- LOG("CInternalGeoTagger::GetTagsL ,end");
- }
-
-#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()
-// --------------------------------------------------------------------------
-//
-
-void CInternalGeoTagger::ConversionCompletedL( const TInt aError,
- TLocality& aPosition )
- {
- LOG1("CInternalGeoTagger::ConversionCompletedL, begin. Error - %d", aError);
- if(aError == KErrNone)
- {
- iLocationData.iPosition.SetCoordinate
- ( 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
- }
- }
- else
- {
- IterateNextLocation(); //Go through next location
- }
- LOG("CInternalGeoTagger::ConversionCompletedL, end");
- }
-
-
-//-----------------------------------------------------------------
-// CInternalGeoTagger::HandleConversionError
-//------------------------------------------------------------------
-//
-void CInternalGeoTagger::HandleConversionError(TInt aError)
- {
- LOG("CInternalGeoTagger::HandleConversionError, begin");
- ARG_USED(aError);
- IterateNextLocation(); //Go through next location
- LOG("CInternalGeoTagger::HandleConversionError, end");
- }
-
-#endif //LOC_GEOTAGGING_CELLID
-
-// --------------------------------------------------------------------------
-// CInternalGeoTagger::PendingGeoTagsL()
-// Is there any untagged photos with location info?.
-// --------------------------------------------------------------------------
-//
-void CInternalGeoTagger::PendingGeoTagsL( TBool aTagInProgress )
- {
- LOG("CInternalGeoTagger::PendingGeoTagsL ,begin");
- iIndex = 0;
- if ( aTagInProgress )
- {
- //Tagging is going through location trail, so photo does not need to do tagging now
- LOG("Geo tagging in progress.\n");
- iObserver->PendingGeoTagReqComplete( KErrInUse );
- }
- else
- {
- if(!iTagPendingHandlerFlag && iIndex <= 0)
- {
- LOG("Processing the request.\n");
- // tag pending request is not going on
- iTagPendingHandlerFlag = ETrue;
- CreateGeoTagsL();
- }
- else
- {
- // req osn progress, don't do anything.
- LOG("Request in progress.\n");
- iObserver->PendingGeoTagReqComplete( KErrInUse );
- }
- }
- 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()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneNetworkInfoV2& CInternalGeoTagger::GetCurrentRegisterNw()
- {
- LOG( "CInternalGeoTagger::GetCurrentRegisterNw ,begin" );
- return iObserver->GetCurrentRegisterNw();
- }
-
-// ----------------------------------------------------------------------------
-// CInternalGeoTagger::IsRegisteredAtHomeNetwork()
-// ----------------------------------------------------------------------------
-TBool CInternalGeoTagger::IsRegisteredAtHomeNetwork()
- {
- LOG( "CInternalGeoTagger::IsRegisteredAtHomeNetwork" );
- return iObserver->IsRegisteredAtHomeNetwork();
- }
-
-// ----------------------------------------------------------------------------
-// CInternalGeoTagger::GetHomeNetworkInfo()
-// ----------------------------------------------------------------------------
-const RMobilePhone::TMobilePhoneNetworkInfoV1&
- CInternalGeoTagger::GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag)
- {
- LOG( "CInternalReverseGeocode::GetHomeNetworkInfo" );
- return iObserver->GetHomeNetworkInfo(aHomeNwInfoAvailableFlag);
- }
-
-#endif //LOC_REVERSEGEOCODE
-
-// End of file
-
--- a/locationmanager/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/group/bld.inf Wed Oct 13 15:02:02 2010 +0300
@@ -14,17 +14,7 @@
* Description: Build information file
*
*/
-#include "../inc/locplatsupport.mmh"
-#ifdef _LOC_GEOTAGGING_CELLID
-#include "../geoconverter/group/bld.inf"
-#endif
-
-#ifdef _LOC_REVERSEGEOCODE
-#include "../tagcreator/group/bld.inf"
-#endif
-
-#include "../geotagger/group/bld.inf"
#include "../locationtrail/group/bld.inf"
#include "../server/group/bld.inf"
#include "../client/group/bld.inf"
--- a/locationmanager/inc/locationmanagerdebug.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/inc/locationmanagerdebug.h Wed Oct 13 15:02:02 2010 +0300
@@ -39,8 +39,6 @@
#define __CLOGGING__
#endif
-// Added to remove compilation warnings.
-#define ARG_USED(a) (void)(a)
// Then actual definitions depending on the
--- a/locationmanager/inc/locationmanagerdefs.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/inc/locationmanagerdefs.h Wed Oct 13 15:02:02 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;
@@ -51,11 +51,7 @@
ELocManTrackLogName,
ELocManRegObserver,
ELocManGetCaptureSetting,
- ELocManCancelTrackLogNotify,
- ELocManTagPending,
- ELocManStartGeoTaging,
- ELocManCancelTagPendingReq,
- ELocManCancelGeoTaggingReq
+ ELocManCancelTrackLogNotify
};
/** Message argument indices */
@@ -66,8 +62,6 @@
EArgumentState
};
-const TInt KLocManagerSessionPriority = 5;
-
#endif // __LOCATIONMANAGERDEFS_H__
// End of file.
--- a/locationmanager/inc/locplatsupport.mmh Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2009-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: Definition file for Location Manager.
-*
-*/
-
-#ifndef __LOCPLATSUPPORT_MMH__
-#define __LOCPLATSUPPORT_MMH__
-
-/*
-* Define this flag when platform supports cellid based location.
-*/
-
-#define _LOC_GEOTAGGING_CELLID
-
-/*
-* Define this flag when platform supports reverse geotagging.
-*/
-#define _LOC_REVERSEGEOCODE
-
-
-#endif // __LOCPLATSUPPORT_MMH__
-
-// End of file.
-
--- a/locationmanager/locationtrail/bwincw/locationtrailwinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/bwincw/locationtrailwinscw.def Wed Oct 13 15:02:02 2010 +0300
@@ -15,7 +15,7 @@
?GetTrackLogName@CTrackLog@@QAEXAAV?$TBuf@$0BAA@@@@Z @ 14 NONAME ; void CTrackLog::GetTrackLogName(class TBuf<256> &)
?IsRecording@CTrackLog@@QAEHXZ @ 15 NONAME ; int CTrackLog::IsRecording(void)
?LocationTrailState@CLocationRecord@@QAEXAAW4TTrailState@RLocationTrail@@@Z @ 16 NONAME ; void CLocationRecord::LocationTrailState(enum RLocationTrail::TTrailState &)
- ?NewL@CLocationRecord@@SAPAV1@AAVMGeoTaggerObserver@@AAVRMobilePhone@@@Z @ 17 NONAME ; class CLocationRecord * CLocationRecord::NewL(class MGeoTaggerObserver &, class RMobilePhone &)
+ ?NewL@CLocationRecord@@SAPAV1@XZ @ 17 NONAME ; class CLocationRecord * CLocationRecord::NewL(void)
?NewL@CNetworkInfo@@SAPAV1@PAVMNetworkInfoObserver@@@Z @ 18 NONAME ; class CNetworkInfo * CNetworkInfo::NewL(class MNetworkInfoObserver *)
?NewL@CPositionInfo@@SAPAV1@PAVMPositionInfoObserver@@@Z @ 19 NONAME ; class CPositionInfo * CPositionInfo::NewL(class MPositionInfoObserver *)
?NewL@CTrackLog@@SAPAV1@XZ @ 20 NONAME ; class CTrackLog * CTrackLog::NewL(void)
@@ -31,12 +31,5 @@
?SetStateToStopping@CLocationRecord@@QAEXXZ @ 30 NONAME ; void CLocationRecord::SetStateToStopping(void)
?LocationSnapshotL@CLocationRecord@@QAEXABI@Z @ 31 NONAME ; void CLocationRecord::LocationSnapshotL(unsigned int const &)
?RemappingNeeded@CLocationRecord@@QAEHXZ @ 32 NONAME ; int CLocationRecord::RemappingNeeded(void)
- ?StartGeoTagging@CLocationRecord@@QAEHW4TConnectionOption@@@Z @ 33 NONAME ; int CLocationRecord::StartGeoTagging(enum TConnectionOption)
- ?StartNwInfoChangeNotifier@CNetworkInfo@@QAEXXZ @ 34 NONAME ; void CNetworkInfo::StartNwInfoChangeNotifier(void)
- ?StopNwInfoChangeNotifier@CNetworkInfo@@QAEXXZ @ 35 NONAME ; void CNetworkInfo::StopNwInfoChangeNotifier(void)
- ?CancelGeoTagging@CLocationRecord@@QAEXXZ @ 36 NONAME ; void CLocationRecord::CancelGeoTagging(void)
- ?TaggingInProgress@CLocationRecord@@QAEHXZ @ 37 NONAME ; int CLocationRecord::TaggingInProgress(void)
- ?MapNetworkInfo@CNetworkInfo@@SAXPAVTNetworkInfoV1@CTelephony@@PAVTMobilePhoneNetworkInfoV2@RMobilePhone@@PAVTMobilePhoneLocationAreaV1@5@@Z @ 38 NONAME ; void CNetworkInfo::MapNetworkInfo(class CTelephony::TNetworkInfoV1 *, class RMobilePhone::TMobilePhoneNetworkInfoV2 *, class RMobilePhone::TMobilePhoneLocationAreaV1 *)
- ?GetCurrentRegisteredNw@CLocationRecord@@QAEAAVTMobilePhoneNetworkInfoV2@RMobilePhone@@XZ @ 39 NONAME ; class RMobilePhone::TMobilePhoneNetworkInfoV2 & CLocationRecord::GetCurrentRegisteredNw(void)
- ?IsLowBattery@CLocationRecord@@QAEHXZ @ 40 NONAME ; int CLocationRecord::IsLowBattery(void)
+ ?IsLowBattery@CLocationRecord@@QAEHXZ @ 33 NONAME ; int CLocationRecord::IsLowBattery(void)
--- a/locationmanager/locationtrail/eabi/locationtrailarm.def Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/eabi/locationtrailarm.def Wed Oct 13 15:02:02 2010 +0300
@@ -10,7 +10,7 @@
_ZN15CLocationRecord18LocationTrailStateERN14RLocationTrail11TTrailStateE @ 9 NONAME
_ZN15CLocationRecord21CancelLocationRequestEv @ 10 NONAME
_E32Dll @ 11 NONAME ABSENT
- _ZN15CLocationRecord4NewLER18MGeoTaggerObserverR12RMobilePhone @ 12 NONAME
+ _ZN15CLocationRecord4NewLEv @ 12 NONAME
_ZN15CLocationRecord4StopEv @ 13 NONAME
_ZN15CLocationRecord6StartLEN14RLocationTrail20TTrailCaptureSettingE @ 14 NONAME
_ZN9CTrackLog11IsRecordingEv @ 15 NONAME
@@ -53,12 +53,5 @@
_ZN9CTrackLogD0Ev @ 52 NONAME
_ZN9CTrackLogD1Ev @ 53 NONAME
_ZN9CTrackLogD2Ev @ 54 NONAME
- _ZN12CNetworkInfo24StopNwInfoChangeNotifierEv @ 55 NONAME
- _ZN12CNetworkInfo25StartNwInfoChangeNotifierEv @ 56 NONAME
- _ZN15CLocationRecord15StartGeoTaggingE17TConnectionOption @ 57 NONAME
- _ZN15CLocationRecord16CancelGeoTaggingEv @ 58 NONAME
- _ZN15CLocationRecord17TaggingInProgressEv @ 59 NONAME
- _ZN12CNetworkInfo14MapNetworkInfoEPN10CTelephony14TNetworkInfoV1EPN12RMobilePhone25TMobilePhoneNetworkInfoV2EPNS3_26TMobilePhoneLocationAreaV1E @ 60 NONAME
- _ZN15CLocationRecord22GetCurrentRegisteredNwEv @ 61 NONAME
- _ZN15CLocationRecord12IsLowBatteryEv @ 62 NONAME
+ _ZN15CLocationRecord12IsLowBatteryEv @ 55 NONAME
--- a/locationmanager/locationtrail/group/locationtrail.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/group/locationtrail.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -17,7 +17,6 @@
#include <platform_paths.hrh>
#include <data_caging_paths.hrh>
-#include "../../inc/locplatsupport.mmh"
VERSION 10.0
TARGET LocationTrail.dll
@@ -29,7 +28,7 @@
#if defined(WINSCW)
deffile ../bwincw/locationtrailwinscw.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/locationtrailarm.def
#endif
nostrictdef
@@ -38,22 +37,6 @@
USERINCLUDE ../../inc
USERINCLUDE ../../../inc
-#ifdef _LOC_REVERSEGEOCODE
-MACRO LOC_REVERSEGEOCODE
-USERINCLUDE ../../tagcreator/inc
-#endif
-
-#ifdef _LOC_GEOTAGGING_CELLID
-MACRO LOC_GEOTAGGING_CELLID
-USERINCLUDE ../../geoconverter/inc
-#endif
-
-SYSTEMINCLUDE /epoc32/include/stdapis
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE /epoc32/include/platform/lbs
-
-MW_LAYER_SYSTEMINCLUDE
-
SOURCEPATH ../src
SOURCE clocationrecord.cpp
SOURCE cnetworkinfo.cpp
@@ -62,34 +45,19 @@
SOURCE cgpxconverterao.cpp
SOURCE locationremappingao.cpp
+MW_LAYER_SYSTEMINCLUDE
+
LIBRARY euser.lib
LIBRARY efsrv.lib
LIBRARY lbs.lib
LIBRARY etel3rdparty.lib
-LIBRARY etel.lib
-LIBRARY etelmm.lib
-LIBRARY mdeclient.lib
+LIBRARY mdeclient.lib
LIBRARY estor.lib
-LIBRARY PlatformEnv.lib
-LIBRARY centralrepository.lib
-LIBRARY ecom.lib
-LIBRARY commsdat.lib
-
-LIBRARY geotagger.lib
-LIBRARY libc.lib
-
-#ifdef _LOC_REVERSEGEOCODE
-LIBRARY tagcreator.lib
-#endif
-
-#ifdef _LOC_GEOTAGGING_CELLID
-LIBRARY geoconverter.lib
-#endif
-
+LIBRARY PlatformEnv.lib
+LIBRARY centralrepository.lib
PAGED
BYTEPAIRCOMPRESSTARGET
OPTION ARMCC -O3 -OTime
-// End of file
-
+
--- a/locationmanager/locationtrail/inc/cgpxconverterao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/inc/cgpxconverterao.h Wed Oct 13 15:02:02 2010 +0300
@@ -100,14 +100,11 @@
/**
* Adds temp-file and possible pre-calculated boundaries
* into processing queue
- * @param aFileName The temp file name
- * @param aBoundaries The pre-calculated boundaries
*/
void AddToQueueL( const TDesC& aFileName, TBoundaries* aBoundaries = NULL );
/**
* Adds observer for GPX file creation notifications
- * @param aObserver The observer that recieves the file creation notifications
*/
void AddObserver( MGpxConversionObserver* aObserver );
@@ -125,13 +122,11 @@
/**
* Set next state for RunL
- * @param aState The next processing state
*/
void SetState( TProcessingState aState );
/**
* Resolve where to save tracklog file
- * aFileName The name of the file
*/
void GetTrackLogPathL( TDes& aFileName );
--- a/locationmanager/locationtrail/inc/clocationrecord.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/inc/clocationrecord.h Wed Oct 13 15:02:02 2010 +0300
@@ -22,11 +22,6 @@
#include <e32property.h>
#include <lbs.h>
-
-#include <etel.h>
-#include <etelmm.h>
-#include <geotagobserver.h>
-
#include "rlocationtrail.h"
#include "locationdatatype.h"
#include "cnetworkinfo.h"
@@ -42,16 +37,6 @@
#include "mdequery.h"
#include "locationremappingao.h"
-#ifdef LOC_GEOTAGGING_CELLID
-#include "cgeoconverter.h"
-#endif
-
-#ifdef LOC_REVERSEGEOCODE
-#include <geotagger.h>
-#include "ctagcreator.h"
-#include <reversegeocoderplugin.h>
-#endif
-
typedef RLocationTrail::TTrailState TLocTrailState;
class CTelephony;
@@ -70,22 +55,11 @@
* This method is used to notify about location trail state changes.
*/
virtual void LocationTrailStateChange() = 0;
-
- /**
- * This method is used to fetch the current location
- * @param aSatelliteInfo The satellite information
- * @param aNetworkInfo The network informatiom
- * @param aError ErrCode if any
- */
+
virtual void CurrentLocation( const TPositionSatelliteInfo& aSatelliteInfo,
const CTelephony::TNetworkInfoV1& aNetworkInfo,
const TInt aError ) = 0;
-
-
- /**
- * This method is used to notify about GPS signal quality changes.
- * @param aSatelliteInfo The satellite information
- */
+
virtual void GPSSignalQualityChanged( const TPositionSatelliteInfo& aSatelliteInfo ) = 0;
/**
@@ -112,21 +86,6 @@
TLocTrailState iTrailState; // Trail state for this item.
};
-/**
-* Location snap shot item class.
-*/
-class TLocationSnapshotItem
- {
- public:
- TLocationData iLocationData; // Location info & network info
- TItemId iObjectId; // current media object id.
- TItemId iLocationId;
- TUint iFlag; //indicator for various scenarios
-#ifdef LOC_REVERSEGEOCODE
- TItemId iCountryTagId;
- TItemId iCityTagId;
-#endif
- };
class MLocationAddObserver
{
public:
@@ -148,21 +107,14 @@
public MNetworkInfoObserver,
public MPositionInfoObserver,
public MMdEQueryObserver
-#ifdef LOC_GEOTAGGING_CELLID
- ,public MGeoConverterObserver
-#endif
-#ifdef LOC_REVERSEGEOCODE
- ,public MReverseGeocodeObserver
-#endif
{
public:
/**
* 2-phased constructor.
- * @param aGeoTaggerObserver The observer that is notified after geotagging
* @since S60 3.1
*/
- IMPORT_C static CLocationRecord* NewL(MGeoTaggerObserver& aGeoTaggerObserver, RMobilePhone& aPhone);
-
+ IMPORT_C static CLocationRecord* NewL();
+
/**
* C++ destructor.
* @since S60 3.1
@@ -243,178 +195,66 @@
/**
* Set observer (TrackLog) for notifying new locations in location trail
- * @param aObserver, An observer for location changes
*/
IMPORT_C void SetAddObserver( MLocationAddObserver* aObserver );
-
-
- /**
- * Update network information
- *
- */
+
static TInt UpdateNetworkInfo( TAny* aAny );
-
- /*
- * creates a location object from the given location data and objectId
- * @param aLocationData the location data
- * @param aObjectId the object Id
- */
IMPORT_C void CreateLocationObjectL( const TLocationData& aLocationData,
const TUint& aObjectId );
-
-
- /**
- * Handle the photos taken by phone camera.
- * @param aObjectId Object id
- */
+
IMPORT_C void LocationSnapshotL( const TUint& aObjectId );
-
- /**
- * Creates a location object with given location data
- * @param aLocationData The location data
- * @return The locationId
- */
+
TItemId DoCreateLocationL( const TLocationData& aLocationData );
-
- /**
- * Creates a "contains" relation for the given ObjectId and LocationId and adds it to the iMdeSession
- * @param aObjectId Object id
- * @param aLocationId location id
- * @return item id
- */
+
TItemId CreateRelationL( const TUint& aObjectId, const TUint& aLocationId );
- /**
- * Sets the CMdESession for tagcreation
- * @param aSession The CMdESession object
- */
+
IMPORT_C void SetMdeSession( CMdESession* aSession );
- /**
- * Sets the current location trail state to Stop
- */
IMPORT_C void SetStateToStopping();
- /**
- * returns the timevalue of the CMdEObject corresponding to a given ObjectId
- * @param aObjectId the objectId
- * @return the timevalue associated with given object
- */
TTime GetMdeObjectTimeL( TItemId aObjectId );
-
- /**
- * Checks if Remapping is needed
- * @return Boolean to indicate if remapping is needed or not
- */
+
IMPORT_C TBool RemappingNeeded();
-
-
+
IMPORT_C TBool IsLowBattery();
- /**
- * Checks if geotagging is in progress
- * @return Boolean to indicate if geotagging is in progress
- */
- IMPORT_C TBool TaggingInProgress();
-
-
- /**
- * Initiates geotagging
- * @param aConnectionOption connection option,silent or not
- * @return Etrue if geotagging is started
- */
- IMPORT_C TBool StartGeoTagging(const TConnectionOption aConnectionOption);
-
- /**
- * Cancels the geotagging
- */
- IMPORT_C void CancelGeoTagging();
-
public: // from MNetworkInfoObserver.
/**
*
- * NetworkInfo
- * This method is used for setting the network cell id to the
* @since S60 3.1
- * @param aNetworkInfo N/W info
- * @param aError Error code
+ * @param
+ * @return
*/
void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, TInt aError );
-
- /**
- * Get mobile phone object for network info object
- * @return mobile phone object
- */
- RMobilePhone& GetMobilePhone4NwInfo();
public: // from MPositionInfoObserver
/**
- * This method is used for setting the position info to the
- * location trail.
+ *
* @since S60 3.1
- * @param aPositionInfo the position information
- * @param aError Captures the errcode if any
+ * @param
+ * @return
*/
void Position( const TPositionInfo& aPositionInfo, const TInt aError );
public: // From MMdEQueryObserver
- /**
- * Handle query new results
- * @param aQuery Query object
- * @param aFirstNewItemIndex new item index
- * @param aNewItemCount item count
- */
void HandleQueryNewResults(CMdEQuery& aQuery, TInt aFirstNewItemIndex,
TInt aNewItemCount);
-
-
- /*
- * This method is called when any of the location/image/tag query is completed
- * @param aQuery The Query type
- * @param aError Indicates if the query was completed successfully or with any err
- *
- */
+
void HandleQueryCompleted(CMdEQuery& aQuery, TInt aError);
-
-#ifdef LOC_GEOTAGGING_CELLID
-public: // MGeoConverterObserver
- /**
- * This method is used for notifying completion of geotagging
- * @param aError error code
- * @param aPosition position (lat/lon) for the correcponding n/w info
- */
- void ConversionCompletedL( const TInt aError, TLocality& aPosition );
-
- /**
- * This method is used to handle the conversion error
- * @param aError the error code
- */
- void HandleConversionError(TInt aError);
-#endif
-public:
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- IMPORT_C RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisteredNw();
-
-
-private:
+private:
/**
* Stores the location info into the array.
- * @param aSatelliteInfo Satellite information
*/
- void StoreLocation( const TPositionSatelliteInfo& aSatelliteInfo );
+ void StoreLocation( /*const TPosition& aPosition, const TCourse& aCourse,*/
+ const TPositionSatelliteInfo& aSatelliteInfo );
/**
* Changes the current state. New state is published in P&S and
* possible observer is notified.
- * @param aState The location trail state that is to be set
*/
void SetCurrentState( TLocTrailState aState );
@@ -422,18 +262,15 @@
* Returns the requested location via callback method, if the location
* is valid. Otherwise new location value is requested until the value
* is succesful, or the time out limit has been reached.
- * @param aSatelliteInfo The satelliteInfo object
- * @param aError Indicates any error in handling the location request
*
*/
void HandleLocationRequest( const TPositionSatelliteInfo& aSatelliteInfo /*TLocality& aPosition*/,
const TInt aError );
/**
* C++ constructor.
- * @param aGeoTaggerObserver The observer that is to be notified when geotagging completes
*/
- CLocationRecord(MGeoTaggerObserver& aGeoTaggerObserver, RMobilePhone& aPhone);
-
+ CLocationRecord();
+
/**
* 2nd phase constructor.
*/
@@ -445,157 +282,12 @@
* @param aValue, Read value
*/
void ReadCenRepValueL(TInt aKey, TInt& aValue);
-
- /**
- * Validates the lat lon values recieved
- * @param aSatelliteInfo The satelliteInfo object
- * @return ETrue if the lat=lon are valid
- */
+
TBool CheckGPSFix( const TPositionSatelliteInfo& aSatelliteInfo );
-
-
- /**
- * Starts the network info timer
- */
+
void StartTimerL();
-
- /**
- * Fetches the location info from the db
- */
-
- void FindLocationFromDBL();
-
-
- /**
- * Find location entry
- * @param aQuery query type for the tag
- * @param aLocationId Location Id
- */
- void FindAnyLocationMatchesL( CMdEQuery& aQuery, TUint& aLocationId );
-
- /**
- * Remaps the location objects when GPS is available
- * @param aGPSInfoAvailable Boolean value to indicate if GPS is available
- */
- void RemapObjectsL( TBool aGPSInfoAvailable );
-
- /**
- * Check any location object already exists with same network info
- */
- void FindLocationWithSameNetInfoL();
-
- /**
- * Initialises the location object definitions
- */
- void InitialiseL();
-
- /**
- * handle network location related query on complete
- * @param aQuery the query type
- */
- void HandleNetLocationQueryL( CMdEQuery& aQuery );
-
-
- /**
- * handle the location query on location query complete
- * @param aQuery the query type
- */
- void HandleLocationQueryL( CMdEQuery& aQuery );
-
- /**
- * Callback method on geotagging complete
- */
- void GeoTaggingCompleted();
-
-#ifdef LOC_REVERSEGEOCODE
- /**
- * Get any imagefor this location object
- * @param aLocID, location object Id
- */
- void GetRelatedImageL( TItemId aLocID );
-
- /**
- * Get tags for this image
- * @param aImageID, image object Id
- */
- void GetTagsL( TItemId aImageID );
-
- /**
- * handle the tag query on complete
- * @param aQuery the query type
- */
- void HandleTagQueryL( CMdEQuery& aQuery );
-
-
- // MReverseGeocodeObserver
- //from reverse-geocode observer
- /*
- * Call back method from reverse geo coder with address details like country, city..
- * @param aErrorcode Indicates any error in Reverse geocoding
- * aAddressInfo address info
- */
- void ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo );
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
-
- /*
- * 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);
-
- /**
- * Find country & city tags id
- * @param aQuery query type for the tag
- * @param aCountryTagId country tag Id
- * @param aCityTagId city tag Id
- */
- void FindCountryAndCityTagL( CMdEQuery& aQuery, TItemId& aCountryTagId, TItemId& aCityTagId );
-
-#endif // LOC_REVERSEGEOCODE
-
- /**
- * Handle n/w related information on taken photograph
- *
- */
- void NetworkInfoSnapshotL();
-
- /**
- * Find location from DB within the non leaving method
- */
- void HandleFindLocationFromDB();
-
- /**
- * handle MDS query failure sceenario
- */
- void HandleQueryFailure();
-
-
private:
- enum TRemapState
- {
- ERemapProgressNone = 0x00,
- ERemapRevGeoCodeInProgress,
- ERemapRevGeoCodePending,
- ERemapNwGeoConverterInProgress,
- ERemapNwGeoConverterPending
- };
/**
* A session to Metadata Engine for creating and manipulating location objects.
*/
@@ -617,7 +309,7 @@
* An array to collect location values.
* Own.
*/
- RPointerArray<TLocationTrailItem> iTrail;
+ RArray<TLocationTrailItem> iTrail;
/**
* P&S key property.
@@ -629,7 +321,7 @@
* Active class to get network information.
* Own.
*/
- CNetworkInfo* iNetworkInfoChangeListener;
+ CNetworkInfo* iNetworkInfo;
/**
* Active class to get position information.
@@ -665,10 +357,14 @@
TBool iRequestCurrentLoc;
TBool iTrailStarted;
+ TUint iLastNumberOfSatellitesUsed;
+ TReal32 iLastHDOP;
+ TReal32 iLastVDOP;
TBool iLastGPSFixState;
TInt iLocationDelta;
TLocationData iLastLocation;
+ TItemId iLastLocationId;
TItemId iObjectId;
TLocationData iLocationData;
@@ -677,82 +373,6 @@
* This query object is used to find existing locations
*/
CMdEObjectQuery* iLocationQuery;
-
-
- /**
- * Net location query
- */
- CMdEObjectQuery* iNetLocationQuery;
-
-
- TRemapState iRemapState;
-
-
- /**
- * Database definitions.
- */
- CMdENamespaceDef* iNamespaceDef;
- CMdEObjectDef* iLocationObjectDef;
- CMdEPropertyDef* iLatitudeDef;
- CMdEPropertyDef* iLongitudeDef;
- CMdEPropertyDef* iAltitudeDef;
-
- /**
- * An array to collect downloaded object
- * and its location details.
- */
- RPointerArray<TLocationSnapshotItem> iMediaItems;
-
- TLocationSnapshotItem iLastMediaItem;
-
- TInt iMediaHandlingFlag;
- RMobilePhone& iPhone;
-
- /*
- * Flag to track GPS data availability to update camera location icon.
- */
- TBool iGpsDataAvailableFlag;
-
- MGeoTaggerObserver& iGeoTaggerObserver;
-
-#ifdef LOC_GEOTAGGING_CELLID
- /*
- * Geo converter
- */
- CGeoConverter* iGeoConverter;
- TBool iConvertRetry;
-#endif
-
-#ifdef LOC_REVERSEGEOCODE
-
- TConnectionOption iConnectionOption;
-
- /**
- * query object for getting an image/video object
- */
- CMdERelationQuery* iImageQuery;
- /**
- * query object for getting country and city tags
- */
- CMdERelationQuery* iTagQuery;
- TLocationSnapshotItem iLastLocationItem;
- RPointerArray<TLocationSnapshotItem> iLocationItems;
- /**
- * to create/attach tags
- */
- CTagCreator *iTagCreator;
- /*
- * Flag to track last reverse geocode failure sceenario
- */
- TBool iLastReverseGeocodeFails;
-
- /*
- * Reverse geo coder plugin object
- */
- CReverseGeoCoderPlugin* iRevGeocoderPlugin;
-
-#endif
-
};
#endif // C_CLOCATIONRECORD_H
--- a/locationmanager/locationtrail/inc/cnetworkinfo.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/inc/cnetworkinfo.h Wed Oct 13 15:02:02 2010 +0300
@@ -20,8 +20,6 @@
#define C_CNETWORKINFO_H
#include <etel3rdparty.h>
-#include <etel.h>
-#include <etelmm.h>
/**
* An observer interface, which is used for getting current network cell id.
@@ -36,12 +34,6 @@
* location trail.
*/
virtual void NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo, const TInt aError ) = 0;
-
- /**
- * Get mobile phone object for network info object
- * @return mobile phone object
- */
- virtual RMobilePhone& GetMobilePhone4NwInfo() = 0;
};
/**
@@ -63,33 +55,6 @@
*/
IMPORT_C virtual ~CNetworkInfo();
- /**
- * Listen to n/w info change
- * @since S60 9.2
- */
- IMPORT_C void StartNwInfoChangeNotifier();
-
- /**
- * Stop n/w info change listener
- * @since S60 9.2
- */
- IMPORT_C void StopNwInfoChangeNotifier();
-
- /**
- * Map etel to ctelephony
- * @since S60 9.2
- */
- IMPORT_C static void MapNetworkInfo(CTelephony::TNetworkInfoV1* aISVNetworkInfo,
- RMobilePhone::TMobilePhoneNetworkInfoV2* aMMNetworkInfo,
- RMobilePhone::TMobilePhoneLocationAreaV1* aMMArea);
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
-
protected:
/**
* Run error implementation in case of RunL leaving.
@@ -120,13 +85,6 @@
void RunL();
private:
- typedef enum
- {
- ENetworkInfoNoOptState = 0x00,
- ENetworkInfoOptGetState,
- ENetworkInfoOptNotifyState
- }TNetworkInfoOptState;
-
/**
* An observer interface to set current cell id to the location trail.
* Not own.
@@ -134,23 +92,18 @@
MNetworkInfoObserver* iTrail;
/**
- * phone object to retrieve modem parameters
- */
- RMobilePhone& iMobilePhone;
-
- /**
- * Maintain the operation state.
+ * Flag to indicate that we retrieve network info for the first time.
*/
- TNetworkInfoOptState iState;
-
- /*
- * Retained this object just to give backward compatibility
- */
+ TBool iFirstTime;
+
+ /**
+ * Interface to phone's telephony system to get Cell Id.
+ * Own.
+ */
+ CTelephony* iTelephony;
+
CTelephony::TNetworkInfoV1 iNetworkInfoV1;
-
- RMobilePhone::TMobilePhoneNetworkInfoV2 iMMNetworkInfo;
- RMobilePhone::TMobilePhoneNetworkInfoV2Pckg iMMNetworkInfoPckg;
- RMobilePhone::TMobilePhoneLocationAreaV1 iMMArea;
+ CTelephony::TNetworkInfoV1Pckg iNetworkInfoV1Pckg;
};
#endif // C_CNETWORKINFO_H
--- a/locationmanager/locationtrail/inc/cpositioninfo.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/inc/cpositioninfo.h Wed Oct 13 15:02:02 2010 +0300
@@ -82,12 +82,7 @@
* @return None.
*/
void Stop();
-
- /**
- * Handle remap completed event
- * @since S60 9.2
- */
- void HandleRemapComplete();
+
protected:
/**
* Run error implementation in case of RunL leaving.
@@ -118,12 +113,6 @@
void RunL();
private:
- typedef enum
- {
- EPositionOptStateNone = 0x00,
- EPositionOptStateGetLastKnownPosition,
- EPositionOptStateNotifyUpdate
- }TPositionOptState;
/**
* An observer interface to set current position to the location trail.
* Not own.
@@ -148,8 +137,7 @@
TInt iUpdateInterval;
- TPositionOptState iState;
- TBool iConnectedPositionServer;
+ TBool iFirstInterval;
};
#endif // C_CPOSITIONINFO_H
--- a/locationmanager/locationtrail/inc/locationremappingao.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/inc/locationremappingao.h Wed Oct 13 15:02:02 2010 +0300
@@ -28,9 +28,7 @@
#include "rlocationtrail.h"
#include "locationmanagerdebug.h"
#include "locationtraildefs.h"
-#ifdef LOC_REVERSEGEOCODE
-#include "ctagcreator.h"
-#endif
+
class TRemapItem
{
@@ -130,19 +128,6 @@
* @param aLocationId, locationId for relations
*/
void UpdateRelationsL( TItemId aLocationId );
-
-#ifdef LOC_REVERSEGEOCODE
- /**
- * AttachGeoTagsL
- * Attaches the country and city tags to all objects
- * @param aTagCreator An instance of the tag creator
- * @param aCountryTagId country tagId
- * @param aCityTagId city tag Id
- */
- void AttachGeoTagsL( CTagCreator *aTagCreator,
- const TItemId aCountryTagId,
- const TItemId aCityTagId );
-#endif
private:
/**
@@ -260,5 +245,3 @@
#endif /*LOCATIONREMAPPINGAO_H_*/
-
-// End of file
--- a/locationmanager/locationtrail/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS LocationTrail</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
Binary file locationmanager/locationtrail/sis/locationtrail_stub.sis has changed
--- a/locationmanager/locationtrail/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/locationtrail/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"locationtrail"}, (0x200071BD), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
--- a/locationmanager/locationtrail/src/cgpxconverterao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/cgpxconverterao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -22,7 +22,6 @@
#include "locationmanagerdebug.h"
// ---------------------------------------------------------------------------
-// CGpxConverterAO::CGpxConverterAO()
// Default constructor.
// ---------------------------------------------------------------------------
//
@@ -33,7 +32,6 @@
}
// ---------------------------------------------------------------------------
-// CGpxConverterAO::NewL
// Standard NewL for first phase construction.
// ---------------------------------------------------------------------------
//
@@ -48,19 +46,18 @@
}
// ---------------------------------------------------------------------------
-// CGpxConverterAO::ConstructL
// 2nd phase construction.
// ---------------------------------------------------------------------------
//
void CGpxConverterAO::ConstructL()
{
- LOG( "CGpxConverterAO::ConstructL ,begin" );
+ LOG( "CGpxConverterAO::ConstructL" );
CActiveScheduler::Add( this );
User::LeaveIfError( iFs.Connect() );
iWriteBuf = HBufC8::NewL( KWriteBufSize );
iFormatBuf = HBufC::NewL( KWriteBufSize );
- LOG( "CGpxConverterAO::ConstructL ,end" );
+
}
// ---------------------------------------------------------------------------
@@ -69,7 +66,7 @@
//
CGpxConverterAO::~CGpxConverterAO()
{
- LOG( "CGpxConverterAO::~CGpxConverterAO ,begin" );
+ LOG( "CGpxConverterAO::~CGpxConverterAO" ); // DEBUG INFO
Cancel();
iFs.Close();
@@ -82,19 +79,13 @@
iBoundQueue.Close();
delete iTempFile;
- iTempFile = NULL;
delete iBoundaries;
- iBoundaries = NULL;
delete iWriteBuf;
- iWriteBuf = NULL;
delete iFormatBuf;
- iFormatBuf = NULL;
- LOG( "CGpxConverterAO::~CGpxConverterAO ,end" );
}
// ---------------------------------------------------------------------------
-// CGpxConverterAO::RunError
// From CActive.
// ---------------------------------------------------------------------------
//
@@ -109,7 +100,6 @@
}
// ---------------------------------------------------------------------------
-// CGpxConverterAO::DoCancel
// From CActive.
// ---------------------------------------------------------------------------
//
@@ -118,15 +108,13 @@
LOG( "CGpxConverterAO::DoCancel" );
}
-// ---------------------------------------------------------------------------
-// CGpxConverterAO::AddToQueueL
-// Adds temp-file and possible pre-calculated boundaries
-// into processing queue
-// ---------------------------------------------------------------------------
-//
+/**
+ * Adds temp-file and possible pre-calculated boundaries
+ * into processing queue
+ */
void CGpxConverterAO::AddToQueueL( const TDesC& aFileName, TBoundaries* aBoundaries )
{
- LOG("CGpxConverterAO::AddToQueueL ,begin");
+ LOG("CGpxConverterAO::AddToQueueL");
TFileName *filename = new (ELeave) TFileName(aFileName);
CleanupStack::PushL( filename );
iFileQueue.AppendL( filename );
@@ -137,15 +125,11 @@
{
SetState( ENextFile );
}
-
- LOG("CGpxConverterAO::AddToQueueL ,end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::SetState
- // Set next state for RunL
- // ---------------------------------------------------------------------------
+/**
+ * Set next state for RunL
+ */
void CGpxConverterAO::SetState( TProcessingState aState )
{
LOG1( "CGpxConverterAO::SetState: %d", aState );
@@ -157,13 +141,11 @@
TRequestStatus* ptrStatus = &iStatus;
User::RequestComplete( ptrStatus, KErrNone );
}
- LOG("CGpxConverterAO::SetState ,end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::RunL()
- // ---------------------------------------------------------------------------
+/**
+ * RunL
+ */
void CGpxConverterAO::RunL()
{
switch( iState )
@@ -182,9 +164,7 @@
TInt err;
iFixLost = ETrue;
delete iTempFile;
- iTempFile = NULL;
delete iBoundaries;
- iBoundaries = NULL;
// get next temp-file from queue
iTempFile = iFileQueue[0];
iBoundaries = iBoundQueue[0];
@@ -330,14 +310,12 @@
}
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::ReadTagIdL
- // Read Tag Id from temp-file
- // ---------------------------------------------------------------------------
+/**
+ * Read Tag Id from temp-file
+ */
void CGpxConverterAO::ReadTagIdL()
{
- LOG("CGpxConverterAO::ReadTagIdL ,begin");
+ LOG("CGpxConverterAO::ReadTagIdL");
TUint32 low( 0 );
TUint32 high( 0 );
@@ -345,15 +323,11 @@
high = iReader.ReadUint32L();
iTagId = MAKE_TINT64( high, low );
-
- LOG("CGpxConverterAO::ReadTagIdL ,end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::CalculateBoundaries
- // Calculate min and max coordinates for tracklog
- // ---------------------------------------------------------------------------
+/**
+ * Calculate min and max coordinates for tracklog
+ */
void CGpxConverterAO::CalculateBoundaries()
{
LOG("CGpxConverterAO::CalculateBoundaries start");
@@ -398,14 +372,11 @@
LOG("CGpxConverterAO::CalculateBoundaries end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::WriteStartingTags
- // Writes header tags for GPX file
- // ---------------------------------------------------------------------------
+/**
+ * Writes header tags for GPX file
+ */
void CGpxConverterAO::WriteStartingTags()
{
- LOG("CGpxConverterAO::WriteStartingTags ,begin");
TPtr8 writePtr = iWriteBuf->Des();
TPtr formatter = iFormatBuf->Des();
@@ -440,17 +411,13 @@
writePtr.Copy( KTagTrackStart );
iGpxFile.Write( writePtr );
- LOG("CGpxConverterAO::WriteStartingTags ,end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::WriteItemToFile
- // Writes single trackpoint to GPX file
- // ---------------------------------------------------------------------------
+/**
+ * Writes single trackpoint to GPX file
+ */
void CGpxConverterAO::WriteItemToFile()
{
- LOG("CGpxConverterAO::WriteItemToFile ,begin");
TTime timeStamp;
TPtr8 writePtr = iWriteBuf->Des();
@@ -536,16 +503,14 @@
writePtr.Copy( KTagTrkPointEnd );
iGpxFile.Write( writePtr );
}
- LOG("CGpxConverterAO::WriteItemToFile ,end");
+
}
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::WriteClosingTags
- // Close GPX file
- // ---------------------------------------------------------------------------
+/**
+ * Close GPX file
+ */
void CGpxConverterAO::WriteClosingTags()
{
- LOG("CGpxConverterAO::WriteClosingTags ,begin");
TPtr8 writePtr = iWriteBuf->Des();
// end segment
@@ -560,14 +525,11 @@
writePtr.Append( KTagGpxEnd );
iGpxFile.Write( writePtr );
- LOG("CGpxConverterAO::WriteClosingTags ,end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::GetTrackLogPathL
- // Resolve where to save tracklog file
- // ---------------------------------------------------------------------------
+/**
+ * Resolve where to save tracklog file
+ */
void CGpxConverterAO::GetTrackLogPathL( TDes& aFileName )
{
LOG("CGpxConverterAO::GetTrackLogPathL start");
@@ -598,15 +560,11 @@
LOG("CGpxConverterAO::GetTrackLogPathL end");
}
-
- // ---------------------------------------------------------------------------
- // CGpxConverterAO::AddObserver
- // Adds observer for GPX file creation notifications
- // ---------------------------------------------------------------------------
+/**
+ * Adds observer for GPX file creation notifications
+ */
void CGpxConverterAO::AddObserver( MGpxConversionObserver* aObserver )
{
iObservers.Append( aObserver );
}
-
-//End of File
--- a/locationmanager/locationtrail/src/clocationrecord.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/clocationrecord.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -18,12 +18,6 @@
#include <e32cmn.h>
#include <lbserrors.h>
#include <lbssatellite.h>
-#include <ecom.h>
-#include <centralrepository.h>
-#include <hwrmpowerstatesdkpskeys.h>
-#ifdef LOC_GEOTAGGING_CELLID
-#include <lbslocationinfo.h>
-#endif //LOC_GEOTAGGING_CELLID
#include "rlocationtrail.h"
#include "clocationrecord.h"
@@ -32,47 +26,30 @@
#include "locationtraildefs.h"
#include "locationtrailpskeys.h"
#include "mdeconstants.h"
-
+#include <centralrepository.h>
+#include <hwrmpowerstatesdkpskeys.h>
using namespace MdeConstants;
-const TUint KNetQueryBit = 1; // 1 bit
-const TUint KDownloadMediaFile = 2; // 2 bit
-const TUint KSnapMediaFile = 4; // 3 bit
-const TUint KLocationQueryInProgress = 1; // 1 bit
-#ifdef LOC_REVERSEGEOCODE
-const TUint KReverseGeoCodingInProgress = 2; // 2 bit
-_LIT ( KCountry, "country:"); // country:india
-_LIT ( KCity, "city:"); // city:bangalore|country:india
-#endif
-const TUint KSnapGeoConvertInProgress = 4; // 3 bit
-#ifdef LOC_GEOTAGGING_CELLID
-const TUint KSnapGeoConvertInPendingState = 8; // 4 bit
-#endif
-
-
-
// --------------------------------------------------------------------------
// CLocationRecord::NewL
// --------------------------------------------------------------------------
//
-EXPORT_C CLocationRecord* CLocationRecord::NewL(MGeoTaggerObserver& aGeoTaggerObserver,
- RMobilePhone& aPhone)
+EXPORT_C CLocationRecord* CLocationRecord::NewL()
{
- CLocationRecord* self = new (ELeave) CLocationRecord(aGeoTaggerObserver, aPhone);
+ CLocationRecord* self = new (ELeave) CLocationRecord();
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
return self;
}
-
+
// --------------------------------------------------------------------------
// CLocationRecord::CLocationRecord
// --------------------------------------------------------------------------
//
-CLocationRecord::CLocationRecord(MGeoTaggerObserver& aGeoTaggerObserver,
- RMobilePhone& aPhone)
+CLocationRecord::CLocationRecord()
: iNetworkInfoTimer( NULL ),
iState( RLocationTrail::ETrailStopped ),
iTrailCaptureSetting( RLocationTrail::ECaptureAll ),
@@ -80,30 +57,7 @@
iRequestCurrentLoc( EFalse ),
iTrailStarted( EFalse ),
iLastGPSFixState( EFalse ),
- iLocationQuery(NULL),
- iNetLocationQuery(NULL),
- iRemapState( ERemapProgressNone),
- iNamespaceDef(NULL),
- iLocationObjectDef(NULL),
- iLatitudeDef(NULL),
- iLongitudeDef(NULL),
- iAltitudeDef(NULL),
- iMediaHandlingFlag(0),
- iPhone(aPhone),
- iGpsDataAvailableFlag(EFalse),
- iGeoTaggerObserver(aGeoTaggerObserver)
-#ifdef LOC_GEOTAGGING_CELLID
- ,iGeoConverter(NULL)
- , iConvertRetry(ETrue)
-#endif
-#ifdef LOC_REVERSEGEOCODE
- ,iConnectionOption(ESilent)
- ,iImageQuery(NULL)
- ,iTagQuery(NULL)
- ,iTagCreator( NULL )
- ,iLastReverseGeocodeFails(EFalse)
- ,iRevGeocoderPlugin( NULL )
-#endif
+ iLastLocationId( 0 )
{
iMaxTrailSize = KMaxTrailLength / KUpdateInterval;
}
@@ -114,7 +68,6 @@
//
void CLocationRecord::ConstructL()
{
- LOG( "CLocationRecord::ConstructL(), begin" );
const TInt KMillion = 1000000;
TInt err = iProperty.Define( KPSUidLocationTrail, KLocationTrailState, RProperty::EInt );
if ( err != KErrNone && err != KErrAlreadyExists )
@@ -124,32 +77,18 @@
User::LeaveIfError( iProperty.Set( KPSUidLocationTrail,
KLocationTrailState, (TInt) RLocationTrail::ETrailStopped ) );
-
- iNetworkInfoChangeListener = CNetworkInfo::NewL( this );
+ iNetworkInfo = CNetworkInfo::NewL( this );
iPositionInfo = CPositionInfo::NewL( this );
iRemapper = CLocationRemappingAO::NewL();
iNetworkInfoTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-
-#ifdef LOC_REVERSEGEOCODE
- iTagCreator = CTagCreator::NewL();
-
- TInt pluginerr = KErrNone;
- TRAP(pluginerr,iRevGeocoderPlugin = CReverseGeoCoderPlugin::NewL());
-
- if(pluginerr == KErrNone)
- {
- iRevGeocoderPlugin->AddObserverL(*this);
- }
- #endif
-
-
+
TInt interval( 0 );
TRAP(err, ReadCenRepValueL(KIntervalKey, interval));
- LOG1("Cenrep interval value:%d", interval);
+ LOG1("CLocationManagerServer::ConstructL, cenrep interval value:%d", interval);
if (interval == 0 || err != KErrNone )
{
- LOG1("Cenrep interval err:%d", err);
+ LOG1("CLocationManagerServer::ConstructL, cenrep interval err:%d", err);
iInterval = KUpdateInterval;
}
else
@@ -158,25 +97,14 @@
}
TRAP(err, ReadCenRepValueL(KLocationDeltaKey, iLocationDelta));
- LOG1("Location delta value:%d", iLocationDelta);
+ LOG1("CLocationManagerServer::ConstructL, location delta value:%d", iLocationDelta);
if (iLocationDelta == 0)
{
- LOG1("Location delta err:%d", err);
+ LOG1("CLocationManagerServer::ConstructL, location delta err:%d", err);
iLocationDelta = KLocationDelta;
}
- iLastMediaItem.iFlag = 0;
- iLastMediaItem.iLocationId = 0;
-#ifdef LOC_REVERSEGEOCODE
- iLastMediaItem.iCityTagId= 0;
- iLastMediaItem.iCountryTagId = 0;
- iLastLocationItem.iFlag = 0;
- iLastLocationItem.iCityTagId= 0;
- iLastLocationItem.iCountryTagId = 0;
- iLastLocationItem.iLocationId = 0;
-#endif
- LOG( "CLocationRecord::ConstructL(), end" );
}
// --------------------------------------------------------------------------
@@ -185,75 +113,19 @@
//
EXPORT_C CLocationRecord::~CLocationRecord()
{
- LOG( "CLocationRecord::~CLocationRecord(), begin" );
Stop();
iProperty.Delete( KPSUidLocationTrail, KLocationTrailState );
iProperty.Close();
- iTrail.ResetAndDestroy();
iTrail.Close();
- iMediaItems.ResetAndDestroy();
- iMediaItems.Close();
-#ifdef LOC_REVERSEGEOCODE
- iLocationItems.ResetAndDestroy();
- iLocationItems.Close();
-#endif
- delete iNetworkInfoChangeListener;
- iNetworkInfoChangeListener = NULL;
+
+ delete iNetworkInfo;
delete iPositionInfo;
- iPositionInfo = NULL;
delete iNetworkInfoTimer;
- iNetworkInfoTimer = NULL;
-#ifdef LOC_GEOTAGGING_CELLID
- if(iGeoConverter)
- {
- delete iGeoConverter;
- iGeoConverter = NULL;
- }
-#endif
- if (iRemapper)
+ if (iRemapper)
{
iRemapper->StopRemapping();
delete iRemapper;
- iRemapper = NULL;
}
- if(iLocationQuery)
- {
- iLocationQuery->RemoveObserver(*this);
- iLocationQuery->Cancel();
- delete iLocationQuery;
- iLocationQuery = NULL;
- }
-
-if(iNetLocationQuery)
- {
- iNetLocationQuery->RemoveObserver(*this);
- iNetLocationQuery->Cancel();
- delete iNetLocationQuery;
- iNetLocationQuery = NULL;
- }
-
-
-#ifdef LOC_REVERSEGEOCODE
- if(iImageQuery)
- {
- iImageQuery->RemoveObserver(*this);
- iImageQuery->Cancel();
- delete iImageQuery;
- iImageQuery = NULL;
- }
- if(iTagQuery)
- {
- iTagQuery->RemoveObserver(*this);
- iTagQuery->Cancel();
- delete iTagQuery;
- iTagQuery = NULL;
- }
- delete iTagCreator;
- // set the pointer to NULL, ECOM will destroy object.
- delete iRevGeocoderPlugin;
- iRevGeocoderPlugin = NULL;
-#endif
- LOG( "CLocationRecord::~CLocationRecord(), end" );
}
// --------------------------------------------------------------------------
@@ -273,17 +145,12 @@
{
LOG( "CLocationRecord::StartL(), begin" );
iTrailCaptureSetting = aCaptureSetting;
- iGpsDataAvailableFlag = EFalse;
if ( aCaptureSetting == RLocationTrail::ECaptureAll && !iPositionInfo->IsActive() )
{
if( iState == RLocationTrail::ETrailStopped )
{
- iTrail.ResetAndDestroy();
+ iTrail.Reset();
}
- // Capture at least one location with n/w info else we wouldn't be able to tag the immediate taken photograph
- // incase LBS didn't provide any valid position data. Without this there may be a leave from GetLocationByTimeL
- // method while calling this from LocationSnapshotL method
- UpdateNetworkInfo( this );
iPositionInfo->StartL( aCaptureSetting, iInterval );
}
else if ( aCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
@@ -300,9 +167,11 @@
StartTimerL();
}
- iTrailStarted = ETrue;
+ iLastLocationId = 0;
+
SetCurrentState( RLocationTrail::ETrailStarting );
+ iTrailStarted = ETrue;
LOG( "CLocationRecord::StartL(), end" );
}
@@ -314,8 +183,8 @@
{
LOG( "CLocationRecord::StopL(), begin" );
iPositionInfo->Stop();
- iGpsDataAvailableFlag = EFalse;
iTrailStarted = EFalse;
+
if ( iNetworkInfoTimer && iNetworkInfoTimer->IsActive() )
{
iNetworkInfoTimer->Cancel();
@@ -362,14 +231,14 @@
TTimeIntervalSeconds nextInterval;
for ( TInt i(iTrail.Count()-1) ; i >= 0 && !posFound ; i-- )
{
- TInt err = iTrail[i]->iTimeStamp.SecondsFrom( aTime, interval );
+ TInt err = iTrail[i].iTimeStamp.SecondsFrom( aTime, interval );
TInt timeDiff = Abs( interval.Int() );
#ifdef _DEBUG
- LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %Ld", iTrail[i]->iTimeStamp.Int64() );
+ LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %Ld", iTrail[i].iTimeStamp.Int64() );
TBuf<DateTimeStrMaxLength> str;
- iTrail[i]->iTimeStamp.FormatL( str, KDateTimeFormat );
+ iTrail[i].iTimeStamp.FormatL( str, KDateTimeFormat );
LOG1( "CLocationRecord::GetLocationByTimeL - Trail timestamp: %S", &str );
LOG1( "CLocationRecord::GetLocationByTimeL - timeDiff: %d", timeDiff );
#endif
@@ -379,25 +248,25 @@
// The nearest time is in iTrail[i] or in iTrail[i-1].
if ( i > 0 )
{
- iTrail[i-1]->iTimeStamp.SecondsFrom( aTime, nextInterval );
+ iTrail[i-1].iTimeStamp.SecondsFrom( aTime, nextInterval );
TInt nextDiff = Abs( nextInterval.Int() );
if ( nextDiff < timeDiff )
{
- aLocationData = iTrail[i-1]->iLocationData;
- aState = iTrail[i-1]->iTrailState;
+ aLocationData = iTrail[i-1].iLocationData;
+ aState = iTrail[i-1].iTrailState;
}
else
{
- aLocationData = iTrail[i]->iLocationData;
- aState = iTrail[i]->iTrailState;
+ aLocationData = iTrail[i].iLocationData;
+ aState = iTrail[i].iTrailState;
}
}
else
{
- aLocationData = iTrail[i]->iLocationData;
- aState = iTrail[i]->iTrailState;
+ aLocationData = iTrail[i].iLocationData;
+ aState = iTrail[i].iTrailState;
}
posFound = ETrue;
}
@@ -415,15 +284,11 @@
//
EXPORT_C void CLocationRecord::RequestLocationL()
{
- LOG( "CLocationRecord::RequestLocationL(), begin" );
iRequestCurrentLoc = ETrue;
if ( iTrailCaptureSetting != RLocationTrail::ECaptureNetworkInfo &&
!iPositionInfo->IsActive() )
{
iPositionInfo->StartL( iTrailCaptureSetting, iInterval );
- SetCurrentState( RLocationTrail::ETrailStarting );
-
- iTrailStarted = ETrue;
}
else if ( iTrailCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
{
@@ -433,7 +298,6 @@
iObserver->CurrentLocation( posInfo, network, KErrNone );
iRequestCurrentLoc = EFalse;
}
- LOG( "CLocationRecord::RequestLocationL(), end" );
}
// --------------------------------------------------------------------------
@@ -442,14 +306,11 @@
//
EXPORT_C void CLocationRecord::CancelLocationRequest()
{
- LOG( "CLocationRecord::CancelLocationRequest(), begin" );
iRequestCurrentLoc = EFalse;
if ( !iTrailStarted )
{
- iGpsDataAvailableFlag = EFalse;
iPositionInfo->Stop();
}
- LOG( "CLocationRecord::CancelLocationRequest(), end" );
}
@@ -490,7 +351,6 @@
void CLocationRecord::Position( const TPositionInfo& aPositionInfo,
const TInt aError )
{
- LOG( "CLocationRecord::Position(), begin" );
const TPositionSatelliteInfo& positionSatelliteInfo =
static_cast<const TPositionSatelliteInfo&>(aPositionInfo);
@@ -498,59 +358,56 @@
{
HandleLocationRequest( positionSatelliteInfo, aError );
}
-
- iGpsDataAvailableFlag = EFalse;
+ if( iState == RLocationTrail::ETrailStopped )
+ {
+ LOG("CLocationRecord::Position - trail stopped");
+ return;
+ }
- if ( !iTrailStarted || iState == RLocationTrail::ETrailStopped)
+ if ( !iTrailStarted )
{
- LOG("CLocationRecord::Position(), trail not started/stopped");
- iPositionInfo->Stop();
+ iPositionInfo->NextPosition();
return;
}
- // all cases store the location..
- StoreLocation( positionSatelliteInfo );
-
- if ( RemappingNeeded() )
- {
- //either network or gps signal is available
- if ( ( iNetwork.iCellId != 0 &&
- iNetwork.iCountryCode.Length() != 0 &&
- iNetwork.iNetworkId.Length() != 0 ) || ( aError == KErrNone ) )
- {
- //no error means gps info available
- TRAP_IGNORE( RemapObjectsL( aError == KErrNone ) );
- }
- }
switch ( aError )
{
case KPositionPartialUpdate: // fall through
case KPositionQualityLoss:
{
// Location is stored, even if it may not be valid.
- LOG("CLocationRecord::Position(), Partial update");
+ StoreLocation( positionSatelliteInfo );
+ LOG("CLocationRecord::Position - partial update");
if ( iState != RLocationTrail::EWaitingGPSData &&
iState != RLocationTrail::ETrailStopping )
{
SetCurrentState( RLocationTrail::EWaitingGPSData );
- LOG("CLocationRecord::Position(), Trail waiting for gps");
+ LOG("CLocationRecord::Position trail waiting for gps");
}
break;
}
case KErrNone:
{
- LOG("CLocationRecord::Position(), Good GPS coordinates");
- iGpsDataAvailableFlag = ETrue;
+ StoreLocation( positionSatelliteInfo );
+ LOG("CLocationRecord::Position - good GPS coordinates");
if ( iState != RLocationTrail::ETrailStarted )
{
if ( iRemapper )
{
- LOG("CLocationRecord::Position(), Start remapping");
+ LOG("CLocationRecord::Position start remapping");
+ iLastLocationId = 0;
+ TBool createLocation = iRemapper->CheckQueue();
+ if( createLocation )
+ {
+ TRAP_IGNORE(
+ TItemId locationId = DoCreateLocationL( iNewItem.iLocationData );
+ iRemapper->UpdateRelationsL( locationId );
+ )
+ }
iRemapper->StartRemappingObjects( iNewItem.iLocationData );
if( iObserver->WaitForPositioningStopTimeout() && !RemappingNeeded() )
{
iObserver->RemapedCompleted();
- iPositionInfo->HandleRemapComplete();
return;
}
@@ -558,135 +415,47 @@
if ( iState != RLocationTrail::ETrailStopping )
{
SetCurrentState( RLocationTrail::ETrailStarted );
- LOG("Trail started");
+ LOG("CLocationRecord::Position trail started");
}
}
break;
}
default:
{
- LOG1("CLocationRecord::Position(), Searching GPS, aError %d", aError );
+ StoreLocation( positionSatelliteInfo );
+ LOG1("CLocationRecord::Position - searching GPS, aError %d", aError );
if ( iState != RLocationTrail::ESearchingGPS &&
iState != RLocationTrail::ETrailStopping )
{
SetCurrentState( RLocationTrail::ESearchingGPS );
- LOG("Trail searching gps");
+ LOG("CLocationRecord::Position trail searching gps");
}
break;
}
}
TBool fixState = CheckGPSFix( positionSatelliteInfo );
- LOG1( "CLocationRecord::Position(), fixState %d", fixState );
- LOG1( "CLocationRecord::Position(), iLastGPSFixState %d", iLastGPSFixState );
+ LOG1( "CLocationRecord::Position fixState %d", fixState );
+ LOG1( "CLocationRecord::Position iLastGPSFixState %d", iLastGPSFixState );
if ( iObserver && iLastGPSFixState != fixState )
{
- LOG("CLocationRecord::Position(), Quality changed");
+ LOG("CLocationRecord::Position quality changed");
iObserver->GPSSignalQualityChanged( positionSatelliteInfo );
}
iLastGPSFixState = fixState;
- LOG( "CLocationRecord::Position(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::RemapObjectsL
-// Remaps the location objects when GPS is available
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::RemapObjectsL( TBool aGPSInfoAvailable )
- {
- LOG( "CLocationRecord::RemapObjectsL(), begin" );
- TBool createLocation = EFalse;
-
- if (iRemapper)
- {
- createLocation = iRemapper->CheckQueue();
- }
-
- if ( !createLocation || iRemapper == NULL)
- {
- return;
- }
-
-
- if ( aGPSInfoAvailable )
- {
- TItemId locationId = DoCreateLocationL( iNewItem.iLocationData );
- iRemapper->UpdateRelationsL( locationId );
-#ifdef LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- iRemapState = ERemapRevGeoCodeInProgress;
- //Find the address by coordinate, results a call to ReverseGeocodeComplete()
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL( iNewItem.iLocationData.iPosition, iConnectionOption );
- }
- }
- else
- {
- // make this as pending state so that on rev geo code complete
- // it will take the priority over the next item within the location
- // item in location queue.
- iRemapState = ERemapRevGeoCodePending;
- }
-#endif //LOC_REVERSEGEOCODE
- }
- else
- {
- //call location m/w API to convert cell ID to lat, long
-#ifdef LOC_GEOTAGGING_CELLID
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0)
- {
- iRemapState = ERemapNwGeoConverterPending;
- }
- else
- {
- // go for cell id based geo coding.
- iRemapState = ERemapNwGeoConverterInProgress;
- if(iGeoConverter == NULL)
- {
- iGeoConverter = CGeoConverter::NewL(*this);
- }
- iGeoConverter->ConvertL(iNewItem.iLocationData.iNetworkInfo);
- iMediaHandlingFlag |= KSnapGeoConvertInProgress;
- }
-#endif
- }
-#ifdef LOC_REVERSEGEOCODE
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 ||
- (iMediaHandlingFlag & KReverseGeoCodingInProgress) > 0)
-#else
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 )
-#endif //LOC_REVERSEGEOCODE
- {
- // stop n/w info change listener, since device may connect to n/w
- // and local trail will receive so many call backs on current n/w info change.
- iNetworkInfoChangeListener->StopNwInfoChangeNotifier();
- }
- else
- {
- iNetworkInfoChangeListener->StartNwInfoChangeNotifier();
- }
- LOG( "CLocationRecord::RemapObjectsL(), end" );
-
+ iPositionInfo->NextPosition();
}
TBool CLocationRecord::CheckGPSFix( const TPositionSatelliteInfo& aSatelliteInfo )
{
- LOG("CLocationRecord::CheckGPSFix, begin");
TPosition position;
aSatelliteInfo.GetPosition( position );
- LOG1( "latitude %f", position.Latitude() );
- LOG1( "longitude %f", position.Longitude() );
+ LOG1( "CLocationRecord::CheckGPSFix latitude %f", position.Latitude() );
+ LOG1( "CLocationRecord::CheckGPSFix longitude %f", position.Longitude() );
TBool ret = ( Math::IsNaN(position.Latitude()) || Math::IsNaN(position.Longitude()) )
? EFalse : ETrue;
- LOG1("CLocationRecord::CheckGPSFix, end. Ret - %d", ret);
return ret;
}
@@ -698,7 +467,7 @@
void CLocationRecord::NetworkInfo( const CTelephony::TNetworkInfoV1 &aNetworkInfo,
const TInt aError )
{
- LOG("CLocationRecord::NetworkInfo, begin");
+ LOG("CLocationRecord::NetworkInfo");
if ( aError == KErrNone )
{
LOG("CLocationRecord::NetworkInfo - KErrNone");
@@ -707,12 +476,10 @@
{
iNetwork.iLocationAreaCode = 0;
}
-#ifdef LOC_GEOTAGGING_CELLID
if ( iState == RLocationTrail::ETrailStarting && iTrailStarted )
{
SetCurrentState( RLocationTrail::ETrailStarted );
}
-#endif
}
else
{
@@ -725,17 +492,6 @@
iNetwork.iCountryCode.Zero();
iNetwork.iNetworkId.Zero();
}
- LOG( "CLocationRecord::NetworkInfo(), end" );
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::GetMobilePhone4NwInfo
-// --------------------------------------------------------------------------
-//
-RMobilePhone& CLocationRecord::GetMobilePhone4NwInfo()
- {
- LOG( "CLocationRecord::GetMobilePhone4NwInfo()" );
- return iPhone;
}
// --------------------------------------------------------------------------
@@ -744,7 +500,6 @@
//
void CLocationRecord::StoreLocation( const TPositionSatelliteInfo& aSatelliteInfo )
{
- LOG( "CLocationRecord::StoreLocation(), begin" );
aSatelliteInfo.GetPosition( iNewItem.iLocationData.iPosition );
aSatelliteInfo.GetCourse( iNewItem.iLocationData.iCourse );
iNewItem.iLocationData.iSatellites = aSatelliteInfo.NumSatellitesUsed();
@@ -756,13 +511,7 @@
iNewItem.iTimeStamp.UniversalTime();
iNewItem.iTrailState = iState;
- TLocationTrailItem *item = new TLocationTrailItem();
- TInt error = KErrNone;
- if(item != NULL)
- {
- *item = iNewItem;
- error = iTrail.Append( item );
- }
+ TInt error = iTrail.Append( iNewItem );
// If appending an item to the trail fails because of OOM, remove oldest trail items
// until the new item fits or there's only one item left in the trail.
@@ -770,22 +519,18 @@
{
LOG("CLocationRecord::StoreLocation - Out of memory! Shortening trail!");
iTrail.Remove( 0 );
- error = iTrail.Append( item );
+ error = iTrail.Append( iNewItem );
}
if ( iTrail.Count() > iMaxTrailSize )
{
- item = iTrail[0];
iTrail.Remove( 0 );
- iTrail.Compress();
- delete item;
}
if( iAddObserver )
{
iAddObserver->LocationAdded( iNewItem, aSatelliteInfo );
}
- LOG( "CLocationRecord::StoreLocation(), end" );
}
// --------------------------------------------------------------------------
@@ -796,36 +541,7 @@
{
LOG1( "CLocationRecord::SetCurrentState(), begin, state:%d", aState );
iState = aState;
- if( iTrailStarted )
- {
- // Set the property only when trail is started to avoid icon flickering and wrong icon update in UI
- 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,
- (TInt) RLocationTrail::ETrailStarted );
- }
- else
- {
- iProperty.Set( KPSUidLocationTrail, KLocationTrailState,
- (TInt) RLocationTrail::ETrailStopped );
- }
- }
- else
- {
- iProperty.Set( KPSUidLocationTrail, KLocationTrailState,
- (TInt) RLocationTrail::ETrailStopped );
- }
-
+ iProperty.Set( KPSUidLocationTrail, KLocationTrailState, (TInt) aState );
if ( iObserver )
{
iObserver->LocationTrailStateChange();
@@ -840,7 +556,6 @@
void CLocationRecord::HandleLocationRequest( const TPositionSatelliteInfo& aSatelliteInfo,
const TInt aError )
{
- LOG( "CLocationRecord::HandleLocationRequest(), begin" );
CTelephony::TNetworkInfoV1 network = CTelephony::TNetworkInfoV1();
if ( aError == KErrNone )
{
@@ -849,7 +564,6 @@
iRequestCurrentLoc = EFalse;
if ( !iTrailStarted )
{
- iGpsDataAvailableFlag = EFalse;
iPositionInfo->Stop();
}
}
@@ -863,19 +577,12 @@
iLocationCounter = 0;
if ( !iTrailStarted )
{
- iGpsDataAvailableFlag = EFalse;
iPositionInfo->Stop();
}
}
- }
- LOG( "CLocationRecord::HandleLocationRequest(), end" );
+ }
}
-
-// --------------------------------------------------------------------------
-// CLocationRecord::UpdateNetworkInfo
-// --------------------------------------------------------------------------
-//
TInt CLocationRecord::UpdateNetworkInfo( TAny* aAny )
{
TPositionSatelliteInfo nullPositionInfo;
@@ -888,185 +595,124 @@
EXPORT_C void CLocationRecord::CreateLocationObjectL( const TLocationData& aLocationData,
const TUint& aObjectId )
{
- LOG( "CLocationRecord::CreateLocationObjectL(), begin" );
- TLocationSnapshotItem* newItem = new (ELeave) TLocationSnapshotItem;
- newItem->iObjectId = aObjectId;
- newItem->iLocationData = aLocationData;
-
- // for downloaded files, network informations are not valid.
- // Do location handling only based on lat/lon
- // all all n/w information to invalid value.
- newItem->iLocationData.iNetworkInfo.iCellId = 0;
- newItem->iLocationData.iNetworkInfo.iAccess = CTelephony::ENetworkAccessUnknown;
- newItem->iLocationData.iNetworkInfo.iLocationAreaCode = 0;
- newItem->iLocationData.iNetworkInfo.iCountryCode.Zero();
- newItem->iLocationData.iNetworkInfo.iNetworkId.Zero();
- newItem->iFlag = KDownloadMediaFile;
-
- iMediaItems.Append( newItem );
- FindLocationFromDBL();
- GeoTaggingCompleted();
- LOG( "CLocationRecord::CreateLocationObjectL(), end" );
-
+ TItemId locationId = DoCreateLocationL( aLocationData );
+ CreateRelationL( aObjectId, locationId );
}
-// --------------------------------------------------------------------------
-// CLocationRecord::LocationSnapshotL
-// --------------------------------------------------------------------------
-//
+
EXPORT_C void CLocationRecord::LocationSnapshotL( const TUint& aObjectId )
{
- LOG( "CLocationRecord::LocationSnapshotL(), begin" );
+ LOG("CLocationRecord::LocationSnapshotL");
+
TBool previousMatch = EFalse;
+ CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
// get locationdata from trail with object time
TTime timestamp = GetMdeObjectTimeL( aObjectId );
TLocationData locationData;
TLocTrailState state;
- TRAPD(err, GetLocationByTimeL( timestamp, locationData, state ));
- if(err != KErrNone && iTrailStarted)
- {
- // Execution shouldn't come over here.
- // Handling error case in worst sceenario..
- StartL(iTrailCaptureSetting);
- // this case may apprear, when cache data is not within the delta limit because someone call stop trail.
- // sceenario, take photograph, then stop taking for sometime, again take photograph.
- // during this time, if there is no change in position (because someone stop trail) and n/w, then cache has old value.
- // go with the n/w based.
- LOG( "Old trail cache. go for n/w based." );
- UpdateNetworkInfo( this );
- // again read the location.
- GetLocationByTimeL( timestamp, locationData, state );
- }
- TLocationSnapshotItem* newItem = new (ELeave) TLocationSnapshotItem;
- newItem->iObjectId = aObjectId;
- newItem->iLocationData = locationData;
- newItem->iFlag = KSnapMediaFile;
-
- iMediaItems.Append( newItem );
+ GetLocationByTimeL( timestamp, locationData, state );
+
+ iObjectId = aObjectId;
+ iLocationData = locationData;
- TItemId lastLocationId = 0;
- if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0)
- {
- lastLocationId = iLastMediaItem.iLocationId;
- }
-
- CTelephony::TNetworkInfoV1* net = &locationData.iNetworkInfo;
// capture only network data
if ( iTrailCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
{
- if ( net->iCellId == 0 &&
- net->iLocationAreaCode == 0 &&
- net->iCountryCode.Length() == 0 &&
- net->iNetworkId.Length() == 0 )
- {
- // no n/w info... put it into remap.
- // remove the last appended element.
- LOG("CLocationRecord::LocationSnapshotL(), No network info (offline mode + no GPS fix), keep for remapping");
- TRemapItem remapItem;
- remapItem.iObjectId = aObjectId;
- remapItem.iTime = timestamp;
- iRemapper->Append( remapItem );
+ CTelephony::TNetworkInfoV1* net = &locationData.iNetworkInfo;
- TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1];
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
- if( firstPtr == newItem)
- {
- newItem = NULL;
- }
- delete firstPtr;
- firstPtr = NULL;
- }
- else
- {
- // n/w info available
- NetworkInfoSnapshotL();
- }
- }
- 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 &&
net->iLocationAreaCode == 0 &&
net->iCountryCode.Length() == 0 &&
net->iNetworkId.Length() == 0 )
{
- LOG("CLocationRecord::LocationSnapshotL(), No network info (offline mode + no GPS fix), keep for remapping");
- TRemapItem remapItem;
- remapItem.iObjectId = aObjectId;
- remapItem.iTime = timestamp;
- iRemapper->Append( remapItem );
+ // nothing to do
+ LOG("CLocationRecord::LocationSnapshotL - no network info available");
+ }
+ else if ( iLastLocationId != 0 )
+ {
+ CTelephony::TNetworkInfoV1* lastnet = &iLastLocation.iNetworkInfo;
+
+ // compare to previous network info
+ TItemId locationId = iLastLocationId;
+ if ( lastnet->iCellId != net->iCellId ||
+ lastnet->iLocationAreaCode != net->iLocationAreaCode ||
+ lastnet->iCountryCode != net->iCountryCode ||
+ lastnet->iNetworkId != net->iNetworkId )
+ {
+ LOG("CLocationRecord::LocationSnapshotL - network info changed");
+ locationId = DoCreateLocationL( locationData );
+ }
+ CreateRelationL( aObjectId, locationId );
+ }
+ else
+ {
+ // new location
+ TItemId locationId = DoCreateLocationL( locationData );
+ CreateRelationL( aObjectId, locationId );
+ }
+ return;
+ }
+
+ // coordinates empty (will be remapped)
+ if ( Math::IsNaN( locationData.iPosition.Latitude() ) &&
+ Math::IsNaN( locationData.iPosition.Longitude() ))
+ {
+ TRemapItem remapItem;
+ remapItem.iObjectId = aObjectId;
+ remapItem.iTime = timestamp;
- TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1];
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
- if( firstPtr == newItem)
- {
- newItem = NULL;
- }
- delete firstPtr;
- firstPtr = NULL;
+ CTelephony::TNetworkInfoV1* net = &locationData.iNetworkInfo;
+
+ // no network info (offline mode + no GPS fix)
+ if ( net->iCellId == 0 &&
+ net->iLocationAreaCode == 0 &&
+ net->iCountryCode.Length() == 0 &&
+ net->iNetworkId.Length() == 0 )
+ {
+ LOG("CLocationRecord::LocationSnapshotL - empty remap item created");
}
// check match for last created locationobject
-#ifdef LOC_REVERSEGEOCODE
- else if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0 &&
- iLastMediaItem.iCountryTagId > 0)
-#else
- else if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0)
-#endif //LOC_REVERSEGEOCODE
+ else if ( iLastLocationId != 0 )
{
- LOG("CLocationRecord::LocationSnapshotL(), last created locationobject match" );
- TLocationData lastLocationData = iLastMediaItem.iLocationData;
- CTelephony::TNetworkInfoV1* lastnet = &lastLocationData.iNetworkInfo;
+ TItemId locationId;
+ CTelephony::TNetworkInfoV1* lastnet = &iLastLocation.iNetworkInfo;
// networkinfo changed from last location
- if ( lastnet->iCellId == net->iCellId &&
- lastnet->iLocationAreaCode == net->iLocationAreaCode &&
- lastnet->iCountryCode == net->iCountryCode &&
- lastnet->iNetworkId == net->iNetworkId )
+ if ( lastnet->iCellId != net->iCellId ||
+ lastnet->iLocationAreaCode != net->iLocationAreaCode ||
+ lastnet->iCountryCode != net->iCountryCode ||
+ lastnet->iNetworkId != net->iNetworkId )
+ {
+ LOG("CLocationRecord::LocationSnapshotL - remap with new network info");
+ locationId = DoCreateLocationL( locationData );
+ }
+ else
{
- // same network.
- previousMatch = ETrue;
- CreateRelationL( aObjectId, lastLocationId );
- // attach same tags associated to last location
-#ifdef LOC_REVERSEGEOCODE
- if ( iLastMediaItem.iCountryTagId ) //found from DB last time
- {
- iTagCreator->AttachTagsL( aObjectId,
- iLastMediaItem.iCountryTagId, iLastMediaItem.iCityTagId );
- }
-#endif //LOC_REVERSEGEOCODE
- // remove the current item.
- TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1];
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
- if( firstPtr == newItem)
- {
- newItem = NULL;
- }
- delete firstPtr;
- firstPtr = NULL;
+ LOG("CLocationRecord::LocationSnapshotL - remap with previous network info");
+ locationId = iLastLocationId;
}
+ TItemId relationId = CreateRelationL( aObjectId, locationId );
+ remapItem.iLocationId = locationId;
+ remapItem.iRelationId = relationId;
}
-
- if ( newItem && !previousMatch )
- {
- // go for n/w based
- newItem->iFlag |= KNetQueryBit;
- }
+ else
+ {
+ // new location with only network data
+ TItemId locationId = DoCreateLocationL( locationData );
+ TItemId relationId = CreateRelationL( aObjectId, locationId );
+ remapItem.iLocationId = locationId;
+ remapItem.iRelationId = relationId;
+ }
+ iRemapper->Append( remapItem );
+ return;
}
-
+
// valid coordinates found
- else if ( lastLocationId != 0 &&
- ((iLastMediaItem.iFlag & KSnapMediaFile) > 0))
+ if ( iLastLocationId != 0 )
{
- LOG("CLocationRecord::LocationSnapshotL(), valid coordinates found");
- TLocationData lastLocationData = iLastMediaItem.iLocationData;
- CTelephony::TNetworkInfoV1* lastnet = &lastLocationData.iNetworkInfo;
+ CTelephony::TNetworkInfoV1* net = &locationData.iNetworkInfo;
+ CTelephony::TNetworkInfoV1* lastnet = &iLastLocation.iNetworkInfo;
// first check if networkinfo matches last created location
if ( lastnet->iCellId == net->iCellId &&
@@ -1074,75 +720,23 @@
lastnet->iCountryCode == net->iCountryCode &&
lastnet->iNetworkId == net->iNetworkId )
{
+ LOG("CLocationRecord::LocationSnapshotL - network info matches");
// if both locations have valid coordinates, calculate distance between points
- if (
-#ifdef LOC_REVERSEGEOCODE
- !iLastReverseGeocodeFails &&
-#endif //LOC_REVERSEGEOCODE
- !Math::IsNaN( lastLocationData.iPosition.Latitude() ) &&
- !Math::IsNaN( lastLocationData.iPosition.Longitude() ) &&
+ if ( !Math::IsNaN( iLastLocation.iPosition.Latitude() ) &&
+ !Math::IsNaN( iLastLocation.iPosition.Longitude() ) &&
!Math::IsNaN( locationData.iPosition.Latitude() ) &&
!Math::IsNaN( locationData.iPosition.Longitude() ))
{
TReal32 distance;
- TInt err = locationData.iPosition.Distance(lastLocationData.iPosition, distance);
+ TInt err = locationData.iPosition.Distance(iLastLocation.iPosition, distance);
if ( distance < iLocationDelta )
{
- LOG("CLocationRecord::LocationSnapshotL(), location close to the previous one");
+ LOG("CLocationRecord::LocationSnapshotL - location close to the previous one");
previousMatch = ETrue;
- CreateRelationL( aObjectId, lastLocationId );
-
-#ifdef LOC_REVERSEGEOCODE
- // attach same tags associated to last location
- if ( iLastMediaItem.iCountryTagId )
- {
- iTagCreator->AttachTagsL(
- aObjectId, iLastMediaItem.iCountryTagId, iLastMediaItem.iCityTagId );
- TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1];
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
- if( firstPtr == newItem)
- {
- newItem = NULL;
- }
- delete firstPtr;
- firstPtr = NULL;
- }
- //check newItem for validity
- else if (newItem)
- {
- // country tag not found.. go for reverse geocoding..
- newItem->iLocationId = lastLocationId;
- iLocationItems.Append( newItem );
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
-
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption);
- }
- }
- }
-#else
- // remove from the queue
- TLocationSnapshotItem* firstPtr = iMediaItems[iMediaItems.Count() - 1];
- iMediaItems.Remove(iMediaItems.Count() - 1);
- iMediaItems.Compress();
- if( firstPtr == newItem)
- {
- newItem = NULL;
- }
- delete firstPtr;
- firstPtr = NULL;
-
-#endif //LOC_REVERSEGEOCODE
+ CreateRelationL( aObjectId, iLastLocationId );
+ LOG("CLocationRecord::CreateLocationObjectL - last location matched");
}
}
}
@@ -1151,192 +745,109 @@
// last location did not match, find existing one from DB
if( !previousMatch )
{
- FindLocationFromDBL();
+ LOG("CLocationRecord::LocationSnapshotL - query location");
+ const TReal64 KMeterInDegrees = 0.000009;
+ const TReal64 KPi = 3.14159265358979;
+ const TReal32 K180Degrees = 180.0;
+
+ TReal64 latitude = locationData.iPosition.Latitude();
+ TReal64 longitude = locationData.iPosition.Longitude();
+ // calculate distance in degrees
+ TReal64 cosine;
+ Math::Cos(cosine, locationData.iPosition.Latitude() * KPi / K180Degrees );
+ TReal64 latDelta = iLocationDelta * KMeterInDegrees;
+ TReal64 lonDelta = latDelta * cosine;
+
+ CMdEObjectDef& locationObjectDef = namespaceDef.GetObjectDefL( Location::KLocationObject );
+
+ CMdEPropertyDef& latitudeDef = locationObjectDef.GetPropertyDefL(
+ Location::KLatitudeProperty );
+ CMdEPropertyDef& longitudeDef = locationObjectDef.GetPropertyDefL(
+ Location::KLongitudeProperty );
+ CMdEPropertyDef& cellIdDef = locationObjectDef.GetPropertyDefL(
+ Location::KCellIdProperty );
+ CMdEPropertyDef& locationCodeDef = locationObjectDef.GetPropertyDefL(
+ Location::KLocationAreaCodeProperty );
+ CMdEPropertyDef& countryCodeDef = locationObjectDef.GetPropertyDefL(
+ Location::KCountryCodeProperty );
+ CMdEPropertyDef& networkCodeDef = locationObjectDef.GetPropertyDefL(
+ Location::KNetworkCodeProperty );
+
+ iLocationQuery = iMdeSession->NewObjectQueryL( namespaceDef, locationObjectDef, this );
+ CMdELogicCondition& cond = iLocationQuery->Conditions();
+ cond.SetOperator( ELogicConditionOperatorAnd );
+
+ LOG1( "CLocationRecord::LocationSnapshotL latitude: %f", latitude);
+ LOG1( "CLocationRecord::LocationSnapshotL latdelta: %f", latDelta);
+ LOG1( "CLocationRecord::LocationSnapshotL longitude: %f", longitude);
+ LOG1( "CLocationRecord::LocationSnapshotL londelta: %f", lonDelta);
+
+ cond.AddPropertyConditionL( latitudeDef,
+ TMdERealBetween( latitude - latDelta, latitude + latDelta ));
+ cond.AddPropertyConditionL( longitudeDef,
+ TMdERealBetween( longitude - lonDelta, longitude + lonDelta ));
+ cond.AddPropertyConditionL( cellIdDef,
+ TMdEUintEqual( locationData.iNetworkInfo.iCellId) );
+ cond.AddPropertyConditionL( locationCodeDef,
+ TMdEUintEqual( locationData.iNetworkInfo.iLocationAreaCode) );
+ cond.AddPropertyConditionL( countryCodeDef, ETextPropertyConditionCompareEquals,
+ locationData.iNetworkInfo.iCountryCode );
+ cond.AddPropertyConditionL( networkCodeDef, ETextPropertyConditionCompareEquals,
+ locationData.iNetworkInfo.iNetworkId );
+
+ iLocationQuery->FindL();
}
- LOG( "CLocationRecord::LocationSnapshotL(), end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationRecord::NetworkInfoSnapshotL
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::NetworkInfoSnapshotL()
- {
- LOG( "CLocationRecord::NetworkInfoSnapshotL(), begin" );
- // n/w info available.. always act on last element within the queue
- TInt lastItemIndex = iMediaItems.Count() - 1;
- if ( lastItemIndex >= 0 &&
- (iMediaItems[lastItemIndex]->iFlag & KSnapMediaFile) > 0 )
- {
- CTelephony::TNetworkInfoV1* net = &iMediaItems[lastItemIndex]->iLocationData.iNetworkInfo;
- //only for snap item.
- if ( (iLastMediaItem.iFlag & KSnapMediaFile) > 0 )
- {
- CTelephony::TNetworkInfoV1* lastnet = &iLastMediaItem.iLocationData.iNetworkInfo;
-
- // compare to previous network info
- TItemId locationId = iLastMediaItem.iLocationId;
- if ( lastnet->iCellId != net->iCellId ||
- lastnet->iLocationAreaCode != net->iLocationAreaCode ||
- lastnet->iCountryCode != net->iCountryCode ||
- lastnet->iNetworkId != net->iNetworkId )
- {
- // last one is not matching.
- // let's check the database of any existing etry.
- iMediaItems[lastItemIndex]->iFlag |= KNetQueryBit;
- }
- else
- {
- // matching with the last entry. Just create a relation.
- CreateRelationL( iMediaItems[lastItemIndex]->iObjectId, locationId );
- TLocationSnapshotItem* firstPtr = iMediaItems[lastItemIndex];
- iMediaItems.Remove(lastItemIndex);
- delete firstPtr;
- }
- }
- else
- {
- // let's check the database of any existing etry.
- iMediaItems[lastItemIndex]->iFlag |= KNetQueryBit;
- }
- }
- LOG( "CLocationRecord::NetworkInfoSnapshotL(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::FindLocationFromDBL
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::FindLocationFromDBL()
- {
- LOG( "CLocationRecord::FindLocationFromDBL(), begin" );
- if(((iMediaHandlingFlag & KLocationQueryInProgress)> 0)
- || (iMediaItems.Count() <= 0))
- {
- // query is in progress or queue is empty
- LOG1( "CLocationRecord::FindLocationFromDBL(), Count - %d", iMediaItems.Count() );
- return;
- }
- if ( (iMediaItems[0]->iFlag & KNetQueryBit) > 0 )
- {
- // n/w based.
- FindLocationWithSameNetInfoL();
- return;
- }
-
- const TReal64 KMeterInDegrees = 0.000009;
- const TReal64 KPi = 3.14159265358979;
- const TReal32 K180Degrees = 180.0;
-
- TReal64 latitude = iMediaItems[0]->iLocationData.iPosition.Latitude();
- TReal64 longitude = iMediaItems[0]->iLocationData.iPosition.Longitude();
- // calculate distance in degrees
- TReal64 cosine;
- Math::Cos(cosine, latitude * KPi / K180Degrees );
- TReal64 latDelta = iLocationDelta * KMeterInDegrees;
- TReal64 lonDelta = latDelta * cosine;
-
- //get network related defs
- CMdEPropertyDef& cellIdDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCellIdProperty );
- CMdEPropertyDef& locationCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KLocationAreaCodeProperty );
- CMdEPropertyDef& countryCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCountryCodeProperty );
- CMdEPropertyDef& networkCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KNetworkCodeProperty );
- if(iLocationQuery)
- {
- iLocationQuery->RemoveObserver(*this);
- iLocationQuery->Cancel();
- delete iLocationQuery;
- iLocationQuery = NULL;
- }
- iLocationQuery = iMdeSession->NewObjectQueryL( *iNamespaceDef, *iLocationObjectDef, this );
-
- CMdELogicCondition& cond = iLocationQuery->Conditions();
- cond.SetOperator( ELogicConditionOperatorAnd );
-
- 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 ));
- cond.AddPropertyConditionL( *iLongitudeDef,
- TMdERealBetween( longitude - lonDelta, longitude + lonDelta ));
-
- if ( iMediaItems[0]->iLocationData.iNetworkInfo.iCellId > 0 )
- {
- cond.AddPropertyConditionL( cellIdDef,
- TMdEUintEqual( iMediaItems[0]->iLocationData.iNetworkInfo.iCellId) );
- }
- if ( iMediaItems[0]->iLocationData.iNetworkInfo.iLocationAreaCode > 0 )
- {
- cond.AddPropertyConditionL( locationCodeDef,
- TMdEUintEqual( iMediaItems[0]->iLocationData.iNetworkInfo.iLocationAreaCode) );
- }
- if ( iMediaItems[0]->iLocationData.iNetworkInfo.iCountryCode.Length() > 0 )
- {
- cond.AddPropertyConditionL( countryCodeDef, ETextPropertyConditionCompareEquals,
- iMediaItems[0]->iLocationData.iNetworkInfo.iCountryCode );
- }
- if ( iMediaItems[0]->iLocationData.iNetworkInfo.iNetworkId.Length() > 0 )
- {
- cond.AddPropertyConditionL( networkCodeDef, ETextPropertyConditionCompareEquals,
- iMediaItems[0]->iLocationData.iNetworkInfo.iNetworkId );
- }
- iMediaHandlingFlag |= KLocationQueryInProgress;
- iLocationQuery->FindL();
-
- LOG( "CLocationRecord::FindLocationFromDBL(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::DoCreateLocationL
-// --------------------------------------------------------------------------
-//
-TItemId CLocationRecord::DoCreateLocationL( const TLocationData& aLocationData )
+
+TItemId CLocationRecord::DoCreateLocationL( const TLocationData& aLocationData )
{
- LOG( "CLocationRecord::DoCreateLocationL(), begin" );
+ LOG("CLocationRecord::DoCreateLocationL - start");
TItemId locationObjectId;
+ CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
+
+ CMdEObjectDef& locationObjectDef = namespaceDef.GetObjectDefL( Location::KLocationObject );
+
// required object properties
- CMdEPropertyDef& creationDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& creationDef = locationObjectDef.GetPropertyDefL(
Object::KCreationDateProperty );
- CMdEPropertyDef& modifiedDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& modifiedDef = locationObjectDef.GetPropertyDefL(
Object::KLastModifiedDateProperty );
- CMdEPropertyDef& sizeDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& sizeDef = locationObjectDef.GetPropertyDefL(
Object::KSizeProperty );
- CMdEPropertyDef& itemTypeDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& itemTypeDef = locationObjectDef.GetPropertyDefL(
Object::KItemTypeProperty );
- CMdEPropertyDef& offSetDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& offSetDef = locationObjectDef.GetPropertyDefL(
Object::KTimeOffsetProperty );
// location related properties
- CMdEPropertyDef& cellIdDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& cellIdDef = locationObjectDef.GetPropertyDefL(
Location::KCellIdProperty );
- CMdEPropertyDef& directionDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& latitudeDef = locationObjectDef.GetPropertyDefL(
+ Location::KLatitudeProperty );
+ CMdEPropertyDef& longitudeDef = locationObjectDef.GetPropertyDefL(
+ Location::KLongitudeProperty );
+ CMdEPropertyDef& altitudeDef = locationObjectDef.GetPropertyDefL(
+ Location::KAltitudeProperty );
+
+ CMdEPropertyDef& directionDef = locationObjectDef.GetPropertyDefL(
Location::KDirectionProperty );
- CMdEPropertyDef& speedDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& speedDef = locationObjectDef.GetPropertyDefL(
Location::KSpeedProperty );
- CMdEPropertyDef& locationCodeDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& locationCodeDef = locationObjectDef.GetPropertyDefL(
Location::KLocationAreaCodeProperty );
- CMdEPropertyDef& countryCodeDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& countryCodeDef = locationObjectDef.GetPropertyDefL(
Location::KCountryCodeProperty );
- CMdEPropertyDef& networkCodeDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& networkCodeDef = locationObjectDef.GetPropertyDefL(
Location::KNetworkCodeProperty );
- CMdEPropertyDef& qualityDef = iLocationObjectDef->GetPropertyDefL(
+ CMdEPropertyDef& qualityDef = locationObjectDef.GetPropertyDefL(
Location::KQualityProperty );
// location object
CMdEObject* locationObject = NULL;
- locationObject = iMdeSession->NewObjectL( *iLocationObjectDef, Object::KAutomaticUri );
+ locationObject = iMdeSession->NewObjectL( locationObjectDef, Object::KAutomaticUri );
CleanupStack::PushL( locationObject );
TTime timestamp( 0 );
@@ -1352,21 +863,18 @@
locationObject->AddTextPropertyL( itemTypeDef, Location::KLocationItemType );
locationObject->AddInt16PropertyL( offSetDef, timeOffset.Int() / 60 );
- LOG1( "CLocationRecord::DoCreateLocationL(), 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() );
-
+ locationObject->AddReal64PropertyL( latitudeDef, aLocationData.iPosition.Latitude() );
+ locationObject->AddReal64PropertyL( longitudeDef, aLocationData.iPosition.Longitude() );
}
if ( !Math::IsNaN( aLocationData.iPosition.Altitude() ) )
{
- locationObject->AddReal64PropertyL( *iAltitudeDef, aLocationData.iPosition.Altitude() );
+ locationObject->AddReal64PropertyL( altitudeDef, aLocationData.iPosition.Altitude() );
}
if ( !Math::IsNaN( aLocationData.iCourse.Course() ) )
{
@@ -1382,71 +890,47 @@
}
// network related properties
- 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.iAreaKnown )
{
- 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.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);
+
+ }
}
- 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);
+
+ iLastLocationId = locationObjectId;
+ iLastLocation = aLocationData;
+
CleanupStack::PopAndDestroy( locationObject );
- LOG( "CLocationRecord::DoCreateLocationL(), end" );
-
+
+ LOG("CLocationRecord::DoCreateLocationL - end");
+
return locationObjectId;
}
-// --------------------------------------------------------------------------
-// CLocationRecord::CreateRelationL
-// --------------------------------------------------------------------------
-//
+
TItemId CLocationRecord::CreateRelationL( const TUint& aObjectId, const TUint& aLocationId )
{
LOG("CLocationRecord::CreateRelationL - start");
@@ -1484,749 +968,131 @@
LOG( "CLocationRecord::::ReadCenRepValueL(), end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleQueryNewResults
-// --------------------------------------------------------------------------
-//
void CLocationRecord::HandleQueryNewResults(CMdEQuery& /*aQuery*/, TInt /*aFirstNewItemIndex*/,
TInt /*aNewItemCount*/)
{
}
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleQueryCompleted
-// --------------------------------------------------------------------------
-//
void CLocationRecord::HandleQueryCompleted(CMdEQuery& aQuery, TInt aError)
{
LOG("CLocationRecord::HandleQueryCompleted - start");
const TInt count = aQuery.Count();
LOG1("CLocationRecord::HandleQueryCompleted count: %d", count);
-
- if ( aError != KErrNone )
- {
- HandleQueryFailure();
- }
-
- else if ( &aQuery == iLocationQuery )
- {
-
- TRAPD(err,HandleLocationQueryL( aQuery ));
- if(err != KErrNone)
- {
- // unable to process the first node..
- // remove this and process the next.
+
+ CMdENamespaceDef* namespaceDef = NULL;
- // reset the flag
- HandleQueryFailure();
- }
-
- }
- else if ( &aQuery == iNetLocationQuery )
+ TRAP_IGNORE( namespaceDef = &iMdeSession->GetDefaultNamespaceDefL() );
+ if ( namespaceDef )
{
- TRAPD(err,HandleNetLocationQueryL( aQuery ));
- if(err != KErrNone)
- {
- // unable to process the first node..
- // remove this and process the next.
- HandleQueryFailure();
- }
-
- }
+ CMdEObjectDef* locationObjectDef = NULL;
+
+ TRAP_IGNORE( locationObjectDef = &namespaceDef->GetObjectDefL( Location::KLocationObject ) );
+ if ( locationObjectDef )
+ {
+ CMdEPropertyDef* latitudeDef = NULL;
+ CMdEPropertyDef* longitudeDef = NULL;
+ CMdEPropertyDef* altitudeDef = NULL;
+
+ TRAP_IGNORE(
+ latitudeDef = &locationObjectDef->GetPropertyDefL(
+ Location::KLatitudeProperty );
+ longitudeDef = &locationObjectDef->GetPropertyDefL(
+ Location::KLongitudeProperty );
+ altitudeDef = &locationObjectDef->GetPropertyDefL(
+ Location::KAltitudeProperty );
+ );
-#ifdef LOC_REVERSEGEOCODE
- else if ( &aQuery == iImageQuery )
- {
- if(aQuery.Count() > 0)
- {
-
- CMdERelation& relation = static_cast<CMdERelation&>( aQuery.ResultItem( 0 ) );
-
- TItemId imageId = relation.LeftObjectId();
-
- TRAPD(err, GetTagsL( imageId ) );
- if(err != KErrNone)
- {
- // unable to process the first node..
- // remove this and process the next.
-
- // reset the flag
- HandleQueryFailure();
- }
- }
- else
- {
- HandleQueryFailure();
+ if( latitudeDef && longitudeDef && altitudeDef )
+ {
+ TBool created = EFalse;
+ for ( TInt i = 0; i < count; i++ )
+ {
+ LOG1("CLocationRecord::HandleQueryCompleted check item: %d", i);
+ CMdEItem& item = aQuery.ResultItem(i);
+ CMdEObject& locationObject = static_cast<CMdEObject&>(item);
+
+ CMdEProperty* latProp = NULL;
+ CMdEProperty* lonProp = NULL;
+ CMdEProperty* altProp = NULL;
+
+ locationObject.Property( *latitudeDef, latProp, 0 );
+ locationObject.Property( *longitudeDef, lonProp, 0 );
+ locationObject.Property( *altitudeDef, altProp, 0 );
+
+ if ( latProp && lonProp )
+ {
+ TReal32 distance;
+ TCoordinate newCoords;
+ if ( altProp )
+ {
+ TRAP_IGNORE( newCoords = TCoordinate( latProp->Real64ValueL(), lonProp->Real64ValueL(), (TReal32)altProp->Real64ValueL() ) );
+ }
+ else
+ {
+ TRAP_IGNORE( newCoords = TCoordinate( latProp->Real64ValueL(), lonProp->Real64ValueL() ) );
+ }
+
+ const TInt err = iLocationData.iPosition.Distance(newCoords, distance);
+
+ if ( distance < iLocationDelta )
+ {
+ LOG("CLocationRecord::HandleQueryCompleted - match found in db");
+ TRAPD( err, CreateRelationL( iObjectId, locationObject.Id() ) );
+ if( err == KErrNone)
+ {
+ created = ETrue;
+ i = count;
+ }
+ else
+ {
+ aError = err;
+ }
+ }
+ }
+ }
+
+ if ( !created && aError == KErrNone )
+ {
+ LOG("CLocationRecord::HandleQueryCompleted - no match found in db, create new");
+ TInt locationId( 0 );
+ TRAPD( err, locationId = DoCreateLocationL( iLocationData ) );
+ LOG1("CLocationRecord::HandleQueryCompleted - DoCreateLocationL err: %d", err);
+ if( err == KErrNone )
+ {
+ TRAP( err, CreateRelationL( iObjectId, locationId ));
+ LOG1("CLocationRecord::HandleQueryCompleted - CreateRelationL err: %d", err);
+ }
+ }
+ }
}
}
-
- else if ( &aQuery == iTagQuery )
- {
- TRAPD(err, HandleTagQueryL( aQuery ) );
-
- GeoTaggingCompleted();
- if(err != KErrNone)
- {
- // unable to process the first node..
- // remove this and process the next.
- // reset the flag
- HandleQueryFailure();
- }
- }
-#endif //LOC_REVERSEGEOCODE
- else
- {
- // execution should not come over here...still take recovery action.
- HandleQueryFailure();
- }
- GeoTaggingCompleted();
- LOG( "CLocationRecord::HandleQueryCompleted(), end" );
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleQueryFailure()
-// handle MDS query sceenario
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::HandleQueryFailure()
- {
- LOG( "CLocationRecord::HandleQueryFailure(), begin" );
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- if ( iMediaItems.Count() > 0 )
- {
- TLocationSnapshotItem* firstPtr = iMediaItems[0];
- iMediaItems.Remove(0);
- delete firstPtr;
- iMediaItems.Compress();
- HandleFindLocationFromDB();
- }
- LOG( "CLocationRecord::HandleQueryFailure(), end" );
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleFindLocationFromDB()
-// handle find location from DB within the non leaving method
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::HandleFindLocationFromDB()
- {
- LOG( "CLocationRecord::HandleFindLocationFromDB(), begin" );
- if ( iMediaItems.Count() > 0 )
- {
- TInt trapErr = KErrNone;
- TRAP(trapErr,FindLocationFromDBL());
- // no memory, don't proceed further
- // other error sceenario, we can move the node to the end and process the next
- if(trapErr != KErrNoMemory && trapErr != KErrNone)
- {
- // other than no memory
- TInt numberOfNodes = iMediaItems.Count();
- LOG1("media count - %d\n", numberOfNodes);
- while(--numberOfNodes >= 0 &&
- trapErr != KErrNoMemory &&
- trapErr != KErrNone)
- {
- // first remove the node
- TLocationSnapshotItem* firstPtr = iMediaItems[0];
- iMediaItems.Remove(0);
- // move this to last
- iMediaItems.Append(firstPtr);
- iMediaItems.Compress();
- trapErr = KErrNone;
- // process for the next till we reached the last node.
- TRAP(trapErr,FindLocationFromDBL());
- }
- }
- }
- LOG( "CLocationRecord::HandleFindLocationFromDB(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleLocationQuery()
-// handle if only gps info available
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::HandleLocationQueryL( CMdEQuery& aQuery )
- {
- LOG( "CLocationRecord::HandleLocationQueryL(), begin" );
- TInt error = KErrNone;
- TUint locationId( 0 );
- if ( iMediaItems.Count() <= 0 )
- {
- LOG("CLocationRecord::HandleLocationQueryL. No media items to process");
- return;
- }
-
- TLocationData locationData = iMediaItems[0]->iLocationData;
-
- const TInt count = aQuery.Count();
- //find any location matches
- for ( TInt i = 0; i < count; i++ )
- {
- LOG1("CLocationRecord::HandleLocationQueryL check item: %d", i);
- CMdEItem& item = aQuery.ResultItem(i);
- CMdEObject& locationObject = static_cast<CMdEObject&>(item);
-
- CMdEProperty* latProp = NULL;
- CMdEProperty* lonProp = NULL;
- CMdEProperty* altProp = NULL;
-
- locationObject.Property( *iLatitudeDef, latProp, 0 );
- locationObject.Property( *iLongitudeDef, lonProp, 0 );
- locationObject.Property( *iAltitudeDef, altProp, 0 );
-
- if ( latProp && lonProp )
- {
- TReal32 distance;
- TCoordinate newCoords;
-
- TReal64 lat = latProp->Real64ValueL();
- TReal64 lon = lonProp->Real64ValueL();
- if ( altProp )
- {
- TReal32 alt = (TReal32)altProp->Real64ValueL();
- newCoords = TCoordinate( lat, lon, alt );
- }
- else
- {
- newCoords = TCoordinate( lat, lon );
- }
-
- locationData.iPosition.Distance(newCoords, distance);
-
- if ( distance < iLocationDelta )
- {
- i = count;
- locationId = locationObject.Id();
- iMediaItems[0]->iLocationId = locationId;
- break;
- }
- }
- }
-
-
- if ( locationId )
- {
- TRAP( error, CreateRelationL( iMediaItems[0]->iObjectId, locationId ) );
-
-#ifdef LOC_REVERSEGEOCODE
- if( error == KErrNone)
- {
- //find out if image for this location is tagged already
- GetRelatedImageL( locationId );
- }
-#else
- TLocationSnapshotItem* firstPtr = iMediaItems[0];
- iMediaItems.Remove(0);
- delete firstPtr;
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- if ( iMediaItems.Count() > 0 )
- {
- FindLocationFromDBL();
- }
-#endif //LOC_REVERSEGEOCODE
- }
- else
- {
-
- if((iMediaItems[0]->iFlag & KDownloadMediaFile) > 0)
- {
- locationData.iNetworkInfo.iCellId = 0;
- locationData.iNetworkInfo.iAccess = CTelephony::ENetworkAccessUnknown;
- locationData.iNetworkInfo.iLocationAreaCode = 0;
- locationData.iNetworkInfo.iCountryCode.Zero();
- locationData.iNetworkInfo.iNetworkId.Zero();
- }
- TRAP( error, locationId = DoCreateLocationL( locationData ) );
-
- if ( error == KErrNone )
- {
- iMediaItems[0]->iLocationId = locationId;
- TRAP( error, CreateRelationL( iMediaItems[0]->iObjectId, locationId ));
- }
-
- TLocationSnapshotItem* item = iMediaItems[0];
- if((iMediaItems[0]->iFlag & KSnapMediaFile) > 0)
- {
- iLastMediaItem = *(iMediaItems[0]);
- }
- iMediaItems.Remove(0);
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- if ( error == KErrNone )
- {
- //Find the address by coordinate, results a call to ReverseGeocodeComplete()
-#ifdef LOC_REVERSEGEOCODE
- iLocationItems.Append( item );
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption);
- }
- }
-#else
- // free resources
- delete item;
-#endif //LOC_REVERSEGEOCODE
- }
- else
- {
- // free resources
- delete item;
- }
-
- if ( iMediaItems.Count() > 0 )
- {
- FindLocationFromDBL();
- }
- }
- LOG( "CLocationRecord::HandleLocationQueryL(), end" );
-
+ LOG("CLocationRecord::HandleQueryCompleted - end");
}
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleNetLocationQuery()
-// handle if only network info available
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::HandleNetLocationQueryL( CMdEQuery& aQuery )
- {
- LOG( "CLocationRecord::HandleNetLocationQueryL(), begin" );
- TInt error = KErrNone;
- TUint locationId( 0 );
- if ( iMediaItems.Count() <= 0 )
- {
- LOG("CLocationRecord::HandleNetLocationQueryL(), End. No media items to process\n");
- return;
- }
- if( aQuery.Count() )
- {
- CMdEItem& item = aQuery.ResultItem(0);
- CMdEObject& locationObject = static_cast<CMdEObject&>(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
- CMdEProperty* latProp = NULL;
- CMdEProperty* lonProp = NULL;
- CMdEProperty* cellIdProp = NULL;
- CMdEProperty* areadCodeProp = NULL;
- CMdEProperty* countryProp = NULL;
- CMdEProperty* networkCodeProp = NULL;
- if ( error == KErrNone )
- {
-
- CMdEPropertyDef& cellIdDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCellIdProperty );
- CMdEPropertyDef& locationAreadCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KLocationAreaCodeProperty );
- CMdEPropertyDef& countryCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCountryCodeProperty );
- CMdEPropertyDef& networkCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KNetworkCodeProperty );
-
- locationObject.Property( *iLatitudeDef, latProp, 0 );
- locationObject.Property( *iLongitudeDef, lonProp, 0 );
-
- locationObject.Property( cellIdDef, cellIdProp, 0 );
- locationObject.Property( locationAreadCodeDef, areadCodeProp, 0 );
- locationObject.Property( countryCodeDef, countryProp, 0 );
- locationObject.Property( networkCodeDef, networkCodeProp, 0 );
- }
-
- if( (latProp && lonProp)
- || (cellIdProp && areadCodeProp && countryProp && networkCodeProp) )
- {
- //find out if image for this location is tagged already
- GetRelatedImageL( locationId );
- }
- else
-#endif //LOC_REVERSEGEOCODE
- {
- // no geo info.. remove the item and proceed for the next.
- TLocationSnapshotItem* firstPtr = iMediaItems[0];
- iMediaItems.Remove(0);
- delete firstPtr;
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- if ( iMediaItems.Count() > 0 )
- {
- FindLocationFromDBL();
- }
- }
- }
- else
- {
-#ifdef LOC_GEOTAGGING_CELLID
- LOG1("Media handling flag = %d", iMediaHandlingFlag);
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0)
- {
- iMediaHandlingFlag |= KSnapGeoConvertInPendingState;
- }
- else
- {
- // go for cell id based geo coding.
- if(iGeoConverter == NULL)
- {
- iGeoConverter = CGeoConverter::NewL(*this);
- }
- iGeoConverter->ConvertL(iMediaItems[0]->iLocationData.iNetworkInfo);
- iMediaHandlingFlag |= KSnapGeoConvertInProgress;
- iMediaHandlingFlag &= ~KSnapGeoConvertInPendingState;
- }
-#else
- // cell id based geo tagging is not supported.. go for remapping.
- locationId = DoCreateLocationL( iMediaItems[0]->iLocationData );
- iMediaItems[0]->iLocationId = 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();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- if ( iMediaItems.Count() > 0 )
- {
- FindLocationFromDBL();
- }
-#endif
- }
-#ifdef LOC_REVERSEGEOCODE
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 ||
- (iMediaHandlingFlag & KReverseGeoCodingInProgress) > 0)
-#else
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0)
-#endif //LOC_REVERSEGEOCODE
- {
- // stop n/w info change listener, since device may connect to n/w
- // and local trail will receive so many call backs on current n/w info change.
- iNetworkInfoChangeListener->StopNwInfoChangeNotifier();
- }
- else
- {
- iNetworkInfoChangeListener->StartNwInfoChangeNotifier();
- }
- LOG( "CLocationRecord::HandleNetLocationQueryL(), end" );
-
- }
-
-
-#ifdef LOC_GEOTAGGING_CELLID
-// --------------------------------------------------------------------------
-// CLocationRecord::ConversionCompletedL()
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::ConversionCompletedL( const TInt aError, TLocality& aPosition )
- {
-
- LOG1("CLocationRecord::ConversionCompletedL, begin. Error - %d", aError);
- // reset the flag first
- iMediaHandlingFlag &= ~KSnapGeoConvertInProgress;
- LOG1("iRemapState - %d", iRemapState);
- if(aError == KErrNone)
- {
- iConvertRetry = ETrue;
- LOG("Conversion completed successfully");
- if(iRemapState == ERemapNwGeoConverterInProgress)
- {
- iNewItem.iLocationData.iPosition.SetCoordinate
- ( aPosition.Latitude(), aPosition.Longitude(), aPosition.Altitude());
- iNewItem.iLocationData.iQuality = aPosition.HorizontalAccuracy();
- TItemId locationId = DoCreateLocationL( iNewItem.iLocationData );
- iRemapper->UpdateRelationsL( locationId );
-#ifdef LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- iRemapState = ERemapRevGeoCodeInProgress;
- //Find the address by coordinate, results a call to ReverseGeocodeComplete()
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iNewItem.iLocationData.iPosition, iConnectionOption );
- }
- }
- else
- {
- // remap in reverse geocoding pending state.
- iRemapState = ERemapRevGeoCodePending;
- }
-#endif //LOC_REVERSEGEOCODE
- }
- else if ( iMediaItems.Count() > 0 )
- {
-
- iMediaItems[0]->iLocationData.iPosition.SetCoordinate
- ( aPosition.Latitude(), aPosition.Longitude(), aPosition.Altitude());
- iMediaItems[0]->iLocationData.iQuality = aPosition.HorizontalAccuracy();
- TLocationSnapshotItem* item = iMediaItems[0];
- 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 );
-
- if((iMediaItems[0]->iFlag & KSnapMediaFile) > 0)
- {
- iLastMediaItem = *(iMediaItems[0]);
- }
- iMediaItems.Remove(0);
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
-#ifdef LOC_REVERSEGEOCODE
- iLocationItems.Append( item );
-#else
- // free resource
- delete item;
-#endif
- }
- }
- else
- {
- LOG1("Conversion error - %d", aError);
- if(iConvertRetry)
- {
- LOG("Retry once");
- iConvertRetry = EFalse;
- if(iRemapState == ERemapNwGeoConverterInProgress)
- {
- iRemapState = ERemapNwGeoConverterPending;
- }
- else if ( iMediaItems.Count() > 0 )
- {
- iMediaHandlingFlag |= KSnapGeoConvertInPendingState;
- }
- }
- else
- {
- if(iRemapState == ERemapNwGeoConverterInProgress)
- {
- iRemapState = ERemapProgressNone;
- }
- 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;
- delete item;
- }
- }
-
- }
-
- // check the remap item first.
- if(iRemapState == ERemapNwGeoConverterPending)
- {
- // go for cell id based geo coding.
- iRemapState = ERemapNwGeoConverterInProgress;
- iGeoConverter->ConvertL(iNewItem.iLocationData.iNetworkInfo);
- iMediaHandlingFlag |= KSnapGeoConvertInProgress;
- }
- //check for media queue pending request.
- else if((iMediaHandlingFlag & KSnapGeoConvertInPendingState) > 0)
- {
- // previous media queue geo convert is in pending state.
- // go for cell id based geo coding.
- iGeoConverter->ConvertL(iMediaItems[0]->iLocationData.iNetworkInfo);
- iMediaHandlingFlag |= KSnapGeoConvertInProgress;
- iMediaHandlingFlag &= ~KSnapGeoConvertInPendingState;
- }
- // let's not use multiple access point.
-#ifdef LOC_REVERSEGEOCODE
- else if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress) &&
- iLocationItems.Count() > 0)
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption);
- }
- }
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 ||
- (iMediaHandlingFlag & KReverseGeoCodingInProgress) > 0)
-#else
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0)
-#endif //LOC_REVERSEGEOCODE
- {
- // stop n/w info change listener, since device may connect to n/w
- // and local trail will receive so many call backs on current n/w info change.
- iNetworkInfoChangeListener->StopNwInfoChangeNotifier();
- }
- else
- {
- iNetworkInfoChangeListener->StartNwInfoChangeNotifier();
- }
- FindLocationFromDBL();
- GeoTaggingCompleted();
- LOG("CLocationRecord::ConversionCompletedL, end");
- }
-
-
-//------------------------------------------------------------------------
-// CLocationRecord::HandleConversionError
-//------------------------------------------------------------------------
-//
-void CLocationRecord::HandleConversionError(TInt aError)
- {
- LOG( "CLocationRecord::HandleConversionError(), begin" );
- ARG_USED(aError);
- if(iRemapState == ERemapNwGeoConverterInProgress)
- {
- iRemapState = ERemapProgressNone;
- }
- else if ( iMediaItems.Count() > 0 )
- {
- TLocationSnapshotItem* item = iMediaItems[0];
- iMediaItems.Remove(0);
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- delete item;
- }
- // let's not use multiple access point.
-#ifdef LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress) &&
- iLocationItems.Count() > 0)
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- if(iRevGeocoderPlugin)
- {
- TRAP_IGNORE(iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption));
- }
- }
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 ||
- (iMediaHandlingFlag & KReverseGeoCodingInProgress) > 0)
-#else
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0)
-#endif //LOC_REVERSEGEOCODE
- {
- // stop n/w info change listener, since device may connect to n/w
- // and local trail will receive so many call backs on current n/w info change.
- iNetworkInfoChangeListener->StopNwInfoChangeNotifier();
- }
- else
- {
- iNetworkInfoChangeListener->StartNwInfoChangeNotifier();
- }
- TRAP_IGNORE(FindLocationFromDBL());
- GeoTaggingCompleted();
- LOG( "CLocationRecord::HandleConversionError(), end" );
- }
-
-#endif // LOC_GEOTAGGING_CELLID
-
-// --------------------------------------------------------------------------
-// CLocationRecord::SetMdeSession
-// --------------------------------------------------------------------------
-//
EXPORT_C void CLocationRecord::SetMdeSession( CMdESession* aSession )
{
- LOG( "CLocationRecord::SetMdeSession(), begin" );
iMdeSession = aSession;
-#ifdef LOC_REVERSEGEOCODE
- iTagCreator->SetSession( aSession );
-#endif
TRAPD(err, iRemapper->InitialiseL( aSession ));
if( err != KErrNone )
{
delete iRemapper;
iRemapper = NULL;
}
- TRAP(err, InitialiseL() );
- LOG( "CLocationRecord::SetMdeSession(), end" );
}
-// --------------------------------------------------------------------------
-// CLocationRecord::InitialiseL
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::InitialiseL()
- {
- LOG( "CLocationRecord::InitialiseL(), begin" );
- // namespace defaults
- iNamespaceDef = &iMdeSession->GetDefaultNamespaceDefL();
-
- // location object definitions
- iLocationObjectDef = &iNamespaceDef->GetObjectDefL( Location::KLocationObject );
- iLatitudeDef = &iLocationObjectDef->GetPropertyDefL( Location::KLatitudeProperty );
- iLongitudeDef = &iLocationObjectDef->GetPropertyDefL( Location::KLongitudeProperty );
- iAltitudeDef = &iLocationObjectDef->GetPropertyDefL( Location::KAltitudeProperty );
- LOG( "CLocationRecord::InitialiseL(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::StartTimerL
-// --------------------------------------------------------------------------
-//
void CLocationRecord::StartTimerL()
{
- LOG("CLocationRecord::StartTimerL,begin");
+ LOG("CLocationRecord::StartTimerL");
if( !iNetworkInfoTimer->IsActive() )
{
iNetworkInfoTimer->Start( iInterval, iInterval, TCallBack( UpdateNetworkInfo, this ) );
}
- LOG( "CLocationRecord::StartL(), end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationRecord::GetMdeObjectTimeL
-// --------------------------------------------------------------------------
-//
TTime CLocationRecord::GetMdeObjectTimeL( TItemId aObjectId )
{
- LOG( "CLocationRecord::GetMdeObjectTimeL(), begin" );
CMdENamespaceDef& namespaceDef = iMdeSession->GetDefaultNamespaceDefL();
CMdEObjectDef& objectDef = namespaceDef.GetObjectDefL( Object::KBaseObject );
@@ -2236,11 +1102,6 @@
CMdEProperty* property = NULL;
object = iMdeSession->GetObjectL( aObjectId );
- if( !object )
- {
- User::Leave( KErrNotFound );
- }
-
CleanupStack::PushL( object );
object->Property( timeDef, property, 0 );
if ( !property )
@@ -2250,84 +1111,14 @@
const TTime timeValue( property->TimeValueL() );
CleanupStack::PopAndDestroy( object );
-
- LOG( "CLocationRecord::GetMdeObjectTimeL(), end" );
return timeValue;
-
}
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::RemappingNeeded
-// --------------------------------------------------------------------------
-//
EXPORT_C TBool CLocationRecord::RemappingNeeded()
{
- return ( iRemapper->ItemsInQueue()
- && (iRemapState == ERemapProgressNone));
+ return iRemapper->ItemsInQueue();
}
-
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::FindLocationWithSameNetInfoL()
-// check any location object already exists with same network info
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::FindLocationWithSameNetInfoL()
- {
- LOG( "CLocationRecord::FindLocationWithSameNetInfoL(), begin" );
- if(iMediaItems[0]->iLocationData.iNetworkInfo.iCellId > 0 &&
- iMediaItems[0]->iLocationData.iNetworkInfo.iCountryCode.Length() > 0 &&
- iMediaItems[0]->iLocationData.iNetworkInfo.iNetworkId.Length() > 0)
- {
- CMdEPropertyDef& cellIdDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCellIdProperty );
- CMdEPropertyDef& locationCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KLocationAreaCodeProperty );
- CMdEPropertyDef& countryCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KCountryCodeProperty );
- CMdEPropertyDef& networkCodeDef = iLocationObjectDef->GetPropertyDefL(
- Location::KNetworkCodeProperty );
-
- if(iNetLocationQuery)
- {
- iNetLocationQuery->RemoveObserver(*this);
- iNetLocationQuery->Cancel();
- delete iNetLocationQuery;
- iNetLocationQuery = NULL;
- }
- iNetLocationQuery = iMdeSession->NewObjectQueryL( *iNamespaceDef, *iLocationObjectDef, this );
- CMdELogicCondition& cond = iNetLocationQuery->Conditions();
- cond.SetOperator( ELogicConditionOperatorAnd );
-
- cond.AddPropertyConditionL( cellIdDef,
- TMdEUintEqual( iMediaItems[0]->iLocationData.iNetworkInfo.iCellId) );
- cond.AddPropertyConditionL( locationCodeDef,
- TMdEUintEqual( iMediaItems[0]->iLocationData.iNetworkInfo.iLocationAreaCode) );
- cond.AddPropertyConditionL( countryCodeDef, ETextPropertyConditionCompareEquals,
- iMediaItems[0]->iLocationData.iNetworkInfo.iCountryCode );
- cond.AddPropertyConditionL( networkCodeDef, ETextPropertyConditionCompareEquals,
- iMediaItems[0]->iLocationData.iNetworkInfo.iNetworkId );
-
- iNetLocationQuery->FindL(1, 1);
- iMediaHandlingFlag |= KLocationQueryInProgress;
- }
- else
- {
- TLocationSnapshotItem* firstPtr = iMediaItems[0];
- iMediaItems.Remove(0);
- delete firstPtr;
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- FindLocationFromDBL();
- }
- LOG( "CLocationRecord::FindLocationWithSameNetInfoL(), end" );
-
- }
-
EXPORT_C TBool CLocationRecord::IsLowBattery()
{
LOG("CLocationRecord::IsLowBattery()");
@@ -2344,527 +1135,7 @@
{
return ETrue;
}
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::GeoTaggingCompleted
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::GeoTaggingCompleted()
- {
- LOG( "CLocationRecord::GeoTaggingCompleted(), begin" );
- if((iMediaItems.Count() == 0)
-#ifdef LOC_REVERSEGEOCODE
- && (iLocationItems.Count() == 0)
-#endif //LOC_REVERSEGEOCODE
- )
- {
- LOG("Geo tagging completed");
- iGeoTaggerObserver.GeoTaggingCompleted(KErrNone);
- // fallback to silent
-#ifdef LOC_REVERSEGEOCODE
- iConnectionOption = ESilent;
-#endif //LOC_REVERSEGEOCODE
- }
- LOG( "CLocationRecord::GeoTaggingCompleted(), end" );
- }
-
-
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::TaggingInProgress
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CLocationRecord::TaggingInProgress()
- {
- LOG( "CLocationRecord::TaggingInProgress(), begin" );
- TBool retVal = EFalse;
-#ifdef LOC_REVERSEGEOCODE
- if( ((iMediaItems.Count() > 0) || (iLocationItems.Count() > 0) )
- && (iRevGeocoderPlugin && iRevGeocoderPlugin->SilentConnectionAllowed()))
-#else
- if( iMediaItems.Count() > 0 )
-
-#endif //LOC_REVERSEGEOCODE
- {
-#ifdef LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- // start geocoding
-
- if (iLocationItems.Count() > 0 )
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
-
- TRAP_IGNORE( iRevGeocoderPlugin->GetAddressByCoordinateL(
- iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption) );
-
- retVal = ETrue;
- }
- }
- else
- {
- retVal = ETrue;
- }
-#endif //LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KLocationQueryInProgress))
- {
- if(iMediaItems.Count() > 0)
- {
- HandleFindLocationFromDB();
- retVal = ETrue;
- }
- }
- else
- {
- retVal = ETrue;
- }
- }
- else
- {
- // Flash the array to avoid double tagging by photos & localrail.
- }
- LOG( "CLocationRecord::TaggingInProgress(), end" );
- return retVal;
- }
-
-
-// ----------------------------------------------------------------------------
-// CLocationRecord::GetCurrentRegisteredNw()
-// ----------------------------------------------------------------------------
-EXPORT_C RMobilePhone::TMobilePhoneNetworkInfoV2& CLocationRecord::GetCurrentRegisteredNw()
- {
- LOG( "CLocationRecord::GetCurrentRegisteredNw ,begin" );
- return iNetworkInfoChangeListener->GetCurrentRegisterNw();
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::StartGeoTagging
-// --------------------------------------------------------------------------
-//
-EXPORT_C TBool CLocationRecord::StartGeoTagging(const TConnectionOption aConnectionOption)
- {
- LOG( "CLocationRecord::StartGeoTagging(), begin" );
- TBool retVal = EFalse;
- ARG_USED(aConnectionOption);
- if((iMediaItems.Count() > 0)
-#ifdef LOC_REVERSEGEOCODE
- || (iLocationItems.Count() > 0)
-#endif //LOC_REVERSEGEOCODE
- )
- {
-#ifdef LOC_REVERSEGEOCODE
- iConnectionOption = aConnectionOption;
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress))
- {
- // start geocoding
- if (iLocationItems.Count() > 0 )
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
- if(iRevGeocoderPlugin)
- {
- TRAP_IGNORE( iRevGeocoderPlugin->GetAddressByCoordinateL(
- iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption) );
- }
- retVal = ETrue;
- }
- }
- else
- {
- retVal = ETrue;
- }
-#endif //LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KLocationQueryInProgress))
- {
- if(iMediaItems.Count() > 0)
- {
- HandleFindLocationFromDB();
- retVal = ETrue;
- }
- }
- else
- {
- retVal = ETrue;
- }
- }
- LOG( "CLocationRecord::StartGeoTagging(), end" );
- return retVal;
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::CancelGeoTagging
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CLocationRecord::CancelGeoTagging()
- {
-#ifdef LOC_REVERSEGEOCODE
- LOG1( "CLocationRecord::CancelGeoTagging(), Connetion opt - %d",
- iConnectionOption );
- // set this to default connection.
- iConnectionOption = ESilent;
-#endif //LOC_REVERSEGEOCODE
- }
-
-
-#ifdef LOC_REVERSEGEOCODE
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GetRelatedImages()
-// Find any image, already related to this location object
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::GetRelatedImageL(TItemId aLocID)
- {
- LOG( "CLocationRecord::GetRelatedImageL(), begin" );
- CMdEObjectDef& imageObjDef = iNamespaceDef->GetObjectDefL( Image::KImageObject );
- if(iImageQuery)
- {
- iImageQuery->RemoveObserver(*this);
- iImageQuery->Cancel();
- delete iImageQuery;
- iImageQuery = NULL;
- }
-
- iImageQuery = iMdeSession->NewRelationQueryL( *iNamespaceDef, this );
- User::LeaveIfNull( iImageQuery );
-
- iImageQuery->SetResultMode( EQueryResultModeItem );
-
- // both left and right condition must match
- CMdERelationCondition& filterCond = iImageQuery->Conditions().
- AddRelationConditionL( ERelationConditionSideRight );
-
- // left one must be any image object.
- filterCond.LeftL().AddObjectConditionL( imageObjDef );
-
- // right one must be this location object
- filterCond.RightL().AddObjectConditionL( aLocID );
-
- iImageQuery->FindL(1, 1); // results to a call to HandleQueryCompleted()
- LOG( "CLocationRecord::GetRelatedImageL(), end" );
}
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::ReverseGeocodeComplete()
-// Get address details like country, city..
-// Create country and city tags and attach to the current image/video object
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::ReverseGeocodeComplete( TInt& aErrorcode, MAddressInfo& aAddressInfo )
- {
- LOG( "CLocationRecord::ReverseGeocodeComplete(), begin" );
- TItemId countryTagId(0);
- TItemId cityTagId(0);
-
- 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,
- cityPtr, cityTagId ) );
- if ( iRemapState == ERemapRevGeoCodeInProgress)
- {
- TRAP_IGNORE( iRemapper->AttachGeoTagsL( iTagCreator, countryTagId, cityTagId ) );
- iRemapState = ERemapProgressNone;
- }
- else
- {
- if(iLocationItems.Count() > 0)
- {
- iLocationItems[0]->iCountryTagId = countryTagId;
- iLocationItems[0]->iCityTagId = cityTagId;
- iLastLocationItem = (*iLocationItems[0]);
-
- 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;
- }
-
- }
- }
- //check other items in the array has same location
- for ( TInt index = iLocationItems.Count() - 1; index > 0; index--)
- {
- if ( iLocationItems[index]->iLocationId == iLastLocationItem.iLocationId )
- {
- LOG1("Attached tags in for - %d\n", index);
- TRAP_IGNORE( iTagCreator->AttachTagsL(
- iLocationItems[index]->iObjectId, countryTagId, cityTagId ) );
- snapshotItem = iLocationItems[index];
- iLocationItems.Remove(index);
- delete snapshotItem;
- }
- }
- }
- else
- {
- //handle error
- LOG("Reverse geo coding fails");
- iLastReverseGeocodeFails = ETrue;
- }
-
- //irrespective of error or not, remove current(first) item to proceed further
- if ( iLocationItems.Count() > 0 )
- {
- snapshotItem = iLocationItems[0];
- iLocationItems.Remove(0);
- delete snapshotItem;
- iLocationItems.Compress();
- }
- if (aErrorcode == KErrNone)
- {
- if(iRemapState == ERemapRevGeoCodePending)
- {
- if(iRevGeocoderPlugin)
- {
- TRAPD(err, iRevGeocoderPlugin->GetAddressByCoordinateL( iNewItem.iLocationData.iPosition, iConnectionOption );)
- if(err == KErrNone)
- {
- // Remap geo coding in pending state
- iRemapState = ERemapRevGeoCodeInProgress;
- //Find the address by coordinate, results a call to ReverseGeocodeComplete()
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
- }
- }
- }
- else if(iLocationItems.Count() > 0)
- {
- if(iRevGeocoderPlugin)
- {
- TRAPD(err, iRevGeocoderPlugin->GetAddressByCoordinateL(
- iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption) );
- if(err == KErrNone)
- {
- // queue is not empty process the next.
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
- }
- }
- }
- }
-
- GeoTaggingCompleted();
- if((iMediaHandlingFlag & KSnapGeoConvertInProgress) > 0 ||
- (iMediaHandlingFlag & KReverseGeoCodingInProgress) > 0)
- {
- // stop n/w info change listener, since device may connect to n/w
- // and local trail will receive so many call backs on current n/w info change.
- iNetworkInfoChangeListener->StopNwInfoChangeNotifier();
- }
- else
- {
- iNetworkInfoChangeListener->StartNwInfoChangeNotifier();
- }
- LOG( "CLocationRecord::ReverseGeocodeComplete(), end" );
- }
-
-
-// ----------------------------------------------------------------------------
-// CLocationRecord::IsRegisteredAtHomeNetwork()
-// ----------------------------------------------------------------------------
-TBool CLocationRecord::IsRegisteredAtHomeNetwork()
- {
- LOG( "CLocationRecord::IsRegisteredAtHomeNetwork" );
- return iGeoTaggerObserver.IsRegisteredAtHomeNetwork();
- }
-
-// ----------------------------------------------------------------------------
-// CLocationRecord::GetHomeNetworkInfo()
-// ----------------------------------------------------------------------------
-const RMobilePhone::TMobilePhoneNetworkInfoV1&
- CLocationRecord::GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag)
- {
- LOG( "CLocationRecord::GetHomeNetworkInfo" );
- return iGeoTaggerObserver.GetHomeNetworkInfo(aHomeNwInfoAvailableFlag);
- }
-
-// ----------------------------------------------------------------------------
-// CLocationRecord::GetCurrentRegisterNw()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneNetworkInfoV2& CLocationRecord::GetCurrentRegisterNw()
- {
- LOG( "CLocationRecord::GetCurrentRegisterNw ,begin" );
- return GetCurrentRegisteredNw();
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::HandleTagQuery()
-// handle if only gps info available
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::HandleTagQueryL( CMdEQuery& aQuery )
- {
- LOG( "CLocationRecord::HandleTagQueryL(), begin" );
- TItemId countryTagId = 0;
- TItemId cityTagId = 0;
- TRAPD( error, FindCountryAndCityTagL( aQuery, countryTagId, cityTagId ) );
- if ( error == KErrNone )
- {
- LOG1("Media count - %d\n", iMediaItems.Count());
- if ( !countryTagId && !cityTagId )
- {
- if ( iMediaItems.Count() > 0 )
- {
- iLocationItems.Append( iMediaItems[0] );
- if((iMediaItems[0]->iFlag & KSnapMediaFile) > 0)
- {
- iLastMediaItem = *(iMediaItems[0]);
- }
- iMediaItems.Remove(0);
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- }
-
-#ifdef LOC_REVERSEGEOCODE
- if(!(iMediaHandlingFlag & KReverseGeoCodingInProgress) &&
- iLocationItems.Count() > 0)
- {
- iMediaHandlingFlag |= KReverseGeoCodingInProgress;
- if(iRevGeocoderPlugin)
- {
- iRevGeocoderPlugin->GetAddressByCoordinateL
- ( iLocationItems[0]->iLocationData.iPosition,
- iConnectionOption);
- }
- }
-#endif //LOC_REVERSEGEOCODE
- }
- else
- {
-
- iTagCreator->AttachTagsL( iMediaItems[0]->iObjectId, countryTagId, cityTagId );
- if ( iMediaItems.Count() > 0 )
- {
- iMediaItems[0]->iCountryTagId = countryTagId;
- iMediaItems[0]->iCityTagId = cityTagId;
- TLocationSnapshotItem* item = iMediaItems[0];
- if((iMediaItems[0]->iFlag & KSnapMediaFile) > 0)
- {
- iLastMediaItem = *item;
- }
- iMediaItems.Remove(0);
- iMediaItems.Compress();
- iMediaHandlingFlag &= ~KLocationQueryInProgress;
- delete item;
- }
- }
-
- }
- if ( iMediaItems.Count() > 0 )
- {
- FindLocationFromDBL();
- }
- LOG( "CLocationRecord::HandleTagQueryL(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationRecord::FindCountryAndCityTagL()
-// Go through all attached tags to get location tags only
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::FindCountryAndCityTagL( CMdEQuery& aQuery,
- TItemId& aCountryTagId, TItemId& aCityTagId )
- {
- LOG( "CLocationRecord::FindCountryAndCityTagL(), begin" );
- TItemId tagId = 0;
- CMdEObject* object = NULL;
- TInt error = KErrNone;
-
- const TInt count = aQuery.Count();
-
- for ( TInt i = 0; i < count; i++ )
- {
- CMdERelation& relation = static_cast<CMdERelation&>( aQuery.ResultItem( i ) );
-
- tagId = relation.RightObjectId();
- TRAP_IGNORE( object = iMdeSession->GetObjectL( tagId ) );
-
- if ( !aCountryTagId )
- {
- error = object->Uri().Find( KCountry );
- //just make sure 'country' appears first in the tag uri
- if ( error == KErrNone )
- {
- aCountryTagId = tagId;
- continue;
- }
- }
-
- if ( !aCityTagId )
- {
- error = object->Uri().Find( KCity );
- if ( error == KErrNone )
- {
- aCityTagId = tagId;
- }
- }
-
- if ( aCountryTagId && aCityTagId )
- {
- i = count;
- }
- }
- LOG( "CLocationRecord::FindCountryAndCityTagL(), end" );
-
- }
-
-// --------------------------------------------------------------------------
-// CLocationRecord::GetTagsL()
-// --------------------------------------------------------------------------
-//
-void CLocationRecord::GetTagsL( TItemId aImageID )
- {
- LOG( "CLocationRecord::GetTagsL(), begin" );
- CMdEObjectDef& tagObjectDef = iNamespaceDef->GetObjectDefL( Tag::KTagObject );
-
- if(iTagQuery)
- {
- iTagQuery->RemoveObserver(*this);
- iTagQuery->Cancel();
- delete iTagQuery;
- iTagQuery = NULL;
- }
-
- iTagQuery = iMdeSession->NewRelationQueryL( *iNamespaceDef, this );
- User::LeaveIfNull( iTagQuery );
-
- iTagQuery->SetResultMode( EQueryResultModeItem );
-
- // both left and right condition must match
- CMdERelationCondition& filterCond = iTagQuery->Conditions().
- AddRelationConditionL( ERelationConditionSideRight );
-
- // left one must be this image object.
- filterCond.LeftL().AddObjectConditionL( aImageID );
-
- // right one must be tag object
- filterCond.RightL().AddObjectConditionL( tagObjectDef );
-
- iTagQuery->FindL(); // results to a call to HandleQueryCompleted()
- LOG( "CLocationRecord::GetTagsL(), end" );
- }
-
-
-#endif //LOC_REVERSEGEOCODE
-
// End of file
-
-
--- a/locationmanager/locationtrail/src/cnetworkinfo.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/cnetworkinfo.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -20,9 +20,6 @@
#include "cnetworkinfo.h"
#include "locationmanagerdebug.h"
-
-
-
// --------------------------------------------------------------------------
// CNetworkInfo::NewL
// --------------------------------------------------------------------------
@@ -34,6 +31,7 @@
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
+ LOG( "CNetworkInfo::NewL(), end" );
return self;
}
@@ -43,13 +41,12 @@
//
CNetworkInfo::CNetworkInfo( MNetworkInfoObserver* aTrail )
: CActive( CActive::EPriorityStandard ),
- iTrail ( aTrail ),
- iMobilePhone(aTrail->GetMobilePhone4NwInfo()),
- iState( ENetworkInfoNoOptState ),
-
- iMMNetworkInfoPckg( iMMNetworkInfo )
+ iFirstTime( EFalse ),
+ iTelephony( NULL ),
+ iNetworkInfoV1Pckg( iNetworkInfoV1 )
{
CActiveScheduler::Add( this );
+ iTrail = aTrail;
}
// --------------------------------------------------------------------------
@@ -59,7 +56,17 @@
void CNetworkInfo::ConstructL()
{
LOG( "CNetworkInfo::ConstructL(), begin" );
- StartNwInfoChangeNotifier();
+ iFirstTime = ETrue;
+ iTelephony = CTelephony::NewL();
+ iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg);
+ LOG( "CNetworkInfo::ConstructL(), iTelephony->GetCurrentNetworkInfo called" );
+
+ if ( IsActive() )
+ {
+ Cancel();
+ }
+ SetActive();
+
LOG( "CNetworkInfo::ConstructL(), end" );
}
@@ -69,8 +76,8 @@
//
EXPORT_C CNetworkInfo::~CNetworkInfo()
{
- // we are not owning RMobilePhone obj.. DON'T CLOSE it.
Cancel();
+ delete iTelephony;
}
// --------------------------------------------------------------------------
@@ -83,61 +90,25 @@
}
// --------------------------------------------------------------------------
-// CNetworkInfo::StartNwInfoChangeNotifier
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CNetworkInfo::StartNwInfoChangeNotifier()
- {
- LOG( "CNetworkInfo::StartNwInfoChangeNotifier(), begin" );
- if ( !IsActive())
- {
- // get current n/w info first and from RunL start notifier
- iState = ENetworkInfoOptGetState;
-
- iMobilePhone.GetCurrentNetwork(iStatus, iMMNetworkInfoPckg, iMMArea);
- SetActive();
- }
-
- LOG( "CNetworkInfo::StartNwInfoChangeNotifier(), end" );
- }
-
-// --------------------------------------------------------------------------
-// CNetworkInfo::StopNwInfoChangeNotifier
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CNetworkInfo::StopNwInfoChangeNotifier()
- {
- LOG( "CNetworkInfo::StopNwInfoChangeNotifier(), begin" );
- Cancel();
- iState = ENetworkInfoNoOptState;
- LOG( "CNetworkInfo::StopNwInfoChangeNotifier(), end" );
- }
-
-// --------------------------------------------------------------------------
// CNetworkInfo::RunL
// --------------------------------------------------------------------------
//
void CNetworkInfo::RunL()
{
LOG( "CNetworkInfo::RunL(), begin" );
- // reset the flag first
- iState = ENetworkInfoNoOptState;
- if(iStatus == KErrNone)
- {
- // convert the network info to CTelephony network info. just to give backward compatibility
- MapNetworkInfo(&iNetworkInfoV1, &iMMNetworkInfo, &iMMArea);
- }
- if(iTrail)
- {
- iTrail->NetworkInfo( iNetworkInfoV1, iStatus.Int() );
- }
- // listen to n/w info change
- if ( !IsActive() )
+ iFirstTime = EFalse;
+ iTrail->NetworkInfo( iNetworkInfoV1, iStatus.Int() );
+ LOG( "CNetworkInfo::RunL(), iTrail->NetworkInfo called" );
+
+ iTelephony->NotifyChange(iStatus, CTelephony::ECurrentNetworkInfoChange, iNetworkInfoV1Pckg);
+ LOG( "CNetworkInfo::RunL(), iTelephony->NotifyChange called" );
+
+ if ( IsActive() )
{
- iState = ENetworkInfoOptNotifyState;
- iMobilePhone.NotifyCurrentNetworkChange(iStatus,iMMNetworkInfoPckg, iMMArea);
- SetActive();
- }
+ Cancel();
+ }
+ SetActive();
+
LOG( "CNetworkInfo::RunL(), end" );
}
@@ -147,190 +118,21 @@
//
void CNetworkInfo::DoCancel()
{
- LOG1( "CNetworkInfo::DoCancel(), begin. State - %d", iState);
- switch ( iState )
- {
- case ENetworkInfoOptGetState:
+ LOG( "CNetworkInfo::DoCancel(), begin" );
+ if ( IsActive() )
+ {
+ if ( iFirstTime )
{
- LOG( "Cancel get current n/w info change" );
- iMobilePhone.CancelAsyncRequest( EMobilePhoneGetCurrentNetwork);
- break;
+ LOG( "CNetworkInfo::DoCancel(), cancelling CTelephony::EGetCurrentNetworkInfoCancel" );
+ iTelephony->CancelAsync( CTelephony::EGetCurrentNetworkInfoCancel );
}
- case ENetworkInfoOptNotifyState:
+ else
{
- LOG( "Cancel current n/w info change" );
- iMobilePhone.CancelAsyncRequest( EMobilePhoneNotifyCurrentNetworkChange);
- break;
- }
- default:
- break;
- }
- iState = ENetworkInfoNoOptState;
+ LOG( "CNetworkInfo::DoCancel(), cancelling CTelephony::ECurrentNetworkInfoChangeCancel" );
+ iTelephony->CancelAsync( CTelephony::ECurrentNetworkInfoChangeCancel );
+ }
+ }
LOG( "CNetworkInfo::DoCancel(), end" );
}
-// --------------------------------------------------------------------------
-// CNetworkInfo::MapNetworkInfo
-// --------------------------------------------------------------------------
-//
-EXPORT_C void CNetworkInfo::MapNetworkInfo(CTelephony::TNetworkInfoV1* aTelNetworkInfo,
- RMobilePhone::TMobilePhoneNetworkInfoV2* aMMNetworkInfo,
- RMobilePhone::TMobilePhoneLocationAreaV1* aMMArea)
- {
- LOG( "CNetworkInfo::MapNetworkInfo(), begin" );
- switch(aMMNetworkInfo->iMode)
- {
- case RMobilePhone::ENetworkModeUnknown:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeUnknown;
- break;
- case RMobilePhone::ENetworkModeUnregistered:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeUnregistered;
- break;
- case RMobilePhone::ENetworkModeGsm:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeGsm;
- break;
- case RMobilePhone::ENetworkModeAmps:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeAmps;
- break;
- case RMobilePhone::ENetworkModeCdma95:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeCdma95;
- break;
- case RMobilePhone::ENetworkModeCdma2000:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeCdma2000;
- break;
- case RMobilePhone::ENetworkModeWcdma:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeWcdma;
- break;
- case RMobilePhone::ENetworkModeTdcdma:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeTdcdma;
- break;
- default:
- aTelNetworkInfo->iMode=CTelephony::ENetworkModeUnknown;
- }
-
- switch(aMMNetworkInfo->iStatus)
- {
- case RMobilePhone::ENetworkStatusUnknown:
- aTelNetworkInfo->iStatus=CTelephony::ENetworkStatusUnknown;
- break;
- case RMobilePhone::ENetworkStatusAvailable:
- aTelNetworkInfo->iStatus=CTelephony::ENetworkStatusAvailable;
- break;
- case RMobilePhone::ENetworkStatusCurrent:
- aTelNetworkInfo->iStatus=CTelephony::ENetworkStatusCurrent;
- break;
- case RMobilePhone::ENetworkStatusForbidden:
- aTelNetworkInfo->iStatus=CTelephony::ENetworkStatusForbidden;
- break;
- default:
- aTelNetworkInfo->iStatus=CTelephony::ENetworkStatusUnknown;
- }
-
- switch(aMMNetworkInfo->iBandInfo)
- {
- case RMobilePhone::EBandUnknown:
- aTelNetworkInfo->iBandInfo=CTelephony::EBandUnknown;
- break;
- case RMobilePhone::E800BandA:
- aTelNetworkInfo->iBandInfo=CTelephony::E800BandA;
- break;
- case RMobilePhone::E800BandB:
- aTelNetworkInfo->iBandInfo=CTelephony::E800BandB;
- break;
- case RMobilePhone::E800BandC:
- aTelNetworkInfo->iBandInfo=CTelephony::E800BandC;
- break;
- case RMobilePhone::E1900BandA:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandA;
- break;
- case RMobilePhone::E1900BandB:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandB;
- break;
- case RMobilePhone::E1900BandC:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandC;
- break;
- case RMobilePhone::E1900BandD:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandD;
- break;
- case RMobilePhone::E1900BandE:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandE;
- break;
- case RMobilePhone::E1900BandF:
- aTelNetworkInfo->iBandInfo=CTelephony::E1900BandF;
- break;
- default:
- aTelNetworkInfo->iBandInfo=CTelephony::EBandUnknown;
- }
-
- aTelNetworkInfo->iCountryCode.Copy(aMMNetworkInfo->iCountryCode);
- aTelNetworkInfo->iNetworkId.Copy(aMMNetworkInfo->iNetworkId);
- aTelNetworkInfo->iDisplayTag.Copy(aMMNetworkInfo->iDisplayTag);
-
- TInt maxLength = aTelNetworkInfo->iShortName.MaxLength();
- if (aMMNetworkInfo->iShortName.Length() > maxLength)
- {
- aTelNetworkInfo->iShortName.Copy(aMMNetworkInfo->iShortName.Ptr(), maxLength);
- }
- else
- {
- aTelNetworkInfo->iShortName.Copy(aMMNetworkInfo->iShortName);
- }
-
- maxLength = aTelNetworkInfo->iLongName.MaxLength();
-
- if (aMMNetworkInfo->iLongName.Length() > maxLength)
- {
- aTelNetworkInfo->iLongName.Copy(aMMNetworkInfo->iLongName.Ptr(), maxLength);
- }
- else
- {
- aTelNetworkInfo->iLongName.Copy(aMMNetworkInfo->iLongName);
- }
-
- aTelNetworkInfo->iCdmaSID.Copy(aMMNetworkInfo->iCdmaSID);
-
- if(aMMArea)
- {
- aTelNetworkInfo->iAreaKnown=aMMArea->iAreaKnown;
- aTelNetworkInfo->iLocationAreaCode=aMMArea->iLocationAreaCode;
- aTelNetworkInfo->iCellId=aMMArea->iCellId;
- }
- else
- {
- aTelNetworkInfo->iAreaKnown=EFalse;
- aTelNetworkInfo->iLocationAreaCode=0;
- aTelNetworkInfo->iCellId=0;
- }
-
- //check which paramater class version this is.
- switch(aMMNetworkInfo->iAccess)
- {
- case RMobilePhone::ENetworkAccessUnknown:
- aTelNetworkInfo->iAccess=CTelephony::ENetworkAccessUnknown;
- break;
- case RMobilePhone::ENetworkAccessGsm:
- aTelNetworkInfo->iAccess=CTelephony::ENetworkAccessGsm;
- break;
- case RMobilePhone::ENetworkAccessGsmCompact:
- aTelNetworkInfo->iAccess=CTelephony::ENetworkAccessGsmCompact;
- break;
- case RMobilePhone::ENetworkAccessUtran:
- aTelNetworkInfo->iAccess=CTelephony::ENetworkAccessUtran;
- break;
- default:
- aTelNetworkInfo->iAccess=CTelephony::ENetworkAccessUnknown;
- }
-
- LOG( "CNetworkInfo::MapNetworkInfo(), end" );
- }
-
-// ----------------------------------------------------------------------------
-// CNetworkInfo::GetCurrentRegisterNw()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneNetworkInfoV2& CNetworkInfo::GetCurrentRegisterNw()
- {
- return iMMNetworkInfo;
- }
-
// End of file
-
--- a/locationmanager/locationtrail/src/cpositioninfo.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/cpositioninfo.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -43,8 +43,7 @@
//
CPositionInfo::CPositionInfo( MPositionInfoObserver* aTrail )
: CActive( CActive::EPriorityStandard ),
- iState( EPositionOptStateNone ),
- iConnectedPositionServer(EFalse)
+ iFirstInterval( ETrue )
{
LOG( "CPositionInfo::CPositionInfo()");
CActiveScheduler::Add( this );
@@ -76,7 +75,9 @@
//
EXPORT_C CPositionInfo::~CPositionInfo()
{
- Stop();
+ Cancel();
+ iPositioner.Close();
+ iPosServer.Close();
}
// --------------------------------------------------------------------------
@@ -95,41 +96,34 @@
void CPositionInfo::StartL( RLocationTrail::TTrailCaptureSetting aCaptureSetting, TInt aUpdateInterval )
{
LOG( "CPositionInfo::StartL(), begin" );
- if(IsActive())
- {
- Cancel();
- }
+
iTrailCaptureSetting = aCaptureSetting;
iUpdateInterval = aUpdateInterval;
- iState = EPositionOptStateNone;
+ iFirstInterval = ETrue;
+ iPositionInfo = TPositionSatelliteInfo();
- iPositionInfo = TPositionSatelliteInfo();
+ // Set update interval.
+ iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds(KFirstInterval) );
+ // Set time out level.
+ iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds( KFirstTimeOut) );
+ // Positions which have time stamp below KMaxAge can be reused
+ iUpdateOptions.SetMaxUpdateAge( TTimeIntervalMicroSeconds(KMaxAge) );
+ // Disables location framework to send partial position data
+ iUpdateOptions.SetAcceptPartialUpdates( EFalse );
if ( aCaptureSetting == RLocationTrail::ECaptureAll )
{
- if(!iConnectedPositionServer)
- {
- // Positions which have time stamp below KMaxAge can be reused
- iUpdateOptions.SetMaxUpdateAge( TTimeIntervalMicroSeconds(KMaxAge) );
- // Disables location framework to send partial position data
- iUpdateOptions.SetAcceptPartialUpdates( EFalse );
- User::LeaveIfError( iPosServer.Connect() );
- CleanupClosePushL(iPosServer);
- User::LeaveIfError( iPositioner.Open( iPosServer ) );
- CleanupClosePushL(iPositioner);
- User::LeaveIfError( iPositioner.SetRequestor( CRequestor::ERequestorService,
- CRequestor::EFormatApplication, KRequestor ) );
- iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds (iUpdateInterval) );
- iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KUpdateTimeOut ) );
- User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
- CleanupStack::Pop(2); // iPositioner, iPosServer
- iConnectedPositionServer = ETrue;
- }
- iState = EPositionOptStateGetLastKnownPosition;
- iPositioner.GetLastKnownPosition( iPositionInfo, iStatus );
- SetActive();
+ User::LeaveIfError( iPosServer.Connect() );
+ User::LeaveIfError( iPositioner.Open( iPosServer ) );
+ User::LeaveIfError( iPositioner.SetRequestor( CRequestor::ERequestorService,
+ CRequestor::EFormatApplication, KRequestor ) );
+ User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
+ iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
}
- else if ( aCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
+
+ SetActive();
+
+ if ( aCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
{
TRequestStatus* status = &iStatus;
User::RequestComplete( status, KErrNone );
@@ -144,25 +138,19 @@
//
void CPositionInfo::NextPosition()
{
- LOG( "CPositionInfo::NextPosition(), begin" );
- if(!IsActive() && iConnectedPositionServer)
- {
- LOG("Not active");
- iPositionInfo = TPositionSatelliteInfo(); // Clear position info.
- if ( iTrailCaptureSetting == RLocationTrail::ECaptureAll )
- {
- iState = EPositionOptStateNotifyUpdate;
- iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
- SetActive();
- }
- else if ( iTrailCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
- {
- SetActive();
- TRequestStatus* status = &iStatus;
- User::RequestComplete( status, KErrNone );
- }
- }
- LOG( "CPositionInfo::NextPosition(), end" );
+ iPositionInfo = TPositionSatelliteInfo(); // Clear position info.
+ if ( iTrailCaptureSetting == RLocationTrail::ECaptureAll )
+ {
+ iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+ }
+
+ SetActive();
+
+ if ( iTrailCaptureSetting == RLocationTrail::ECaptureNetworkInfo )
+ {
+ TRequestStatus* status = &iStatus;
+ User::RequestComplete( status, KErrNone );
+ }
}
// --------------------------------------------------------------------------
@@ -171,17 +159,10 @@
//
void CPositionInfo::Stop()
{
- LOG( "CPositionInfo::Stop(), begin" );
Cancel();
- if(iConnectedPositionServer)
- {
- iPositioner.Close();
- iPosServer.Close();
- iConnectedPositionServer = EFalse;
- }
- // reset the state
- iState = EPositionOptStateNone;
- LOG( "CPositionInfo::Stop(), end" );
+
+ iPositioner.Close();
+ iPosServer.Close();
}
// --------------------------------------------------------------------------
@@ -190,39 +171,22 @@
//
void CPositionInfo::RunL()
{
- LOG( "CPositionInfo::RunL(), begin" );
- if(iState == EPositionOptStateGetLastKnownPosition)
- {
- // get last location.. check the time and if it's within the limit, pass to trail.
- const TTimeIntervalSeconds KMaxAllowedLastKnownPosition(60*5); // 5 mins
- TTimeIntervalSeconds interval;
- TTime now;
- TPosition lastPosition;
- iPositionInfo.GetPosition(lastPosition);
- now.UniversalTime();
- now.SecondsFrom(lastPosition.Time(), interval);
- if(iStatus.Int() == KErrNone && interval < KMaxAllowedLastKnownPosition)
- {
- LOG("Last know position is recent one");
- iTrail->Position( iPositionInfo, iStatus.Int() );
- }
- else
- {
- LOG("Old last know position. Drop it..");
- }
- }
- else
- {
- // notify response.. always pass to trail
- iTrail->Position( iPositionInfo, iStatus.Int() );
- }
-
- if ( iTrailCaptureSetting == RLocationTrail::ECaptureAll &&
- iState != EPositionOptStateNone)
+ iTrail->Position( iPositionInfo, iStatus.Int() );
+
+ if ( iFirstInterval && IsActive() )
{
- NextPosition();
+ Cancel();
+ LOG("CPositionInfo::RunL() - First Time");
+ iUpdateOptions.SetUpdateInterval( TTimeIntervalMicroSeconds (iUpdateInterval) );
+ iUpdateOptions.SetUpdateTimeOut( TTimeIntervalMicroSeconds(KUpdateTimeOut ) );
+ if ( iTrailCaptureSetting == RLocationTrail::ECaptureAll )
+ {
+ User::LeaveIfError( iPositioner.SetUpdateOptions( iUpdateOptions ) );
+ iPositioner.NotifyPositionUpdate( iPositionInfo, iStatus );
+ }
+ SetActive();
+ iFirstInterval = EFalse;
}
- LOG( "CPositionInfo::RunL(), end" );
}
// --------------------------------------------------------------------------
@@ -231,37 +195,11 @@
//
void CPositionInfo::DoCancel()
{
- LOG( "CPositionInfo::DoCancel(), begin" );
- switch(iState)
+ LOG( "CPositionInfo::DoCancel()" );
+ if ( IsActive() )
{
- case EPositionOptStateGetLastKnownPosition:
- {
- iPositioner.CancelRequest( EPositionerGetLastKnownPosition );
- break;
- }
- case EPositionOptStateNotifyUpdate:
- {
- iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
- break;
- }
- default:
- break;
+ iPositioner.CancelRequest( EPositionerNotifyPositionUpdate );
}
- iState = EPositionOptStateNone;
- LOG( "CPositionInfo::DoCancel(), end" );
- }
-
-
-// --------------------------------------------------------------------------
-// CPositionInfo::HandleRemapComplete
-// --------------------------------------------------------------------------
-//
-void CPositionInfo::HandleRemapComplete()
- {
- LOG( "CPositionInfo::HandleRemapComplete()" );
- // Don't call notify update from RunL
- iState = EPositionOptStateNone;
}
// End of file
-
--- a/locationmanager/locationtrail/src/ctracklog.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/ctracklog.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -68,7 +68,6 @@
EXPORT_C CTrackLog::~CTrackLog()
{
delete iGpxConverter;
- iGpxConverter = NULL;
iFs.Close();
}
@@ -202,7 +201,6 @@
if ( err == KErrNone )
{
delete lastCoords;
- lastCoords = NULL;
lastCoords = new TCoordinate( aTrailItem.iLocationData.iPosition );
iBoundaries->distance += distance;
}
@@ -223,8 +221,6 @@
RFile64 file;
RFileWriteStream writer;
- CleanupClosePushL( writer );
-
TInt err;
err = file.Open( iFs, iTmpFileName, EFileRead );
if ( err != KErrNone )
@@ -251,6 +247,8 @@
writer.Sink()->SeekL( MStreamBuf::EWrite, TStreamPos( endpos ));
}
+ CleanupClosePushL( writer );
+
TInt count = iTrackLogItemArray.Count();
for( TInt i = 0; i < count; i++ )
@@ -308,9 +306,7 @@
}
}
delete filename;
- filename = NULL;
delete files;
- files = NULL;
}
void CTrackLog::ReadCenRepValueL(TInt aKey, TInt& aValue)
--- a/locationmanager/locationtrail/src/locationremappingao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/locationtrail/src/locationremappingao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -24,11 +24,6 @@
using namespace MdeConstants;
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::NewL()
-// --------------------------------------------------------------------------
-//
CLocationRemappingAO* CLocationRemappingAO::NewL()
{
LOG( "CLocationRemappingAO::NewL" ); // DEBUG INFO
@@ -40,10 +35,6 @@
return self;
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::ConstructL()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::ConstructL()
{
LOG( "CLocationRemappingAO::ConstructL" ); // DEBUG INFO
@@ -58,10 +49,6 @@
}
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::~CLocationRemappingAO()
-// --------------------------------------------------------------------------
-//
CLocationRemappingAO::~CLocationRemappingAO()
{
LOG( "CLocationRemappingAO::~CLocationRemappingAO" ); // DEBUG INFO
@@ -72,10 +59,6 @@
iObjects.ResetAndDestroy();
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::CLocationRemappingAO()
-// --------------------------------------------------------------------------
-//
CLocationRemappingAO::CLocationRemappingAO() : CActive( CActive::EPriorityStandard ),
iState ( EIdle ),
iContinue( EFalse ),
@@ -88,10 +71,7 @@
// No implementation required
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::InitialiseL()
-// --------------------------------------------------------------------------
-//
+
void CLocationRemappingAO::InitialiseL(CMdESession* aMdEClient)
{
LOG( "CLocationRemappingAO::Initialise start" ); // DEBUG INFO
@@ -117,41 +97,21 @@
LOG( "CLocationRemappingAO::Initialise end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::Append()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::Append( TRemapItem aItem )
{
iRemapItems.Append( aItem );
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::ResetQueue()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::ResetQueue()
{
iRemapItems.Reset();
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::ItemsInQueue()
-// --------------------------------------------------------------------------
-//
TBool CLocationRemappingAO::ItemsInQueue()
{
return iRemapItems.Count() > 0;
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::CheckQueue()
-// --------------------------------------------------------------------------
-//
TBool CLocationRemappingAO::CheckQueue()
{
LOG( "CLocationRemappingAO::CheckQueue - start" );
@@ -205,21 +165,13 @@
return create;
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::StopRemapping()
-// --------------------------------------------------------------------------
-//
+
void CLocationRemappingAO::StopRemapping()
{
LOG( "CLocationRemappingAO::StopRemapping" ); // DEBUG INFO
NextState(EIdle);
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::StartRemappingObjects()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::StartRemappingObjects( const TLocationData& aLocationData )
{
iLocationData = aLocationData;
@@ -233,11 +185,6 @@
NextState( ERemapObjects );
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::NextState()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::NextState(TMappingState aState)
{
LOG1( "CLocationRemappingAO::NextState - state: %d", aState ); // DEBUG INFO
@@ -251,11 +198,6 @@
}
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::DoCancel()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::DoCancel()
{
LOG( "CLocationRemappingAO::DoCancel" ); // DEBUG INFO
@@ -263,11 +205,6 @@
NextState(EIdle);
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::RunError()
-// --------------------------------------------------------------------------
-//
TInt CLocationRemappingAO::RunError( TInt aError )
{
if (aError != KErrNone)
@@ -279,11 +216,6 @@
return KErrNone;
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::RunL()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::RunL()
{
LOG1( "CCameraTrailMonitorAO::RunL iStatus: %d", iStatus.Int() ); // DEBUG INFO
@@ -320,10 +252,7 @@
}
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::RemapObjectsL()
-// --------------------------------------------------------------------------
-//
+
void CLocationRemappingAO::RemapObjectsL()
{
LOG( "CLocationRemappingAO::RemapObjects - start" ); // DEBUG INFO
@@ -385,14 +314,12 @@
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);
}
}
@@ -404,11 +331,6 @@
LOG( "CLocationRemappingAO::RemapObjects - end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::CommitObjectsL()
-// --------------------------------------------------------------------------
-//
void CLocationRemappingAO::CommitObjectsL()
{
LOG( "CLocationRemappingAO::CommitObjects" ); // DEBUG INFO
@@ -438,10 +360,7 @@
LOG( "CLocationRemappingAO::ReadTimeFromCenRepL(), end" );
}
-// --------------------------------------------------------------------------
-// CLocationRemappingAO::UpdateRelationsL()
-// --------------------------------------------------------------------------
-//
+
void CLocationRemappingAO::UpdateRelationsL( TItemId aLocationId )
{
LOG("CLocationRemappingAO::UpdateRelationsL - start");
@@ -462,16 +381,14 @@
iRemapItems[i].iObjectId, aLocationId, 0 );
iMdEClient->AddRelationL( *relationObject );
CleanupStack::PopAndDestroy( relationObject );
- LOG("new relation created");
+ LOG("CLocationRemappingAO::UpdateRelationsL - new relation created");
}
else
{
CMdERelation* relationObject = iMdEClient->GetRelationL( iRemapItems[i].iRelationId );
- CleanupStack::PushL(relationObject);
relationObject->SetRightObjectIdL( aLocationId );
iMdEClient->UpdateRelationL( *relationObject );
- CleanupStack::PopAndDestroy(relationObject);
- LOG("old relation updated");
+ LOG("CLocationRemappingAO::UpdateRelationsL - old relation updated");
}
iRemapItems.Remove( i );
}
@@ -479,30 +396,6 @@
LOG("CLocationRemappingAO::UpdateRelationsL - end");
}
-#ifdef LOC_REVERSEGEOCODE
-// --------------------------------------------------------------------------
-// CLocationRemapping::AttachGeoTagsL
-// --------------------------------------------------------------------------
-//
-void CLocationRemappingAO::AttachGeoTagsL( CTagCreator *aTagCreator,
- const TItemId aCountryTagId, const TItemId aCityTagId )
- {
- LOG("CLocationRemapping::AttachGeoTagsL - start");
-
- TInt count = iObjectIds.Count() - 1;
- for( TInt i = count; i >= 0; i-- )
- {
- aTagCreator->AttachTagsL( iObjectIds[i], aCountryTagId, aCityTagId );
- }
-
- iObjectIds.Reset();
-
- LOG("CLocationRemapping::AttachGeoTagsL - end");
- }
-
-#endif //LOC_REVERSEGEOCODE
-
-
// --------------------------------------------------------------------------
// TRemapItem constructor
// --------------------------------------------------------------------------
@@ -516,4 +409,3 @@
}
-// End of file
--- a/locationmanager/server/group/locationmanagerserver.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/server/group/locationmanagerserver.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -18,22 +18,19 @@
#include <platform_paths.hrh>
#include <data_caging_paths.hrh>
-#include "../../inc/locplatsupport.mmh"
VERSION 10.0
TARGETTYPE exe
TARGET locationmanagerserver.exe
UID 0 0x200071BE
-EPOCSTACKSIZE 0x5000
-
#ifdef WINS
EPOCHEAPSIZE 1000 2500000
#else
EPOCHEAPSIZE 1000 5000000
#endif
-CAPABILITY CAP_SERVER Location
+CAPABILITY CAP_SERVER
VENDORID VID_DEFAULT
USERINCLUDE ../inc
@@ -41,29 +38,11 @@
USERINCLUDE ../../../inc
USERINCLUDE ../../locationtrail/inc
-#ifdef _LOC_REVERSEGEOCODE
-MACRO LOC_REVERSEGEOCODE
-USERINCLUDE ../../tagcreator/inc
-#endif
-
-#ifdef _LOC_GEOTAGGING_CELLID
-MACRO LOC_GEOTAGGING_CELLID
-USERINCLUDE ../../geoconverter/inc
-#endif
-
-
-SYSTEMINCLUDE /epoc32/include/platform/lbs
-SYSTEMINCLUDE /epoc32/include/stdapis
-SYSTEMINCLUDE /epoc32/include/ecom
-MW_LAYER_SYSTEMINCLUDE
-
SOURCEPATH ../src
SOURCE clocationmanagerserver.cpp
SOURCE clocationmanagersession.cpp
-SOURCE clocationgeotagtimerao.cpp
-SOURCE clocationservertimerhandler.cpp
-SOURCE nwregistrationstatushandler.cpp
+MW_LAYER_SYSTEMINCLUDE
LIBRARY euser.lib
LIBRARY efsrv.lib
@@ -73,19 +52,9 @@
LIBRARY centralrepository.lib
LIBRARY mdeclient.lib
LIBRARY mdccommon.lib
-LIBRARY libc.lib
-LIBRARY ecom.lib
-LIBRARY etel.lib
-LIBRARY etelmm.lib
-LIBRARY commsdat.lib
-
-LIBRARY geotagger.lib
PAGED
BYTEPAIRCOMPRESSTARGET
OPTION ARMCC -O3 -OTime
EPOCPROCESSPRIORITY background
-
-// End of file
-
--- a/locationmanager/server/inc/clocationgeotagtimerao.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +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: 3AM geo tagger handler
-*
-*/
-
-#ifndef __CLOCATIONGEOTAGTIMERAO_H__
-#define __CLOCATIONGEOTAGTIMERAO_H__
-
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <e32msgqueue.h>
-#include <geotagger.h>
-
-class CLocationGeoTagTimerAO : public CTimer,
- public MGeoTaggerObserver
-{
-
-public:
- /**
- * 1st phase constructor.
- * @param aMdeSession, CMdESession reference
- */
- static CLocationGeoTagTimerAO* NewL(CMdESession& aMdeSession,
- MGeoTaggerObserver& aObserver);
-
- /**
- * Destructor
- */
- ~CLocationGeoTagTimerAO();
-
- /**
- * Start 3AM timer
- */
- void StartTimer();
-
-
-protected:
- /*
- * @see CActive::RunL()
- */
- void RunL();
- // MGeoTaggerObserver
- /**
- * This method is used for notifying that the Geo Tagging is Completed, from MGeoTaggerObserver
- * @param aError, TInt value to indicate if there is any error in geotagging
- * @return None.
- */
- void GeoTaggingCompleted( const TInt aError );
-
- /**
- * This method is used for notifying completion of query for pending geo tags from MGeoTaggerObserver
- * @param aError, TInt value to indicate if there is any error in geotagging
- * @return None.
- */
- void PendingGeoTagReqComplete( const TInt aError );
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
-
- /*
- * 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:
-
- /**
- * 2nd Phase constructor
- */
- void ConstructL();
-
- /**
- * CLocationGeoTagTimerAO
- * Constructor
- * @param aMdeSession, CMdESession reference
- * @return None.
- */
- CLocationGeoTagTimerAO(CMdESession& aMdeSession, MGeoTaggerObserver& aObserver);
-
- TBool IsLowBattery();
-
-private:
- CGeoTagger* iGeoTagger;
- CMdESession& iMdeSession;
- MGeoTaggerObserver& iObserver;
-};
-
-
-#endif /*__CLOCATIONGEOTAGTIMERAO_H__*/
-
-// End of file
--- a/locationmanager/server/inc/clocationmanagerserver.h Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/server/inc/clocationmanagerserver.h Wed Oct 13 15:02:02 2010 +0300
@@ -24,9 +24,6 @@
#include <centralrepository.h>
#include <locationdatatype.h>
#include <locationeventdef.h>
-#ifdef LOC_REVERSEGEOCODE
-#include <geotagger.h>
-#endif //LOC_REVERSEGEOCODE
#include "rlocationtrail.h"
#include "rlocationobjectmanipulator.h"
@@ -38,13 +35,9 @@
#include "mdequery.h"
#include "mderelationquery.h"
#include "locationmanagerdefs.h"
-#include "clocationservertimerhandler.h"
+
class CMdESession;
-class CLocationGeoTagTimerAO;
-class CGeoTagger;
-class REComSession;
-class CNwRegistrationStatusHandler;
// Total number of ranges
const TUint KLocationManagerRangeCount = 1;
@@ -92,9 +85,7 @@
public MMdESessionObserver,
public MMdEQueryObserver,
public MMdEObjectObserver,
- public MGpxConversionObserver,
- public MGeoTaggerObserver,
- public MLocationServerTimerObserver
+ public MGpxConversionObserver
{
private:
struct TMessageQuery
@@ -268,122 +259,30 @@
* @return None.
*/
void RemoveLocationObjectL(TUint& aObjectId);
-
- /**
- * Copies the location object
- * @param aSource source location object
- * @param aTargets target location object
- * @param aQuery message query type
-
- */
void CopyLocationObjectL( TItemId aSource, const RArray<TItemId>& aTargets, TMessageQuery& aQuery );
-
- /**
- * Copies the location object
- * @param aSource The source location object
- * @param aTargets target location object
- * @param aQuery message query type
- */
void CopyLocationObjectL( const TDesC& aSource, const RArray<TPtrC>& aTargets, TMessageQuery& aQuery );
-
- /**
- * checks if the session is ready
- * @return ETrue if Session is ready
- */
+
TBool IsSessionReady();
-
- /**
- * Start track log
- *
- * @return The itemId
- */
+
TItemId StartTrackLogL();
-
- /**
- * Stop track log
- *
- */
+
void StopTrackLogL();
-
- /**
- * IsTrackLogRecording
- *
- * @param aRec
- */
+
void IsTrackLogRecording( TBool &aRec );
- /**
- * Retrieve track log status
- *
- * @param aRecording
- * @param aFixQuality
- */
TInt GetTrackLogStatus( TBool& aRecording, TPositionSatelliteInfo& aFixQuality);
-
- /**
- * Delete track log
- *
- * @param aUri
- */
+
TInt DeleteTrackLogL(const TDesC& aUri);
-
- /**
- * Track log name
- *
- * @param aFileName name of file used to track log
- */
+
TInt TrackLogName(TFileName& aFileName);
- /**
- * Gets the location trail capture settings
- * @param aCaptureSetting The location trail capture settings
- */
void GetCaptureSetting( RLocationTrail::TTrailCaptureSetting& aCaptureSetting );
-
- /**
- * Adds an observer for Gpx conversion
- * @param aObserver the observer for Gpx conversion
- */
+
void AddGpxObserver( MGpxConversionObserver* aObserver );
- /**
- * Copy location by Id
- * @param aMessage
- */
void InitCopyLocationByIdL( const RMessage2& aMessage );
-
- /**
- * Copy Location by Uri
- * @param aMessage
- */
void InitCopyLocationByURIL( const RMessage2& aMessage );
- /**
- * Handles tag pending request
- *
- * @param aMessage IPC message
- */
- void TagPendingRequestL( const RMessage2& aMessage );
-
- /**
- * Cancels the tag pending request
- * @param aMessage IPC message
- */
- void CancelTagPendingRequest( const RMessage2& aMessage );
-
- /**
- * Cancels the geotagging request
- * @param aMessage IPC message
- */
- void CancelGeoTaggingRequest( const RMessage2& aMessage );
-
-
- /**
- * Handle starts geotagging request
- * @param aMessage IPC message
- */
- void StartGeoTaggingL( const RMessage2& aMessage );
-
public: // from MLocationTrailObserver.
/**
* Callback method to get notification about trail state change.
@@ -441,52 +340,6 @@
void GpxFileCreated( const TDesC& aFileName, TItemId aTagId, TReal32 aLength,
TTime aStart, TTime aEnd );
-protected: //From MGeoTaggerObserver
-
- /**
- * This method is called on completion of geotagging
- * and also completes start geotagging IPC message
- * @param aError The err code for geotagging if any
- */
- void GeoTaggingCompleted( const TInt aError );
- /**
- * This method is used for notifying completion of query for pending geo tags
- * @param aError The err code for geotagging if any
- */
- void PendingGeoTagReqComplete( const TInt aError );
-
- /*
- * Get registrer network country code
- *
- * @return current register n/w info
- */
- RMobilePhone::TMobilePhoneNetworkInfoV2& GetCurrentRegisterNw();
-
-
- /*
- * 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);
-
-
- /*
- * UE is registered to home network?
- *
- * @return ETrue if UE is registered at home network else EFalse
- */
- TBool IsRegisteredAtHomeNetwork();
-
-public: //MLocationServerTimerObserver
- /**
- * Timer call back
- * @param aLocationServerTimerType timer type
- * @param aErrorCode error code
- */
- void LocationServerTimerCallBackL
- (const TLocationServerTimerType aLocationServerTimerType, const TInt aErrorCode);
private:
/**
* C++ constructor.
@@ -497,11 +350,7 @@
* 2nd phase constructor.
*/
void ConstructL();
-
- /**
- * Copies the location
- * @param aQuery The query
- */
+
void CopyLocationL( CMdEQuery& aQuery );
/**
@@ -510,10 +359,7 @@
*/
void CancelRequests(RArray<RMessage2>& aMessagesList);
- /**
- * cancels the list of copy requests
- * @param aMessageList the list of query
- */
+
void CancelCopyRequests(RArray<TMessageQuery>& aMessageList);
/**
@@ -550,50 +396,22 @@
* @param aAny, a pointer to CLocationRecord object
* @return Error code
*/
- void PositioningStopTimeout();
+ static TInt PositioningStopTimeout( TAny* aAny );
/**
* Callback function to check if files were added to remapping queue with delay
* @param aAny, a pointer to CLocationRecord object
* @return Error code
*/
- void CheckForRemappingCallback();
-
+ static TInt CheckForRemappingCallback( TAny* aAny );
/**
* Stops location trail and deletes the positioning stop timer.
*/
void StopRecording();
-
- /**
- * Complete notify request
- *
- * @param aEventType, returns the event type
- * @param aError, return error type for this call.
- */
+
void CompleteNotifyRequest( TEventTypes aEventType, TInt aError );
- /**
- * Get supported TSY name
- *@param aTsyName - buffer to store the supported tsy name
- */
- void GetCommDbTSYnameL(TDes& aTsyName);
-
- /**
- * Initialize etel to access modem parameters
- */
- void InitialisePhoneL();
-
- /**
- * Retrieve home network
- */
- void RetrieveHomeNetwork();
-
- /**
- * Stop the server (if possible)
- */
- void StopServer();
-
private:
/**
* A class for recording and storing locations.
@@ -648,7 +466,7 @@
* A timer to stop location trail.
* Own.
*/
- CLocationServerTimerHandler* iTimer;
+ CPeriodic* iTimer;
TBool iClientSwitch;
TInt iSessionCount;
@@ -660,28 +478,12 @@
TInt iLocManStopRemapDelay;
RLocationTrail::TTrailCaptureSetting iCaptureSetting;
- TBool iRemoveLocation;
+ TBool iRemoveLocation;
/**
* A flag for state of waiting for position stop timeout.
*/
TBool iWaitForPositioningStopTimeout;
- RTelServer iTelServer;
- RMobilePhone iPhone;
- TBool iTelServerIsOpen;
- TBool iPhoneIsOpen;
- CNwRegistrationStatusHandler *iNwRegistrationStatusHandler;
- RMobilePhone::TMobilePhoneNetworkInfoV1 iHomeNetwork;
- TBool iHomeNwInfoAvailableFlag;
-
- CLocationGeoTagTimerAO* iGeoTagTimer;
-
-#ifdef LOC_REVERSEGEOCODE
- CGeoTagger* iGeoTaggingPendingReqObj;
- RMessage2 iTagPendingMessage;
- RMessage2 iGeoTaggingMessage;
- REComSession* iEcomSession;
-#endif //LOC_REVERSEGEOCODE
};
--- a/locationmanager/server/inc/clocationservertimerhandler.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +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: helper class to handle location server tiimer related functionality
-*
-*/
-
-#ifndef __CLOCATIONSERVERTIMERHANDLER_H__
-#define __CLOCATIONSERVERTIMERHANDLER_H__
-
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-
-/*
-* Timer Observer class
-*/
-
-class MLocationServerTimerObserver
- {
-public:
- typedef enum
- {
- EStopRecording = 0x1, // Stop recording
- EPositioningStopTimeout, // Stop positioning
- ELocGeneralPurpose // generic purpose
- }TLocationServerTimerType;
- /**
- * Timer call back
- * @param aLocationServerTimerType timer type
- * @param aErrorCode error code
- */
- virtual void LocationServerTimerCallBackL
- (const TLocationServerTimerType aLocationServerTimerType, const TInt aErrorCode) = 0;
- };
-
-/*
-* Helper class for location server related to timer functionality.
-*/
-class CLocationServerTimerHandler : public CTimer
- {
-
-public:
- /**
- * 1st phase constructor.
- * @param aLocationServerTimerObserver timer observer
- */
- static CLocationServerTimerHandler* NewL(MLocationServerTimerObserver& aLocationServerTimerObserver);
-
- /**
- * Destructor
- */
- ~CLocationServerTimerHandler();
-
- /**
- * start a timer for predefined period
- * @param anInterval timer value
- * @param aLocationServerTimerType timer type
- */
- void StartTimer(const TTimeIntervalMicroSeconds32 anInterval,
- const MLocationServerTimerObserver::TLocationServerTimerType aLocationServerTimerType);
-
-
-protected:
- /*
- * @see CActive::RunL()
- */
- void RunL();
-private:
- /**
- * 2nd Phase constructor
- */
- void ConstructL();
- /**
- * CLocationServerTimerHandler
- * Constructor
- * @param aLocationServerTimerObserver timer observer
- * @return None.
- */
- CLocationServerTimerHandler(MLocationServerTimerObserver& aLocationServerTimerObserver);
-
-
-
-private:
- MLocationServerTimerObserver& iLocationServerTimerObserver;
- MLocationServerTimerObserver::TLocationServerTimerType iLocationServerTimerType;
- };
-
-
-#endif /*__CLOCATIONSERVERTIMERHANDLER_H__*/
-
-// End of file
-
--- a/locationmanager/server/inc/nwregistrationstatushandler.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +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: Helper class to retrieve UE network registration status
-*
-*/
-
-#ifndef __NW_REGISTRATION_STATUS_HANDLER_H__
-#define __NW_REGISTRATION_STATUS_HANDLER_H__
-
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <etelmm.h>
-
-NONSHARABLE_CLASS(CNwRegistrationStatusHandler) : public CActive
-{
-
-public:
-
- /**
- * 1st phase constructor
- * @param aMobilePhone an instance of the RMobilePhone to get the current network
- */
- static CNwRegistrationStatusHandler* NewL(RMobilePhone& aMobilePhone);
-
- /**
- * destructor
- */
- ~CNwRegistrationStatusHandler();
-
- /**
- * Register for getting the n/w registration change notification
- * starts notifying the current network changes
- */
- void StartNotifier();
-
- /**
- * Retrieve network registration status
- * @return the mobilephone reg status
- */
-
- RMobilePhone::TMobilePhoneRegistrationStatus GetNetworkRegistrationStatus() const;
-
-protected:
-
- /**
- * RunL
- * from CActive
- */
- void RunL();
-
- /**
- * DoCancel
- * from CActive
- */
- void DoCancel();
- private:
-
- /**
- * Second phase construction
- */
- void ConstructL();
- CNwRegistrationStatusHandler(RMobilePhone& aMobilePhone);
-
-
-
-private:
- typedef enum
- {
- ERegStatusOptStateNone = 0x00,
- ERegStatusOptStateGet,
- ERegStatusOptStateNotify
- }TRegStatusOptState;
-
- /**
- * An instance of the RMobilePhone to get the current network
- */
- RMobilePhone& iMobilePhone;
-
- /**
- * Indicates the network registration status
- */
- RMobilePhone::TMobilePhoneRegistrationStatus iRegistrationStatus;
- TRegStatusOptState iState;
-};
-
-
-#endif /*__NW_REGISTRATION_STATUS_HANDLER_H__*/
-
-// End of file
-
--- a/locationmanager/server/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS Location Manager Server</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
Binary file locationmanager/server/sis/locationmanagerserver_stub.sis has changed
--- a/locationmanager/server/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/server/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"locationmanagerserver"}, (0x200071BE), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
--- a/locationmanager/server/src/clocationgeotagtimerao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +0,0 @@
-/*
-* Copyright (c) 2009-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: Implements geotagging 3AM timer
-*
-*/
-
-#include <hwrmpowerstatesdkpskeys.h>
-#include "clocationgeotagtimerao.h"
-#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
-const TInt HOUR_VALUE_IN_MINUTES = 60;
-//Hour specified in seconds
-const TInt HOUR_VALUE_IN_SECONDS = 3600;
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::CLocationGeoTagTimerAO
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO::CLocationGeoTagTimerAO(CMdESession& aMdeSession,
- MGeoTaggerObserver& aObserver):
- CTimer( EPriorityLow ),
- iGeoTagger(NULL),
- iMdeSession(aMdeSession),
- iObserver(aObserver)
-{
-
-}
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO()
- {
- LOG ("CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO(), begin");
- if(iGeoTagger)
- {
- delete iGeoTagger;
- iGeoTagger = NULL;
- }
- LOG ("CLocationGeoTagTimerAO::~CLocationGeoTagTimerAO(), end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::NewL
-// --------------------------------------------------------------------------
-//
-CLocationGeoTagTimerAO* CLocationGeoTagTimerAO::NewL(CMdESession& aMdeSession,
- MGeoTaggerObserver& aObserver)
- {
- CLocationGeoTagTimerAO* self =
- new( ELeave ) CLocationGeoTagTimerAO(aMdeSession, aObserver);
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
-
- return self;
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::ConstructL
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::ConstructL()
- {
- LOG ("CLocationGeoTagTimerAO::ConstructL(), begin");
- CActiveScheduler::Add(this);
- CTimer::ConstructL();
- LOG ("CLocationGeoTagTimerAO::ConstructL(), end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::StartTimer
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::StartTimer()
- {
- LOG ("CLocationGeoTagTimerAO::StartTimer(), begin");
- if(!IsActive())
- {
- TTime hometime;
- hometime.HomeTime();
-
- //Get the current time in Hour,Minute, Second
- TDateTime currentDateTime = hometime.DateTime();
- TInt currentHr = currentDateTime.Hour();
- TInt currentMin = currentDateTime.Minute();
- TInt currentSec = currentDateTime.Second();
-
- //3 AM in seconds
- TInt targetTimeInSeconds = GEOTAGGING_TIME_IN_HOURS * HOUR_VALUE_IN_SECONDS;
- 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 )
- {
- timeDifference = targetTimeInSeconds -
- ( ( currentHr * HOUR_VALUE_IN_SECONDS ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec );
- }
- else
- {
- timeDifference = ( 24 * HOUR_VALUE_IN_SECONDS - (
- ( currentHr * HOUR_VALUE_IN_SECONDS ) + ( currentMin * HOUR_VALUE_IN_MINUTES ) + currentSec ) ) +
- targetTimeInSeconds ;
- }
-
- //Add the time difference to current time to set the target time ( 3.00 AM )
- TTimeIntervalSeconds interval( timeDifference );
- TTime timeToSet;
- timeToSet.HomeTime();
- timeToSet+= interval;
-
-
- At( timeToSet );
- }
- LOG ("CLocationGeoTagTimerAO::StartTimer(), end");
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::RunL
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::RunL( )
- {
- LOG ("CLocationGeoTagTimerAO::RunL(), begin");
- TInt status = iStatus.Int();
- LOG1 ("Timedout error - %d", status);
-
- switch( status )
- {
- 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 != 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");
- }
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::GeoTaggingCompleted
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::GeoTaggingCompleted( const TInt aError )
- {
- LOG ("CLocationGeoTagTimerAO::GeoTaggingCompleted(), begin");
- StartTimer();
- iObserver.GeoTaggingCompleted(aError);
- LOG ("CLocationGeoTagTimerAO::GeoTaggingCompleted(), end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::PendingGeoTagReqComplete
-// --------------------------------------------------------------------------
-//
-void CLocationGeoTagTimerAO::PendingGeoTagReqComplete( const TInt aError )
- {
- LOG ("CLocationGeoTagTimerAO::PendingGeoTagReqComplete()");
- // do nothing.
- iObserver.PendingGeoTagReqComplete(aError);
- }
-
-// ----------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::GetCurrentRegisterNw()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneNetworkInfoV2& CLocationGeoTagTimerAO::GetCurrentRegisterNw()
- {
- LOG( "CLocationGeoTagTimerAO::GetCurrentRegisterNw ,begin" );
- return iObserver.GetCurrentRegisterNw();
- }
-
-
-// ----------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::IsRegisteredAtHomeNetwork()
-// ----------------------------------------------------------------------------
-TBool CLocationGeoTagTimerAO::IsRegisteredAtHomeNetwork()
- {
- LOG( "CLocationGeoTagTimerAO::IsRegisteredAtHomeNetwork" );
- return iObserver.IsRegisteredAtHomeNetwork();
- }
-
-// ----------------------------------------------------------------------------
-// CLocationGeoTagTimerAO::GetHomeNetworkInfo()
-// ----------------------------------------------------------------------------
-const RMobilePhone::TMobilePhoneNetworkInfoV1&
- CLocationGeoTagTimerAO::GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag)
- {
- LOG( "CLocationGeoTagTimerAO::GetHomeNetworkInfo" );
- 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
-
--- a/locationmanager/server/src/clocationmanagerserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/server/src/clocationmanagerserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -17,10 +17,6 @@
#include <e32debug.h>
#include <w32std.h>
-#include <ecom.h>
-#include <commsdattypesv1_1.h>
-#include <cdblen.h>
-#include <commsdat_partner.h>
#include "clocationmanagerserver.h"
#include "clocationmanagersession.h"
@@ -33,12 +29,8 @@
#include "mdeobjectdef.h"
#include "mdepropertydef.h"
#include "mdcserializationbuffer.h"
-#include "clocationgeotagtimerao.h"
-#include "nwregistrationstatushandler.h"
using namespace MdeConstants;
-using namespace CommsDat;
-
// --------------------------------------------------------------------------
// RunServerL
@@ -76,7 +68,6 @@
{
TRAP( ret, RunServerL() );
delete cleanup;
- cleanup = NULL;
}
return ret;
}
@@ -100,10 +91,9 @@
// --------------------------------------------------------------------------
//
CLocationManagerServer::CLocationManagerServer()
- : CPolicyServer( KLocManagerSessionPriority,
+ : CPolicyServer( CActive::EPriorityStandard,
KLocationManagerPolicy,
ESharableSessions ),
- iASW(NULL),
iTimer( NULL ),
iSessionReady( EFalse ),
iTagId( 0 ),
@@ -111,16 +101,7 @@
iLocManStopRemapDelay( 0 ),
iCaptureSetting( RLocationTrail::EOff ),
iRemoveLocation( EFalse ),
- iWaitForPositioningStopTimeout ( EFalse ),
- iTelServerIsOpen(EFalse),
- iPhoneIsOpen(EFalse),
- iNwRegistrationStatusHandler(NULL),
- iHomeNwInfoAvailableFlag(EFalse),
- iGeoTagTimer(NULL)
-#ifdef LOC_REVERSEGEOCODE
- ,iGeoTaggingPendingReqObj(NULL)
- ,iEcomSession(NULL)
-#endif //LOC_REVERSEGEOCODE
+ iWaitForPositioningStopTimeout ( EFalse )
{
}
@@ -134,22 +115,18 @@
LOG ("CLocationManagerServer::ConstructL() begin");
StartL( KLocServerName );
-
- // initialize etel
- InitialisePhoneL();
+
+ RProcess process;
+ process.SetPriority( EPriorityBackground );
+ process.Close();
-#ifdef LOC_REVERSEGEOCODE
- iEcomSession = &(REComSession::OpenL());
-#endif //LOC_REVERSEGEOCODE
-
iASW = new (ELeave) CActiveSchedulerWait();
+ iMdeSession = CMdESession::NewL( *this );
+ iLocationRecord = CLocationRecord::NewL();
+ iTrackLog = CTrackLog::NewL();
- iNwRegistrationStatusHandler = CNwRegistrationStatusHandler::NewL(iPhone);
+ iASW->Start();
- iLocationRecord = CLocationRecord::NewL(*this, iPhone);
- iTrackLog = CTrackLog::NewL();
- iMdeSession = CMdESession::NewL( *this );
-
iLocationRecord->SetObserver( this );
iLocationRecord->SetAddObserver( iTrackLog );
@@ -157,55 +134,34 @@
iTrackLog->AddGpxObserver( this );
CRepository* repository = CRepository::NewLC( KRepositoryUid );
- TInt err = repository->Get( KLocationTrailShutdownTimer, iLocManStopDelay );
-
- LOG1("iLocManStopDelay:%d", iLocManStopDelay);
+ TInt err = repository->Get( KLocationTrailShutdownTimer, iLocManStopDelay );
+
+ LOG1("CLocationManagerServer::ConstructL, iLocManStopDelay:%d", iLocManStopDelay);
if ( err != KErrNone )
- {
- LOG1("iLocManStopDelay err:%d", err);
+ {
+ LOG1("CLocationManagerServer::ConstructL, iLocManStopDelay err:%d", err);
iLocManStopDelay = KLocationTrailShutdownDelay;
- }
+ }
err = repository->Get( KLocationTrailRemapShutdownTimer, iLocManStopRemapDelay );
CleanupStack::PopAndDestroy( repository );
- LOG1("iLocManStopRemapDelay:%d", iLocManStopRemapDelay);
+ LOG1("CLocationManagerServer::ConstructL, iLocManStopRemapDelay:%d", iLocManStopRemapDelay);
if ( err != KErrNone )
{
- LOG1("iLocManStopRemapDelay err:%d", err);
+ LOG1("CLocationManagerServer::ConstructL, iLocManStopRemapDelay err:%d", err);
iLocManStopRemapDelay = KLocationTrailRemapShutdownDelay;
}
-
- if( !iSessionReady )
- {
- iASW->Start();
- }
-
- delete iASW;
- iASW = NULL;
-
- if( iSessionReady )
+
+ TRAPD( error, iTimer = CPeriodic::NewL( CActive::EPriorityUserInput ) );
+ if ( error != KErrNone )
{
- LOG("Session is ready to give service");
- //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
- }
- else
- {
- LOG("Unable to open MDE session. Closing..");
- User::Leave( KErrCouldNotConnect );
- }
-
- RProcess process;
- process.SetPriority( EPriorityBackground );
- process.Close();
+ LOG("CLocationManagerServer::ConstructL - iTimer not created");
+ iTimer = NULL;
+ }
+
LOG ("CLocationManagerServer::ConstructL() end");
}
@@ -217,30 +173,13 @@
//
CLocationManagerServer::~CLocationManagerServer()
{
- LOG("CLocationManagerServer::~CLocationManagerServer ,begin");
-#if defined(LOC_REVERSEGEOCODE) || defined(LOC_GEOTAGGING_CELLID)
- delete iGeoTagTimer;
- iGeoTagTimer = NULL;
-#endif
-#ifdef LOC_REVERSEGEOCODE
- delete iGeoTaggingPendingReqObj;
- iGeoTaggingPendingReqObj = NULL;
-#endif //LOC_REVERSEGEOCODE
+ delete iLocationRecord;
+ delete iTrackLog;
+ delete iTimer;
+ //delete iRelationQuery;
+ delete iASW;
+ delete iMdeSession;
- 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();
@@ -251,115 +190,9 @@
CancelCopyRequests(iCopyReqs);
iCopyReqs.Close();
iSessionCount = 0;
- if(iPhoneIsOpen)
- {
- iPhoneIsOpen = EFalse; // not required
- iPhone.Close();
- }
- if(iTelServerIsOpen)
- {
- iTelServerIsOpen = EFalse;
- iTelServer.Close();
- }
-#ifdef LOC_REVERSEGEOCODE
- if(iEcomSession)
- {
- iEcomSession->Close();
- }
-#endif //LOC_REVERSEGEOCODE
- LOG("CLocationManagerServer::~CLocationManagerServer ,end");
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GetCommDbTSYnameL
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::GetCommDbTSYnameL(TDes& aTsyName)
- {
- LOG( "CLocationManagerServer::GetCommDbTSYnameL(), begin" );
-#ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
- CMDBSession* db = CMDBSession::NewL(KCDVersion1_2);
-#else
- CMDBSession* db = CMDBSession::NewL(KCDVersion1_1);
-#endif
- CleanupStack::PushL(db);
-
- CMDBField<TDesC>* globalSettingField = new(ELeave) CMDBField<TDesC>(KCDTIdBearerAvailabilityCheckTSY);
- CleanupStack::PushL(globalSettingField);
- globalSettingField->SetRecordId(1);
- globalSettingField->SetMaxLengthL(KMaxTextLength);
- globalSettingField->LoadL(*db);
- aTsyName = *globalSettingField;
- CleanupStack::PopAndDestroy(globalSettingField);
-
- CleanupStack::PopAndDestroy(db);
- LOG( "CLocationManagerServer::GetCommDbTSYnameL(), end" );
- }
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::InitialisePhoneL
// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::InitialisePhoneL()
- {
- LOG( "CLocationManagerServer::InitialisePhoneL(), begin" );
- User::LeaveIfError(iTelServer.Connect());
- iTelServerIsOpen = ETrue;
- TBuf<KCommsDbSvrMaxFieldLength> tsyName;
- GetCommDbTSYnameL(tsyName);
-
- User::LeaveIfError(iTelServer.LoadPhoneModule(tsyName));
-
- TInt numPhones;
- User::LeaveIfError(iTelServer.EnumeratePhones(numPhones));
-
- TInt phoneIndx;
- TInt ret = KErrHardwareNotAvailable;
-
- for(phoneIndx=0; phoneIndx<numPhones; phoneIndx++)
- {
- RTelServer::TPhoneInfo tInfo;
- ret = iTelServer.GetPhoneInfo(phoneIndx, tInfo);
- if(ret != KErrNone)
- {
- continue;
- }
-
- ret = iPhone.Open(iTelServer, tInfo.iName);
- if(ret != KErrNone)
- {
- continue;
- }
-
- iPhoneIsOpen = ETrue;
-
- RPhone::TStatus status;
- User::LeaveIfError(iPhone.GetStatus(status));
- if(status.iModemDetected!=RPhone::EDetectedPresent)
- {
- ret = iPhone.Initialise();
- if(ret != KErrNone)
- {
- iPhone.Close();
- iPhoneIsOpen = EFalse;
- continue;
- }
- }
- // we found the correct phone
- break;
- }
-
- //
- // ret will be KErrNone if a valid phone was found...
- //
-
- LOG1( "CLocationManagerServer::InitialisePhoneL(), end. Err - %d", ret );
- User::LeaveIfError(ret);
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CancelRequests()
+// CLocationManagerServer::CompleteRequests()
// --------------------------------------------------------------------------
//
void CLocationManagerServer::CancelRequests(RArray<RMessage2>& aMessageList)
@@ -378,10 +211,6 @@
aMessageList.Reset();
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CancelCopyRequests
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CancelCopyRequests(RArray<TMessageQuery>& aMessageList)
{
const TInt count = aMessageList.Count();
@@ -398,14 +227,10 @@
aMessageList.Reset();
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::HandleSessionOpened
-// --------------------------------------------------------------------------
-//
+
void CLocationManagerServer::HandleSessionOpened(CMdESession& /*aSession*/, TInt aError)
{
- LOG ("CLocationManagerServer::HandleSessionOpened() start");
- if ( iASW && iASW->IsStarted() )
+ if ( iASW->IsStarted() )
{
iASW->AsyncStop();
}
@@ -424,31 +249,18 @@
}
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::HandleSessionError
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::HandleSessionError(CMdESession& /*aSession*/, TInt aError)
+void CLocationManagerServer::HandleSessionError(CMdESession& /*aSession*/, TInt /*aError*/)
{
- LOG1 ("CLocationManagerServer::HandleSessionError() start, Error - %d", aError);
- ARG_USED(aError);
iSessionReady = EFalse;
delete iMdeSession;
iMdeSession = NULL;
- if ( iASW && iASW->IsStarted() )
+ if ( iASW->IsStarted() )
{
iASW->AsyncStop();
}
}
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::IsSessionReady
-// --------------------------------------------------------------------------
-//
TBool CLocationManagerServer::IsSessionReady()
{
return iSessionReady;
@@ -490,9 +302,11 @@
//
void CLocationManagerServer::RemoveSession()
{
- LOG1( "CLocationManagerServer::RemoveSession. Session count - %d", iSessionCount);
iSessionCount--;
- StopServer();
+ if ( !iSessionCount )
+ {
+ CActiveScheduler::Stop();
+ }
}
// --------------------------------------------------------------------------
@@ -520,8 +334,7 @@
if ( iTimer )
{
- delete iTimer;
- iTimer = NULL;
+ iTimer->Cancel();
}
iLocationRecord->StartL( aCaptureSetting );
@@ -542,19 +355,24 @@
if( state != RLocationTrail::ETrailStopped && state != RLocationTrail::ETrailStopping )
{
- if(iTimer == NULL)
+ if(!iTimer)
{
- TRAP_IGNORE(iTimer = CLocationServerTimerHandler::NewL(*this));
+ TRAPD( error, iTimer = CPeriodic::NewL( CActive::EPriorityUserInput ) );
+ if ( error != KErrNone )
+ {
+ LOG("CLocationManagerServer::StopGPSPositioningL() - iTimer not created");
+ iTimer = NULL;
+ }
+ }
+ if(iTimer)
+ {
+ iTimer->Cancel();
+ iLocationRecord->SetStateToStopping();
+ iTimer->Start( iLocManStopDelay * 1000000, 0, TCallBack( CheckForRemappingCallback, this ) );
}
- if ( iTimer == NULL)
- {
- // If timer can't be created we stop the location trail immediately.
- iLocationRecord->Stop();
- }
else
{
- iLocationRecord->SetStateToStopping();
- iTimer->StartTimer( iLocManStopDelay * 1000000, MLocationServerTimerObserver::EStopRecording);
+ iLocationRecord->Stop();
}
}
@@ -571,61 +389,48 @@
LOG( "CLocationManagerServer::StopRecording()" );
iWaitForPositioningStopTimeout = EFalse;
iLocationRecord->Stop();
- }
-
-// --------------------------------------------------------------------------
-// CLocationUtilityServer::LocationServerTimerCallBackL
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::LocationServerTimerCallBackL
- (const TLocationServerTimerType aLocationServerTimerType, const TInt /*aErrorCode*/)
- {
- LOG1( "CLocationManagerServer::LocationServerTimerCallBackL, begin, Type - %d",
- aLocationServerTimerType);
- switch(aLocationServerTimerType)
- {
- case MLocationServerTimerObserver::EStopRecording:
- CheckForRemappingCallback();
- break;
- case MLocationServerTimerObserver::EPositioningStopTimeout:
- PositioningStopTimeout();
- break;
- case MLocationServerTimerObserver::ELocGeneralPurpose:
- default:
- // execution shouldn't come over here.
- LOG("Invalid timer type");
- break;
- }
- LOG( "CLocationManagerServer::LocationServerTimerCallBackL, end" );
+ if(iTimer)
+ {
+ iTimer->Cancel();
+ }
+
}
// --------------------------------------------------------------------------
// CLocationUtilityServer::PositioningStopTimeout
// --------------------------------------------------------------------------
//
-void CLocationManagerServer::PositioningStopTimeout()
+TInt CLocationManagerServer::PositioningStopTimeout( TAny* aAny )
{
LOG( "CLocationManagerServer::PositioningStopTimeout" );
- StopRecording();
+ CLocationManagerServer* self = STATIC_CAST( CLocationManagerServer*, aAny );
+ self->StopRecording();
+
+ return KErrNone;
}
// --------------------------------------------------------------------------
-// CLocationUtilityServer::CheckForRemappingCallback
+// CLocationUtilityServer::PositioningStopTimeout
// --------------------------------------------------------------------------
//
-void CLocationManagerServer::CheckForRemappingCallback()
+TInt CLocationManagerServer::CheckForRemappingCallback( TAny* aAny )
{
- LOG( "CLocationManagerServer::CheckForRemappingCallback, begin" );
- if ( iLocationRecord->RemappingNeeded() && !iLocationRecord->IsLowBattery())
+ LOG( "CLocationManagerServer::CheckForRemappingCallback" );
+ CLocationManagerServer* self = STATIC_CAST( CLocationManagerServer*, aAny );
+
+ self->iTimer->Cancel();
+
+ if ( self->iLocationRecord->RemappingNeeded() && !self->iLocationRecord->IsLowBattery())
{
- iTimer->StartTimer( iLocManStopRemapDelay * 1000000, MLocationServerTimerObserver::EPositioningStopTimeout);
- iWaitForPositioningStopTimeout = ETrue;
+ self->iTimer->Start( self->iLocManStopRemapDelay * 1000000, 0, TCallBack( PositioningStopTimeout, self ) );
+ self->iWaitForPositioningStopTimeout = ETrue;
}
else
{
- StopRecording();
+ self->StopRecording();
}
- LOG( "CLocationManagerServer::CheckForRemappingCallback, end" );
+
+ return KErrNone;
}
// --------------------------------------------------------------------------
@@ -743,7 +548,7 @@
}
// --------------------------------------------------------------------------
-// CLocationManagerServer::GetCurrentNetworkInfo
+// CLocationManagerServer::GetCurrentCellId
// --------------------------------------------------------------------------
//
void CLocationManagerServer::GetCurrentNetworkInfo( CTelephony::TNetworkInfoV1& aNetworkInfo )
@@ -825,11 +630,6 @@
LOG( "CLocationManagerServer::CurrentLocation(), end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GPSSignalQualityChanged
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::GPSSignalQualityChanged( const TPositionSatelliteInfo& aSatelliteInfo )
{
LOG( "CLocationManagerServer::GPSSignalQualityChanged" );
@@ -877,10 +677,7 @@
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CancelTrackLogNotificationRequest
-// --------------------------------------------------------------------------
-//
+
void CLocationManagerServer::CancelTrackLogNotificationRequest( const TInt aHandle )
{
LOG( "CLocationManagerServer::CancelTrackLogNotificationRequest(), begin" );
@@ -907,11 +704,6 @@
LOG( "CLocationManagerServer::CancelTrackLogNotificationRequest(), end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CreateLocationObjectL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CreateLocationObjectL( const TLocationData& aLocationData,
const TUint& aObjectId )
{
@@ -923,21 +715,13 @@
iLocationRecord->CreateLocationObjectL( aLocationData, aObjectId );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::LocationSnapshotL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::LocationSnapshotL( const TUint& aObjectId )
{
- LOG( "CLocationManagerServer::LocationSnapshotL(), begin" );
if ( !IsSessionReady() )
{
- LOG( "Session is not ready" );
User::Leave( KErrNotReady );
}
iLocationRecord->LocationSnapshotL( aObjectId );
- LOG( "CLocationManagerServer::LocationSnapshotL(), end" );
}
// --------------------------------------------------------------------------
@@ -973,11 +757,6 @@
iRelationQuery->FindL( 1, 1 );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CopyLocationObjectL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CopyLocationObjectL( TItemId aSource,
const RArray<TItemId>& aTargets, TMessageQuery& aMessageQuery )
{
@@ -1039,11 +818,6 @@
}
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CopyLocationObjectL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CopyLocationObjectL( const TDesC& aSource,
const RArray<TPtrC>& aTargets, TMessageQuery& aQuery )
{
@@ -1065,24 +839,13 @@
CopyLocationObjectL( source, iTargetObjectIds, aQuery );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::HandleQueryNewResults
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::HandleQueryNewResults( CMdEQuery& /*aQuery*/,
TInt /*aFirstNewItemIndex*/, TInt /*aNewItemCount*/ )
{
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::HandleQueryCompleted
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::HandleQueryCompleted( CMdEQuery& aQuery, TInt aError )
{
- LOG("CLocationManagerServer::HandleQueryCompleted");
if ( iRemoveLocation )
{
if( aQuery.Count() > 0 && aError == KErrNone )
@@ -1116,7 +879,6 @@
}
iCopyReqs[i].iMessage.Complete( aError );
delete iCopyReqs[i].iQuery;
- iCopyReqs[i].iQuery = NULL;
iCopyReqs.Remove( i );
break;
}
@@ -1127,11 +889,6 @@
iTargetObjectIds.Reset();
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::NewLC
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CopyLocationL( CMdEQuery& aQuery )
{
CMdEObjectDef& locationDef = aQuery.NamespaceDef().GetObjectDefL( Location::KLocationObject );
@@ -1163,18 +920,12 @@
{
iCopyReqs[i].iMessage.Complete( KErrNone );
delete iCopyReqs[i].iQuery;
- iCopyReqs[i].iQuery = NULL;
iCopyReqs.Remove( i );
break;
}
}
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::InitCopyLocationByIdL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::InitCopyLocationByIdL( const RMessage2& aMessage )
{
const TInt KParamSourceId = 0;
@@ -1208,11 +959,6 @@
CleanupStack::PopAndDestroy(&targetIds);
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::InitCopyLocationByURIL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::InitCopyLocationByURIL( const RMessage2& aMessage )
{
LOG( "CLocationManagerSession::CopyLocationDataByUriL begin" );
@@ -1262,14 +1008,8 @@
LOG( "CLocationManagerSession::CopyLocationDataByUriL end" );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::StartTrackLogL
-// --------------------------------------------------------------------------
-//
TItemId CLocationManagerServer::StartTrackLogL()
{
- LOG("CLocationManagerServer::StartTrackLogL");
if ( iTrackLog->IsRecording() )
{
User::Leave( KErrInUse );
@@ -1286,14 +1026,8 @@
return iTagId;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::StopTrackLogL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::StopTrackLogL()
{
- LOG("CLocationManagerServer::StopTrackLogL");
if ( iTrackLog->IsRecording() )
{
iTrackLog->StopRecordingL();
@@ -1306,14 +1040,8 @@
}
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CompleteNotifyRequest
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CompleteNotifyRequest( TEventTypes aEventType, TInt aError )
{
- LOG("CLocationManagerServer::CompleteNotifyRequest");
const TInt KEventTypeParam = 2;
TPckg<TEventTypes> wrapEventType( aEventType );
@@ -1331,35 +1059,19 @@
iTrackLogNotifyReqs.Reset();
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::IsTrackLogRecording
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::IsTrackLogRecording( TBool &aRec )
{
aRec = iTrackLog->IsRecording();
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GpxFileCreated
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::GpxFileCreated( const TDesC& aFileName, TItemId aTagId,
TReal32 aLength, TTime aStart, TTime aEnd )
{
TRAP_IGNORE( CreateTrackLogL( aTagId, aFileName, aLength, aStart, aEnd ) );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CreateTrackLogTagL
-// --------------------------------------------------------------------------
-//
TItemId CLocationManagerServer::CreateTrackLogTagL()
{
- LOG("CLocationManagerServer::CreateTrackLogTagL");
if ( !IsSessionReady() )
{
User::Leave( KErrNotReady );
@@ -1392,15 +1104,9 @@
return tagId;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CreateTrackLogL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::CreateTrackLogL( TItemId aTagId, const TDesC& aUri, TReal32 aLength,
TTime aStart, TTime aEnd )
{
- LOG("CLocationManagerServer::CreateTrackLogL");
if ( !IsSessionReady() )
{
User::Leave( KErrNotReady );
@@ -1447,11 +1153,6 @@
CleanupStack::PopAndDestroy( trackLog );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GetTrackLogStatus
-// --------------------------------------------------------------------------
-//
TInt CLocationManagerServer::GetTrackLogStatus( TBool& aRecording, TPositionSatelliteInfo& aFixQuality)
{
if ( !iTrackLog )
@@ -1464,11 +1165,6 @@
return KErrNone;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::DeleteTrackLogL
-// --------------------------------------------------------------------------
-//
TInt CLocationManagerServer::DeleteTrackLogL( const TDesC& aUri )
{
LOG( "CLocationManagerServer::DeleteTrackLogL enter" );
@@ -1509,11 +1205,6 @@
return err;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::TrackLogName
-// --------------------------------------------------------------------------
-//
TInt CLocationManagerServer::TrackLogName( TFileName& aFileName )
{
if ( iTrackLog->IsRecording() )
@@ -1524,21 +1215,11 @@
return KErrNotFound;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GetCaptureSetting
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::GetCaptureSetting( RLocationTrail::TTrailCaptureSetting& aCaptureSetting )
{
aCaptureSetting = iCaptureSetting;
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::HandleObjectNotification
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::HandleObjectNotification( CMdESession& /*aSession*/,
TObserverNotificationType aType,
const RArray<TItemId>& aObjectIdArray )
@@ -1553,11 +1234,6 @@
TRAP_IGNORE( LinkObjectToTrackLogTagL( aObjectIdArray ) );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::StartListeningTagRemovalsL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::StartListeningTagRemovalsL()
{
if ( !IsSessionReady() )
@@ -1573,11 +1249,6 @@
CleanupStack::Pop( condition );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::StartListeningObjectCreationsL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::StartListeningObjectCreationsL()
{
if ( !IsSessionReady() )
@@ -1600,11 +1271,6 @@
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::LinkObjectToTrackLogTagL
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::LinkObjectToTrackLogTagL( const RArray<TItemId>& aObjectIdArray )
{
CMdERelationDef& containsRelDef = iMdeSession->GetDefaultNamespaceDefL()
@@ -1622,299 +1288,21 @@
}
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::AddGpxObserver
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::AddGpxObserver( MGpxConversionObserver* aObserver )
{
iTrackLog->AddGpxObserver( aObserver );
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::RemapedCompleted()
-// --------------------------------------------------------------------------
-//
void CLocationManagerServer::RemapedCompleted()
{
LOG( "CLocationManagerServer::RemapedCompleted()" );
StopRecording();
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::WaitForPositioningStopTimeout()
-// --------------------------------------------------------------------------
-//
TBool CLocationManagerServer::WaitForPositioningStopTimeout()
{
LOG( "CLocationManagerServer::WaitForPositioningStopTimeout()" );
return iWaitForPositioningStopTimeout;
}
-// --------------------------------------------------------------------------
-// CLocationManagerServer::GeoTaggingCompleted
-// --------------------------------------------------------------------------
-//
-
-void CLocationManagerServer::GeoTaggingCompleted( const TInt aError )
- {
- LOG("CLocationManagerServer::GeoTaggingCompleted ,begin");
- ARG_USED(aError);
- // do nothing because we are only handling pending request for this object.
-#ifdef LOC_REVERSEGEOCODE
- if(!iGeoTaggingMessage.IsNull())
- {
- LOG("Completing the request");
- iGeoTaggingMessage.Complete(aError);
- 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::StopServer ,end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::PendingGeoTagReqComplete
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::PendingGeoTagReqComplete( const TInt aError )
- {
- LOG("CLocationManagerServer::PendingGeoTagReqComplete ,begin");
- ARG_USED(aError);
-#ifdef LOC_REVERSEGEOCODE
- if(!iTagPendingMessage.IsNull())
- {
-
- TGeoTaggingSatus pendingGeoTagEntry = EGeoTagCmpt;
- switch(aError)
- {
- case KErrNotFound:
- pendingGeoTagEntry = EGeoTaggingPending;
- LOG("Geo tagging pending");
- break;
- case KErrInUse:
- pendingGeoTagEntry = EGeoTaggingGoingOn;
- LOG("Geo tagging going on");
- break;
- default:
- break;
- }
-
- TPckg<TGeoTaggingSatus> pendingGeoTagEntryPkg( pendingGeoTagEntry );
- TRAPD(err, iTagPendingMessage.WriteL( 0, pendingGeoTagEntryPkg ));
- iTagPendingMessage.Complete((err == KErrNone) ? KErrNone : err);
- iTagPendingMessage = RMessage2 ();
- }
-#endif //LOC_REVERSEGEOCODE
- LOG("CLocationManagerServer::PendingGeoTagReqComplete ,end");
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::TagPendingRequestL
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::TagPendingRequestL( const RMessage2& aMessage )
- {
- LOG("CLocationManagerServer::TagPendingRequestL ,begin");
- // Only one request at a time
-#ifdef LOC_REVERSEGEOCODE
- if(iTagPendingMessage.IsNull() && iGeoTaggingMessage.IsNull())
- {
- iTagPendingMessage = RMessage2( aMessage );
- // search for pending entry.
- //Create the instance of geotagger class
- TBool tagProgress = iLocationRecord->TaggingInProgress();
- if(tagProgress)
- {
- LOG("Tagging is going on.\n");
- // Let UI to send start geo tagging command.
- PendingGeoTagReqComplete(KErrNotFound);
- }
- else
- {
- LOG("Tagging is not going on.\n");
- if(iGeoTaggingPendingReqObj == NULL)
- {
- iGeoTaggingPendingReqObj = CGeoTagger::NewL( this, NULL );
- }
- iGeoTaggingPendingReqObj->PendingGeoTagsL( tagProgress);
- }
- }
- else
- {
- LOG("Server busy\n");
- aMessage.Complete(KErrServerBusy);
- }
-#else
- aMessage.Complete(KErrNotSupported);
-#endif //LOC_REVERSEGEOCODE
- LOG("CLocationManagerServer::TagPendingRequestL ,end");
- }
-
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CancelTagPendingRequest
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::CancelTagPendingRequest( const RMessage2& aMessage )
- {
- LOG("CLocationManagerServer::CancelTagPendingRequest ,begin");
- // Only one request at a time
-#ifdef LOC_REVERSEGEOCODE
- if(!iTagPendingMessage.IsNull())
- {
- iTagPendingMessage.Complete(KErrCancel);
- iLocationRecord->CancelGeoTagging();
- }
- aMessage.Complete(KErrNone);
-#else
- aMessage.Complete(KErrNotSupported);
-#endif //LOC_REVERSEGEOCODE
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::CancelGeoTaggingRequest
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::CancelGeoTaggingRequest( const RMessage2& aMessage )
- {
- LOG("CLocationManagerServer::CancelGeoTaggingRequest ,begin");
- // Only one request at a time
-#ifdef LOC_REVERSEGEOCODE
- if(!iGeoTaggingMessage.IsNull())
- {
- iGeoTaggingMessage.Complete(KErrCancel);
- iGeoTaggingMessage = RMessage2 ();
- iLocationRecord->CancelGeoTagging();
- }
- aMessage.Complete(KErrNone);
-#else
- aMessage.Complete(KErrNotSupported);
-#endif //LOC_REVERSEGEOCODE
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationManagerServer::StartGeoTaggingL
-// --------------------------------------------------------------------------
-//
-void CLocationManagerServer::StartGeoTaggingL( const RMessage2& aMessage )
- {
- LOG("CLocationManagerServer::StartGeoTaggingL ,begin");
-#ifdef LOC_REVERSEGEOCODE
- if(iGeoTaggingMessage.IsNull() && iTagPendingMessage.IsNull())
- {
- iGeoTaggingMessage = RMessage2( aMessage );
- // search for pending entry.
- //Create the instance of geotagger class
- if(!iLocationRecord->StartGeoTagging(EInteractive))
- {
- if(iGeoTaggingPendingReqObj == NULL)
- {
- iGeoTaggingPendingReqObj = CGeoTagger::NewL( this, NULL );
- }
- iGeoTaggingPendingReqObj->CreateGeoTagsL((TConnectionOption)(aMessage.Int0()));
- }
- }
- else
- {
- LOG("Server busy\n");
- aMessage.Complete(KErrServerBusy);
- }
-#else
- aMessage.Complete(KErrNotSupported);
-#endif //LOC_REVERSEGEOCODE
- }
-
-
-// ----------------------------------------------------------------------------
-// CLocationManagerServer::GetCurrentRegisterNw()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneNetworkInfoV2& CLocationManagerServer::GetCurrentRegisterNw()
- {
- LOG( "CLocationManagerServer::GetCurrentRegisterNw ,begin" );
- return iLocationRecord->GetCurrentRegisteredNw();
- }
-
-// ----------------------------------------------------------------------------
-// CLocationManagerServer::RetrieveHomeNetwork()
-// ----------------------------------------------------------------------------
-void CLocationManagerServer::RetrieveHomeNetwork()
- {
- LOG("CLocationManagerServer::RetrieveHomeNetwork ,begin");
- if(iHomeNwInfoAvailableFlag)
- {
- RMobilePhone::TMobilePhoneNetworkInfoV1Pckg homeNetworkPckg( iHomeNetwork );
-
- TRequestStatus status( KErrNone );
-
- iPhone.GetHomeNetwork(status, homeNetworkPckg);
- User::WaitForRequest( status );
- if(status.Int() == KErrNone)
- {
- iHomeNwInfoAvailableFlag = ETrue;
- }
- }
- LOG("CLocationManagerServer::RetrieveHomeNetwork ,end");
- }
-
-// ----------------------------------------------------------------------------
-// CLocationManagerServer::GetHomeNetworkInfo()
-// ----------------------------------------------------------------------------
-const RMobilePhone::TMobilePhoneNetworkInfoV1&
- CLocationManagerServer::GetHomeNetworkInfo(TBool& aHomeNwInfoAvailableFlag)
- {
- LOG("CLocationManagerServer::RetrieveHomeNetwork ,begin");
- if(!iHomeNwInfoAvailableFlag)
- {
- RetrieveHomeNetwork();
- }
- aHomeNwInfoAvailableFlag = iHomeNwInfoAvailableFlag;
- return iHomeNetwork;
- }
-
-
-// ----------------------------------------------------------------------------
-// CLocationManagerServer::IsRegisteredAtHomeNetwork()
-// ----------------------------------------------------------------------------
-TBool CLocationManagerServer::IsRegisteredAtHomeNetwork()
- {
- LOG( "CLocationManagerServer::IsRegisteredAtHomeNetwork" );
- return (iNwRegistrationStatusHandler &&
- (iNwRegistrationStatusHandler->GetNetworkRegistrationStatus()
- == RMobilePhone::ERegisteredOnHomeNetwork));
- }
-
// End of file
--- a/locationmanager/server/src/clocationmanagersession.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/server/src/clocationmanagersession.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -48,12 +48,7 @@
CLocationManagerSession::~CLocationManagerSession()
{
LOG( "CLocationManagerSession::~CLocationManagerSession(), begin" );
- // don't call stop GPS positioning from here...
- // 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.
-
-
+ TRAP_IGNORE(Server().StopGPSPositioningL());
Server().CancelNotificationRequest( iNotificationHandle );
Server().CancelLocationRequest( iLocationHandle );
Server().CancelTrackLogNotificationRequest( iTrackLogNotificationHandle );
@@ -91,15 +86,22 @@
//
void CLocationManagerSession::ServiceL( const RMessage2& aMessage )
{
- LOG( "CLocationManagerSession::ServiceL, begin" );
- LOG1("Message id - %d", aMessage.Function());
+ LOG( "CLocationManagerSession::ServiceL" );
+ _LIT( KSemaphore, "LocManSynchSemaphore" );
+ RSemaphore semaphore;
+ const TInt result = semaphore.OpenGlobal( KSemaphore );
+ LOG1( "CLocationManagerSession::ServiceL - semaphore open result: %d", result );
iMessage = RMessage2( aMessage );
+ if ( result == KErrNone )
+ {
+ semaphore.Signal();
+ semaphore.Close();
+ }
TRAPD( err, DispatchMessageL( aMessage ) );
if ( err != KErrNone )
{
aMessage.Complete( err );
}
- LOG( "CLocationManagerSession::ServiceL, end" );
}
// --------------------------------------------------------------------------
@@ -178,18 +180,6 @@
case ELocManCancelTrackLogNotify:
CancelTrackLogNotificationRequest( aMessage );
break;
- case ELocManTagPending:
- Server().TagPendingRequestL(aMessage);
- break;
- case ELocManStartGeoTaging:
- Server().StartGeoTaggingL(aMessage);
- break;
- case ELocManCancelTagPendingReq:
- Server().CancelTagPendingRequest(aMessage);
- break;
- case ELocManCancelGeoTaggingReq:
- Server().CancelGeoTaggingRequest(aMessage);
- break;
default:
aMessage.Complete( KErrArgument );
break;
@@ -504,7 +494,7 @@
}
// --------------------------------------------------------------------------
-// CLocationManagerSession::RegisterTrackLogObserver
+// CLocationManagerSession::GpsQualityChange
// --------------------------------------------------------------------------
//
void CLocationManagerSession::RegisterTrackLogObserver( const RMessage2& aMessage )
@@ -513,11 +503,6 @@
TRAP_IGNORE( Server().AddTrackLogNotificationRequestL( aMessage ) );
}
-
-// --------------------------------------------------------------------------
-// CLocationManagerSession::GetCaptureSettingL
-// --------------------------------------------------------------------------
-//
void CLocationManagerSession::GetCaptureSettingL( const RMessage2& aMessage )
{
TInt KParamCaptureSetting = 0;
--- a/locationmanager/server/src/clocationservertimerhandler.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2009-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: Implements helper class to handle location server tiimer related functionality
-*
-*/
-
-#include "clocationservertimerhandler.h"
-#include "locationmanagerdebug.h"
-
-
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::CLocationServerTimerHandler
-// --------------------------------------------------------------------------
-//
-CLocationServerTimerHandler::CLocationServerTimerHandler
- (MLocationServerTimerObserver& aLocationServerTimerObserver):
- CTimer( EPriorityStandard ),
- iLocationServerTimerObserver(aLocationServerTimerObserver),
- iLocationServerTimerType(MLocationServerTimerObserver::ELocGeneralPurpose)
- {
- }
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::~CLocationServerTimerHandler
-// --------------------------------------------------------------------------
-//
-CLocationServerTimerHandler::~CLocationServerTimerHandler()
- {
- LOG ("CLocationServerTimerHandler::~CLocationServerTimerHandler(), begin");
- Cancel();
- LOG ("CLocationServerTimerHandler::~CLocationServerTimerHandler(), end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::NewL
-// --------------------------------------------------------------------------
-//
-CLocationServerTimerHandler* CLocationServerTimerHandler::NewL(MLocationServerTimerObserver& aLocationServerTimerObserver)
- {
- CLocationServerTimerHandler* self =
- new( ELeave ) CLocationServerTimerHandler(aLocationServerTimerObserver);
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
- return self;
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::ConstructL
-// --------------------------------------------------------------------------
-//
-void CLocationServerTimerHandler::ConstructL()
- {
- LOG ("CLocationServerTimerHandler::ConstructL(), begin");
- CActiveScheduler::Add(this);
- CTimer::ConstructL();
- LOG ("CLocationServerTimerHandler::ConstructL(), end");
- }
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::StartTimer
-// --------------------------------------------------------------------------
-//
-void CLocationServerTimerHandler::StartTimer(const TTimeIntervalMicroSeconds32 anInterval,
- const MLocationServerTimerObserver::TLocationServerTimerType aLocationServerTimerType)
- {
- LOG ("CLocationServerTimerHandler::StartTimer(), begin");
- if(!IsActive())
- {
- LOG1("Starting timer of type - %d", aLocationServerTimerType);
- // not active.
- iLocationServerTimerType = aLocationServerTimerType;
- After( anInterval );
- }
- LOG ("CLocationServerTimerHandler::StartTimer(), end");
- }
-
-
-// --------------------------------------------------------------------------
-// CLocationServerTimerHandler::RunL
-// --------------------------------------------------------------------------
-//
-void CLocationServerTimerHandler::RunL( )
- {
- LOG ("CLocationServerTimerHandler::RunL(), begin");
- TInt status = iStatus.Int();
- LOG1("Error code - %d", status);
- iLocationServerTimerObserver.LocationServerTimerCallBackL
- (iLocationServerTimerType,status);
- LOG ("CLocationServerTimerHandler::RunL(), end");
- }
-
-
-// End of file
-
--- a/locationmanager/server/src/nwregistrationstatushandler.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2009-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: Network registration status handler
-*
-*/
-
-
-#include "nwregistrationstatushandler.h"
-#include "locationmanagerdebug.h"
-
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::CNwRegistrationStatusHandler()
-// ----------------------------------------------------------------------------
-CNwRegistrationStatusHandler::CNwRegistrationStatusHandler(RMobilePhone& aMobilePhone):
- CActive(EPriorityStandard ),
- iMobilePhone(aMobilePhone),
- iRegistrationStatus(RMobilePhone::ERegistrationUnknown),
- iState(ERegStatusOptStateNone)
- {
- }
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::~CNwRegistrationStatusHandler()
-// ----------------------------------------------------------------------------
-CNwRegistrationStatusHandler::~CNwRegistrationStatusHandler()
- {
- LOG("CNwRegistrationStatusHandler::~CNwRegistrationStatusHandler");
- Cancel();
- }
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::NewL()
-// ----------------------------------------------------------------------------
-CNwRegistrationStatusHandler* CNwRegistrationStatusHandler::NewL(RMobilePhone& aMobilePhone)
- {
- LOG("CNwRegistrationStatusHandler::NewL ,begin");
- CNwRegistrationStatusHandler* self = new( ELeave ) CNwRegistrationStatusHandler(aMobilePhone);
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); //self
-
- return self;
- }
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::ConstructL()
-// ----------------------------------------------------------------------------
-void CNwRegistrationStatusHandler::ConstructL()
- {
- LOG("CNwRegistrationStatusHandler::ConstructL ,begin");
- CActiveScheduler::Add(this);
- iMobilePhone.GetNetworkRegistrationStatus(iStatus, iRegistrationStatus);
- iState = ERegStatusOptStateGet;
- SetActive();
- LOG("CNwRegistrationStatusHandler::ConstructL ,end");
- }
-
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::GetNetworkRegistrationStatus()
-// ----------------------------------------------------------------------------
-RMobilePhone::TMobilePhoneRegistrationStatus CNwRegistrationStatusHandler::GetNetworkRegistrationStatus() const
- {
- return iRegistrationStatus;
- }
-
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::StartNotifier()
-// ----------------------------------------------------------------------------
-void CNwRegistrationStatusHandler::StartNotifier()
- {
- LOG("CNwRegistrationStatusHandler::StartNotifier ,begin");
- if(!IsActive())
- {
- iState = ERegStatusOptStateNotify;
- iMobilePhone.NotifyNetworkRegistrationStatusChange(iStatus, iRegistrationStatus);
- SetActive();
- }
- else
- {
- // already active.
- LOG("N/W registration status handler already active");
- }
- LOG("CNwRegistrationStatusHandler::StartNotifier ,end");
- }
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::RunL()
-// ----------------------------------------------------------------------------
-void CNwRegistrationStatusHandler::RunL( )
- {
- LOG("CNwRegistrationStatusHandler::RunL");
- LOG1("Status - %d", iStatus.Int());
- StartNotifier();
- }
-
-// ----------------------------------------------------------------------------
-// CNwRegistrationStatusHandler::DoCancel()
-// ----------------------------------------------------------------------------
-void CNwRegistrationStatusHandler::DoCancel( )
- {
- LOG("CNwRegistrationStatusHandler::DoCancel");
- switch(iState)
- {
- case ERegStatusOptStateGet:
- {
- iMobilePhone.CancelAsyncRequest(EMobilePhoneGetNetworkRegistrationStatus);
- break;
- }
- case ERegStatusOptStateNotify:
- {
- iMobilePhone.CancelAsyncRequest(EMobilePhoneNotifyNetworkRegistrationStatusChange);
- break;
- }
- default:
- // execution shouldn't come over here
- LOG1("CNwRegistrationStatusHandler::DoCancel, in wrong state - %d", iState);
- break;
- }
- }
-
-
-// End of file
-
--- a/locationmanager/sis/locutildebug.pkg Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/sis/locutildebug.pkg Wed Oct 13 15:02:02 2010 +0300
@@ -28,26 +28,7 @@
;:"Nokia"
:"Vendor"
-"\EPOC32\RELEASE\ARMV5\UDEB\locationutilityserver.exe" -"!:\sys\bin\locationutilityserver.exe"
-"\EPOC32\RELEASE\ARMV5\UDEB\LocationTrail.dll" -"!:\sys\bin\LocationTrail.dll"
-"\EPOC32\RELEASE\ARMV5\UDEB\locationutility.dll" -"!:\sys\bin\locationutility.dll"
-"\EPOC32\RELEASE\ARMV5\UDEB\Loc.exe" -"!:\sys\bin\Loc.exe"
-
-
-; Geo converter
-"\EPOC32\RELEASE\ARMV5\UDEB\geoconverter.dll" -"!:\sys\bin\geoconverter.dll"
-
-;#include "..\inc\locplatsupport.mmh"
-;#ifdef _LOC_REVERSEGEOCODE
-;MACRO LOC_REVERSEGEOCODE
-
-; Tag creator
-;"\EPOC32\RELEASE\ARMV5\UDEB\tagcreator.dll" -"!:\sys\bin\tagcreator.dll"
-
-; Geo tagger
-;"\EPOC32\RELEASE\ARMV5\UDEB\geotagger.dll" -"!:\sys\bin\geotagger.dll"
-
-;#endif
-
-; End of file
-
+"S:\EPOC32\RELEASE\ARMV5\UDEB\locationutilityserver.exe" -"!:\sys\bin\locationutilityserver.exe"
+"S:\EPOC32\RELEASE\ARMV5\UDEB\LocationTrail.dll" -"!:\sys\bin\LocationTrail.dll"
+"S:\EPOC32\RELEASE\ARMV5\UDEB\locationutility.dll" -"!:\sys\bin\locationutility.dll"
+"S:\EPOC32\RELEASE\ARMV5\UDEB\Loc.exe" -"!:\sys\bin\Loc.exe"
\ No newline at end of file
--- a/locationmanager/sis/package.pkg Wed Sep 15 12:40:59 2010 +0300
+++ b/locationmanager/sis/package.pkg Wed Oct 13 15:02:02 2010 +0300
@@ -28,7 +28,4 @@
;Files
"\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"
-
-; End of file
-
+"\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe"
\ No newline at end of file
--- a/locationmanager/sis/package_cellid_reverse_geocode_enabled.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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:
-;
-;Languages
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"Location Manager Patch"},(0x200071BE), 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"
-"\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll"
-"\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe"
-
-; Tag creator
-"\EPOC32\RELEASE\ARMV5\UREL\tagcreator.dll" -"c:\sys\bin\tagcreator.dll"
-
-; Geo tagger
-"\EPOC32\RELEASE\ARMV5\UREL\geotagger.dll" -"c:\sys\bin\geotagger.dll"
-
-; Geo converter
-"\EPOC32\RELEASE\ARMV5\UREL\geoconverter.dll" -"c:\sys\bin\geoconverter.dll"
-
-; End of file
-
-
--- a/locationmanager/sis/package_cellidenabled.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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:
-;
-;Languages
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"Location Manager Patch"},(0x200071BE), 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"
-"\EPOC32\RELEASE\ARMV5\UREL\locationmanager.dll" -"c:\sys\bin\locationmanager.dll"
-"\EPOC32\RELEASE\ARMV5\UREL\locationmanagerserver.exe" -"c:\sys\bin\locationmanagerserver.exe"
-
-; 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
-
-
--- a/locationmanager/tagcreator/bwincw/tagcreatorwinscw.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-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)
-
--- a/locationmanager/tagcreator/eabi/tagcreatorarm.def Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-EXPORTS
- _ZN11CTagCreator10SetSessionEP11CMdESession @ 1 NONAME
- _ZN11CTagCreator11AttachTagsLEmmm @ 2 NONAME
- _ZN11CTagCreator19CreateLocationTagsLERK7TPtrC16RmS2_S3_ @ 3 NONAME
- _ZN11CTagCreator4NewLEv @ 4 NONAME
- _ZTI11CTagCreator @ 5 NONAME
- _ZTV11CTagCreator @ 6 NONAME
-
--- a/locationmanager/tagcreator/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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
-tagcreator.mmp
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
-
--- a/locationmanager/tagcreator/group/tagcreator.mmp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-VERSION 10.0
-TARGET tagcreator.dll
-TARGETTYPE DLL
-UID 0x1000008d 0x2002701E
-
-VENDORID VID_DEFAULT
-CAPABILITY CAP_GENERAL_DLL
-
-#if defined(WINSCW)
-deffile ../bwincw/tagcreatorwinscw.def
-#elif defined(EABI)
-deffile ../eabi/tagcreatorarm.def
-#endif
-nostrictdef
-
-USERINCLUDE ../inc
-USERINCLUDE ../../inc
-USERINCLUDE ../../../inc
-
-
-
-SOURCEPATH ../src
-SOURCE ctagcreator.cpp
-
-MW_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY efsrv.lib
-LIBRARY mdeclient.lib
-LIBRARY estor.lib
-LIBRARY platformenv.lib
-
-
-PAGED
-BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O3 -OTime
-
-// End of file
-
--- a/locationmanager/tagcreator/inc/ctagcreator.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +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: 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 <mdeconstants.h>
-
-/**
- *
- * @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.
--- a/locationmanager/tagcreator/sis/depends.xml Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ad:metadata xmlns="http://nokia.com/arrow/repository/ia_component"
- xmlns:ad="http://nokia.com/arrow/application_metadata">
- <appResources>
- <appResource>
- <language>1</language>
- <iacName>MdS Location Manager</iacName>
- <iacDescription>Upgrade package for MdS Tag Creator</iacDescription>
- </appResource>
- </appResources>
- <swPlatformDep>
- <platform>S60</platform>
- <versionFrom>
- <major>5</major>
- <minor>0</minor>
- <date>
- <year>2009</year>
- <week>16</week>
- </date>
- </versionFrom>
- </swPlatformDep>
- <interDeps>
- </interDeps>
-</ad:metadata>
\ No newline at end of file
--- a/locationmanager/tagcreator/sis/package.pkg Wed Sep 15 12:40:59 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:
-;
-;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
--- a/locationmanager/tagcreator/sis/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +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:
-;
-;Languages
-&EN
-
-;Header
-# {"tagcreator"}, (0x2002701E), 1, 0, 0, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Files
-
-
Binary file locationmanager/tagcreator/sis/tagcreator_stub.sis has changed
--- a/locationmanager/tagcreator/src/ctagcreator.cpp Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,307 +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: 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
--- a/mds_plat/harvester_framework_api/inc/harvesterplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/harvester_framework_api/inc/harvesterplugin.h Wed Oct 13 15:02:02 2010 +0300
@@ -160,11 +160,6 @@
* @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:
@@ -270,7 +265,6 @@
CMdEPropertyDef* iTitlePropertyDef;
TBool iHarvesting;
- TBool iPaused;
};
--- a/mds_plat/location_manager_api/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/group/bld.inf Wed Oct 13 15:02:02 2010 +0300
@@ -16,7 +16,6 @@
*/
#include <platform_paths.hrh>
-#include "../../../locationmanager/inc/locplatsupport.mmh"
PRJ_PLATFORMS
DEFAULT
@@ -29,11 +28,6 @@
../inc/rlocationobjectmanipulator.h MW_LAYER_PLATFORM_EXPORT_PATH(rlocationobjectmanipulator.h)
../inc/locationdatatype.h MW_LAYER_PLATFORM_EXPORT_PATH(locationdatatype.h)
../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)
-../inc/geotagger.h MW_LAYER_PLATFORM_EXPORT_PATH(geotagger.h)
-../inc/reversegeocoderplugin.h MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.h)
-../inc/reversegeocoderplugin.inl MW_LAYER_PLATFORM_EXPORT_PATH(reversegeocoderplugin.inl)
PRJ_MMPFILES
--- a/mds_plat/location_manager_api/inc/geotagger.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#ifndef GEOTAGGER_H_
-#define GEOTAGGER_H_
-
-#include <e32base.h>
-#include <e32property.h>
-#include <mdesession.h>
-#include <geotagobserver.h>
-
-
-/**
- * GeoTagger converts a given cell ID(CGI Info) to geo-coordinates.
- * Does reverse geocoding to get country and city name.
- * Creates country and city tag for image/video files.
- * @since S60 9.2
- */
-
-NONSHARABLE_CLASS(CGeoTagger) : public CBase
- {
-public:
- /**
- * 2-phased constructor.
- */
- IMPORT_C static CGeoTagger* NewL(MGeoTaggerObserver* aObserver, CMdESession* aMdeSession = NULL );
-
-public: //exported API
- /**
- * Harvests location tags.
- * @param aObserver, observer for geotagging.
- * @return None.
- */
- virtual void CreateGeoTagsL( const TConnectionOption = ESilent ) = 0;
-
- /**
- * Is there any untagged photos with location info?.
- * @return None.
- */
- virtual void PendingGeoTagsL( TBool aTagInProgress ) = 0;
- };
-
-#endif // GEOTAGGER_H_
-
-// End of file.
-
--- a/mds_plat/location_manager_api/inc/geotagobserver.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +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: A class responsible for geotagging of media files in background.
-*
-*/
-
-#ifndef GEOTAGOBSERVER_H_
-#define GEOTAGOBSERVER_H_
-
-#include <e32base.h>
-#include <etel.h>
-#include <etelmm.h>
-
-enum TConnectionOption
- {
- ESilent=0,
- EInteractive
- };
-
-typedef enum
- {
- EGeoTaggingPending = 0x01,
- EGeoTaggingGoingOn,
- EGeoTagCmpt
- }TGeoTaggingSatus;
-
-
-class MGeoTaggerObserver
- {
-public:
- /**
- * This method is used for notifying completion of geotagging
- */
- virtual void GeoTaggingCompleted( const TInt aError ) = 0;
-
- /**
- * This method is used for notifying completion of query for pending geo tags
- */
- virtual void PendingGeoTagReqComplete( const TInt aError ) = 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;
-
- };
-
-
-#endif // GEOTAGOBSERVER_H_
-
-// End of file.
--- a/mds_plat/location_manager_api/inc/locationdatatype.h Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/inc/locationdatatype.h Wed Oct 13 15:02:02 2010 +0300
@@ -20,8 +20,6 @@
#include <lbsposition.h>
#include <etel3rdparty.h>
-const TInt KMaxCountryName = 128;
-typedef TBuf<KMaxCountryName> TCountryName;
/*
* TLocationData encapsulates all location data.
*/
@@ -30,7 +28,7 @@
TPosition iPosition;
CTelephony::TNetworkInfoV1 iNetworkInfo;
TCourse iCourse;
- TCountryName iCountry;
+ TBuf<100> iCountry;
TUint iSatellites;
TReal32 iQuality;
};
--- a/mds_plat/location_manager_api/inc/reversegeocoderplugin.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +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 <e32base.h>
-#include <lbsposition.h>
-#include <etel.h>
-#include <etelmm.h>
-#include <geotagobserver.h>
-
-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
-
--- a/mds_plat/location_manager_api/inc/reversegeocoderplugin.inl Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* 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 <ecom/ecom.h> // 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<CReverseGeoCoderPlugin*>(
- REComSession::CreateImplementationL(
- pluginId, _FOFF( CReverseGeoCoderPlugin,iDtorKey ) ) );
-
- return self;
-}
-
-// End of file
--- a/mds_plat/location_manager_api/inc/rlocationgeotagger.h Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +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: An interface to Location Trail.
-*
-*/
-
-#ifndef R_RLOCATIONGEOTAGGER_H
-#define R_RLOCATIONGEOTAGGER_H
-
-#include <e32base.h>
-#include <etel3rdparty.h>
-#include <lbsposition.h>
-#include <rlocationmanager.h>
-#include <locationdatatype.h>
-#include <geotagobserver.h>
-
-
-/**
- * RLocationManager class is used for creating a Location Manager session.
- * Location Manager is used to start and stop the location trail, retrieve
- * location information and write the location information to images.
- *
- * @lib LocationManager.lib
- * @since S60 9.2
- */
-NONSHARABLE_CLASS( RLocationGeoTagger ) : public RLocationManager
- {
-public:
-
-public:
- IMPORT_C RLocationGeoTagger();
-
- IMPORT_C ~RLocationGeoTagger();
-
-
- /**
- * Is there any geo tag pending state. (Asynchronous call)
- * @param aStatus - request status.
- * @param aTagPendingFlag - tag pending flag (ETrue if few entry is yet to be tagged else EFalse)
- * @return None
- */
- IMPORT_C void GeoTagStaus( TRequestStatus& aStatus,
- TGeoTaggingSatus& aTagPendingFlag );
-
- /**
- * Cancel tag pending request
- * @return None
- */
- IMPORT_C void CancelTagPendingRequest();
-
- /**
- * Cancel geo tagging request
- * @return None
- */
- IMPORT_C void CancelGeoTaggingRequest();
-
- /**
- * Start geo tagging.
- * @param aConnectionOption - connection option (ESilent/EInteractive).
- * @return None
- */
- IMPORT_C void StartGeoTagging(TRequestStatus& aStatus, const TConnectionOption aConnectionOption );
-
-private:
- TPckg<TGeoTaggingSatus> *iTagPendingData;
- };
-
-#endif // R_RLOCATIONGEOTAGGER_H
-
-//End of File
--- a/mds_plat/location_manager_api/tsrc/conf/LocationManagerTestScripter_reverse_geocode.cfg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,345 +0,0 @@
-#
-# Copyright (c) 2008-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 "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: Location Manager API tests
-#
-
-// ---------------------------------------------------------------------------
-// Location Manager API test cases
-// ---------------------------------------------------------------------------
-
-// These should be run in sequential mode if several cases are run at the same
-// time!
-
-[StifSettings]
-TestThreadStackSize= 32768
-TestThreadMinHeap= 4096
-TestThreadMaxHeap= 16777216
-[EndStifSettings]
-
-[Test]
-title Location Manager Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test Connect
-test Close
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Start-Stop Location Trail
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrailTests
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Get Location Trail State
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test GetTrailState
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Location Trail Notification Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test LocationTrailNotifyTest
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Retrieve Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test RetrieveLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Current Location Basic Test
-timeout 60000
-create LocationManagerTestScripter test
-test TrailConnect
-test StartTrail
-test CurrentLocation
-test StopTrail
-test TrailClose
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object Manipulator
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Create Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Location Snapshot
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Remove Location Object
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By ID
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByID
-test CloseOM
-test CopyByIDDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Copy By URI
-timeout 60000
-create LocationManagerTestScripter test
-request Session
-test PrepareSession
-wait Session
-test SetupOM
-test CopyByURI
-test CloseOM
-test CopyByURIDisco
-test TearDownOM
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Connect Disconnect
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording
-timeout 80000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Observer test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-test AddObserver
-test AddObserver
-test RemoveObserver
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Start Stop Tracklog Recording 2
-timeout 240000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test Recording
-test GetFile
-test GetStatus
-request StopRecording
-test StopTrackLog
-wait StopRecording
-test NotRecording
-test DeleteFile
-test GetStatus2
-test RemoveObserver
-test TearDownTrackLog
-delete test
-[Endtest]
-
-[Test]
-title Tracklog Crash Test
-timeout 60000
-create LocationManagerTestScripter test
-test SetupTrackLog
-test AddObserver
-request Recording
-test StartTrackLog
-wait Recording
-test CrashLocationManager
-test RemoveObserver
-test TearDownTrackLog
-delete test
-create LocationManagerTestScripter test2
-test2 SetupTrackLog
-test2 AddObserver
-request Recording
-test2 StartTrackLog
-wait Recording
-test2 StopTrackLog
-test2 RemoveObserver
-test2 TearDownTrackLog
-delete test2
-[Endtest]
-
-[Test]
-title StartGeoTagging Test
-create LocationManagerTestScripter test
-#test ConnectGeoTaggerL
-test StartGeoTaggingL
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-
-[Test]
-title TagComplete Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagCompleteStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagPending Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagPendingStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagGoingOn Status for GeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagGoingOnStatusL 0
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-
-[Test]
-title TagComplete Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagCompleteStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagPending Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagPendingStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title TagGoingOn Status for NonGeoTagged Photos
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test TestGeoTagGoingOnStatusL 1
-test CloseGeoTaggerL
-delete test
-[Endtest]
-
-[Test]
-title CancelGeoTagging
-create LocationManagerTestScripter test
-test ConnectGeoTaggerL
-test CancelGeoTaggingL
-test CloseGeoTaggerL
-delete test
-[Endtest]
\ No newline at end of file
--- a/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/group/LocationManagerTestScripter.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -18,7 +18,6 @@
#include <platform_paths.hrh>
#include <data_caging_paths.hrh>
-#include "../../../../locationmanager/inc/locplatsupport.mmh"
TARGET LocationManagerTestScripter.dll
TARGETTYPE dll
@@ -29,10 +28,6 @@
DEFFILE LocationManagerTestScripter.DEF
-#ifdef _LOC_REVERSEGEOCODE
-MACRO LOC_REVERSEGEOCODE
-#endif
-
SOURCEPATH ../src
SOURCE LocationManagerTestScripter.cpp
SOURCE LocationManagerTestScripterBlocks.cpp
--- a/mds_plat/location_manager_api/tsrc/group/bld.inf Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/group/bld.inf Wed Oct 13 15:02:02 2010 +0300
@@ -15,8 +15,6 @@
*
*/
-#include "../../../../locationmanager/inc/locplatsupport.mmh"
-
PRJ_PLATFORMS
DEFAULT
@@ -28,10 +26,5 @@
LocationManagerTestScripter.mmp
PRJ_TESTEXPORTS
-#ifdef _LOC_REVERSEGEOCODE
-../conf/LocationManagerTestScripter_reverse_geocode.cfg /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.cfg
-#else
../conf/LocationManagerTestScripter.cfg /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.cfg
-#endif
-
../init/LocationManagerTestScripter.ini /epoc32/winscw/c/TestFramework/LocationManagerTestScripter.ini
--- a/mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/inc/LocationManagerTestScripter.h Wed Oct 13 15:02:02 2010 +0300
@@ -31,10 +31,6 @@
#include "mdccommon.h"
#include "mdesession.h"
-#ifdef LOC_REVERSEGEOCODE
-#include "rlocationgeotagger.h"
-#endif //LOC_REVERSEGEOCODE
-
// CONSTANTS
// Logging path
_LIT( KLocationManagerTestScripterLogPath, "\\logs\\testframework\\LocationManagerTestScripter\\" );
@@ -140,19 +136,7 @@
TInt GetStatus2L( CStifItemParser& aItem );
//ADD NEW METHOD DEC HERE
//[TestMethods] - Do not remove
-
-#ifdef LOC_REVERSEGEOCODE
- TInt ConnectGeoTaggerL( CStifItemParser& /*aItem*/ );
- TInt CloseGeoTaggerL( CStifItemParser& /*aItem*/ );
- TInt StartGeoTaggingL( CStifItemParser& aItem );
-
- TInt TestGeoTagCompleteStatusL( CStifItemParser& aItem );
- TInt TestGeoTagPendingStatusL( CStifItemParser& aItem );
- TInt TestGeoTagGoingOnStatusL( CStifItemParser& aItem );
-
- TInt CancelGeoTaggingL( CStifItemParser& aItem ) ;
-#endif //LOC_REVERSEGEOCODE
-
+
public: // From MTrackLogObserver
void TrackLogStarted(TInt aError);
void TrackLogStopped(TInt aError);
@@ -171,11 +155,7 @@
CMdESession* iMdeSession;
CActiveSchedulerWait* iASW;
-
-#ifdef LOC_REVERSEGEOCODE
- RLocationGeoTagger iLocationGeoTagger;
- TBool iLocGeoTaggerConnected;
-#endif //LOC_REVERSEGEOCODE
+
};
#endif // LOCATIONMANAGERTESTSCRIPTER_H
--- a/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripter.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripter.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -43,11 +43,6 @@
//
void CLocationManagerTestScripter::ConstructL()
{
-
-#ifdef LOC_REVERSEGEOCODE
- iLocGeoTaggerConnected = EFalse;
-#endif //LOC_REVERSEGEOCODE
-
//Read logger settings to check whether test case name is to be
//appended to log file name.
RSettingServer settingServer;
--- a/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripterBlocks.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/src/LocationManagerTestScripterBlocks.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -88,16 +88,9 @@
ENTRY( "DeleteFile" , CLocationManagerTestScripter::DeleteFileL ),
ENTRY( "GetStatus" , CLocationManagerTestScripter::GetStatusL ),
ENTRY( "GetStatus2" , CLocationManagerTestScripter::GetStatus2L )
+ //ADD NEW ENTRY HERE
+ // [test cases entries] - Do not remove
-#ifdef LOC_REVERSEGEOCODE
- ,ENTRY( "ConnectGeoTaggerL", CLocationManagerTestScripter::ConnectGeoTaggerL )
- ,ENTRY( "CloseGeoTaggerL", CLocationManagerTestScripter::CloseGeoTaggerL )
- ,ENTRY( "StartGeoTaggingL", CLocationManagerTestScripter::StartGeoTaggingL )
- ,ENTRY( "TestGeoTagCompleteStatusL", CLocationManagerTestScripter::TestGeoTagCompleteStatusL )
- ,ENTRY( "TestGeoTagPendingStatusL", CLocationManagerTestScripter::TestGeoTagPendingStatusL )
- ,ENTRY( "TestGeoTagGoingOnStatusL", CLocationManagerTestScripter::TestGeoTagGoingOnStatusL )
- ,ENTRY( "CancelGeoTaggingL", CLocationManagerTestScripter::CancelGeoTaggingL )
-#endif //LOC_REVERSEGEOCODE
};
const TInt count = sizeof( KFunctions ) /
--- a/mds_plat/location_manager_api/tsrc/src/RLocationObjectManipulatorTest.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/location_manager_api/tsrc/src/RLocationObjectManipulatorTest.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -334,212 +334,5 @@
aLocationData.iQuality = 1;
}
-
-#ifdef LOC_REVERSEGEOCODE
-TInt CLocationManagerTestScripter::ConnectGeoTaggerL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "ConnectGeoTaggerL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- if(!iLocGeoTaggerConnected)
- {
- User::LeaveIfError( iLocationGeoTagger.Connect() );
- }
-
- iLocGeoTaggerConnected = ETrue;
- return KErrNone;
- }
-
-TInt CLocationManagerTestScripter::CloseGeoTaggerL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "CloseGeoTaggerL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- iLocationGeoTagger.Close() ;
- iLocGeoTaggerConnected = EFalse;
-
- return KErrNone;
- }
-
-
-TInt CLocationManagerTestScripter::StartGeoTaggingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter StartGeoTagging" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- //rav
-
- if(!iLocGeoTaggerConnected)
- {
- User::LeaveIfError( iLocationGeoTagger.Connect() );
- }
-
- iLocGeoTaggerConnected = ETrue;
-
-
-
- TRequestStatus status(KRequestPending);
- TConnectionOption conOption(ESilent);
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- User::WaitForRequest( status );
-
- _LIT( KMsg3, " status.Int() =%d" );
- iLog->Log( KMsg3,status.Int() );
-
- TL( status.Int() == KErrNone );
-
-
- _LIT( KMsg2, "Exit StartGeoTagging" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagCompleteStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagCompleteStatusL( CStifItemParser& /*aItem*/)
- {
- _LIT( KMsg1, "TestGeoTagCompleteStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTaggingPending;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- TL(tagPendingFlag == EGeoTagCmpt);
-
- _LIT( KMsg2, "TestGeoTagCompleteStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
+// End of file
- return KErrNone;
- }
-
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagPendingStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagPendingStatusL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "TestGeoTagPendingStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt fntype;
- aItem.GetNextInt(fntype);
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTagCmpt;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- if(fntype == 0 )
- {
- //for geotagged photos the tag status will be pending
- TL(tagPendingFlag == EGeoTaggingPending);
- }
- else
- {
- //for geotagged photos the tag status will be pending
- TL(tagPendingFlag == EGeoTagCmpt);
- }
-
- _LIT( KMsg2, "TestGeoTagPendingStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CLocationManagerTestScripter::TestGeoTagGoingOnStatusL
-// -----------------------------------------------------------------------------
-//
-TInt CLocationManagerTestScripter::TestGeoTagGoingOnStatusL( CStifItemParser& aItem )
- {
- _LIT( KMsg1, "TestGeoTagGoingOnStatusL enter" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TInt fntype;
- aItem.GetNextInt(fntype);
-
-
- TRequestStatus status = KRequestPending;
- TGeoTaggingSatus tagPendingFlag = EGeoTagCmpt;
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
- if(fntype == 0 )
- {
- if(tagPendingFlag == EGeoTaggingPending)
- {
- TConnectionOption conOption(ESilent);
- status = KRequestPending;
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- iLocationGeoTagger.GeoTagStaus( status, tagPendingFlag );
-
- TL(tagPendingFlag == EGeoTaggingGoingOn);
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
- }
- }
- else
- {
- TL(tagPendingFlag == EGeoTagCmpt);
- }
-
- _LIT( KMsg2, "TestGeoTagGoingOnStatusL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
- }
-
-
-TInt CLocationManagerTestScripter::CancelGeoTaggingL( CStifItemParser& /*aItem*/ )
- {
- _LIT( KMsg1, "Enter CancelGeoTaggingL" );
- iLog->Log( KMsg1 );
- RDebug::Print( KMsg1 );
-
- TRequestStatus status(KRequestPending);
- TConnectionOption conOption(ESilent);
- iLocationGeoTagger.StartGeoTagging(status,conOption);
- iLocationGeoTagger.CancelGeoTaggingRequest();
-
- User::WaitForRequest( status );
-
- TL(status.Int() == KErrNone);
-
-
- _LIT( KMsg2, "CancelGeoTaggingL exit" );
- iLog->Log( KMsg2 );
- RDebug::Print( KMsg2 );
-
- return KErrNone;
-
- }
-#endif //LOC_REVERSEGEOCODE
-
- // End of file
--- a/mds_plat/metadata_engine_api/inc/mdeconstants.h Wed Sep 15 12:40:59 2010 +0300
+++ b/mds_plat/metadata_engine_api/inc/mdeconstants.h Wed Oct 13 15:02:02 2010 +0300
@@ -130,12 +130,6 @@
{
_LIT( KTagObject, "Tag" );
_LIT( KTagItemType, "application/vnd.nokia.mde.tag" );
- enum TTagType
- {
- EUserDefineTags = 0,
- ESystemDefineCityTags = 1,
- ESystemDefineCountryTags = 2
- };
}
namespace MediaObject
--- a/metadataengine/client/group/mdeclient.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/group/mdeclient.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -32,7 +32,7 @@
#if defined(WINSCW)
deffile ../bwincw/mdeclientu.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/mdeclientu.def
#endif
nostrictdef
--- a/metadataengine/client/src/mdeasynchronousfindao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeasynchronousfindao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -132,10 +132,8 @@
Cancel(); // Causes call to DoCancel()
delete iDistinctResults;
- iDistinctResults = NULL;
delete iConditionBuffer;
- iConditionBuffer = NULL;
iResultList.ResetAndDestroy();
iResultList.Close();
--- a/metadataengine/client/src/mdeevent.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeevent.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -70,9 +70,7 @@
CMdEEvent::~CMdEEvent()
{
delete iSource;
- iSource = NULL;
delete iParticipant;
- iParticipant = NULL;
}
CMdEEvent* CMdEEvent::NewL(CMdESession* aSession, CMdCSerializationBuffer& aBuffer, CMdENamespaceDef& aNamespaceDef )
--- a/metadataengine/client/src/mdeeventcondition.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeeventcondition.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -94,15 +94,10 @@
CMdEEventCondition::~CMdEEventCondition()
{
delete iCreationTimeRange;
- iCreationTimeRange = NULL;
delete iObjectConditions;
- iObjectConditions = NULL;
delete iSourceConditions;
- iSourceConditions = NULL;
delete iParticipantConditions;
- iParticipantConditions = NULL;
delete iURI;
- iURI = NULL;
}
--- a/metadataengine/client/src/mdeharvestersession.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeharvestersession.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -45,7 +45,6 @@
{
iHarvestingPrioritizationChunk.Close();
delete iHarvestingPrioritizationSerializationBuffer;
- iHarvestingPrioritizationSerializationBuffer = NULL;
}
void CMdEHarvesterSession::ConstructL()
@@ -113,20 +112,12 @@
}
// Note: CopyLC doesn't push anything to cleanup stack
- TRAPD(err, uri->Des().CopyLC( aUri ));
+ 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;
}
@@ -138,10 +129,8 @@
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 );
}
--- a/metadataengine/client/src/mdenotifierao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdenotifierao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -66,7 +66,6 @@
{
Cancel(); // Causes call to DoCancel()
delete iDataBuffer;
- iDataBuffer = NULL;
iIdArray.Close();
iRelationItemArray.Close();
}
--- a/metadataengine/client/src/mdeobject.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeobject.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -582,7 +582,6 @@
CMdEProperty* oldProperty = iPropertyArray[f];
iPropertyArray[f] = &aProperty;
delete oldProperty;
- oldProperty = NULL;
}
else if (err < KErrNone)
{
@@ -744,7 +743,6 @@
CMdEProperty* oldProperty = iPropertyArray[f];
iPropertyArray[f] = aObject.iPropertyArray[i];
delete oldProperty;
- oldProperty = NULL;
}
else if (err < KErrNone)
{
@@ -819,7 +817,6 @@
if ( prop->Removed() )
{
delete prop;
- prop = NULL;
iPropertyArray.Remove( i );
continue;
}
@@ -1058,7 +1055,6 @@
CMdEProperty* oldProperty = newObject->iPropertyArray[f];
newObject->iPropertyArray[f] = property;
delete oldProperty;
- oldProperty = NULL;
}
else if (err < KErrNone)
{
--- a/metadataengine/client/src/mdeobjectcondition.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeobjectcondition.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -144,18 +144,15 @@
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
--- a/metadataengine/client/src/mdeproperty.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdeproperty.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -95,7 +95,6 @@
if (iDef.PropertyType() == EPropertyText)
{
delete iValue.iText;
- iValue.iText = NULL;
}
}
--- a/metadataengine/client/src/mdequery.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdequery.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -46,15 +46,13 @@
// 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;
}
}
@@ -79,7 +77,6 @@
iObservers.Close();
delete iDistinctResults;
- iDistinctResults = NULL;
}
@@ -157,7 +154,6 @@
if(iResults[i].iOwned)
{
delete iResults[i].iItem;
- iResults[i].iItem = NULL;
}
}
iResults.Reset();
--- a/metadataengine/client/src/mdequerycriteriaserialization.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdequerycriteriaserialization.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -86,7 +86,6 @@
if( iOwnSerializedBuffer )
{
delete iSerializedBuffer;
- iSerializedBuffer = NULL;
}
}
--- a/metadataengine/client/src/mdequeryimpl.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdequeryimpl.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -70,7 +70,6 @@
iAsyncFind->Cancel();
delete iAsyncFind;
- iAsyncFind = NULL;
}
}
@@ -153,7 +152,6 @@
CMdERelationQueryImpl::~CMdERelationQueryImpl()
{
delete iAsyncFind;
- iAsyncFind = NULL;
}
@@ -228,7 +226,6 @@
CMdEEventQueryImpl::~CMdEEventQueryImpl()
{
delete iAsyncFind;
- iAsyncFind = NULL;
}
--- a/metadataengine/client/src/mderelationcondition.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mderelationcondition.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -85,19 +85,14 @@
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;
}
}
--- a/metadataengine/client/src/mdesessionimpl.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdesessionimpl.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -241,7 +241,6 @@
iSessionObserver = NULL;
delete iSchemaBuffer;
- iSchemaBuffer = NULL;
iNotifiers.ResetAndDestroy();
iNotifiers.Close();
@@ -255,10 +254,8 @@
iNamespaceDefs.Close();
delete iSessionStartupAO;
- iSessionStartupAO = NULL;
delete iAsyncHandler;
- iAsyncHandler = NULL;
}
void CMdESessionImpl::ConstructL()
@@ -362,8 +359,7 @@
{
User::Leave( KErrMdENotLocked );
}
-
- items.AppendL( obj );
+ items.Append( obj );
}
UpdateItemsL(items);
@@ -540,7 +536,6 @@
}
delete iSchemaBuffer;
- iSchemaBuffer = NULL;
iSchemaBuffer = schemaBuffer;
@@ -2699,7 +2694,6 @@
{
const TInt index = iNotifiers.Find( aNotifier );
delete aNotifier;
- aNotifier = NULL;
iNotifiers.Remove( index );
}
--- a/metadataengine/client/src/mdetextpropertycondition.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/client/src/mdetextpropertycondition.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -62,7 +62,6 @@
CMdETextPropertyCondition::~CMdETextPropertyCondition()
{
delete iText;
- iText = NULL;
}
TUint32 CMdETextPropertyCondition::InternalQueryOptimizationFlags(TUint32& aFlags)
--- a/metadataengine/common/group/mdccommon.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/common/group/mdccommon.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -29,7 +29,7 @@
#if defined(WINSCW)
deffile ../bwincw/mdccommonu.def
-#elif defined(EABI)
+#elif defined(ARMCC)
deffile ../eabi/mdccommonu.def
#endif
nostrictdef
@@ -50,5 +50,5 @@
PAGED
BYTEPAIRCOMPRESSTARGET
-OPTION ARMCC -O2 -OTime
+OPTION ARMCC -O3 -OTime
--- a/metadataengine/common/src/mdcserializationbuffer.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/common/src/mdcserializationbuffer.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -163,7 +163,6 @@
CMdCSerializationBuffer::~CMdCSerializationBuffer()
{
delete iHeapBuffer;
- iHeapBuffer = NULL;
}
EXPORT_C TPtr8 CMdCSerializationBuffer::Buffer() const
--- a/metadataengine/server/group/mdsserver.mmp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/group/mdsserver.mmp Wed Oct 13 15:02:02 2010 +0300
@@ -93,6 +93,7 @@
LIBRARY flogger.lib
LIBRARY hash.lib
LIBRARY inetprotutil.lib
+LIBRARY platformenv.lib
UNPAGED
--- a/metadataengine/server/inc/mdslogger.h Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/inc/mdslogger.h Wed Oct 13 15:02:02 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; queryText = NULL;} }
+ delete queryText;} }
#else //LOG_QUERY
#define __LOGQUERY_16(INFO, BUFFER, ROWDATA)
#endif //LOG_QUERY
--- a/metadataengine/server/inc/mdsmanipulationengine.h Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/inc/mdsmanipulationengine.h Wed Oct 13 15:02:02 2010 +0300
@@ -32,7 +32,7 @@
class CMdSSqlObjectManipulate;
// CONSTANT DECLARATION
-const TInt KGarbageCollectionDelay = 90; // 1,5 minutes
+const TInt KGarbageCollectionDelay = 80; // 1 minute, 20 seconds
// CLASS DECLARATION
--- a/metadataengine/server/inc/mdspreferences.h Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/inc/mdspreferences.h Wed Oct 13 15:02:02 2010 +0300
@@ -225,7 +225,7 @@
EPreferenceExtraSortAsc |
EPreferenceExtraSortDesc;
- CMdsClauseBuffer* sortBuffer = CMdsClauseBuffer::NewLC( 12 ); // minimum reserved lenght for sort rules
+ CMdsClauseBuffer* sortBuffer = CMdsClauseBuffer::NewLC( 8 ); // estimated minimum lenght for sort rules
// check if there is some order rules
if( KSortFlags & aFlags )
--- a/metadataengine/server/inc/mdsserversession.h Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/inc/mdsserversession.h Wed Oct 13 15:02:02 2010 +0300
@@ -427,7 +427,6 @@
~CNotificationCacheItem()
{
delete iData;
- iData = NULL;
}
public:
--- a/metadataengine/server/inc/mdssqldbmaintenance.h Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/inc/mdssqldbmaintenance.h Wed Oct 13 15:02:02 2010 +0300
@@ -55,11 +55,6 @@
* Drops and re-creates tables
*/
void CreateDatabaseL();
-
- /**
- * Does quick check to the existing database to detect obvious corruption
- */
- TBool CheckForCorruptionL();
};
#endif // __MDSSQLDBMAINTENANCE_H__
--- a/metadataengine/server/src/mdsclausebuffer.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsclausebuffer.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -54,7 +54,6 @@
CMdsClauseBuffer::~CMdsClauseBuffer()
{
delete iBuffer;
- iBuffer = NULL;
}
// ---------------------------------------------------------------------------
--- a/metadataengine/server/src/mdsfindengine.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsfindengine.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -133,9 +133,7 @@
CMdSFindEngine::~CMdSFindEngine()
{
delete iSerializedCriteria;
- iSerializedCriteria = NULL;
delete iSequence;
- iSequence = NULL;
}
// ---------------------------------------------------------------------------
--- a/metadataengine/server/src/mdsfindsequence.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsfindsequence.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -15,7 +15,6 @@
*/
#include <badesca.h>
-#include <mdequery.h>
#include "mdsfindsequence.h"
@@ -73,7 +72,7 @@
, iObserver( &aObserver )
, iUserLevel( EUserLevelNone )
{
- iNotifyCount = KMdEQueryDefaultMaxCount;
+ iNotifyCount = KMaxTUint32;
iFindOperation = NULL;
}
--- a/metadataengine/server/src/mdsfindsqlclause.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsfindsqlclause.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -61,7 +61,6 @@
CMdSFindSqlClause::~CMdSFindSqlClause()
{
delete iQueryBuf;
- iQueryBuf = NULL;
iResultRow.Close();
iVariables.Close();
@@ -77,7 +76,6 @@
iSourceObjectDefs->Close();
delete iSourceObjectDefs;
- iSourceObjectDefs = NULL;
}
}
--- a/metadataengine/server/src/mdsgetimeiao.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsgetimeiao.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -47,7 +47,6 @@
Cancel();
delete iTelephony;
- iTelephony = NULL;
}
TInt64 CMdsGetImeiAO::GetIMEI()
--- a/metadataengine/server/src/mdsimportexport.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsimportexport.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -118,7 +118,6 @@
CMdsImportExport::~CMdsImportExport()
{
delete iConverter;
- iConverter = NULL;
#ifdef _DEBUG
if( iLogEnabled )
@@ -130,10 +129,8 @@
iFs.Close();
delete iBuffer;
- iBuffer = NULL;
delete iSchema;
- iSchema = NULL;
}
/**
--- a/metadataengine/server/src/mdsitemdef.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsitemdef.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -52,7 +52,6 @@
CMdsItemDef::~CMdsItemDef()
{
delete iName;
- iName = NULL;
}
TUint32 CMdsItemDef::RequiredBufferSize()
--- a/metadataengine/server/src/mdsmaintenanceengine.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsmaintenanceengine.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -16,6 +16,8 @@
*/
// INCLUDE FILES
+#include <driveinfo.h>
+
#include "mdsmaintenanceengine.h"
#include "mdslogger.h"
#include "mdsmanipulationengine.h"
@@ -77,7 +79,6 @@
CMdSMaintenanceEngine::~CMdSMaintenanceEngine()
{
delete iMaintenance;
- iMaintenance = NULL;
}
// ------------------------------------------------
@@ -120,7 +121,7 @@
TBool isValid(EFalse);
TRAPD(err, isValid = iMaintenance->ValidateL( ));
- if( err == KErrCorrupt )
+ if(err == KErrCorrupt)
{
DeleteDatabase();
User::Leave( err );
@@ -174,6 +175,11 @@
User::Leave( schemaError );
}
}
+
+ if ( FailedImports() != 0 )
+ {
+ User::Leave( KErrBadName );
+ }
// try to read default import file from C drive
TRAPD( err, ImportMetadataL( aManipulate, aSchema, KMdsDefaultImportFile ) );
@@ -183,13 +189,6 @@
// 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 );
@@ -208,12 +207,6 @@
DeleteDatabase();
User::Leave( err );
}
-
- if( !iMaintenance->CheckForCorruptionL() )
- {
- DeleteDatabase();
- User::Leave( KErrCorrupt );
- }
}
__LOG1( ELogAlways, "CMdSMaintenanceEngine::InstallL complete: %d", 0 );
}
@@ -289,6 +282,31 @@
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 );
}
--- a/metadataengine/server/src/mdsmanipulationengine.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsmanipulationengine.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -93,10 +93,8 @@
CMdSManipulationEngine::~CMdSManipulationEngine()
{
delete iManipulate;
- iManipulate = NULL;
delete iGarbageCollector;
- iGarbageCollector = NULL;
}
// ---------------------------------------------------------------------------
@@ -155,7 +153,7 @@
CleanupClosePushL(objStmt);
RMdSTransaction transaction( connection );
- CleanupClosePushL (transaction );
+ CleanupClosePushL(transaction);
const TInt beginError( transaction.Error() );
if( beginError != KErrNone )
{
@@ -852,11 +850,11 @@
#ifdef _DEBUG
const TInt64 time = fileInfo.iModifiedTime;
- RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) uri %S, iSize %u, iModified %Ld"),
+ RDebug::Print( _L("CMdSManipulationEngine::SetFilesToPresentL: (%d) iSize %u, iModified %Ld, uri %S"),
i,
- &uri,
fileInfo.iSize,
- time );
+ time,
+ &uri);
#endif
TFilePresentStates placeHolder;
@@ -1074,19 +1072,13 @@
CMdSSqLiteConnection& connection = MMdSDbConnectionPool::GetDefaultDBL();
RMdSTransaction transaction( connection );
CleanupClosePushL( transaction );
- const TInt beginError( transaction.Error() );
- if( beginError != KErrNone )
- {
- CleanupStack::PopAndDestroy( &transaction );
- }
+ User::LeaveIfError( transaction.Error() );
iManipulate->CheckMassStorageMediaIdL( aMediaId );
- if( beginError == KErrNone )
- {
- transaction.CommitL();
- CleanupStack::PopAndDestroy( &transaction );
- }
+ transaction.CommitL();
+
+ CleanupStack::PopAndDestroy( &transaction );
}
void CMdSManipulationEngine::AddRelationDefL( TDefId aNamespaceId, const TDesC& aRelationDefName )
--- a/metadataengine/server/src/mdsnotifier.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsnotifier.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -80,7 +80,6 @@
CMdSNotifier::~CMdSNotifier()
{
delete iComparator;
- iComparator = NULL;
const TInt count = iEntries.Count();
@@ -587,9 +586,7 @@
}
delete e.iSerializedCondition;
- e.iSerializedCondition = NULL;
delete e.iDataBuffer;
- e.iDataBuffer = NULL;
iEntries.Remove( i );
}
}
--- a/metadataengine/server/src/mdsnotifycomparator.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsnotifycomparator.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -1180,7 +1180,7 @@
{
aSerializedCondition.PositionL( aRelationCondition.iRelationIds.iPtr.iOffset );
- for (TUint i = 0; i < aRelationCondition.iRelationIds.iPtr.iCount; ++i)
+ for (TInt i = 0; i < aRelationCondition.iRelationIds.iPtr.iCount; ++i)
{
TItemId relationId;
aSerializedCondition.ReceiveL( relationId );
--- a/metadataengine/server/src/mdsschema.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsschema.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -78,7 +78,6 @@
iProperties.Close();
delete iBaseObject;
- iBaseObject = NULL;
}
void CMdsSchema::Reset()
--- a/metadataengine/server/src/mdsserver.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsserver.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -489,30 +489,19 @@
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;
@@ -960,7 +949,6 @@
{
TRAP(result, CMdSServer::ThreadFunctionL());
delete cleanup;
- cleanup = NULL;
}
__UHEAP_MARKEND;
return result;
--- a/metadataengine/server/src/mdsserversession.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdsserversession.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -601,7 +601,7 @@
CleanupStack::Pop( find );
- iFindEngines.AppendL( find );
+ iFindEngines.Append( find );
}
// ---------------------------------------------------------------------------
@@ -641,7 +641,7 @@
CleanupStack::Pop( find );
- iFindEngines.AppendL( find );
+ iFindEngines.Append( find );
}
// ---------------------------------------------------------------------------
@@ -678,7 +678,6 @@
else if( findEngine->IsComplete() )
{
delete findEngine;
- findEngine = NULL;
iFindEngines.Remove( feIndex );
@@ -709,7 +708,6 @@
findEngine->Cancel( aError );
delete findEngine;
- findEngine = NULL;
iFindEngines.Remove( i );
@@ -866,7 +864,6 @@
if ( serverRequest != EAsyncFindSetReady )
{
delete findEngine;
- findEngine = NULL;
iFindEngines.Remove( findEngineIndex );
iFindEngines.Compress();
--- a/metadataengine/server/src/mdssqldbmaintenance.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdssqldbmaintenance.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -188,6 +188,7 @@
}
}
CleanupStack::PopAndDestroy( &col2propQuery );
+ emptyRowData.Reset();
CleanupStack::PopAndDestroy( &emptyRowData );
@@ -226,49 +227,3 @@
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 );
- }
-
--- a/metadataengine/server/src/mdssqlfindoperation.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdssqlfindoperation.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -86,9 +86,7 @@
iQueryId.Close();
delete iResults;
- iResults = NULL;
delete iFindClause;
- iFindClause = NULL;
}
TInt CMdSSqlFindOperation::ExecuteL()
--- a/metadataengine/server/src/mdssqliteconnection.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdssqliteconnection.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -48,7 +48,6 @@
CloseDb();
delete iDbFileName;
- iDbFileName = NULL;
iNotFinishFindQuery = NULL;
}
@@ -544,11 +543,6 @@
if (err != KErrNone)
{
_LIT( KMdsTransactionBegin, "Transaction begin error" );
- if( !iNotFinishFindQuery )
- {
- iEnableTransaction = ETrue;
- }
- iTransactionOngoing = EFalse;
TraceAndLeaveL( KMdsTransactionBegin, err );
}
CleanupStack::PopAndDestroy( &emptyRow );
@@ -587,16 +581,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 );
}
--- a/metadataengine/server/src/mdssqlobjectmanipulate.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/metadataengine/server/src/mdssqlobjectmanipulate.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -71,7 +71,6 @@
CMdSIdentifierGenerator::~CMdSIdentifierGenerator()
{
delete iDigest;
- iDigest = NULL;
}
void CMdSIdentifierGenerator::ConstructL( )
@@ -179,14 +178,11 @@
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,
@@ -2271,8 +2267,8 @@
TPtrC16 uri = aBuffer.ReceivePtr16L();
objectId = SearchObjectByUriL( uri, flags );
if ( objectId != KNoId &&
- uri != KSystemFavouritesAlbumUri &&
- uri != KSystemCapturedAlbumUri )
+ objectId != KSystemFavouritesAlbumId &&
+ objectId != KSystemCapturedAlbumId )
{
// unlock object, so update is no possible anymore
if ( iLockList.IsLocked( *iNamespaceDef, objectId ) )
--- a/rom/mds_cellid_reverse_geocode_enabled.iby Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +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:
-* Metadata system iby file (for ROM image creation)
-*
-*
-*/
-
-
-#ifndef __METADATA_IBY__
-#define __METADATA_IBY__
-
-// sql is mandatory for mds
-#include <sql.iby>
-
-rem - MdE binaries
-file=ABI_DIR\BUILD_DIR\mdeclient.dll SHARED_LIB_DIR\mdeclient.dll
-file=ABI_DIR\BUILD_DIR\mdccommon.dll SHARED_LIB_DIR\mdccommon.dll
-file=ABI_DIR\BUILD_DIR\!mdsserver.exe PROGRAMS_DIR\!mdsserver.exe
-
-rem - MdE data files
-data=EPOCROOT##epoc32\data\z\Private\200009F3\schema.mde PRIVATE\200009F3\schema.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\defaultimportfile.mde PRIVATE\200009F3\defaultimportfile.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\backup_registration.xml PRIVATE\200009F3\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\backup_registration.xml PRIVATE\200009F5\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\mappings.db PRIVATE\200009F5\mappings.db
-
-rem - Harvester and Context Engine binaries
-file=ABI_DIR\BUILD_DIR\HarvesterPluginInterface.dll SHARED_LIB_DIR\HarvesterPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\HarvesterClient.dll SHARED_LIB_DIR\HarvesterClient.dll
-file=ABI_DIR\BUILD_DIR\HarvesterServer.exe PROGRAMS_DIR\HarvesterServer.exe
-file=ABI_DIR\BUILD_DIR\harvestercommon.dll SHARED_LIB_DIR\harvestercommon.dll
-file=ABI_DIR\BUILD_DIR\harvesterdata.dll SHARED_LIB_DIR\harvesterdata.dll
-file=ABI_DIR\BUILD_DIR\mdsfileserverplugin.pxt SHARED_LIB_DIR\mdsfileserverplugin.pxt
-ECOM_PLUGIN(HarvesterImagePlugin.dll,HarvesterImagePlugin.rsc)
-ECOM_PLUGIN(HarvesterVideoPlugin.dll,HarvesterVideoPlugin.rsc)
-ECOM_PLUGIN(HarvesterMessagePlugin.dll,HarvesterMessagePlugin.rsc)
-ECOM_PLUGIN(harvesteromadrmplugin.dll,harvesteromadrmplugin.rsc)
-ECOM_PLUGIN(harvesterwmvplugin.dll,harvesterwmvplugin.rsc)
-ECOM_PLUGIN(harvesterrtpplugin.dll,harvesterrtpplugin.rsc)
-ECOM_PLUGIN(harvesteraudioplugin.dll,harvesteraudioplugin.rsc)
-
-rem - Blacklist server binaries
-file=ABI_DIR\BUILD_DIR\!blacklistserver.exe PROGRAMS_DIR\!blacklistserver.exe
-file=ABI_DIR\BUILD_DIR\blacklistclient.dll SHARED_LIB_DIR\blacklistclient.dll
-
-file=ABI_DIR\BUILD_DIR\MonitorPluginInterface.dll SHARED_LIB_DIR\MonitorPluginInterface.dll
-ECOM_PLUGIN(MMCMonitorPlugin.dll,MMCMonitorPlugin.rsc)
-ECOM_PLUGIN(FileMonitorPlugin.dll,FileMonitorPlugin.rsc)
-ECOM_PLUGIN(MessageMonitorPlugin.dll,MessageMonitorPlugin.rsc)
-ECOM_PLUGIN(mdsoomplugin.dll,mdsoomplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ContextPluginInterface.dll SHARED_LIB_DIR\ContextPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\ContextEngine.dll SHARED_LIB_DIR\ContextEngine.dll
-ECOM_PLUGIN(locationcontextplugin.dll,locationcontextplugin.rsc)
-ECOM_PLUGIN(calendarcontextplugin.dll,calendarcontextplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ComposerPluginInterface.dll SHARED_LIB_DIR\ComposerPluginInterface.dll
-ECOM_PLUGIN(ComposerImagePlugin.dll,ComposerImagePlugin.rsc)
-
-// Location Manager
-REM locationmanager
-file=ABI_DIR\BUILD_DIR\locationmanager.dll SHARED_LIB_DIR\locationmanager.dll
-
-REM locationmanagerserver
-file=ABI_DIR\BUILD_DIR\locationmanagerserver.exe PROGRAMS_DIR\locationmanagerserver.exe
-
-REM watchdog
-file=ABI_DIR\BUILD_DIR\mdswatchdog.exe PROGRAMS_DIR\mdswatchdog.exe
-
-REM locationtrail
-file=ABI_DIR\BUILD_DIR\locationtrail.dll SHARED_LIB_DIR\locationtrail.dll
-
-
-REM tagcreator
-file=ABI_DIR\BUILD_DIR\tagcreator.dll SHARED_LIB_DIR\tagcreator.dll
-
-REM geotagger
-file=ABI_DIR\BUILD_DIR\geotagger.dll SHARED_LIB_DIR\geotagger.dll
-
-REM geoconverter
-file=ABI_DIR\BUILD_DIR\geoconverter.dll SHARED_LIB_DIR\geoconverter.dll
-
-REM Location Manager data files
-data=ZPRIVATE\10202BE9\200071BE.txt "PRIVATE\10202BE9\200071BE.txt"
-
-REM Harvester Cen Repo file
-data=ZPRIVATE\10202BE9\200009FE.txt "PRIVATE\10202BE9\200009FE.txt"
-
-REM MdS version CenRep file
-data=ZPRIVATE\10202BE9\200009F3.txt "PRIVATE\10202BE9\200009F3.txt"
-
-REM Harvester MMC plugin CenRep file
-data=ZPRIVATE\10202BE9\20007183.txt "PRIVATE\10202BE9\20007183.txt"
-
-data=ZSYSTEM\install\contentlistingframework_stub.sis system\install\contentlistingframework_stub.sis
-data=ZSYSTEM\install\contextengine_stub.sis system\install\contextengine_stub.sis
-data=ZSYSTEM\install\blacklistserver_stub.sis system\install\blacklistserver_stub.sis
-data=ZSYSTEM\install\composerplugins_stub.sis system\install\composerplugins_stub.sis
-data=ZSYSTEM\install\harvester_stub.sis system\install\harvester_stub.sis
-data=ZSYSTEM\install\harvesterplugins_stub.sis system\install\harvesterplugins_stub.sis
-data=ZSYSTEM\install\monitorplugins_stub.sis system\install\monitorplugins_stub.sis
-data=ZSYSTEM\install\locationmanager_stub.sis system\install\locationmanager_stub.sis
-data=ZSYSTEM\install\metadataengine_stub.sis system\install\metadataengine_stub.sis
-data=ZSYSTEM\install\mds_stub.sis system\install\mds_stub.sis
-data=ZSYSTEM\install\mdswatchdog_stub.sis system\install\mdswatchdog_stub.sis
-
-#endif //__METADATA_IBY__
--- a/rom/mds_cellidenabled.iby Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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:
-* Metadata system iby file (for ROM image creation)
-*
-*
-*/
-
-
-#ifndef __METADATA_IBY__
-#define __METADATA_IBY__
-
-// sql is mandatory for mds
-#include <sql.iby>
-
-rem - MdE binaries
-file=ABI_DIR\BUILD_DIR\mdeclient.dll SHARED_LIB_DIR\mdeclient.dll
-file=ABI_DIR\BUILD_DIR\mdccommon.dll SHARED_LIB_DIR\mdccommon.dll
-file=ABI_DIR\BUILD_DIR\!mdsserver.exe PROGRAMS_DIR\!mdsserver.exe
-
-rem - MdE data files
-data=EPOCROOT##epoc32\data\z\Private\200009F3\schema.mde PRIVATE\200009F3\schema.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\defaultimportfile.mde PRIVATE\200009F3\defaultimportfile.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\backup_registration.xml PRIVATE\200009F3\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\backup_registration.xml PRIVATE\200009F5\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\mappings.db PRIVATE\200009F5\mappings.db
-
-rem - Harvester and Context Engine binaries
-file=ABI_DIR\BUILD_DIR\HarvesterPluginInterface.dll SHARED_LIB_DIR\HarvesterPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\HarvesterClient.dll SHARED_LIB_DIR\HarvesterClient.dll
-file=ABI_DIR\BUILD_DIR\HarvesterServer.exe PROGRAMS_DIR\HarvesterServer.exe
-file=ABI_DIR\BUILD_DIR\harvestercommon.dll SHARED_LIB_DIR\harvestercommon.dll
-file=ABI_DIR\BUILD_DIR\harvesterdata.dll SHARED_LIB_DIR\harvesterdata.dll
-file=ABI_DIR\BUILD_DIR\mdsfileserverplugin.pxt SHARED_LIB_DIR\mdsfileserverplugin.pxt
-ECOM_PLUGIN(HarvesterImagePlugin.dll,HarvesterImagePlugin.rsc)
-ECOM_PLUGIN(HarvesterVideoPlugin.dll,HarvesterVideoPlugin.rsc)
-ECOM_PLUGIN(HarvesterMessagePlugin.dll,HarvesterMessagePlugin.rsc)
-ECOM_PLUGIN(harvesteromadrmplugin.dll,harvesteromadrmplugin.rsc)
-ECOM_PLUGIN(harvesterwmvplugin.dll,harvesterwmvplugin.rsc)
-ECOM_PLUGIN(harvesterrtpplugin.dll,harvesterrtpplugin.rsc)
-ECOM_PLUGIN(harvesteraudioplugin.dll,harvesteraudioplugin.rsc)
-
-rem - Blacklist server binaries
-file=ABI_DIR\BUILD_DIR\!blacklistserver.exe PROGRAMS_DIR\!blacklistserver.exe
-file=ABI_DIR\BUILD_DIR\blacklistclient.dll SHARED_LIB_DIR\blacklistclient.dll
-
-file=ABI_DIR\BUILD_DIR\MonitorPluginInterface.dll SHARED_LIB_DIR\MonitorPluginInterface.dll
-ECOM_PLUGIN(MMCMonitorPlugin.dll,MMCMonitorPlugin.rsc)
-ECOM_PLUGIN(FileMonitorPlugin.dll,FileMonitorPlugin.rsc)
-ECOM_PLUGIN(MessageMonitorPlugin.dll,MessageMonitorPlugin.rsc)
-ECOM_PLUGIN(mdsoomplugin.dll,mdsoomplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ContextPluginInterface.dll SHARED_LIB_DIR\ContextPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\ContextEngine.dll SHARED_LIB_DIR\ContextEngine.dll
-ECOM_PLUGIN(locationcontextplugin.dll,locationcontextplugin.rsc)
-ECOM_PLUGIN(calendarcontextplugin.dll,calendarcontextplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ComposerPluginInterface.dll SHARED_LIB_DIR\ComposerPluginInterface.dll
-ECOM_PLUGIN(ComposerImagePlugin.dll,ComposerImagePlugin.rsc)
-
-// Location Manager
-REM locationmanager
-file=ABI_DIR\BUILD_DIR\locationmanager.dll SHARED_LIB_DIR\locationmanager.dll
-
-REM locationmanagerserver
-file=ABI_DIR\BUILD_DIR\locationmanagerserver.exe PROGRAMS_DIR\locationmanagerserver.exe
-
-REM watchdog
-file=ABI_DIR\BUILD_DIR\mdswatchdog.exe PROGRAMS_DIR\mdswatchdog.exe
-
-REM locationtrail
-file=ABI_DIR\BUILD_DIR\locationtrail.dll SHARED_LIB_DIR\locationtrail.dll
-
-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"
-
-REM Harvester Cen Repo file
-data=ZPRIVATE\10202BE9\200009FE.txt "PRIVATE\10202BE9\200009FE.txt"
-
-REM MdS version CenRep file
-data=ZPRIVATE\10202BE9\200009F3.txt "PRIVATE\10202BE9\200009F3.txt"
-
-REM Harvester MMC plugin CenRep file
-data=ZPRIVATE\10202BE9\20007183.txt "PRIVATE\10202BE9\20007183.txt"
-
-data=ZSYSTEM\install\contentlistingframework_stub.sis system\install\contentlistingframework_stub.sis
-data=ZSYSTEM\install\contextengine_stub.sis system\install\contextengine_stub.sis
-data=ZSYSTEM\install\blacklistserver_stub.sis system\install\blacklistserver_stub.sis
-data=ZSYSTEM\install\composerplugins_stub.sis system\install\composerplugins_stub.sis
-data=ZSYSTEM\install\harvester_stub.sis system\install\harvester_stub.sis
-data=ZSYSTEM\install\harvesterplugins_stub.sis system\install\harvesterplugins_stub.sis
-data=ZSYSTEM\install\monitorplugins_stub.sis system\install\monitorplugins_stub.sis
-data=ZSYSTEM\install\locationmanager_stub.sis system\install\locationmanager_stub.sis
-data=ZSYSTEM\install\metadataengine_stub.sis system\install\metadataengine_stub.sis
-data=ZSYSTEM\install\mds_stub.sis system\install\mds_stub.sis
-data=ZSYSTEM\install\mdswatchdog_stub.sis system\install\mdswatchdog_stub.sis
-
-#endif //__METADATA_IBY__
--- a/rom/mds_reverse_geocode_enabled_only.iby Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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:
-* Metadata system iby file (for ROM image creation)
-*
-*
-*/
-
-
-#ifndef __METADATA_IBY__
-#define __METADATA_IBY__
-
-// sql is mandatory for mds
-#include <sql.iby>
-
-rem - MdE binaries
-file=ABI_DIR\BUILD_DIR\mdeclient.dll SHARED_LIB_DIR\mdeclient.dll
-file=ABI_DIR\BUILD_DIR\mdccommon.dll SHARED_LIB_DIR\mdccommon.dll
-file=ABI_DIR\BUILD_DIR\!mdsserver.exe PROGRAMS_DIR\!mdsserver.exe
-
-rem - MdE data files
-data=EPOCROOT##epoc32\data\z\Private\200009F3\schema.mde PRIVATE\200009F3\schema.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\defaultimportfile.mde PRIVATE\200009F3\defaultimportfile.mde
-data=EPOCROOT##epoc32\data\z\Private\200009F3\backup_registration.xml PRIVATE\200009F3\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\backup_registration.xml PRIVATE\200009F5\backup_registration.xml
-data=EPOCROOT##epoc32\data\z\Private\200009F5\mappings.db PRIVATE\200009F5\mappings.db
-
-rem - Harvester and Context Engine binaries
-file=ABI_DIR\BUILD_DIR\HarvesterPluginInterface.dll SHARED_LIB_DIR\HarvesterPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\HarvesterClient.dll SHARED_LIB_DIR\HarvesterClient.dll
-file=ABI_DIR\BUILD_DIR\HarvesterServer.exe PROGRAMS_DIR\HarvesterServer.exe
-file=ABI_DIR\BUILD_DIR\harvestercommon.dll SHARED_LIB_DIR\harvestercommon.dll
-file=ABI_DIR\BUILD_DIR\harvesterdata.dll SHARED_LIB_DIR\harvesterdata.dll
-file=ABI_DIR\BUILD_DIR\mdsfileserverplugin.pxt SHARED_LIB_DIR\mdsfileserverplugin.pxt
-ECOM_PLUGIN(HarvesterImagePlugin.dll,HarvesterImagePlugin.rsc)
-ECOM_PLUGIN(HarvesterVideoPlugin.dll,HarvesterVideoPlugin.rsc)
-ECOM_PLUGIN(HarvesterMessagePlugin.dll,HarvesterMessagePlugin.rsc)
-ECOM_PLUGIN(harvesteromadrmplugin.dll,harvesteromadrmplugin.rsc)
-ECOM_PLUGIN(harvesterwmvplugin.dll,harvesterwmvplugin.rsc)
-ECOM_PLUGIN(harvesterrtpplugin.dll,harvesterrtpplugin.rsc)
-ECOM_PLUGIN(harvesteraudioplugin.dll,harvesteraudioplugin.rsc)
-
-rem - Blacklist server binaries
-file=ABI_DIR\BUILD_DIR\!blacklistserver.exe PROGRAMS_DIR\!blacklistserver.exe
-file=ABI_DIR\BUILD_DIR\blacklistclient.dll SHARED_LIB_DIR\blacklistclient.dll
-
-file=ABI_DIR\BUILD_DIR\MonitorPluginInterface.dll SHARED_LIB_DIR\MonitorPluginInterface.dll
-ECOM_PLUGIN(MMCMonitorPlugin.dll,MMCMonitorPlugin.rsc)
-ECOM_PLUGIN(FileMonitorPlugin.dll,FileMonitorPlugin.rsc)
-ECOM_PLUGIN(MessageMonitorPlugin.dll,MessageMonitorPlugin.rsc)
-ECOM_PLUGIN(mdsoomplugin.dll,mdsoomplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ContextPluginInterface.dll SHARED_LIB_DIR\ContextPluginInterface.dll
-file=ABI_DIR\BUILD_DIR\ContextEngine.dll SHARED_LIB_DIR\ContextEngine.dll
-ECOM_PLUGIN(locationcontextplugin.dll,locationcontextplugin.rsc)
-ECOM_PLUGIN(calendarcontextplugin.dll,calendarcontextplugin.rsc)
-
-file=ABI_DIR\BUILD_DIR\ComposerPluginInterface.dll SHARED_LIB_DIR\ComposerPluginInterface.dll
-ECOM_PLUGIN(ComposerImagePlugin.dll,ComposerImagePlugin.rsc)
-
-// Location Manager
-REM locationmanager
-file=ABI_DIR\BUILD_DIR\locationmanager.dll SHARED_LIB_DIR\locationmanager.dll
-
-REM locationmanagerserver
-file=ABI_DIR\BUILD_DIR\locationmanagerserver.exe PROGRAMS_DIR\locationmanagerserver.exe
-
-REM watchdog
-file=ABI_DIR\BUILD_DIR\mdswatchdog.exe PROGRAMS_DIR\mdswatchdog.exe
-
-REM locationtrail
-file=ABI_DIR\BUILD_DIR\locationtrail.dll SHARED_LIB_DIR\locationtrail.dll
-
-
-REM tagcreator
-file=ABI_DIR\BUILD_DIR\tagcreator.dll SHARED_LIB_DIR\tagcreator.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"
-
-REM Harvester Cen Repo file
-data=ZPRIVATE\10202BE9\200009FE.txt "PRIVATE\10202BE9\200009FE.txt"
-
-REM MdS version CenRep file
-data=ZPRIVATE\10202BE9\200009F3.txt "PRIVATE\10202BE9\200009F3.txt"
-
-REM Harvester MMC plugin CenRep file
-data=ZPRIVATE\10202BE9\20007183.txt "PRIVATE\10202BE9\20007183.txt"
-
-data=ZSYSTEM\install\contentlistingframework_stub.sis system\install\contentlistingframework_stub.sis
-data=ZSYSTEM\install\contextengine_stub.sis system\install\contextengine_stub.sis
-data=ZSYSTEM\install\blacklistserver_stub.sis system\install\blacklistserver_stub.sis
-data=ZSYSTEM\install\composerplugins_stub.sis system\install\composerplugins_stub.sis
-data=ZSYSTEM\install\harvester_stub.sis system\install\harvester_stub.sis
-data=ZSYSTEM\install\harvesterplugins_stub.sis system\install\harvesterplugins_stub.sis
-data=ZSYSTEM\install\monitorplugins_stub.sis system\install\monitorplugins_stub.sis
-data=ZSYSTEM\install\locationmanager_stub.sis system\install\locationmanager_stub.sis
-data=ZSYSTEM\install\metadataengine_stub.sis system\install\metadataengine_stub.sis
-data=ZSYSTEM\install\mds_stub.sis system\install\mds_stub.sis
-data=ZSYSTEM\install\mdswatchdog_stub.sis system\install\mdswatchdog_stub.sis
-
-#endif //__METADATA_IBY__
Binary file sis/mds/mds_stub.sis has changed
--- a/sis/mds/package.pkg Wed Sep 15 12:40:59 2010 +0300
+++ b/sis/mds/package.pkg Wed Oct 13 15:02:02 2010 +0300
@@ -17,7 +17,7 @@
&EN
;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 26, TYPE=SA, RU
+#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 22, TYPE=SA, RU
; Localised vendor name
%{"Nokia"}
--- a/sis/mds/package_cellid_reverse_geocode_enabled.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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:
-;
-;Languages
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 26, 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\geoconverter.dll" -"c:\sys\bin\geoconverter.dll"
-"\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
-
--- a/sis/mds/package_cellidenabled.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +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:
-;
-;Languages
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 26, 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\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"
-"\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
-
--- a/sis/mds/package_reverse_geocode_enabled_only.pkg Wed Sep 15 12:40:59 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +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:
-;
-;Languages
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 26, 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
-
--- a/sis/mds/package_separate.pkg Wed Sep 15 12:40:59 2010 +0300
+++ b/sis/mds/package_separate.pkg Wed Oct 13 15:02:02 2010 +0300
@@ -17,7 +17,7 @@
&EN
;packet-header (name, uid, major, minor, build, type)
-#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 26, TYPE=SA, RU
+#{"Metadata System Upgrade"},(0x200009F5), 9, 20, 22, TYPE=SA, RU
; Localised vendor name
%{"Nokia"}
--- a/sis/mds/stub.pkg Wed Sep 15 12:40:59 2010 +0300
+++ b/sis/mds/stub.pkg Wed Oct 13 15:02:02 2010 +0300
@@ -17,7 +17,7 @@
&EN
; Header
-#{"Metadata System"}, (0x200009F5), 9, 20, 26, TYPE=SA
+#{"Metadata System"}, (0x200009F5), 9, 20, 22, TYPE=SA
; Localised Vendor name
%{"Nokia"}
--- a/watchdog/src/watchdog.cpp Wed Sep 15 12:40:59 2010 +0300
+++ b/watchdog/src/watchdog.cpp Wed Oct 13 15:02:02 2010 +0300
@@ -161,7 +161,7 @@
//
CWatchdog::~CWatchdog()
{
- delete iShutdownObserver;
+ delete iShutdownObserver;
delete iSelfShutdownObserver;
Cancel();
}
@@ -304,6 +304,5 @@
}
delete cleanupStack;
- cleanupStack = NULL;
return err;
}