// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'HttpScan.pas' rev: 4.00

#ifndef HttpScanHPP
#define HttpScanHPP

#pragma delphiheader begin
#pragma option push -w-
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Httpscan
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TLinkReport { reportAllLinks, reportCurrentSiteLinks, reportCurrentPathLinks };
#pragma option pop

#pragma option push -b-
enum TLinkScan { scanAllLinks, scanInitialSite, scanInitialPath };
#pragma option pop

#pragma option push -b-
enum TProxyType { PROXY_DIRECT, PROXY_USEPROXY, PROXY_DEFAULT };
#pragma option pop

typedef void __fastcall (__closure *TOnEndUserPageReceived)(System::TObject* Sender, AnsiString HostName
	, AnsiString Url, AnsiString Head, AnsiString Body, bool AlreadyOnDisk);

typedef void __fastcall (__closure *TOnError)(System::TObject* Sender, AnsiString Url, unsigned ErrorCode
	, AnsiString ErrorMsg);

typedef void __fastcall (__closure *TOnLinkFound)(System::TObject* Sender, AnsiString UrlFound, AnsiString 
	TypeLink, AnsiString FromUrl, AnsiString HostName, AnsiString UrlPath, AnsiString UrlPathWithFile, 
	AnsiString FileName, AnsiString ExtraInfos, int Port, AnsiString &WriteToFile, char HrefOrSrc, int 
	CountArea, bool &FollowIfHtmlLink);

typedef void __fastcall (__closure *TOnLog)(System::TObject* Sender, AnsiString LogMessage);

typedef void __fastcall (__closure *TOnMetaTag)(System::TObject* Sender, AnsiString Url, AnsiString 
	ReferringUrl, AnsiString TagType, AnsiString Tag1stAttrib, AnsiString Tag1stValue, AnsiString Tag2ndAttrib
	, AnsiString Tag2ndValue, AnsiString Tag3rdAttrib, AnsiString Tag3rdValue);

typedef void __fastcall (__closure *TOnPageReceived)(System::TObject* Sender, AnsiString HostName, AnsiString 
	Url, AnsiString Head, AnsiString Body);

typedef void __fastcall (__closure *TOnUpdatedStats)(System::TObject* Sender, int InQueue, int Downloading
	, int ToAnalyze, int Done, int Retries, int Errors);

typedef void __fastcall (__closure *TOnWorking)(System::TObject* Sender, bool Working_);

typedef void __fastcall (__closure *TOnHttpAuthenticate)(System::TObject* Sender, AnsiString HostName
	, AnsiString Url, AnsiString &UserName, AnsiString &Password, int RetryCount, bool &Cancel);

typedef void __fastcall (__closure *TOnProxyAuthenticate)(System::TObject* Sender, AnsiString &UserName
	, AnsiString &Password, int RetryCount, bool &Cancel);

