//
//
// Window Size Option
//
//

#ifndef WINSIZEOPTION__H
#define WINSIZEOPTION__H

#include "Negotiator.h"
#include "TelnetEngine.h"
#include "YesNoOptions.h"

#define NAWS 31

enum
{
	WINSIZE_CHANGED
};

class WinSizeOption : public YesNoOption {
public:
	WinSizeOption (CharStream *stream, TelnetEngine *engine)
	: YesNoOption (stream, engine, NAWS)
	{
		negotiated = false;
	 };
	
	void NegotiateOption (unsigned char command);
	void ExecOption(unsigned int Command, void* Data = NULL);

	// width, height 16-bit numbers
	void SendWinSize (unsigned short width, unsigned short height);
private:
	Boolean negotiated;
};

#endif
