forked from blue/squawk
work progress: trust manager. DOESN'T START!
This commit is contained in:
parent
0b61b6e928
commit
db3bc358a7
20 changed files with 634 additions and 55 deletions
|
@ -31,6 +31,17 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
config(),
|
||||
presence(),
|
||||
state(Shared::ConnectionState::disconnected),
|
||||
|
||||
mh(new MessageHandler(this)),
|
||||
rh(new RosterHandler(this)),
|
||||
vh(new VCardHandler(this)),
|
||||
dh(new DiscoveryHandler(this)),
|
||||
#ifdef WITH_OMEMO
|
||||
th(new TrustHandler(this)),
|
||||
oh(new OmemoHandler(this)),
|
||||
tm(new QXmppTrustManager(th)),
|
||||
om(new QXmppOmemoManager(oh)),
|
||||
#endif
|
||||
cm(new QXmppCarbonManager()),
|
||||
am(new QXmppMamManager()),
|
||||
mm(new QXmppMucManager()),
|
||||
|
@ -40,9 +51,6 @@ 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),
|
||||
|
@ -50,17 +58,17 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
lastError(Error::none),
|
||||
pepSupport(Shared::Support::unknown),
|
||||
active(p_active),
|
||||
notReadyPassword(false),
|
||||
mh(new MessageHandler(this)),
|
||||
rh(new RosterHandler(this)),
|
||||
vh(new VCardHandler(this)),
|
||||
dh(new DiscoveryHandler(this))
|
||||
notReadyPassword(false)
|
||||
{
|
||||
config.setUser(p_login);
|
||||
config.setDomain(p_server);
|
||||
config.setPassword(p_password);
|
||||
config.setAutoAcceptSubscriptions(true);
|
||||
//config.setAutoReconnectionEnabled(false);
|
||||
|
||||
rh->initialize();
|
||||
vh->initialize();
|
||||
dh->initialize();
|
||||
|
||||
QObject::connect(&client, &QXmppClient::stateChanged, this, &Account::onClientStateChange);
|
||||
QObject::connect(&client, &QXmppClient::presenceReceived, this, &Account::onPresenceReceived);
|
||||
|
@ -92,6 +100,7 @@ Account::Account(const QString& p_login, const QString& p_server, const QString&
|
|||
QObject::connect(rcpm, &QXmppMessageReceiptManager::messageDelivered, mh, &MessageHandler::onReceiptReceived);
|
||||
|
||||
#ifdef WITH_OMEMO
|
||||
client.addExtension(tm);
|
||||
client.addExtension(om);
|
||||
qDebug("Added OMEMO manager");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue