memspy/Engine/Source/Sink/MemSpyEngineOutputSink.cpp
changeset 34 7259cf1302ad
parent 0 a03f92240627
child 44 52e343bb8f80
equal deleted inserted replaced
33:0d72cc2a29a3 34:7259cf1302ad
   378     }
   378     }
   379 
   379 
   380 
   380 
   381 EXPORT_C CMemSpyEngineSinkMetaData::~CMemSpyEngineSinkMetaData()
   381 EXPORT_C CMemSpyEngineSinkMetaData::~CMemSpyEngineSinkMetaData()
   382     {
   382     {
       
   383 	delete iRoot;
   383     delete iContext;
   384     delete iContext;
   384     delete iFolder;
   385     delete iFolder;
   385     delete iExtension;
   386     delete iExtension;
   386     delete iFolderTimeStamp;
   387     delete iFolderTimeStamp;
   387     }
   388     }
   388 
   389 
   389 
   390 
   390 void CMemSpyEngineSinkMetaData::ConstructL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, const TTime& aFolderTime )
   391 void CMemSpyEngineSinkMetaData::ConstructL( const TDesC& aRoot, const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, const TTime& aFolderTime )
   391     {
   392     {
       
   393 	iRoot = aRoot.AllocL();
   392     iContext = aContext.AllocL();
   394     iContext = aContext.AllocL();
   393     iFolder = aFolder.AllocL();
   395     iFolder = aFolder.AllocL();
   394     iExtension = aExtension.AllocL();
   396     iExtension = aExtension.AllocL();
   395 
   397 
   396     const TDateTime dt = aFolderTime.DateTime();
   398     const TDateTime dt = aFolderTime.DateTime();
   405 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL()
   407 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL()
   406     {
   408     {
   407     return CMemSpyEngineSinkMetaData::NewL( KNullDesC, KNullDesC, KNullDesC, ETrue, ETrue );
   409     return CMemSpyEngineSinkMetaData::NewL( KNullDesC, KNullDesC, KNullDesC, ETrue, ETrue );
   408     }
   410     }
   409 
   411 
   410 
   412 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL(  const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp )
   411 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp )
   413 	{
       
   414 	return NewL( KNullDesC, aContext, aFolder, aExtension, aOverwrite, aUseFileTimeStamp );
       
   415 	}
       
   416 
       
   417 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp, const TTime& aFolderTimeStamp )
       
   418     {
       
   419     return NewL( KNullDesC, aContext, aFolder, aExtension, aOverwrite, aUseFileTimeStamp, aFolderTimeStamp );
       
   420     }
       
   421 
       
   422 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL( const TDesC& aRoot, const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp )
   412     {
   423     {
   413     // Create a dummy time, we'll clear it after ConstructL() returns...
   424     // Create a dummy time, we'll clear it after ConstructL() returns...
   414     TTime now; now.HomeTime();
   425     TTime now; now.HomeTime();
   415 
   426 
   416     CMemSpyEngineSinkMetaData* self = new(ELeave) CMemSpyEngineSinkMetaData( aOverwrite, aUseFileTimeStamp );
   427     CMemSpyEngineSinkMetaData* self = new(ELeave) CMemSpyEngineSinkMetaData( aOverwrite, aUseFileTimeStamp );
   417     CleanupStack::PushL( self );
   428     CleanupStack::PushL( self );
   418     self->ConstructL( aContext, aFolder, aExtension, now );
   429     self->ConstructL( aRoot, aContext, aFolder, aExtension, now );
   419     CleanupStack::Pop( self );
   430     CleanupStack::Pop( self );
   420 
   431 
   421     // Clear folder time stamp
   432     // Clear folder time stamp
   422     self->iFolderTimeStamp->Des().Zero();
   433     self->iFolderTimeStamp->Des().Zero();
   423     return self;
   434     return self;
   424     }
   435     }
   425 
   436 
   426 
   437 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL( const TDesC& aRoot, const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp, const TTime& aFolderTimeStamp )
   427 EXPORT_C CMemSpyEngineSinkMetaData* CMemSpyEngineSinkMetaData::NewL( const TDesC& aContext, const TDesC& aFolder, const TDesC& aExtension, TBool aOverwrite, TBool aUseFileTimeStamp, const TTime& aFolderTimeStamp )
       
   428     {
   438     {
   429     CMemSpyEngineSinkMetaData* self = new(ELeave) CMemSpyEngineSinkMetaData( aOverwrite, aUseFileTimeStamp );
   439     CMemSpyEngineSinkMetaData* self = new(ELeave) CMemSpyEngineSinkMetaData( aOverwrite, aUseFileTimeStamp );
   430     CleanupStack::PushL( self );
   440     CleanupStack::PushL( self );
   431     self->ConstructL( aContext, aFolder, aExtension, aFolderTimeStamp );
   441     self->ConstructL( aRoot, aContext, aFolder, aExtension, aFolderTimeStamp );
   432     CleanupStack::Pop( self );
   442     CleanupStack::Pop( self );
   433     return self;
   443     return self;
   434     }
   444     }
   435 
       
   436