2019-03-29 14:54:34 +00:00
|
|
|
#ifndef CORE_SQUAWK_H
|
|
|
|
#define CORE_SQUAWK_H
|
|
|
|
|
|
|
|
#include <QtCore/QObject>
|
2019-03-30 20:13:13 +00:00
|
|
|
#include <QString>
|
|
|
|
#include <QVariant>
|
|
|
|
#include <QMap>
|
2019-03-29 14:54:34 +00:00
|
|
|
#include <deque>
|
|
|
|
|
|
|
|
#include "account.h"
|
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
class Squawk : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
Squawk(QObject* parent = 0);
|
|
|
|
~Squawk();
|
|
|
|
|
2019-03-30 20:13:13 +00:00
|
|
|
signals:
|
|
|
|
void newAccount(const QMap<QString, QVariant>&);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void start();
|
|
|
|
void newAccountRequest(const QMap<QString, QVariant>& map);
|
|
|
|
|
2019-03-29 14:54:34 +00:00
|
|
|
private:
|
2019-03-30 20:13:13 +00:00
|
|
|
typedef std::deque<Account*> Accounts;
|
2019-03-29 14:54:34 +00:00
|
|
|
|
|
|
|
Accounts accounts;
|
2019-03-30 20:13:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void addAccount(const QString& login, const QString& server, const QString& password, const QString& name);
|
2019-03-29 14:54:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CORE_SQUAWK_H
|