From dd43402365ac82e6f28d373ea857a38f473e9f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Tue, 10 Dec 2019 01:24:17 +0100 Subject: kopete: Restore the AIM protocol because a replacement AIM server was created. This reverts commits 036b0229db and dc34f9c391. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit 91ba38a1df42b56caa73babc90ffa4f674c000d4) --- kopete/protocols/oscar/oscarversionupdater.cpp | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'kopete/protocols/oscar/oscarversionupdater.cpp') 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(); } } -- cgit v1.2.1