class DELPHICLASS THttpScan;
#pragma pack(push, 4)
class PASCALIMPLEMENTATION THttpScan : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	void *Impl;
	TOnError FOnError;
	TOnLinkFound FOnLinkFound;
	TOnLog FOnLog;
	TOnMetaTag FOnMetaTag;
	TOnPageReceived FOnPageReceived;
	TOnUpdatedStats FOnUpdatedStats;
	TOnWorking FOnWorking;
	TOnHttpAuthenticate FOnHttpAuthenticate;
	TOnProxyAuthenticate FOnProxyAuthenticate;
	AnsiString __fastcall GetAgent();
	bool __fastcall GetAllowRedirect(void);
	int __fastcall GetDepthSearchLevel(void);
	AnsiString __fastcall GetFileOfResults();
	int __fastcall GetHtmlConcurrentDownloads(void);
	AnsiString __fastcall GetKeywordsFilter();
	bool __fastcall GetKeywordsFilterEnabled(void);
	AnsiString __fastcall GetKeywordsLimiter();
	bool __fastcall GetKeywordsLimiterEnabled(void);
	AnsiString __fastcall GetInitialReferringUrl();
	bool __fastcall GetLeavesFirst(void);
	TLinkReport __fastcall GetLinkReport(void);
	TLinkScan __fastcall GetLinkScan(void);
	bool __fastcall GetLogsEnabled(void);
	int __fastcall GetMaxHtmlQueueSize(void);
	AnsiString __fastcall GetPassword();
	int __fastcall GetPort(void);
	AnsiString __fastcall GetProxyAddress();
	AnsiString __fastcall GetProxyPassword();
	int __fastcall GetProxyPort(void);
	TProxyType __fastcall GetProxyType(void);
	AnsiString __fastcall GetProxyUser();
	AnsiString __fastcall GetReferer();
	int __fastcall GetRetryCount(void);
	bool __fastcall GetSeekRobotsTxt(void);
	AnsiString __fastcall GetStartingUrl();
	int __fastcall GetTimeOut(void);
	AnsiString __fastcall GetTypeFilter();
	bool __fastcall GetTypeFilterEnabled(void);
	AnsiString __fastcall GetUserName();
	AnsiString __fastcall GetVersion();
	bool __fastcall GetWorking(void);
	void __fastcall SetAgent(AnsiString Value);
	void __fastcall SetAllowRedirect(bool Value);
	void __fastcall SetDepthSearchLevel(int Value);
	void __fastcall SetFileOfResults(AnsiString Value);
	void __fastcall SetHtmlConcurrentDownloads(int Value);
	void __fastcall SetKeywordsFilter(AnsiString Value);
	void __fastcall SetKeywordsFilterEnabled(bool Value);
	void __fastcall SetKeywordsLimiter(AnsiString Value);
	void __fastcall SetKeywordsLimiterEnabled(bool Value);
	void __fastcall SetInitialReferringUrl(AnsiString Value);
	void __fastcall SetLeavesFirst(bool Value);
	void __fastcall SetLinkReport(TLinkReport Value);
	void __fastcall SetLinkScan(TLinkScan Value);
	void __fastcall SetLogsEnabled(bool Value);
	void __fastcall SetMaxHtmlQueueSize(int Value);
	void __fastcall SetPassword(AnsiString Value);
	void __fastcall SetPort(int Value);
	void __fastcall SetProxyType(TProxyType Value);
	void __fastcall SetProxyAddress(AnsiString Value);
	void __fastcall SetProxyPassword(AnsiString Value);
	void __fastcall SetProxyPort(int Value);
	void __fastcall SetProxyUser(AnsiString Value);
	void __fastcall SetReferer(AnsiString Value);
	void __fastcall SetRetryCount(int Value);
	void __fastcall SetSeekRobotsTxt(bool Value);
	void __fastcall SetStartingUrl(AnsiString Value);
	void __fastcall SetTimeOut(int Value);
	void __fastcall SetTypeFilter(AnsiString Value);
	void __fastcall SetTypeFilterEnabled(bool Value);
	void __fastcall SetVersion(AnsiString Value);
	void __fastcall SetUsername(AnsiString Value);
	void __fastcall SetOnHttpAuthenticate(TOnHttpAuthenticate Value);
	void __fastcall SetOnProxyAuthenticate(TOnProxyAuthenticate Value);
	
public:
	__fastcall virtual THttpScan(Classes::TComponent* AOwner);
	__fastcall virtual ~THttpScan(void);
	__property AnsiString InitialReferringUrl = {read=GetInitialReferringUrl, write=SetInitialReferringUrl
		};
	bool __fastcall Start(void)/* overload */;
	bool __fastcall Start(AnsiString Value)/* overload */;
	bool __fastcall Stop(void);
	__property AnsiString KeywordsFilter = {read=GetKeywordsFilter, write=SetKeywordsFilter};
	__property AnsiString KeywordsLimiter = {read=GetKeywordsLimiter, write=SetKeywordsLimiter};
	__property AnsiString TypeFilter = {read=GetTypeFilter, write=SetTypeFilter};
	__property bool Working = {read=GetWorking, nodefault};
	
