Roster model, account model, connection commena, connection report
This commit is contained in:
parent
6823b41f24
commit
3d947a0748
12 changed files with 551 additions and 15 deletions
|
@ -4,22 +4,39 @@
|
|||
#include <QtCore/QObject>
|
||||
|
||||
#include <qxmpp/QXmppClient.h>
|
||||
#include "../global.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
class Account : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Account(const QString& p_login, const QString& p_server, const QString& p_password, const QString& p_name, QObject* parent = 0);
|
||||
~Account();
|
||||
|
||||
void connect();
|
||||
void disconnect();
|
||||
|
||||
Shared::ConnectionState getState() const;
|
||||
QString getName() const;
|
||||
|
||||
signals:
|
||||
void connectionStateChanged(int);
|
||||
|
||||
private:
|
||||
QString name;
|
||||
QString login;
|
||||
QString server;
|
||||
QString password;
|
||||
QXmppClient client;
|
||||
Shared::ConnectionState state;
|
||||
|
||||
private slots:
|
||||
void onClientConnected();
|
||||
void onClientDisonnected();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue