Exemplo n.º 1
0
void SyncWindow::slotReadyToSync(SyncQtOwnCloud* oc)
{
    mAccountsReadyToSync.enqueue(oc);
    syncDebug() << oc->getName() << " is ready to sync!";
    if(!mBusy) {
        processNextStep();
    }
}
Exemplo n.º 2
0
    virtual void run()
    {
        while (mProcessing)
        {
            if (isResumed())
            {
                if (mStartTime == 0)
                {
                    mStartTime = Sys::Time::now();
                    mPrevTime = mStartTime;
                }

                Sys::Time::Value currTime = Sys::Time::now();
                Sys::Time::Value frameTime = currTime - mPrevTime;

                if ((currTime - mStartTime) >= mDuration)
                {
                    mResume = false;
                    continue;
                }

                mCondVar.aquire();
                if (frameTime >= 16)
                {
                    mDt += 0.1f;
                    mRes = processNextStep(mDt);

                    mPrevTime = currTime;

                    mResume = true;
                    mCondVar.signalAll();
                }

                mCondVar.release();
            }
            else
            {
                mStartTime = 0;
                mDt = 0.0f;

                mCondVar.signalAll();

                Sys::LockGuard<Sys::ConditionVariable> lock(mCondVar);
                while (!mResume)
                    mCondVar.wait();
            }
        }
    }
Exemplo n.º 3
0
void UpdateManager::check() {
    if (_downloading) {
        return;
    }

    if (_isLastVersion) {
        // only reset these values if the last check returned that this is
        // the last version
        _isLastVersion = false;
        _versionConfDownloaded = false;
        _updateDownloaded = false;
    }

    _timer->stop();
    processNextStep();
    _timer->start(_mins * 60000);
}
Exemplo n.º 4
0
void SyncWindow::slotFinishedSync(SyncQtOwnCloud *oc)
{
    syncDebug() << oc->getName() << " just finishied.";
    rebuildAccountsTable();
    processNextStep();
}