2014-05-29 00:25:28 +08:00
|
|
|
#ifndef qamqp_global_h__
|
|
|
|
|
#define qamqp_global_h__
|
|
|
|
|
|
2014-06-12 02:38:42 +08:00
|
|
|
#include <QMetaType>
|
|
|
|
|
|
2014-06-10 07:26:30 +08:00
|
|
|
#define AMQP_SCHEME "amqp"
|
|
|
|
|
#define AMQP_SSCHEME "amqps"
|
|
|
|
|
#define AMQP_PORT 5672
|
|
|
|
|
#define AMQP_HOST "localhost"
|
|
|
|
|
#define AMQP_VHOST "/"
|
|
|
|
|
#define AMQP_LOGIN "guest"
|
|
|
|
|
#define AMQP_PSWD "guest"
|
|
|
|
|
|
|
|
|
|
#define AMQP_FRAME_MAX 131072
|
|
|
|
|
#define AMQP_FRAME_MIN_SIZE 4096
|
2014-05-29 00:25:28 +08:00
|
|
|
|
2014-05-29 03:33:15 +08:00
|
|
|
#define QAMQP_VERSION "0.3.0"
|
2014-05-29 00:25:28 +08:00
|
|
|
|
|
|
|
|
#define AMQP_CONNECTION_FORCED 320
|
|
|
|
|
|
2014-05-29 03:33:15 +08:00
|
|
|
#ifdef QAMQP_SHARED
|
|
|
|
|
# ifdef QAMQP_BUILD
|
|
|
|
|
# define QAMQP_EXPORT Q_DECL_EXPORT
|
|
|
|
|
# else
|
|
|
|
|
# define QAMQP_EXPORT Q_DECL_IMPORT
|
|
|
|
|
# endif
|
|
|
|
|
#else
|
|
|
|
|
# define QAMQP_EXPORT
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-06-07 01:46:08 +08:00
|
|
|
#define qAmqpDebug if (qgetenv("QAMQP_DEBUG").isEmpty()); else qDebug
|
|
|
|
|
|
2014-06-12 01:44:30 +08:00
|
|
|
namespace QAMQP {
|
|
|
|
|
|
|
|
|
|
enum Error {
|
|
|
|
|
NoError = 0,
|
|
|
|
|
ContentTooLargeError = 311,
|
2014-06-24 03:36:03 +08:00
|
|
|
UnroutableKey = 312,
|
2014-06-12 01:44:30 +08:00
|
|
|
NoConsumersError = 313,
|
|
|
|
|
ConnectionForcedError = 320,
|
|
|
|
|
InvalidPathError = 402,
|
|
|
|
|
AccessRefusedError = 403,
|
|
|
|
|
NotFoundError = 404,
|
|
|
|
|
ResourceLockedError = 405,
|
|
|
|
|
PreconditionFailedError = 406,
|
|
|
|
|
FrameError = 501,
|
|
|
|
|
SyntaxError = 502,
|
|
|
|
|
CommandInvalidError = 503,
|
|
|
|
|
ChannelError = 504,
|
|
|
|
|
UnexpectedFrameError = 505,
|
|
|
|
|
ResourceError = 506,
|
|
|
|
|
NotAllowedError = 530,
|
|
|
|
|
NotImplementedError = 540,
|
|
|
|
|
InternalError = 541
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace QAMQP
|
|
|
|
|
|
2014-06-12 02:38:42 +08:00
|
|
|
Q_DECLARE_METATYPE(QAMQP::Error);
|
|
|
|
|
|
2014-05-29 00:25:28 +08:00
|
|
|
#endif // qamqp_global_h__
|