Logo Search packages:      
Sourcecode: nateon version File versions  Download package

void KNateon::connectWithAccount ( Account pAccount  )  [private, slot]

PRS 서버 경유

자동로그인에서 소켓접속 에러가 나면, 자동로그인 해제 시킴

Definition at line 409 of file knateon.cpp.

References nmconfig::autologin, bLogout, NateonDPLConnection::closeConnection(), config, CurrentAccount::copyAccount(), NateonConnection::isConnected(), NateonDPLConnection::openConnection(), and NateonDPLConnection::openPRSConnection().

Referenced by initializeLoginView().

{
      bLogout = FALSE;
      
      slotUpdateStatusText( UTF8("접속 및 인증 확인 중") );
      // bool          bConnected;
      QString       sErrorMessage;

      if ( pAccount == 0 )
      {
            return;
      }

      // First disconnect, to unregister all contacts
      if( m_pDPLcon->isConnected() )
      {
            m_pDPLcon->closeConnection();
      }
      // copy the account to the current account
      m_pCurrentAccount->copyAccount( pAccount );
      //don't forget this :(
      if (pAccount) delete pAccount;

      // Connect to the server.
      if ( m_pDPLcon->openConnection() == FALSE ) {
            if ( m_pDPLcon->openPRSConnection() == FALSE ) {
                  /*! PRS 서버 경유 */
                  
                  // Notify the user.
                  sErrorMessage = UTF8("The connection to the server failed.") + "\r\n";
                  sErrorMessage += UTF8("You may not be connected to the internet.");
                  KMessageBox::error( 0, sErrorMessage );
                  stConfig.autologin = false;
                  m_pLoginView->setCancel( FALSE ); // m_pLoginView->setEnable( TRUE );
                  
                  /*! 자동로그인에서 소켓접속 에러가 나면, 자동로그인 해제 시킴 */
                  if ( stConfig.autologin == true )
                  {
#ifdef NETDEBUG
                        kdDebug() << "XXXXXXXXXXXXX TTTTTTTTTTTTT SSSSSSSSSSSSSSSS " << endl;
#endif
                        config->setGroup( "Login" );
                        config->writeEntry( "AutoLogin", false );
                        config->sync();
                        m_pLoginView->setAutoLogin( false );
                  }
                  return;
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index