コード例 #1
0
WP::err RemoteSync::sync()
{
    if (fAuthentication->isVerified())
        syncConnected(WP::kOk);
    else {
        connect(fAuthentication, SIGNAL(authenticationAttemptFinished(WP::err)),
                this, SLOT(syncConnected(WP::err)));
        fAuthentication->login();
    }
    return WP::kOk;
}
コード例 #2
0
ファイル: remotesync.cpp プロジェクト: czeidler/fejoa
void RemoteSync::run(RemoteConnectionJobQueue *jobQueue)
{
    remoteConnection = jobQueue->getRemoteConnection();
    authentication = jobQueue->getRemoteAuthentication(remoteStorage->getRemoteAuthenticationInfo(),
                                                       remoteStorage->getKeyStoreFinder());

    if (authentication->isVerified())
        syncConnected(WP::kOk);
    else {
        connect(authentication.data(), SIGNAL(authenticationAttemptFinished(WP::err)),
                this, SLOT(syncConnected(WP::err)));
        authentication->login();
    }
}
コード例 #3
0
ファイル: mailmessenger.cpp プロジェクト: czeidler/fejoa
void MailMessenger::onContactFound(WP::err error)
{
    delete contactRequest;
    contactRequest = NULL;

    if (error != WP::kOk) {
        emit jobDone(error);
        return;
    }

    targetContact = userIdentity->findContact(receiver->address);
    if (targetContact == NULL)
        return;

    if (authentication->isVerified())
        authConnected(WP::kOk);
    else {
        authentication->disconnect(this);
        connect(authentication.data(), SIGNAL(authenticationAttemptFinished(WP::err)),
                this, SLOT(authConnected(WP::err)));
        authentication->login();
    }
}