2022-04-22 15:26:18 +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/>.
|
|
|
|
*/
|
|
|
|
|
2023-03-10 18:43:31 +00:00
|
|
|
#include "root.h"
|
2022-04-22 15:26:18 +00:00
|
|
|
#include "shared/messageinfo.h"
|
2022-08-22 20:29:43 +00:00
|
|
|
#include "shared/identity.h"
|
2023-01-30 17:52:26 +00:00
|
|
|
#include "shared/info.h"
|
2022-04-22 15:26:18 +00:00
|
|
|
|
2023-03-11 16:46:23 +00:00
|
|
|
#include <QObject>
|
2022-04-22 15:26:18 +00:00
|
|
|
|
2022-12-14 23:08:08 +00:00
|
|
|
#ifdef WITH_OMEMO
|
2023-11-12 22:55:32 +00:00
|
|
|
#include <QXmppOmemoStorage.h>
|
2022-12-14 23:08:08 +00:00
|
|
|
#endif
|
|
|
|
|
2023-11-06 23:57:08 +00:00
|
|
|
int main(int argc, char *argv[]) {
|
2022-04-22 15:26:18 +00:00
|
|
|
qRegisterMetaType<Shared::Message>("Shared::Message");
|
|
|
|
qRegisterMetaType<Shared::MessageInfo>("Shared::MessageInfo");
|
|
|
|
qRegisterMetaType<Shared::VCard>("Shared::VCard");
|
|
|
|
qRegisterMetaType<std::list<Shared::Message>>("std::list<Shared::Message>");
|
|
|
|
qRegisterMetaType<std::list<Shared::MessageInfo>>("std::list<Shared::MessageInfo>");
|
2022-12-14 23:08:08 +00:00
|
|
|
qRegisterMetaType<std::list<QString>>("std::list<QString>");
|
|
|
|
qRegisterMetaType<std::set<QString>>("std::set<QString>");
|
|
|
|
qRegisterMetaType<std::list<Shared::Identity>>("std::list<Shared::Identity>");
|
2022-04-22 15:26:18 +00:00
|
|
|
qRegisterMetaType<QSet<QString>>("QSet<QString>");
|
|
|
|
qRegisterMetaType<Shared::ConnectionState>("Shared::ConnectionState");
|
|
|
|
qRegisterMetaType<Shared::Availability>("Shared::Availability");
|
2023-03-27 18:45:29 +00:00
|
|
|
qRegisterMetaType<Shared::EncryptionProtocol>("Shared::EncryptionProtocol");
|
2023-01-01 17:25:51 +00:00
|
|
|
qRegisterMetaType<Shared::KeyInfo>("Shared::KeyInfo");
|
2023-01-30 17:52:26 +00:00
|
|
|
qRegisterMetaType<Shared::Info>("Shared::Info");
|
2023-04-15 18:07:27 +00:00
|
|
|
qRegisterMetaType<Shared::TrustLevel>("Shared::TrustLevel");
|
2022-12-14 23:08:08 +00:00
|
|
|
#ifdef WITH_OMEMO
|
|
|
|
qRegisterMetaType<QXmppOmemoStorage::OwnDevice>("QXmppOmemoStorage::OwnDevice");
|
2022-12-26 22:01:01 +00:00
|
|
|
qRegisterMetaTypeStreamOperators<QXmppOmemoStorage::OwnDevice>("QXmppOmemoStorage::OwnDevice");
|
|
|
|
qRegisterMetaType<QXmppOmemoStorage::Device>("QXmppOmemoStorage::Device");
|
2022-12-14 23:08:08 +00:00
|
|
|
#endif
|
2022-04-22 15:26:18 +00:00
|
|
|
|
2023-03-10 18:43:31 +00:00
|
|
|
Root app(argc, argv);
|
2023-03-11 16:46:23 +00:00
|
|
|
if (!app.initializeSettings())
|
2022-04-22 15:26:18 +00:00
|
|
|
return -1;
|
|
|
|
|
2023-03-11 16:46:23 +00:00
|
|
|
return app.run();
|
2022-04-22 15:26:18 +00:00
|
|
|
}
|
|
|
|
|