forked from TelepathyIM/telepathy-morse
/
main.cpp
29 lines (21 loc) · 813 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <QCoreApplication>
#include <TelepathyQt/BaseConnectionManager>
#include <TelepathyQt/Constants>
#include <TelepathyQt/Debug>
#include "protocol.hpp"
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
app.setApplicationName(QLatin1String("telepathy-morse"));
Tp::registerTypes();
Tp::enableDebug(true);
Tp::enableWarnings(true);
Tp::BaseProtocolPtr proto = Tp::BaseProtocol::create<MorseProtocol>(QLatin1String("telegram"));
Tp::BaseConnectionManagerPtr cm = Tp::BaseConnectionManager::create(QLatin1String("morse"));
proto->setEnglishName(QLatin1String("Telegram"));
proto->setIconName(QLatin1String("telegram"));
proto->setVCardField(QLatin1String("tel"));
cm->addProtocol(proto);
cm->registerObject();
return app.exec();
}