emailservices/emailframework/src/CFSMailClient.cpp
changeset 43 99bcbff212ad
parent 20 ecc8def7944a
child 47 f83bd4ae1fe3
--- a/emailservices/emailframework/src/CFSMailClient.cpp	Mon May 24 21:02:02 2010 +0300
+++ b/emailservices/emailframework/src/CFSMailClient.cpp	Fri May 28 13:56:43 2010 +0300
@@ -15,11 +15,12 @@
 *
 */
 
+#include "emailtrace.h"
+
 //<qmail>
 #include <nmcommonheaders.h>
 //</qmail>
 
-#include "emailtrace.h"
 #include "CFSMailClient.h"
 #include "CFSFWImplementation.h"
 #include "CFSMailPluginManager.h"
@@ -34,7 +35,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CFSMailClient* CFSMailClient::NewLC(TInt aConfiguration)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
 
 	CFSMailClient* client = Instance();
 	if(!client)
@@ -61,10 +62,11 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CFSMailClient* CFSMailClient::NewL()
 {
-    FUNC_LOG;
-  CFSMailClient* client =  CFSMailClient::NewLC(EFSLoadPlugins);
-  CleanupStack:: Pop(client);
-  return client;
+    NM_FUNCTION;
+    
+    CFSMailClient* client =  CFSMailClient::NewLC(EFSLoadPlugins);
+    CleanupStack:: Pop(client);
+    return client;
 }
 
 // -----------------------------------------------------------------------------
@@ -72,11 +74,11 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CFSMailClient* CFSMailClient::NewL(TInt aConfiguration)
 {
-    FUNC_LOG;
-
-  CFSMailClient* client =  CFSMailClient::NewLC(aConfiguration);
-  CleanupStack:: Pop(client);
-  return client;
+    NM_FUNCTION;
+    
+    CFSMailClient* client =  CFSMailClient::NewLC(aConfiguration);
+    CleanupStack:: Pop(client);
+    return client;
 }
 
 // -----------------------------------------------------------------------------
@@ -84,7 +86,8 @@
 // -----------------------------------------------------------------------------
 void CFSMailClient::ConstructL(TInt aConfiguration)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	iFWImplementation = CFSFWImplementation::NewL(aConfiguration);
 }
 
@@ -93,7 +96,8 @@
 // -----------------------------------------------------------------------------
 CFSMailClient::CFSMailClient()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	// clear pointers
 	iFWImplementation = NULL;
 	iBrandManager = NULL;
@@ -105,7 +109,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CFSMailClient::~CFSMailClient()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	if(iBrandManager)
 		{
 		delete iBrandManager;
@@ -118,7 +123,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CFSMailBox* CFSMailClient::GetMailBoxByUidL(const TFSMailMsgId aMailBoxId)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	// select plugin
 	CFSMailBox* mailBox = NULL;
 	CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMailBoxId);
@@ -137,7 +143,8 @@
 EXPORT_C CFSMailFolder* CFSMailClient::GetFolderByUidL( const TFSMailMsgId aMailBoxId,
 													   const TFSMailMsgId aFolderId )
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	CFSMailFolder* folder = NULL;
 	
 	// select plugin
@@ -158,7 +165,8 @@
 														 const TFSMailMsgId aMessageId,
 														 const TFSMailDetails aDetails)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	CFSMailMessage* message = NULL;
     // select plugin
     CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMessageId);
@@ -178,7 +186,8 @@
 												   const TFSMailMsgId aFolderId,
 											 	   const RArray<TFSMailMsgId>& aMessages )
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aFolderId);
 	if(plugin)
 	{
@@ -192,7 +201,8 @@
 EXPORT_C TInt CFSMailClient::DeleteMailBoxByUidL( const TFSMailMsgId aMailBoxId,
  								  MFSMailRequestObserver& aOperationObserver )
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	// select plugin
 	CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMailBoxId);
 	if(plugin)
@@ -218,7 +228,7 @@
 EXPORT_C TInt CFSMailClient::ListMailBoxes(const TFSMailMsgId aPlugin,
 											 RPointerArray<CFSMailBox>& aMailBoxes)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
 
 	RArray<TFSMailMsgId> mailBoxList;
 	mailBoxList.Reset();
@@ -311,7 +321,7 @@
         						const TFSMailMsgId aFolderId, const TFSMailDetails aDetails,
         						const RArray<TFSMailSortCriteria>& aSorting)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
 
 	MFSMailIterator* iterator = NULL;
 	MFSMailIterator* pluginIterator = NULL;
