//-------------------------------
// File:			XonXoff.h
// Function:		XON/XOFF protocol
// Supported Toolchain(s):
//		- Microsoft Visual C++
// Date created:	23-May-2006
// Created by:		JJo
//-------------------------------

#ifndef FIRMWARE_UPDATER_XONXOFF_H
#define FIRMWARE_UPDATER_XONXOFF_H

//-------------------------------
// Includes

#include <afxwin.h>
#include <winbase.h>
#include "Communication.h"

//-------------------------------
// Defines

#define XON					0x11
#define XOFF				0x13
#define XONXOFF_PACKETSIZE	64
#define XON_XOFF_TIMEOUT	100000

//-------------------------------
// Class

class XonXoff : public Communication {

public:
	XonXoff::XonXoff(Media * media);
	XonXoff::~XonXoff();

	unsigned long XonXoff::Send(void * data,
								unsigned long size,
								ProgressDialog * pProgressDialog,
								unsigned long rate);
};

#endif
