diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-12-10 01:24:17 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-12-10 01:24:17 +0100 |
commit | 91ba38a1df42b56caa73babc90ffa4f674c000d4 (patch) | |
tree | cb65a7a13ac72de8a4ef610424da9195edca0a0c /kopete/protocols/oscar/oscarversionupdater.cpp | |
parent | f2553c2ff47de1bcf060f22edd5c23d9cb653bc3 (diff) | |
download | tdenetwork-91ba38a1df42b56caa73babc90ffa4f674c000d4.tar.gz tdenetwork-91ba38a1df42b56caa73babc90ffa4f674c000d4.zip |
kopete: Restore the AIM protocol because a replacement AIM server was created.
This reverts commits 036b0229db and dc34f9c391.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'kopete/protocols/oscar/oscarversionupdater.cpp')
-rw-r--r-- | kopete/protocols/oscar/oscarversionupdater.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp index 7d5806e3..16149c18 100644 --- a/kopete/protocols/oscar/oscarversionupdater.cpp +++ b/kopete/protocols/oscar/oscarversionupdater.cpp @@ -32,6 +32,7 @@ OscarVersionUpdater::OscarVersionUpdater() : mStamp( 1 ), mUpdating( false ) { initICQVersionInfo(); + initAIMVersionInfo(); } OscarVersionUpdater::~OscarVersionUpdater() @@ -99,8 +100,37 @@ void OscarVersionUpdater::initICQVersionInfo() mICQVersion.lang = config.readEntry( "Lang", "en" ); } +void OscarVersionUpdater::initAIMVersionInfo() +{ + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; + + TDEConfigGroup config( TDEGlobal::config(), "AIMVersion" ); + + mAIMVersion.clientString = config.readEntry( "ClientString", "AOL Instant Messenger (SM), version 5.1.3036/WIN32" ); + mAIMVersion.clientId = config.readEntry( "ClientId", "0x0109" ).toUShort( 0, 0 ); + mAIMVersion.major = config.readEntry( "Major", "0x0005" ).toUShort( 0, 0 ); + mAIMVersion.minor = config.readEntry( "Minor", "0x0001" ).toUShort( 0, 0 ); + mAIMVersion.point = config.readEntry( "Point", "0x0000" ).toUShort( 0, 0 ); + mAIMVersion.build = config.readEntry( "Build", "0x0bdc" ).toUShort( 0, 0 ); + mAIMVersion.other = config.readEntry( "Other", "0x000000d2" ).toUInt( 0, 0 ); + mAIMVersion.country = config.readEntry( "Country", "us" ); + mAIMVersion.lang = config.readEntry( "Lang", "en" ); +} + void OscarVersionUpdater::printDebug() { + kdDebug(OSCAR_RAW_DEBUG) << "*************** AIM VERSION INFO ***************" << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mAIMVersion.clientString << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mAIMVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mAIMVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mAIMVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mAIMVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mAIMVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mAIMVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "country: " << mAIMVersion.country << endl; + kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mAIMVersion.lang << endl; + kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; + kdDebug(OSCAR_RAW_DEBUG) << "*************** ICQ VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mICQVersion.clientString << endl; kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mICQVersion.clientId, 16 ) << endl; @@ -139,6 +169,7 @@ void OscarVersionUpdater::slotTransferResult ( TDEIO::Job *job ) if ( doc.setContent ( mVersionData ) ) { Oscar::ClientVersion tmpICQ = mICQVersion; + Oscar::ClientVersion tmpAIM = mAIMVersion; parseDocument( doc ); @@ -147,6 +178,12 @@ void OscarVersionUpdater::slotTransferResult ( TDEIO::Job *job ) storeVersionInfo( "ICQVersion", mICQVersion ); bUpdate = true; } + + if ( !equal( tmpAIM, mAIMVersion ) ) + { + storeVersionInfo( "AIMVersion", mAIMVersion ); + bUpdate = true; + } } } @@ -174,6 +211,9 @@ void OscarVersionUpdater::parseDocument( TQDomDocument& doc ) { if ( versionElement.tagName() == "icq" ) parseVersion( mICQVersion, versionElement ); + else if ( versionElement.tagName() == "aim" ) + parseVersion( mAIMVersion, versionElement ); + versionElement = versionElement.nextSibling().toElement(); } } |