Skip to content

Commit

Permalink
Fix for
Browse files Browse the repository at this point in the history
Issue 23: QXmppBind compilation error on macosx starting from r23
Issue 26: examples fail to link on macosx and linux
Issue 24: all text files should have the svn property eol-style set

Contributed by: Marco Molteni
  • Loading branch information
manjeetdahiya committed Oct 26, 2009
1 parent f988517 commit 239b2b1
Show file tree
Hide file tree
Showing 53 changed files with 5,883 additions and 5,857 deletions.
1,008 changes: 504 additions & 504 deletions LICENSE.LGPL

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions QXmppClient.pro
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TEMPLATE = subdirs

SUBDIRS = source \
example
TEMPLATE = subdirs

SUBDIRS = source \
example
120 changes: 60 additions & 60 deletions README
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
ABOUT
This is QXmpp version 0.1.
QXmpp is cross-platform C++ client library for XMPP. It is based on Qt.
BUILDING QXmpp
You need to have Qt 4.5 or higher to build the QXmpp.
The project uses qmake build system of Qt.
Commands to build QXmpp:
cd <where QXmppClient.pro is lying>
qmake
<respective-make-cmd = gmake, make, mingw32-make, nmake>
Using Qt Creator:
Open the QXmppClient.pro file in Qt Creator and hit Buil All to build all the examples and library.
EXAMPLES
Have a look the available examples to start using this library.
* example_0_connected
This example just connects to the xmpp server. And start receiving presences (updates) from the server.
After running this example, you can see this user online, if it's added in your roster (friends list).
Logging type has been set to stdout. You can see the progress on the command line.
* example_1_echoClient
This is a very simple bot which echoes the message sent to it.
Run this example, send it a message from a friend of this bot. You will recieve the message back.
This example shows how to receive and send messages.
REFERENCE DOCUMENTATION
http://code.google.com/p/qxmpp
SUPPORTED PLATFORMS
For this release, the following platforms have been tested:
win32-g++ (mingw)
win32-msvc2005
linux-g++
linux-g++-64
It should work on all the plaforms supported by Qt.
For a complete list of supported platforms, see
http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/
HOW TO REPORT A BUG
If you think you have found a bug in QXmpp, we would like to hear about
it so that we can fix it. Before reporting a bug, please check
http://code.google.com/p/qxmpp/issues/
to see if the issue is already known.
ABOUT

This is QXmpp version 0.1.
QXmpp is cross-platform C++ client library for XMPP. It is based on Qt.


BUILDING QXmpp

You need to have Qt 4.5 or higher to build the QXmpp.
The project uses qmake build system of Qt.

Commands to build QXmpp:
cd <where QXmppClient.pro is lying>
qmake
<respective-make-cmd = gmake, make, mingw32-make, nmake>

Using Qt Creator:
Open the QXmppClient.pro file in Qt Creator and hit Buil All to build all the examples and library.

EXAMPLES

Have a look the available examples to start using this library.

* example_0_connected
This example just connects to the xmpp server. And start receiving presences (updates) from the server.
After running this example, you can see this user online, if it's added in your roster (friends list).
Logging type has been set to stdout. You can see the progress on the command line.

* example_1_echoClient
This is a very simple bot which echoes the message sent to it.
Run this example, send it a message from a friend of this bot. You will recieve the message back.
This example shows how to receive and send messages.

REFERENCE DOCUMENTATION

http://code.google.com/p/qxmpp


SUPPORTED PLATFORMS

For this release, the following platforms have been tested:

win32-g++ (mingw)
win32-msvc2005

linux-g++
linux-g++-64

It should work on all the plaforms supported by Qt.
For a complete list of supported platforms, see
http://www.qtsoftware.com/developer/supported-platforms/supported-platforms/


HOW TO REPORT A BUG

If you think you have found a bug in QXmpp, we would like to hear about
it so that we can fix it. Before reporting a bug, please check
http://code.google.com/p/qxmpp/issues/
to see if the issue is already known.

10 changes: 5 additions & 5 deletions example/example.pro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TEMPLATE = subdirs

SUBDIRS = example_0_connected\
example_1_echoClient

TEMPLATE = subdirs

SUBDIRS = example_0_connected\
example_1_echoClient

