From 6cc9d16586c0c1e758e110c813fdfe4df2a571cf Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Fri, 10 Sep 2010 07:11:33 +0000 Subject: eol fix --- src/QXmppGlobal.cpp | 68 ++++++++++---------- src/QXmppVCard.h | 92 +++++++++++++-------------- src/QXmppVersionManager.cpp | 152 ++++++++++++++++++++++---------------------- src/QXmppVersionManager.h | 112 ++++++++++++++++---------------- 4 files changed, 212 insertions(+), 212 deletions(-) (limited to 'src') diff --git a/src/QXmppGlobal.cpp b/src/QXmppGlobal.cpp index 4814f4c4..d6459001 100644 --- a/src/QXmppGlobal.cpp +++ b/src/QXmppGlobal.cpp @@ -1,34 +1,34 @@ -/* - * Copyright (C) 2008-2010 The QXmpp developers - * - * 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 "QXmppGlobal.h" - -#define QXMPPSTRINGIZE(n) _QXMPPSTRINGIZE(n) -#define _QXMPPSTRINGIZE(n) #n - -QString QXmppVersion() -{ - return QString(QXMPPSTRINGIZE(QXMPP_VERSION)); -} - +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * 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 "QXmppGlobal.h" + +#define QXMPPSTRINGIZE(n) _QXMPPSTRINGIZE(n) +#define _QXMPPSTRINGIZE(n) #n + +QString QXmppVersion() +{ + return QString(QXMPPSTRINGIZE(QXMPP_VERSION)); +} + diff --git a/src/QXmppVCard.h b/src/QXmppVCard.h index 25406892..d282b75e 100644 --- a/src/QXmppVCard.h +++ b/src/QXmppVCard.h @@ -1,46 +1,46 @@ -/* - * Copyright (C) 2008-2010 The QXmpp developers - * - * Authors: - * 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. - * - */ - -#ifndef QXMPPVCARD_H -#define QXMPPVCARD_H - -// deprecated in release 0.3.0 -#ifndef QXMPP_SUPRESS_INTERNAL_VCARD_WARNING -#warning "QXmppVCard.h is deprecated, use QXmppVCardIq instead" -#endif - -#include "QXmppVCardIq.h" - -// QXmppVCard inherits QXmppVCardIq, to maintain backward compatibility -class QXmppVCard : public QXmppVCardIq -{ -public: - QXmppVCard(const QString& bareJid = ""):QXmppVCardIq(bareJid) - { - } - QXmppVCard(QXmppVCardIq vcard):QXmppVCardIq(vcard) - { - } -}; - -#endif //QXMPPVCARD_H +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * Authors: + * 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. + * + */ + +#ifndef QXMPPVCARD_H +#define QXMPPVCARD_H + +// deprecated in release 0.3.0 +#ifndef QXMPP_SUPRESS_INTERNAL_VCARD_WARNING +#warning "QXmppVCard.h is deprecated, use QXmppVCardIq instead" +#endif + +#include "QXmppVCardIq.h" + +// QXmppVCard inherits QXmppVCardIq, to maintain backward compatibility +class QXmppVCard : public QXmppVCardIq +{ +public: + QXmppVCard(const QString& bareJid = ""):QXmppVCardIq(bareJid) + { + } + QXmppVCard(QXmppVCardIq vcard):QXmppVCardIq(vcard) + { + } +}; + +#endif //QXMPPVCARD_H diff --git a/src/QXmppVersionManager.cpp b/src/QXmppVersionManager.cpp index 6daa3c8d..4ee5c687 100644 --- a/src/QXmppVersionManager.cpp +++ b/src/QXmppVersionManager.cpp @@ -1,76 +1,76 @@ -/* - * Copyright (C) 2008-2010 The QXmpp developers - * - * 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 "QXmppVersionManager.h" -#include "QXmppOutgoingClient.h" -#include "QXmppVersionIq.h" -#include "QXmppGlobal.h" - -#include - -QXmppVersionManager::QXmppVersionManager(QXmppOutgoingClient* stream, QObject *parent) - : QObject(parent), - m_stream(stream) -{ - bool check = QObject::connect(m_stream, SIGNAL(versionIqReceived(const QXmppVersionIq&)), - this, SLOT(versionIqReceived(const QXmppVersionIq&))); - Q_ASSERT(check); - Q_UNUSED(check); -} - -void QXmppVersionManager::versionIqReceived(const QXmppVersionIq& versionIq) -{ - if(versionIq.type() == QXmppIq::Get) - { - // respond to query - QXmppVersionIq responseIq; - responseIq.setType(QXmppIq::Result); - responseIq.setId(versionIq.id()); - responseIq.setTo(versionIq.from()); - - QString name = qApp->applicationName(); - if(name.isEmpty()) - name = "Based on QXmpp"; - responseIq.setName(name); - - QString version = qApp->applicationVersion(); - if(version.isEmpty()) - version = QXmppVersion(); - responseIq.setVersion(version); - - // TODO set OS aswell - - m_stream->sendPacket(responseIq); - } - - emit versionReceived(versionIq); -} - -void QXmppVersionManager::requestVersion(const QString& jid) -{ - QXmppVersionIq request; - request.setType(QXmppIq::Get); - request.setFrom(m_stream->configuration().jid()); - request.setTo(jid); - m_stream->sendPacket(request); -} +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * 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 "QXmppVersionManager.h" +#include "QXmppOutgoingClient.h" +#include "QXmppVersionIq.h" +#include "QXmppGlobal.h" + +#include + +QXmppVersionManager::QXmppVersionManager(QXmppOutgoingClient* stream, QObject *parent) + : QObject(parent), + m_stream(stream) +{ + bool check = QObject::connect(m_stream, SIGNAL(versionIqReceived(const QXmppVersionIq&)), + this, SLOT(versionIqReceived(const QXmppVersionIq&))); + Q_ASSERT(check); + Q_UNUSED(check); +} + +void QXmppVersionManager::versionIqReceived(const QXmppVersionIq& versionIq) +{ + if(versionIq.type() == QXmppIq::Get) + { + // respond to query + QXmppVersionIq responseIq; + responseIq.setType(QXmppIq::Result); + responseIq.setId(versionIq.id()); + responseIq.setTo(versionIq.from()); + + QString name = qApp->applicationName(); + if(name.isEmpty()) + name = "Based on QXmpp"; + responseIq.setName(name); + + QString version = qApp->applicationVersion(); + if(version.isEmpty()) + version = QXmppVersion(); + responseIq.setVersion(version); + + // TODO set OS aswell + + m_stream->sendPacket(responseIq); + } + + emit versionReceived(versionIq); +} + +void QXmppVersionManager::requestVersion(const QString& jid) +{ + QXmppVersionIq request; + request.setType(QXmppIq::Get); + request.setFrom(m_stream->configuration().jid()); + request.setTo(jid); + m_stream->sendPacket(request); +} diff --git a/src/QXmppVersionManager.h b/src/QXmppVersionManager.h index 6d91b45a..8d7a19ce 100644 --- a/src/QXmppVersionManager.h +++ b/src/QXmppVersionManager.h @@ -1,56 +1,56 @@ -/* - * Copyright (C) 2008-2010 The QXmpp developers - * - * 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. - * - */ - -#ifndef QXMPPVERSIONMANAGER_H -#define QXMPPVERSIONMANAGER_H - -#include - -class QXmppOutgoingClient; -class QXmppVersionIq; - -/// \brief The QXmppVersionManager class makes it possible to request for -/// the software version of an entity as defined by XEP-0092: Software Version. -/// -/// \ingroup Managers - -class QXmppVersionManager : public QObject -{ - Q_OBJECT - -public: - QXmppVersionManager(QXmppOutgoingClient* stream, QObject *parent = 0); - void requestVersion(const QString& jid); - -signals: - void versionReceived(const QXmppVersionIq&); - -private slots: - void versionIqReceived(const QXmppVersionIq&); - -private: - // reference to the xmpp stream (no ownership) - QXmppOutgoingClient* m_stream; -}; - -#endif // QXMPPVERSIONMANAGER_H +/* + * Copyright (C) 2008-2010 The QXmpp developers + * + * 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. + * + */ + +#ifndef QXMPPVERSIONMANAGER_H +#define QXMPPVERSIONMANAGER_H + +#include + +class QXmppOutgoingClient; +class QXmppVersionIq; + +/// \brief The QXmppVersionManager class makes it possible to request for +/// the software version of an entity as defined by XEP-0092: Software Version. +/// +/// \ingroup Managers + +class QXmppVersionManager : public QObject +{ + Q_OBJECT + +public: + QXmppVersionManager(QXmppOutgoingClient* stream, QObject *parent = 0); + void requestVersion(const QString& jid); + +signals: + void versionReceived(const QXmppVersionIq&); + +private slots: + void versionIqReceived(const QXmppVersionIq&); + +private: + // reference to the xmpp stream (no ownership) + QXmppOutgoingClient* m_stream; +}; + +#endif // QXMPPVERSIONMANAGER_H -- cgit v1.2.3