2012-01-29 23:36:03 +08:00
|
|
|
#ifndef qamqp_amqp_p_h__
|
|
|
|
|
#define qamqp_amqp_p_h__
|
|
|
|
|
|
2012-02-23 21:54:04 +08:00
|
|
|
#include <QSharedPointer>
|
2012-01-29 23:36:03 +08:00
|
|
|
|
2012-04-17 21:50:44 +08:00
|
|
|
#include "amqp_global.h"
|
2012-01-29 23:36:03 +08:00
|
|
|
#include "amqp_network.h"
|
|
|
|
|
#include "amqp_connection.h"
|
2012-02-23 21:54:04 +08:00
|
|
|
#include "amqp_authenticator.h"
|
2012-01-29 23:36:03 +08:00
|
|
|
|
|
|
|
|
namespace QAMQP
|
|
|
|
|
{
|
2012-04-17 21:50:44 +08:00
|
|
|
class ClientPrivate
|
2012-01-29 23:36:03 +08:00
|
|
|
{
|
2012-04-17 21:50:44 +08:00
|
|
|
P_DECLARE_PUBLIC(QAMQP::Client)
|
|
|
|
|
|
2012-01-29 23:36:03 +08:00
|
|
|
public:
|
2012-04-17 21:50:44 +08:00
|
|
|
ClientPrivate(Client * q ) ;
|
2012-01-29 23:36:03 +08:00
|
|
|
~ClientPrivate();
|
|
|
|
|
|
2012-05-28 18:01:49 +08:00
|
|
|
|
2012-01-29 23:36:03 +08:00
|
|
|
void init(QObject * parent);
|
|
|
|
|
void init(QObject * parent, const QUrl & connectionString);
|
|
|
|
|
void printConnect() const;
|
|
|
|
|
void connect();
|
2012-02-12 20:22:10 +08:00
|
|
|
void disconnect();
|
2012-01-29 23:36:03 +08:00
|
|
|
void parseCnnString( const QUrl & connectionString);
|
|
|
|
|
void sockConnect();
|
|
|
|
|
void login();
|
2012-02-23 21:54:04 +08:00
|
|
|
void setAuth(Authenticator* auth);
|
2012-02-12 20:22:10 +08:00
|
|
|
Exchange * createExchange(int channelNumber, const QString &name);
|
|
|
|
|
Queue * createQueue(int channelNumber, const QString &name);
|
2012-01-29 23:36:03 +08:00
|
|
|
|
|
|
|
|
quint32 port;
|
|
|
|
|
QString host;
|
|
|
|
|
QString virtualHost;
|
2012-02-23 21:54:04 +08:00
|
|
|
|
2012-01-29 23:36:03 +08:00
|
|
|
QPointer<QAMQP::Network> network_;
|
|
|
|
|
QPointer<QAMQP::Connection> connection_;
|
2012-02-23 21:54:04 +08:00
|
|
|
QSharedPointer<Authenticator> auth_;
|
2012-04-17 21:50:44 +08:00
|
|
|
|
2012-05-23 18:23:20 +08:00
|
|
|
bool isSSl() const;
|
|
|
|
|
|
2012-05-23 18:49:56 +08:00
|
|
|
|
2012-04-17 21:50:44 +08:00
|
|
|
|
|
|
|
|
Client * const pq_ptr;
|
|
|
|
|
|
2012-01-29 23:36:03 +08:00
|
|
|
};
|
2012-05-28 18:01:49 +08:00
|
|
|
|
2012-01-29 23:36:03 +08:00
|
|
|
}
|
|
|
|
|
#endif // amqp_p_h__
|