예제 #1
0
void SyncSystem::connected()
{
  setSyncState(e_Idle);
  m_BytesInTransit = 0;

  if(m_RestartSyncOnReconnect)
  {
    m_RestartSyncOnReconnect = false;
    QTimer::singleShot(1000, this, SLOT(slotStartSync()));
  }
}
예제 #2
0
파일: folder.cpp 프로젝트: stonerl/client
void Folder::slotTerminateSync()
{
    qDebug() << "folder " << alias() << " Terminating!";

    if( _engine ) {
        _engine->abort();

        // Do not display an error message, user knows his own actions.
        // _errors.append( tr("The CSync thread terminated.") );
        // _csyncError = true;
        setSyncState(SyncResult::SyncAbortRequested);
    }
}
예제 #3
0
파일: folder.cpp 프로젝트: 24killen/client
void Folder::setSyncPaused( bool paused )
{
  _paused = paused;

  if( !paused ) {
      // qDebug() << "Syncing enabled on folder " << name();
  } else {
      // do not stop or start the watcher here, that is done internally by
      // folder class. Even if the watcher fires, the folder does not
      // schedule itself because it checks the var. _enabled before.
      setSyncState(SyncResult::Paused);
  }
}
예제 #4
0
파일: folder.cpp 프로젝트: SpacyNG/mirall
void Folder::slotTerminateSync(bool block)
{
    qDebug() << "folder " << alias() << " Terminating!";

    if( _engine ) {
        _engine->abort();

        // Do not display an error message, user knows his own actions.
        // _errors.append( tr("The CSync thread terminated.") );
        // _csyncError = true;
        if (!block) {
            setSyncState(SyncResult::SyncAbortRequested);
            return;
        }

        slotSyncFinished();
    }
    setSyncEnabled(false);
}
예제 #5
0
//////////////////////////////////////////////////////////////////////////
/// Do a full nodewatching and scan stop.
/// 
/// Returns the sync system state to idle.
/// Loops over all FileSystemWatchers, stops, disconnects all signals and
/// waits for the thread to stop.
//////////////////////////////////////////////////////////////////////////
void SyncSystem::slotStopSync()
{
  setSyncState(e_Idle);
  stopFullSync();
  stopNodeWatching();
}