#include<qdialog.h>
#include"xmpp.h"

namespace XMPP
{
	class JidLink;
}

using namespace XMPP;

class PsiAccount;

class JLTestDlg : public QDialog
{
	Q_OBJECT
public:
	enum { ModeConnect, ModeAccept };
	JLTestDlg(const Jid &, PsiAccount *);
	JLTestDlg(const Jid &, JidLink *, PsiAccount *);
	~JLTestDlg();

private slots:
	void start();
	void jl_connected();
	void jl_connectionClosed();
	void jl_error(int);
	void jl_readyRead();
	void jl_bytesWritten(int);

	void doNext();

private:
	class Private;
	Private *d;

	void init();
	void reset();

	void writePacket();
};
