File: example_0_connected.cpp

package info (click to toggle)
qxmpp 1.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 5,480 kB
  • sloc: cpp: 73,257; xml: 1,345; ansic: 362; sh: 176; makefile: 16
file content (26 lines) | stat: -rw-r--r-- 628 bytes parent folder | download | duplicates (2)
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();
}