rename amqp_ files to qamqp

amqp_<filename> is used in at least two other C/C++ projects related
to amqp, so this commit changes all our source to use a qamqp header.
This avoids potential clashes, and is more in line with Qt style
This commit is contained in:
Matt Broadstone 2014-08-26 15:05:39 -04:00
parent 840efb037d
commit 6a3d355de2
39 changed files with 175 additions and 176 deletions

View File

@ -1,6 +1,6 @@
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
#include "amqp_authenticator.h" #include "qamqpauthenticator.h"
using namespace QAMQP; using namespace QAMQP;
AMQPlainAuthenticator::AMQPlainAuthenticator(const QString &l, const QString &p) AMQPlainAuthenticator::AMQPlainAuthenticator(const QString &l, const QString &p)

View File

@ -1,10 +1,10 @@
#ifndef amqp_authenticator_h__ #ifndef QAMQPAUTHENTICATOR_H
#define amqp_authenticator_h__ #define QAMQPAUTHENTICATOR_H
#include <QString> #include <QString>
#include <QDataStream> #include <QDataStream>
#include "amqp_global.h" #include "qamqpglobal.h"
namespace QAMQP namespace QAMQP
{ {
@ -40,4 +40,4 @@ private:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_authenticator_h__ #endif // QAMQPAUTHENTICATOR_H

View File

@ -1,7 +1,7 @@
#include "amqp_channel.h" #include "qamqpchannel.h"
#include "amqp_channel_p.h" #include "qamqpchannel_p.h"
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_client_p.h" #include "qamqpclient_p.h"
#include <QDebug> #include <QDebug>
#include <QDataStream> #include <QDataStream>
@ -337,4 +337,4 @@ void Channel::resume()
d->flow(true); d->flow(true);
} }
#include "moc_amqp_channel.cpp" #include "moc_qamqpchannel.cpp"

View File

