Esempio n. 1
0
IMAPAsyncConnection * IMAPAsyncSession::session()
{
    IMAPAsyncConnection * session = new IMAPAsyncConnection();
    session->setConnectionLogger(mConnectionLogger);
    session->setOwner(this);
    session->autorelease();

    session->setHostname(mHostname);
    session->setPort(mPort);
    session->setUsername(mUsername);
    session->setPassword(mPassword);
    session->setOAuth2Token(mOAuth2Token);
    session->setAuthType(mAuthType);
    session->setConnectionType(mConnectionType);
    session->setTimeout(mTimeout);
    session->setCheckCertificateEnabled(mCheckCertificateEnabled);
    session->setVoIPEnabled(mVoIPEnabled);
    session->setDefaultNamespace(mDefaultNamespace);
    session->setClientIdentity(mClientIdentity);
#if __APPLE__
    session->setDispatchQueue(mDispatchQueue);
#endif
#if 0 // should be implemented properly
    if (mAutomaticConfigurationDone) {
        session->setAutomaticConfigurationEnabled(false);
    }
#endif

    return session;
}
Esempio n. 2
0
void IMAPAsyncSession::setConnectionLogger(ConnectionLogger * logger)
{
    mConnectionLogger = logger;
    for(unsigned int i = 0 ; i < mSessions->count() ; i ++) {
        IMAPAsyncConnection * currentSession = (IMAPAsyncConnection *) mSessions->objectAtIndex(i);
        currentSession->setConnectionLogger(logger);
    }
}