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; }
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(); } }
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(); } }