__published:
	__property AnsiString Agent = {read=GetAgent, write=SetAgent};
	__property bool AllowRedirect = {read=GetAllowRedirect, write=SetAllowRedirect, nodefault};
	__property int ConcurrentDownloads = {read=GetHtmlConcurrentDownloads, write=SetHtmlConcurrentDownloads
		, nodefault};
	__property int DepthSearchLevel = {read=GetDepthSearchLevel, write=SetDepthSearchLevel, nodefault};
		
	__property AnsiString FileOfResults = {read=GetFileOfResults, write=SetFileOfResults};
	__property int HttpPort = {read=GetPort, write=SetPort, nodefault};
	__property bool KeywordsFilterEnabled = {read=GetKeywordsFilterEnabled, write=SetKeywordsFilterEnabled
		, stored=true, default=0};
	__property bool KeywordsLimiterEnabled = {read=GetKeywordsLimiterEnabled, write=SetKeywordsLimiterEnabled
		, stored=true, default=0};
	__property bool LeavesFirst = {read=GetLeavesFirst, write=SetLeavesFirst, nodefault};
	__property TLinkReport LinkReport = {read=GetLinkReport, write=SetLinkReport, nodefault};
	__property TLinkScan LinkScan = {read=GetLinkScan, write=SetLinkScan, nodefault};
	__property bool LogsEnabled = {read=GetLogsEnabled, write=SetLogsEnabled, nodefault};
	__property int MaxQueueSize = {read=GetMaxHtmlQueueSize, write=SetMaxHtmlQueueSize, nodefault};
	__property AnsiString Password = {read=GetPassword, write=SetPassword};
	__property AnsiString ProxyAddress = {read=GetProxyAddress, write=SetProxyAddress};
	__property AnsiString ProxyPassword = {read=GetProxyPassword, write=SetProxyPassword};
	__property int ProxyPort = {read=GetProxyPort, write=SetProxyPort, nodefault};
	__property TProxyType ProxyType = {read=GetProxyType, write=SetProxyType, nodefault};
	__property AnsiString ProxyUser = {read=GetProxyUser, write=SetProxyUser};
	__property AnsiString Referer = {read=GetReferer, write=SetReferer};
	__property int Retries = {read=GetRetryCount, write=SetRetryCount, nodefault};
	__property bool SeekRobotsTxt = {read=GetSeekRobotsTxt, write=SetSeekRobotsTxt, nodefault};
	__property AnsiString StartingUrl = {read=GetStartingUrl, write=SetStartingUrl};
	__property int TimeOut = {read=GetTimeOut, write=SetTimeOut, nodefault};
	__property bool TypeFilterEnabled = {read=GetTypeFilterEnabled, write=SetTypeFilterEnabled, nodefault
		};
	__property AnsiString UserName = {read=GetUserName, write=SetUsername};
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
	__property TOnError OnError = {read=FOnError, write=FOnError};
	__property TOnLinkFound OnLinkFound = {read=FOnLinkFound, write=FOnLinkFound};
	__property TOnLog OnLog = {read=FOnLog, write=FOnLog};
	__property TOnMetaTag OnMetaTag = {read=FOnMetaTag, write=FOnMetaTag};
	__property TOnPageReceived OnPageReceived = {read=FOnPageReceived, write=FOnPageReceived};
	__property TOnUpdatedStats OnUpdatedStats = {read=FOnUpdatedStats, write=FOnUpdatedStats};
	__property TOnWorking OnWorking = {read=FOnWorking, write=FOnWorking};
	__property TOnHttpAuthenticate OnHttpAuthenticate = {read=FOnHttpAuthenticate, write=SetOnHttpAuthenticate
		};
	__property TOnProxyAuthenticate OnProxyAuthenticate = {read=FOnProxyAuthenticate, write=SetOnProxyAuthenticate
		};
};

#pragma pack(pop)

//-- var, const, procedure ---------------------------------------------------
#define THttpScanVersion "THttpScan v4.7, February 14, 2006"
static const char TYPELINK_UNKNOWN = '\x30';
extern PACKAGE void __fastcall Register(void);

}	/* namespace Httpscan */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Httpscan;
#endif
#pragma option pop	// -w-

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// HttpScan
