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