filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp
changeset 16 ada7962b4308
parent 14 1957042d8c7e
child 18 edd66bde63a4
child 25 b7bfdea70ca2
child 37 15bc28c9dd51
--- a/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp	Fri Apr 16 14:53:38 2010 +0300
+++ b/filemanager/src/filemanager/src/backuprestore/fmbackuprestorehandler.cpp	Mon May 03 12:24:39 2010 +0300
@@ -40,6 +40,8 @@
         this, SLOT( onNotifyFinish(int) ), Qt::QueuedConnection );
     connect( mBkupEngine, SIGNAL( notifyMemoryLow(int, int& ) ), 
         this, SLOT( onNotifyMemoryLow(int, int&) ) );
+    connect( mBkupEngine, SIGNAL( notifyBackupFilesExist( bool& )), this, SLOT( onNotifyBackupFilesExist( bool& )));
+    
 }
 FmBackupRestoreHandler::~FmBackupRestoreHandler()
 {
@@ -74,10 +76,8 @@
         mBkupEngine->BackupSettingsL()->targetDrive(),
         mBkupEngine->BackupSettingsL()->content() );
 
-    if( !ret )
-        {
+    if( !ret ) {
         mCurrentProcess = ProcessNone;
-        HbMessageBox::information(tr("backup failed"));
         }
     return ret;
 }
@@ -90,10 +90,8 @@
     mCurrentProcess = ProcessRestore;
     mBkupEngine->RestoreSettingsL()->SetSelection( operationRestore->selection() );
     bool ret = mBkupEngine->startRestore( backupConfigLoader()->driversAndOperationList() );
-    if( !ret )
-        {
+    if( !ret ) {
         mCurrentProcess = ProcessNone;
-        HbMessageBox::information(tr("restore failed"));
         }
     return ret;
 }
@@ -116,6 +114,17 @@
         }
     }
 }
+void FmBackupRestoreHandler::onNotifyBackupFilesExist( bool &isContinue )
+    {
+    if ( HbMessageBox::question( "some bacup files exist, continue?" ) )
+        {
+        isContinue = true;
+        }
+    else
+        {
+        isContinue = false;
+        }
+    }
 
 
 void FmBackupRestoreHandler::onNotifyPreparing( bool cancelable )
@@ -140,3 +149,8 @@
         emit notifyError( err, QString("") );
     }
 }
+
+void FmBackupRestoreHandler::getBackupDriveList( QStringList &driveList )
+{
+    mBkupEngine->getBackupDriveList( driveList );
+}