Port things from MSN to WLM plugin:
[kdenetwork.git] / kopete / protocols / msn / msnsecureloginhandler.h
blob463ac3100bfe06ab25b88d0ce9920a33f28fbf3e
1 /*
2 msnsecureloginhandler.h - SSL login for MSN protocol
4 Copyright (c) 2005 by Michaël Larouche <larouche@kde.org>
6 Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 *************************************************************************
17 #ifndef MSNSECURELOGINHANDLER_H
18 #define MSNSECURELOGINHANDLER_H
20 #include <qobject.h>
22 class KJob;
23 namespace KIO
25 class Job;
26 class MetaData;
29 /**
30 * This class handle the login process. It connect to the .NET Password service and retrive the ticket(tweener) to login.
31 * Use KIO.
33 * @author Michaël Larouche <larouche@kde.org>
35 class MSNSecureLoginHandler : public QObject
37 Q_OBJECT
38 public:
39 MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters);
41 ~MSNSecureLoginHandler();
43 void login();
45 signals:
46 /**
47 * TODO: return to const QString &
49 void loginSuccesful(QString ticket);
50 void loginBadPassword();
51 void loginFailed();
53 private slots:
54 void slotLoginServerReceived(KJob *);
55 /**
56 * We have received our ticket to login.
58 void slotTweenerReceived(KJob *);
60 private:
61 /**
62 * Store the password.
64 QString m_password;
65 /**
66 * Store the accountId.
68 QString m_accountId;
69 /**
70 * Store the authentication parameters
72 QString m_authentification;
74 void displayMetaData(KIO::MetaData data);
77 #endif