10 changes: 5 additions & 5 deletions example/example_0_connected/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This example just connects to the xmpp server. And start receiving presences (updates) from the server.
After running this example, you can see this user online, if it's added in your roster (friends list).
Logging type has been set to stdout. You can see the progress on the command line.
This example just connects to the xmpp server. And start receiving presences (updates) from the server.

After running this example, you can see this user online, if it's added in your roster (friends list).

Logging type has been set to stdout. You can see the progress on the command line.
38 changes: 19 additions & 19 deletions example/example_0_connected/example_0_connected.pro
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
TEMPLATE = app

TARGET = example_0_connected

SOURCES += main.cpp

INCLUDEPATH += ../../source

QT += network xml

CONFIG += console debug_and_release

CONFIG(debug, debug|release) {
LIBS += -L../../source/debug -lQXmppClient_d
} else {
LIBS += -L../../source/release -lQXmppClient
}

OTHER_FILES += README
TEMPLATE = app

TARGET = example_0_connected

SOURCES += main.cpp

INCLUDEPATH += ../../source

QT += network xml

CONFIG += console debug_and_release

CONFIG(debug, debug|release) {
LIBS += -L../../source/debug -lQXmppClient_d
} else {
LIBS += -L../../source/release -lQXmppClient
}

OTHER_FILES += README
94 changes: 47 additions & 47 deletions example/example_0_connected/main.cpp
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
/*
* Copyright (C) 2008-2009 Manjeet Dahiya
*
* Author:
* Manjeet Dahiya
*
* Source:
* http://code.google.com/p/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
*/


#include <QtCore/QCoreApplication>

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

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

QXmppLogger::getLogger()->setLoggingType(QXmppLogger::STDOUT);

QXmppClient client;

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

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

client.connectToServer("talk.google.com", "qxmpp.test1", "qxmpp123", "gmail.com");

return a.exec();
}
/*
* Copyright (C) 2008-2009 Manjeet Dahiya
*
* Author:
* Manjeet Dahiya
*
* Source:
* http://code.google.com/p/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
*/


#include <QtCore/QCoreApplication>

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

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

QXmppLogger::getLogger()->setLoggingType(QXmppLogger::STDOUT);

QXmppClient client;

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

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

client.connectToServer("talk.google.com", "qxmpp.test1", "qxmpp123", "gmail.com");

return a.exec();
}
10 changes: 5 additions & 5 deletions example/example_1_echoClient/README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a very simple bot which echoes the message sent to it.
Run this example, send it a message from a friend of this bot. You will recieve the message back.
This example shows how to receive and send messages.
This is a very simple bot which echoes the message sent to it.

Run this example, send it a message from a friend of this bot. You will recieve the message back.

This example shows how to receive and send messages.
94 changes: 47 additions & 47 deletions example/example_1_echoClient/echoClient.cpp
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
/*
* Copyright (C) 2008-2009 Manjeet Dahiya
*
* Author:
* Manjeet Dahiya
*
* Source:
* http://code.google.com/p/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
*/


#include "echoClient.h"
#include "QXmppMessage.h"

echoClient::echoClient(QObject *parent)
: QXmppClient(parent)
{
bool check = connect(this, SIGNAL(messageReceived(const QXmppMessage&)),
SLOT(messageReceived(const QXmppMessage&)));
Q_ASSERT(check);
}

echoClient::~echoClient()
{

}

void echoClient::messageReceived(const QXmppMessage& message)
{
QString from = message.getFrom();
QString msg = message.getBody();

sendPacket(QXmppMessage("", from, "Your message: " + msg));
}
/*
* Copyright (C) 2008-2009 Manjeet Dahiya
*
* Author:
* Manjeet Dahiya
*
* Source:
* http://code.google.com/p/qxmpp
*
* This file is a part of QXmpp library.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
*/


#include "echoClient.h"
#include "QXmppMessage.h"

echoClient::echoClient(QObject *parent)
: QXmppClient(parent)
{
bool check = connect(this, SIGNAL(messageReceived(const QXmppMessage&)),
SLOT(messageReceived(const QXmppMessage&)));
Q_ASSERT(check);
}

echoClient::~echoClient()
{

}

void echoClient::messageReceived(const QXmppMessage& message)
{
QString from = message.getFrom();
QString msg = message.getBody();

sendPacket(QXmppMessage("", from, "Your message: " + msg));
}
Loading

0 comments on commit 239b2b1

Please sign in to comment.