mpengine/src/mpsongscanner.cpp
changeset 55 f3930dda3342
parent 43 0f32e550d9d8
equal deleted inserted replaced
51:560ce2306a17 55:f3930dda3342
    57       mScanning( false ),
    57       mScanning( false ),
    58       mAutomaticScan( true )
    58       mAutomaticScan( true )
    59 {
    59 {
    60     TX_ENTRY
    60     TX_ENTRY
    61     connect( mMpxHarvesterWrapper, SIGNAL( scanStarted() ),
    61     connect( mMpxHarvesterWrapper, SIGNAL( scanStarted() ),
    62             this, SIGNAL( scanStarted() ), Qt::QueuedConnection );
    62             this, SLOT( handleScanStarted() ), Qt::QueuedConnection );
    63     connect( mMpxHarvesterWrapper, SIGNAL( scanEnded( int, int ) ),
    63     connect( mMpxHarvesterWrapper, SIGNAL( scanEnded( int, int ) ),
    64             this, SLOT( handleScanEnded( int, int ) ), Qt::QueuedConnection );
    64             this, SLOT( handleScanEnded( int, int ) ), Qt::QueuedConnection );
    65     connect( mMpxHarvesterWrapper, SIGNAL( scanCountChanged( int ) ), 
    65     connect( mMpxHarvesterWrapper, SIGNAL( scanCountChanged( int ) ), 
    66             this, SIGNAL( scanCountChanged( int ) ), Qt::QueuedConnection );
    66             this, SIGNAL( scanCountChanged( int ) ), Qt::QueuedConnection );
    67     // Disk events should be handled asap in order to stop the scan on time
    67     // Disk events should be handled asap in order to stop the scan on time
   114     }
   114     }
   115     TX_EXIT
   115     TX_EXIT
   116 }
   116 }
   117 
   117 
   118 /*!
   118 /*!
       
   119  Slot called upon notification from MPX Harvesting FW indicating start of
       
   120  scanning process.
       
   121  */
       
   122 void MpSongScanner::handleScanStarted()
       
   123 {
       
   124     TX_ENTRY
       
   125     mScanning = true;
       
   126     emit scanStarted();
       
   127     TX_EXIT
       
   128 }
       
   129 
       
   130 /*!
   119  Slot called upon notification from MPX Harvesting FW indicating end of
   131  Slot called upon notification from MPX Harvesting FW indicating end of
   120  scanning process.
   132  scanning process.
   121  */
   133  */
   122 void MpSongScanner::handleScanEnded( int numItemsAdded, int error )
   134 void MpSongScanner::handleScanEnded( int numItemsAdded, int error )
   123 {
   135 {
   124     TX_ENTRY
   136     TX_ENTRY_ARGS("error=" << error << ", numItemsAdded=" << numItemsAdded);
   125     if (error == KErrDiskFull) {
   137     if (error == KErrDiskFull) {
   126         emit scanFinished( ScanErrorDiskFull, 0 );
   138         emit scanFinished( ScanErrorDiskFull, 0 );
   127         mScanning = false;
   139         mScanning = false;
   128     }
   140     }
   129     else{
   141     else{