@ -1,8 +1,8 @@
#ifndef amqp_channel_h__ #ifndef QAMQPCHANNEL_H
#define amqp_channel_h__ #define QAMQPCHANNEL_H
#include <QObject> #include <QObject>
#include "amqp_global.h" #include "qamqpglobal.h"
namespace QAMQP namespace QAMQP
{ {
@ -65,4 +65,4 @@ protected:
} // namespace QAMQP } // namespace QAMQP
#endif #endif // QAMQPCHANNEL_H

View File

@ -1,8 +1,8 @@
#ifndef amqp_channel_p_h__ #ifndef QAMQPCHANNEL_P_H
#define amqp_channel_p_h__ #define QAMQPCHANNEL_P_H
#include <QPointer> #include <QPointer>
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
#define METHOD_ID_ENUM(name, id) name = id, name ## Ok #define METHOD_ID_ENUM(name, id) name = id, name ## Ok
@ -81,4 +81,4 @@ public:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_channel_p_h__ #endif // QAMQPCHANNEL_P_H

View File

@ -4,15 +4,15 @@
#include <QStringList> #include <QStringList>
#include <QtEndian> #include <QtEndian>
#include "amqp_global.h" #include "qamqpglobal.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_exchange_p.h" #include "qamqpexchange_p.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
#include "amqp_queue_p.h" #include "qamqpqueue_p.h"
#include "amqp_authenticator.h" #include "qamqpauthenticator.h"
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_client_p.h" #include "qamqpclient_p.h"
#include "amqp_client.h" #include "qamqpclient.h"
using namespace QAMQP; using namespace QAMQP;
ClientPrivate::ClientPrivate(Client *q) ClientPrivate::ClientPrivate(Client *q)
@ -844,4 +844,4 @@ SslClient::~SslClient()
#endif #endif
#include "moc_amqp_client.cpp" #include "moc_qamqpclient.cpp"

View File

@ -1,5 +1,5 @@
#ifndef amqp_client_h__ #ifndef QAMQPCLIENT_H
#define amqp_client_h__ #define QAMQPCLIENT_H
#include <QObject> #include <QObject>
#include <QUrl> #include <QUrl>
@ -10,7 +10,7 @@
#include <QSslError> #include <QSslError>
#endif #endif
#include "amqp_global.h" #include "qamqpglobal.h"
namespace QAMQP namespace QAMQP
{ {
@ -136,4 +136,4 @@ private:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_client_h__ #endif // QAMQPCLIENT_H

View File

@ -1,5 +1,5 @@
#ifndef amqp_client_p_h__ #ifndef QAMQPCLIENT_P_H
#define amqp_client_p_h__ #define QAMQPCLIENT_P_H
#include <QHash> #include <QHash>
#include <QSharedPointer> #include <QSharedPointer>
@ -11,8 +11,8 @@
# include <QSslError> # include <QSslError>
#endif #endif
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
#define METHOD_ID_ENUM(name, id) name = id, name ## Ok #define METHOD_ID_ENUM(name, id) name = id, name ## Ok
@ -130,4 +130,4 @@ public:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_client_p_h__ #endif // QAMQPCLIENT_P_H

View File

@ -1,15 +1,13 @@
#include "amqp_exchange.h"
#include "amqp_exchange_p.h"
#include "amqp_queue.h"
#include "amqp_global.h"
#include "amqp_client.h"
#include <QDataStream> #include <QDataStream>
#include <QDebug> #include <QDebug>
#include "qamqpexchange.h"
#include "qamqpexchange_p.h"
#include "qamqpqueue.h"
#include "qamqpglobal.h"
#include "qamqpclient.h"
using namespace QAMQP; using namespace QAMQP;
QString ExchangePrivate::typeToString(Exchange::ExchangeType type) QString ExchangePrivate::typeToString(Exchange::ExchangeType type)
{ {
switch (type) { switch (type) {

View File

@ -1,9 +1,9 @@
#ifndef amqp_exchange_h__ #ifndef QAMQPEXCHANGE_H
#define amqp_exchange_h__ #define QAMQPEXCHANGE_H
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_channel.h" #include "qamqpchannel.h"
#include "amqp_message.h" #include "qamqpmessage.h"
namespace QAMQP namespace QAMQP
{ {
@ -99,4 +99,4 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QAMQP::Exchange::ExchangeOptions) Q_DECLARE_OPERATORS_FOR_FLAGS(QAMQP::Exchange::ExchangeOptions)
Q_DECLARE_METATYPE(QAMQP::Exchange::ExchangeType) Q_DECLARE_METATYPE(QAMQP::Exchange::ExchangeType)
#endif // amqp_exchange_h__ #endif // QAMQPEXCHANGE_H

View File

@ -1,9 +1,9 @@
#ifndef amqp_exchange_p_h__ #ifndef QAMQPEXCHANGE_P_H
#define amqp_exchange_p_h__ #define QAMQPEXCHANGE_P_H
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_channel_p.h" #include "qamqpchannel_p.h"
namespace QAMQP namespace QAMQP
{ {
@ -39,4 +39,4 @@ public:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_exchange_p_h__ #endif // QAMQPEXCHANGE_P_H

View File

@ -2,9 +2,9 @@
#include <QList> #include <QList>
#include <QDebug> #include <QDebug>
#include "amqp_table.h" #include "qamqptable.h"
#include "amqp_global.h" #include "qamqpglobal.h"
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
using namespace QAMQP; using namespace QAMQP;
using namespace QAMQP::Frame; using namespace QAMQP::Frame;

View File

@ -1,12 +1,12 @@
#ifndef amqp_frame_h__ #ifndef QAMQPFRAME_P_H
#define amqp_frame_h__ #define QAMQPFRAME_P_H
#include <QDataStream> #include <QDataStream>
#include <QHash> #include <QHash>
#include <QVariant> #include <QVariant>
#include "amqp_global.h" #include "qamqpglobal.h"
#include "amqp_message.h" #include "qamqpmessage.h"
/** /**
* Library namespace * Library namespace
@ -358,4 +358,4 @@ namespace Frame
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_frame_h__ #endif // QAMQPFRAME_P_H

View File

@ -1,5 +1,5 @@
#ifndef qamqp_global_h__ #ifndef QAMQPGLOBAL_H
#define qamqp_global_h__ #define QAMQPGLOBAL_H
#include <QMetaType> #include <QMetaType>
@ -113,4 +113,4 @@ struct Decimal
Q_DECLARE_METATYPE(QAMQP::Error) Q_DECLARE_METATYPE(QAMQP::Error)
Q_DECLARE_METATYPE(QAMQP::Decimal) Q_DECLARE_METATYPE(QAMQP::Decimal)
#endif // qamqp_global_h__ #endif // QAMQPGLOBAL_H

View File

@ -1,7 +1,7 @@
#include "amqp_message.h" #include "qamqpmessage.h"
#include "amqp_message_p.h" #include "qamqpmessage_p.h"
using namespace QAMQP; using namespace QAMQP;
MessagePrivate::MessagePrivate() MessagePrivate::MessagePrivate()
: deliveryTag(0), : deliveryTag(0),
leftSize(0) leftSize(0)

View File

@ -1,12 +1,12 @@
#ifndef amqp_message_h__ #ifndef QAMQPMESSAGE_H
#define amqp_message_h__ #define QAMQPMESSAGE_H
#include <QByteArray> #include <QByteArray>
#include <QHash> #include <QHash>
#include <QSharedDataPointer> #include <QSharedDataPointer>
#include <QVariant> #include <QVariant>
#include "amqp_global.h" #include "qamqpglobal.h"
namespace QAMQP namespace QAMQP
{ {
@ -65,4 +65,4 @@ private:
Q_DECLARE_METATYPE(QAMQP::Message::PropertyHash) Q_DECLARE_METATYPE(QAMQP::Message::PropertyHash)
#endif // amqp_message_h__ #endif // QAMQPMESSAGE_H

View File

@ -1,11 +1,11 @@
#ifndef amqp_message_p_h__ #ifndef QAMQPMESSAGE_P_H
#define amqp_message_p_h__ #define QAMQPMESSAGE_P_H
#include <QHash> #include <QHash>
#include <QSharedData> #include <QSharedData>
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
#include "amqp_message.h" #include "qamqpmessage.h"
namespace QAMQP { namespace QAMQP {
@ -27,4 +27,4 @@ public:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_message_p_h__ #endif // QAMQPMESSAGE_P_H

View File

@ -1,15 +1,15 @@
#include "amqp_queue.h"
#include "amqp_queue_p.h"
#include "amqp_exchange.h"
#include "amqp_message_p.h"
#include "amqp_table.h"
using namespace QAMQP;
#include <QCoreApplication> #include <QCoreApplication>
#include <QDebug> #include <QDebug>
#include <QDataStream> #include <QDataStream>
#include <QFile> #include <QFile>
#include "qamqpqueue.h"
#include "qamqpqueue_p.h"
#include "qamqpexchange.h"
#include "qamqpmessage_p.h"
#include "qamqptable.h"
using namespace QAMQP;
QueuePrivate::QueuePrivate(Queue *q) QueuePrivate::QueuePrivate(Queue *q)
: ChannelPrivate(q), : ChannelPrivate(q),
delayedDeclare(false), delayedDeclare(false),

View File

@ -1,11 +1,11 @@
#ifndef amqp_queue_h__ #ifndef QAMQPQUEUE_H
#define amqp_queue_h__ #define QAMQPQUEUE_H
#include <QQueue> #include <QQueue>
#include "amqp_channel.h" #include "qamqpchannel.h"
#include "amqp_message.h" #include "qamqpmessage.h"
#include "amqp_global.h" #include "qamqpglobal.h"
namespace QAMQP namespace QAMQP
{ {
@ -101,4 +101,4 @@ private:
} // namespace QAMQP } // namespace QAMQP
#endif #endif // QAMQPQUEUE_H

View File

@ -1,10 +1,10 @@
#ifndef amqp_queue_p_h__ #ifndef QAMQPQUEUE_P_H
#define amqp_queue_p_h__ #define QAMQPQUEUE_P_H
#include <QQueue> #include <QQueue>
#include <QStringList> #include <QStringList>
#include "amqp_channel_p.h" #include "qamqpchannel_p.h"
namespace QAMQP namespace QAMQP
{ {
@ -60,4 +60,4 @@ public:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_queue_p_h__ #endif // QAMQPQUEUE_P_H

View File

@ -3,8 +3,8 @@
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
#include "amqp_frame_p.h" #include "qamqpframe_p.h"
#include "amqp_table.h" #include "qamqptable.h"
using namespace QAMQP; using namespace QAMQP;
/* /*

View File

@ -1,9 +1,10 @@
#ifndef amqp_table_h__ #ifndef QAMQPTABLE_H
#define amqp_table_h__ #define QAMQPTABLE_H
#include "amqp_global.h"
#include <QVariantHash> #include <QVariantHash>
#include "qamqpglobal.h"
namespace QAMQP { namespace QAMQP {
class QAMQP_EXPORT Table : public QVariantHash class QAMQP_EXPORT Table : public QVariantHash
@ -26,4 +27,4 @@ QAMQP_EXPORT QDataStream &operator<<(QDataStream &, const QAMQP::Table &table);
QAMQP_EXPORT QDataStream &operator>>(QDataStream &, QAMQP::Table &table); QAMQP_EXPORT QDataStream &operator>>(QDataStream &, QAMQP::Table &table);
Q_DECLARE_METATYPE(QAMQP::Table) Q_DECLARE_METATYPE(QAMQP::Table)
#endif // amqp_table_h__ #endif // QAMQPTABLE_H

View File

@ -11,36 +11,36 @@ VERSION = $${QAMQP_VERSION}
win32:DESTDIR = $$OUT_PWD win32:DESTDIR = $$OUT_PWD
PRIVATE_HEADERS += \ PRIVATE_HEADERS += \
amqp_channel_p.h \ qamqpchannel_p.h \
amqp_client_p.h \ qamqpclient_p.h \
amqp_exchange_p.h \ qamqpexchange_p.h \
amqp_frame_p.h \ qamqpframe_p.h \
amqp_message_p.h \ qamqpmessage_p.h \
amqp_queue_p.h qamqpqueue_p.h
INSTALL_HEADERS += \ INSTALL_HEADERS += \
amqp_authenticator.h \ qamqpauthenticator.h \
amqp_channel.h \ qamqpchannel.h \
amqp_client.h \ qamqpclient.h \
amqp_exchange.h \ qamqpexchange.h \
amqp_global.h \ qamqpglobal.h \
amqp_message.h \ qamqpmessage.h \
amqp_queue.h \ qamqpqueue.h \
amqp_table.h qamqptable.h
HEADERS += \ HEADERS += \
$${INSTALL_HEADERS} \ $${INSTALL_HEADERS} \
$${PRIVATE_HEADERS} $${PRIVATE_HEADERS}
SOURCES += \ SOURCES += \
amqp_authenticator.cpp \ qamqpauthenticator.cpp \
amqp_channel.cpp \ qamqpchannel.cpp \
amqp_client.cpp \ qamqpclient.cpp \
amqp_exchange.cpp \ qamqpexchange.cpp \
amqp_frame.cpp \ qamqpframe.cpp \
amqp_message.cpp \ qamqpmessage.cpp \
amqp_queue.cpp \ qamqpqueue.cpp \
amqp_table.cpp qamqptable.cpp
# install # install
headers.files = $${INSTALL_HEADERS} headers.files = $${INSTALL_HEADERS}

View File

@ -1,11 +1,11 @@
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include "signalspy.h" #include "signalspy.h"
#include "amqp_testcase.h" #include "qamqptestcase.h"
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class tst_QAMQPChannel : public TestCase class tst_QAMQPChannel : public TestCase

View File

@ -1,10 +1,10 @@
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include "amqp_testcase.h" #include "qamqptestcase.h"
#include <QProcess> #include <QProcess>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_client_p.h" #include "qamqpclient_p.h"
#include "amqp_authenticator.h" #include "qamqpauthenticator.h"
using namespace QAMQP; using namespace QAMQP;
class tst_QAMQPClient : public TestCase class tst_QAMQPClient : public TestCase

View File

@ -1,11 +1,11 @@
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include "signalspy.h" #include "signalspy.h"
#include "amqp_testcase.h" #include "qamqptestcase.h"
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class tst_QAMQPExchange : public TestCase class tst_QAMQPExchange : public TestCase

View File

@ -3,11 +3,11 @@
#include <QScopedPointer> #include <QScopedPointer>
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include "amqp_testcase.h" #include "qamqptestcase.h"
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
using namespace QAMQP; using namespace QAMQP;
class tst_QAMQPQueue : public TestCase class tst_QAMQPQueue : public TestCase

View File

@ -1,10 +1,10 @@
#ifndef amqp_testcase_h__ #ifndef QAMQPTESTCASE_H
#define amqp_testcase_h__ #define QAMQPTESTCASE_H
#include <QObject> #include <QObject>
#include <QTestEventLoop> #include <QTestEventLoop>
#include "amqp_queue.h" #include "qamqpqueue.h"
namespace QAMQP { namespace QAMQP {
@ -52,4 +52,4 @@ protected:
} // namespace QAMQP } // namespace QAMQP
#endif // amqp_testcase_h__ #endif // QAMQPTESTCASE_H

View File

@ -7,5 +7,5 @@ CONFIG += testcase
HEADERS += \ HEADERS += \
$${PWD}/common/signalspy.h \ $${PWD}/common/signalspy.h \
$${PWD}/common/amqp_testcase.h $${PWD}/common/qamqptestcase.h

View File

@ -1,9 +1,9 @@
#include <QCoreApplication> #include <QCoreApplication>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class Receiver : public QObject class Receiver : public QObject

View File

@ -2,9 +2,9 @@
#include <QTimer> #include <QTimer>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class Sender : public QObject class Sender : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class LogEmitter : public QObject class LogEmitter : public QObject

View File

@ -2,9 +2,9 @@
#include <QTimer> #include <QTimer>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class LogReceiver : public QObject class LogReceiver : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class DirectLogEmitter : public QObject class DirectLogEmitter : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class DirectLogReceiver : public QObject class DirectLogReceiver : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class TopicLogEmitter : public QObject class TopicLogEmitter : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class TopicLogReceiver : public QObject class TopicLogReceiver : public QObject

View File

@ -2,9 +2,9 @@
#include <QStringList> #include <QStringList>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_exchange.h" #include "qamqpexchange.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class TaskCreator : public QObject class TaskCreator : public QObject

View File

@ -2,8 +2,8 @@
#include <QTimer> #include <QTimer>
#include <QDebug> #include <QDebug>
#include "amqp_client.h" #include "qamqpclient.h"
#include "amqp_queue.h" #include "qamqpqueue.h"
using namespace QAMQP; using namespace QAMQP;
class Worker : public QObject class Worker : public QObject