1 /***************************************************************************
2 * Copyright (C) 2004 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
13 #include <QtCore/QByteArray>
14 #include <QtCore/QEventLoop>
15 #include <QtCore/QObject>
17 #include <kdemacros.h>
28 @author Hideki Ikemoto
30 class KDE_EXPORT Account : public QObject
33 static Account* instance;
39 QEventLoop m_eventLoop;
44 bool loginInternal(const QString& userID, const QString& password);
45 static Account* getInstance();
47 void slotReceiveData(KIO::Job* job, const QByteArray& data);
48 void slotResult(KIO::Job* job);
50 Account(const Account&);
51 Account& operator=(const Account&);
53 static const QString& getSessionId() { return getInstance() ->m_sessionID; }
54 static bool isLogged() { return getInstance() ->m_isLogged; }
55 static bool login(const QString& userID, const QString& password);