2019-08-21 09:35:07 +00:00
|
|
|
/*
|
|
|
|
* Squawk messenger.
|
|
|
|
* Copyright (C) 2019 Yury Gubich <blue@macaw.me>
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CORE_CONFERENCE_H
|
|
|
|
#define CORE_CONFERENCE_H
|
|
|
|
|
|
|
|
#include "rosteritem.h"
|
|
|
|
#include <QXmppMucManager.h>
|
|
|
|
|
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @todo write docs
|
|
|
|
*/
|
|
|
|
class Conference : public RosterItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
Conference(const QString& p_jid, const QString& p_account, bool p_autoJoin, const QString& p_name, const QString& p_nick, QXmppMucRoom* p_room);
|
|
|
|
~Conference();
|
|
|
|
|
|
|
|
QString getNick() const;
|
2019-09-03 20:28:58 +00:00
|
|
|
QString getSubject() const;
|
2019-08-21 09:35:07 +00:00
|
|
|
void setNick(const QString& p_nick);
|
|
|
|
|
|
|
|
bool getJoined() const;
|
|
|
|
void setJoined(bool p_joined);
|
|
|
|
|
|
|
|
bool getAutoJoin();
|
|
|
|
void setAutoJoin(bool p_autoJoin);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void nickChanged(const QString& nick);
|
|
|
|
void joinedChanged(bool joined);
|
|
|
|
void autoJoinChanged(bool autoJoin);
|
2019-09-03 20:28:58 +00:00
|
|
|
void subjectChanged(const QString& subject);
|
2019-09-01 19:46:12 +00:00
|
|
|
void addParticipant(const QString& name, const QMap<QString, QVariant>& data);
|
|
|
|
void changeParticipant(const QString& name, const QMap<QString, QVariant>& data);
|
|
|
|
void removeParticipant(const QString& name);
|
2019-08-21 09:35:07 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QString nick;
|
|
|
|
QXmppMucRoom* room;
|
|
|
|
bool joined;
|
|
|
|
bool autoJoin;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void onRoomJoined();
|
|
|
|
void onRoomLeft();
|
|
|
|
void onRoomNameChanged(const QString& p_name);
|
2019-09-03 20:28:58 +00:00
|
|
|
void onRoomSubjectChanged(const QString& p_name);
|
2019-08-21 09:35:07 +00:00
|
|
|
void onRoomNickNameChanged(const QString& p_nick);
|
|
|
|
void onRoomError(const QXmppStanza::Error& err);
|
2019-09-01 19:46:12 +00:00
|
|
|
void onRoomParticipantAdded(const QString& p_name);
|
|
|
|
void onRoomParticipantChanged(const QString& p_name);
|
|
|
|
void onRoomParticipantRemoved(const QString& p_name);
|
2019-08-21 09:35:07 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // CORE_CONFERENCE_H
|