diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/yahoo/libkyahoo/logintask.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/yahoo/libkyahoo/logintask.h')
-rw-r--r-- | kopete/protocols/yahoo/libkyahoo/logintask.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.h b/kopete/protocols/yahoo/libkyahoo/logintask.h new file mode 100644 index 00000000..2ad68853 --- /dev/null +++ b/kopete/protocols/yahoo/libkyahoo/logintask.h @@ -0,0 +1,75 @@ +/* + Kopete Yahoo Protocol + Handles logging into to the Yahoo service + + Copyright (c) 2004 Duncan Mac-Vicar P. <duncan@kde.org> + + Copyright (c) 2005 André Duffeck <andre.duffeck@kdemail.net> + + Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org> + + ************************************************************************* + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ + +#ifndef LOGINTASK_H +#define LOGINTASK_H + +#include "task.h" +#include "yahootypes.h" + +class QString; +class YMSGTransfer; + +/** +@author Duncan Mac-Vicar +*/ +class LoginTask : public Task +{ +Q_OBJECT +public: + LoginTask(Task *parent); + ~LoginTask(); + + bool take(Transfer* transfer); + virtual void onGo(); + + void reset(); + void setStateOnConnect( Yahoo::Status status ); + void setVerificationWord( const QString &word ); + + const QString &yCookie(); + const QString &cCookie(); + const QString &tCookie(); + const QString &loginCookie(); +protected: + bool forMe( Transfer* transfer ) const; + enum State { InitialState, SentVerify, GotVerifyACK, SentAuth, GotAuthACK, SentAuthResp }; + void sendVerify(); + void sendAuth(YMSGTransfer* transfer); + void sendAuthResp(YMSGTransfer* transfer); + void sendAuthResp_0x0b(const QString &sn, const QString &seed, uint sessionID); + void sendAuthResp_pre_0x0b(const QString &sn, const QString &seed); + void handleAuthResp(YMSGTransfer *transfer); + void parseCookies( YMSGTransfer *transfer ); +signals: + void haveSessionID( uint ); + void haveCookies(); + void loginResponse( int, const QString& ); +private: + State mState; + Yahoo::Status m_stateOnConnect; + QString m_yCookie; + QString m_tCookie; + QString m_cCookie; + QString m_loginCookie; + QString m_verificationWord; +}; + +#endif |