author | treke <treke> | 2002-09-04 17:53:12 (UTC) |
---|---|---|
committer | treke <treke> | 2002-09-04 17:53:12 (UTC) |
commit | 605d854057eb470a1d75210193b82eb0b1ad6b53 (patch) (side-by-side diff) | |
tree | c411b661d5211fefbd83a7c8f63eef8c9cca72ee /noncore/comm/keypebble/krfblogin.cpp | |
parent | c35a5eabd8f5ed18e4216f6c88ee6794bacfb491 (diff) | |
download | opie-605d854057eb470a1d75210193b82eb0b1ad6b53.zip opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.gz opie-605d854057eb470a1d75210193b82eb0b1ad6b53.tar.bz2 |
Major modifications to the User Interface
1) Bookmark support added, all options are stored on a per bookmark basis
2) 16 Bit color is now a supported bit depth for the server
Diffstat (limited to 'noncore/comm/keypebble/krfblogin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfblogin.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/noncore/comm/keypebble/krfblogin.cpp b/noncore/comm/keypebble/krfblogin.cpp index cc3a8fa..0d2a205 100644 --- a/noncore/comm/keypebble/krfblogin.cpp +++ b/noncore/comm/keypebble/krfblogin.cpp @@ -31,50 +31,48 @@ typedef unsigned short CARD16; typedef unsigned long CARD32; const int endianTest = 1; // Endian stuff #define Swap16IfLE(s) \ (*(char *)&endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) #define Swap32IfLE(l) \ (*(char *)&endianTest ? ((((l) & 0xff000000) >> 24) | \ (((l) & 0x00ff0000) >> 8) | \ (((l) & 0x0000ff00) << 8) | \ (((l) & 0x000000ff) << 24)) : (l)) KRFBLogin::KRFBLogin( KRFBConnection *con ) : QObject( con, "RFB login manager" ) { assert( con ); this->con = con; currentState = AwaitingServerVersion; connect( this, SIGNAL( error( const QString & ) ), con, SIGNAL( error( const QString & ) ) ); - connect( this, SIGNAL( passwordRequired( KRFBConnection * ) ), - con, SIGNAL( passwordRequired( KRFBConnection * ) ) ); qWarning( "Waiting for server version..." ); static QString statusMsg = tr( "Waiting for server version..." ); emit status( statusMsg ); // Kick off the state machine connect( con, SIGNAL( gotEnoughData() ), SLOT( gotServerVersion() ) ); con->waitForData( ServerVersionLength ); } KRFBLogin::~KRFBLogin() { } KRFBLogin::State KRFBLogin::state() const { return currentState; } void KRFBLogin::gotServerVersion() { qWarning( "Got server version" ); @@ -162,62 +160,62 @@ void KRFBLogin::gotAuthScheme() con->waitForData( ChallengeLength ); break; default: qWarning( "Unknown authentication scheme, 0x%08lx", scheme ); currentState = Error; break; }; } void KRFBLogin::gotChallenge() { disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotChallenge() ) ); QTimer::singleShot( 0, this, SLOT(getPassword()) ); } void KRFBLogin::getPassword() { // Got data CARD8 challenge[ ChallengeLength ]; con->read( challenge, ChallengeLength ); // Last chance to enter a password - if ( con->pass_.isNull() ) { + if ( con->options_->password.isNull() ) { qWarning( "krfblogin needs a password" ); emit passwordRequired( con ); } - if ( con->pass_.isNull() ) { + if ( con->options_->password.isNull() ) { QString msg = tr( "Error: This server requires a password, but none " "has been specified.\n" ); emit error( msg ); return; } - vncEncryptBytes( (unsigned char *) challenge, con->pass_.data() ); + vncEncryptBytes( (unsigned char *) challenge, QCString(con->options_->password.latin1()).data() ); con->write( challenge, ChallengeLength ); connect( con, SIGNAL( gotEnoughData() ), SLOT( gotAuthResult() ) ); con->waitForData( AuthResultLength ); } void KRFBLogin::gotFailureReasonSize() { disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotFailureReasonSize() ) ); } void KRFBLogin::gotAuthResult() { // Got data disconnect( con, SIGNAL( gotEnoughData() ), this, SLOT( gotAuthResult() ) ); long result; con->read( &result, AuthResultLength ); result = Swap32IfLE( result ); qWarning( "Authentication Result is 0x%08lx", result ); |