forked from blue/squawk
first attempts to build against upstream qxmpp
This commit is contained in:
parent
b6ba022bff
commit
87973b3b67
4 changed files with 84 additions and 21 deletions
|
@ -40,6 +40,9 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
um(new QXmppUploadRequestManager()),
|
||||
dm(client.findExtension<QXmppDiscoveryManager>()),
|
||||
rcpm(new QXmppMessageReceiptManager()),
|
||||
#ifdef WITH_OMEMO
|
||||
om(new QXmppOmemoManager()),
|
||||
#endif
|
||||
reconnectScheduled(false),
|
||||
reconnectTimer(new QTimer),
|
||||
network(p_net),
|
||||
|
@ -87,6 +90,11 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
|
||||
client.addExtension(rcpm);
|
||||
QObject::connect(rcpm, &QXmppMessageReceiptManager::messageDelivered, mh, &MessageHandler::onReceiptReceived);
|
||||
|
||||
#ifdef WITH_OMEMO
|
||||
client.addExtension(om);
|
||||
qDebug("Added OMEMO manager");
|
||||
#endif
|
||||
|
||||
reconnectTimer->setSingleShot(true);
|
||||
QObject::connect(reconnectTimer, &QTimer::timeout, this, &Account::onReconnectTimer);
|
||||
|
@ -118,6 +126,9 @@ Account::~Account()
|
|||
delete rh;
|
||||
|
||||
delete reconnectTimer;
|
||||
#ifdef WITH_OMEMO
|
||||
delete om;
|
||||
#endif
|
||||
delete rcpm;
|
||||
delete dm;
|
||||
delete um;
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
#include <QXmppUploadRequestManager.h>
|
||||
#include <QXmppVCardManager.h>
|
||||
#include <QXmppMessageReceiptManager.h>
|
||||
#ifdef WITH_OMEMO
|
||||
#include <QXmppOmemoManager.h>
|
||||
#endif
|
||||
|
||||
#include <shared/shared.h>
|
||||
#include <shared/identity.h>
|
||||
|
@ -176,6 +179,9 @@ private:
|
|||
QXmppUploadRequestManager* um;
|
||||
QXmppDiscoveryManager* dm;
|
||||
QXmppMessageReceiptManager* rcpm;
|
||||
#ifdef WITH_OMEMO
|
||||
QXmppOmemoManager* om;
|
||||
#endif
|
||||
bool reconnectScheduled;
|
||||
QTimer* reconnectTimer;
|
||||
|
||||
|
|
|
@ -32,6 +32,11 @@ Core::DiscoveryHandler::DiscoveryHandler(Core::Account* account):
|
|||
acc->dm->setClientCapabilitiesNode("https://git.macaw.me/blue/squawk");
|
||||
}
|
||||
|
||||
Core::DiscoveryHandler::~DiscoveryHandler()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Core::DiscoveryHandler::onItemsReceived(const QXmppDiscoveryIq& items)
|
||||
{
|
||||
QString server = acc->getServer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue