aboutsummaryrefslogtreecommitdiff
path: root/examples/example_0_connected/example_0_connected.cpp
blob: 0c625f6bcd0229b548bd89c0fab6a774bb9ac7ee (plain) (blame)
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
// SPDX-FileCopyrightText: 2012 Manjeet Dahiya <manjeetdahiya@gmail.com>
//
// SPDX-License-Identifier: LGPL-2.1-or-later

#include "QXmppClient.h"
#include "QXmppLogger.h"

#include <QCoreApplication>

int main(int argc, char *argv[])
{
    QCoreApplication app(argc, argv);

    QXmppClient client;
    client.logger()->setLoggingType(QXmppLogger::StdoutLogging);

    // For jabber
    // client.connectToServer("username@jabber.org", "passwd");

    // For google talk
    // client.connectToServer("username@gmail.com", "passwd");

    client.connectToServer("qxmpp.test1@qxmpp.org", "qxmpp123");

    return app.exec();
}