@@ -339,7 +349,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C MFSMailBrandManager& CFSMailClient::GetBrandManagerL( void )
 {
-    FUNC_LOG;
+    NM_FUNCTION;
 
 	if(iBrandManager == NULL)
 		{
@@ -360,7 +370,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::AddObserverL(MFSMailEventObserver& aObserver)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	for(TInt i=0;i<iFWImplementation->GetPluginManager().GetPluginCount();i++)
 		{
 		CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByIndex(i);
@@ -376,7 +387,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::RemoveObserver(MFSMailEventObserver& aObserver)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	for(TInt i=0;i<iFWImplementation->GetPluginManager().GetPluginCount();i++)
 	{
 		CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByIndex(i);
@@ -392,7 +404,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::UnregisterRequestObserver(TInt aRequestId)
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	for(TInt i=0;i<iFWImplementation->GetPluginManager().GetPluginCount();i++)
 	{
 		if(CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByIndex(i))
@@ -409,7 +422,8 @@
 EXPORT_C void CFSMailClient::SubscribeMailboxEventsL(TFSMailMsgId aMailBoxId,
 													 	MFSMailEventObserver& aObserver)
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	// select plugin
 	if(CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMailBoxId))
 		{
@@ -424,7 +438,8 @@
 EXPORT_C void CFSMailClient::UnsubscribeMailboxEvents(TFSMailMsgId aMailBoxId,
 														MFSMailEventObserver& aObserver)
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	// select plugin
 	if(CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid(aMailBoxId))
 		{
@@ -438,7 +453,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C TInt CFSMailClient::WizardDataAvailableL()
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
 	
 	TInt ret = KErrNone;
 	for(TInt i=0;i<iFWImplementation->GetPluginManager().GetPluginCount();i++)
@@ -465,7 +480,7 @@
 // -----------------------------------------------------------------------------
 EXPORT_C TInt CFSMailClient::AuthenticateL(MFSMailRequestObserver& aOperationObserver)
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
 
 	TInt requestId(0);
 	
@@ -496,7 +511,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::CleanTempDirL( )
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
     iFWImplementation->GetPluginManager().CleanTempDirL();	
 	}
 
@@ -505,7 +521,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C TDesC& CFSMailClient::GetTempDirL( )
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	return iFWImplementation->GetPluginManager().GetTempDirL();
 	}
 
@@ -514,7 +531,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::CancelL( const TInt aRequestId )
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	iFWImplementation->GetPluginManager().CancelRequestL(aRequestId);
 	}
 
@@ -523,7 +541,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::CancelAllL( )
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 		iFWImplementation->GetPluginManager().CancelAllRequestsL();
 	}
 
@@ -532,7 +551,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::SetMailboxName( const TFSMailMsgId aMailboxId, const TDesC& aMailboxName )
 	{
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	CFSMailPlugin* plugin = iFWImplementation->GetPluginManager().GetPluginByUid( aMailboxId );
 	if ( plugin )
 		{
@@ -545,7 +565,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::Close()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	CFSMailClient* instance = Instance();
 	if(!instance)
 	{
@@ -569,7 +590,8 @@
 // -----------------------------------------------------------------------------
 CFSMailClient* CFSMailClient::Instance()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	return static_cast<CFSMailClient*>(Dll::Tls());
 }
 
@@ -578,7 +600,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C TInt CFSMailClient::IncReferenceCount()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	return ++iReferenceCount;
 }
 
@@ -587,7 +610,8 @@
 // -----------------------------------------------------------------------------
 TInt CFSMailClient::DecReferenceCount()
 {
-    FUNC_LOG;
+    NM_FUNCTION;
+    
 	return --iReferenceCount;
 }
 
@@ -596,6 +620,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C void CFSMailClient::ReleaseExtension( CEmailExtension* aExtension )
     {
+    NM_FUNCTION;
+    
     CExtendableEmail::ReleaseExtension( aExtension );
     }
 
@@ -604,6 +630,8 @@
 // -----------------------------------------------------------------------------
 EXPORT_C CEmailExtension* CFSMailClient::ExtensionL( const TUid& aInterfaceUid )
     {
+    NM_FUNCTION;
+    
     return CExtendableEmail::ExtensionL( aInterfaceUid );
     }