201033_03
authorhgs
Tue, 31 Aug 2010 17:25:42 +0530
changeset 19 08315a312857
parent 18 1edf350003c5
child 21 708468d5143e
201033_03
harvesterplugins/media/audio/src/mediaplugin.cpp
harvesterplugins/media/image/src/imageplugin.cpp
harvesterplugins/media/video/src/videoplugin.cpp
harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp
--- a/harvesterplugins/media/audio/src/mediaplugin.cpp	Wed Aug 25 13:02:31 2010 +0530
+++ b/harvesterplugins/media/audio/src/mediaplugin.cpp	Tue Aug 31 17:25:42 2010 +0530
@@ -88,7 +88,8 @@
 	delete iObjectJobQueueManager;
 	delete iMdsUtils;
 	delete iAudioDocument;
-	iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
+	if (iIndexerUtil)
+	  TRAP_IGNORE(iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS)));
 	delete iIndexerUtil;
 	delete iMMcMonitor;
 	delete iDBManager;
--- a/harvesterplugins/media/image/src/imageplugin.cpp	Wed Aug 25 13:02:31 2010 +0530
+++ b/harvesterplugins/media/image/src/imageplugin.cpp	Tue Aug 31 17:25:42 2010 +0530
@@ -86,7 +86,8 @@
 	delete iObjectJobQueueManager;
 	delete iMdsUtils;
 	delete iImageDocument;
-	iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
+	if ( iIndexerUtil )
+	   TRAP_IGNORE(iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS)));
 	delete iIndexerUtil;
 	delete iMMcMonitor;
 	delete iDBManager;
--- a/harvesterplugins/media/video/src/videoplugin.cpp	Wed Aug 25 13:02:31 2010 +0530
+++ b/harvesterplugins/media/video/src/videoplugin.cpp	Tue Aug 31 17:25:42 2010 +0530
@@ -73,7 +73,8 @@
     delete iObjectJobQueueManager;
     delete iMdsUtils;
     delete iVideoDocument;
-    iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS));
+    if ( iIndexerUtil )
+      TRAP_IGNORE(iIndexerUtil->UnMountAllDrivesL(_L(MEDIAGENERICAPPCLASS)));
     delete iIndexerUtil;
     delete iMMcMonitor;
     delete iDBManager;
--- a/harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp	Wed Aug 25 13:02:31 2010 +0530
+++ b/harvesterplugins/messaging/email/qtemailfetcher/qtemailfetcher.cpp	Tue Aug 31 17:25:42 2010 +0530
@@ -300,6 +300,7 @@
     //More mailboxes available.
     delete iMailFolderList; iMailFolderList = NULL;
     iMailFolderList = new NmApiFolderListing( this, iMailBoxes.at( iCurrentMailboxIndex++ ).id() );
+    qDebug() << "\n QEmailFetcher::processing "<< iMailBoxes.at( iCurrentMailboxIndex-1 ).name()<< "Mailbox";
     connect( iMailFolderList, SIGNAL(foldersListed( qint32 )), this, SLOT(handleMailFoldersListed( qint32)) );
     iMailFolderList->start();
    
@@ -343,7 +344,7 @@
             this, 
             iFolders.at( iCurrentFolderIndex++ ).id(),
             iMailBoxes.at( iCurrentMailboxIndex-1 ).id() ); //we have already incremented iMailboxIndex.
-
+    qDebug() << "\n QEmailFetcher::collecting mails from the "<< iFolders.at( iCurrentFolderIndex++ ).name() << "Folder \n";
     connect(iEnvelopeListing, SIGNAL(envelopesListed(qint32)),this,SLOT(processMessages(qint32)));
     iEnvelopeListing->start();
     qDebug() << "QEmailFetcher::processNextFolder :processNextFolder";
@@ -373,11 +374,14 @@
 void QEmailFetcher::handleMessageEvent( EmailClientApi::NmApiMessageEvent aEvent, quint64 aMailboxId, quint64 aFolderId, QList<quint64> aMessageList){
     NmApiMessageEnvelope envelope;
     qDebug() << "QEmailFetcher::handleMessageEvent :START";
+    qDebug() << "\n QEmailFetcher::aEvent="<< aEvent<<" MailboxId =" << aMailboxId << " FolderId = "<< aFolderId;
     const int messageCount = aMessageList.count();
+    qDebug() << "\n QEmailFetcher::message count="<< messageCount;
     if( messageCount>0 ){
     if( aEvent == MessageCreated || aEvent == MessageChanged ){
         qDebug() << "QEmailFetcher::handleMessageEvent :MessageCreated || MessageChanged";
         for( int i=0; i<messageCount; i++ ){
+            qDebug() << "\n MessageId"<< aMessageList.at( i );
             if( iEmailService->getEnvelope( aMailboxId, aFolderId, aMessageList.at( i ), envelope ) ){
                qDebug() << "QEmailFetcher::handleMessageEvent :HandleDocumentL";
                 QT_TRAP_THROWING( 
@@ -390,6 +394,7 @@
     else if( aEvent == MessageDeleted ) {
         qDebug() << "QEmailFetcher::handleMessageEvent :MessageDeleted";
         for( int i=0; i<messageCount; i++ ){
+                qDebug() << "\n MessageId"<< aMessageList.at( i );
                 qDebug() << "QEmailFetcher::handleMessageEvent :MessageDeleted : HandleDocumentL";
                 QT_TRAP_THROWING( 
                 iEmailObserver.HandleDocumentL( getPartialSearchDocument( aMessageList.at( i ) ), ECPixRemoveAction ) );