⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auhttp.hpp

📁 利用AutoUpgrader可在delphi环境下快速开发自动更新程式
💻 HPP
📖 第 1 页 / 共 2 页
字号:
// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'auHTTP.pas' rev: 5.00

#ifndef auHTTPHPP
#define auHTTPHPP

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

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

namespace Auhttp
{
//-- type declarations -------------------------------------------------------
typedef Set<char, 0, 255>  SetOfChar;

class DELPHICLASS TauLoginComponent;
class PASCALIMPLEMENTATION TauLoginComponent : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	void __fastcall ReadData(Classes::TStream* Stream);
	void __fastcall WriteData(Classes::TStream* Stream);
	
protected:
	AnsiString FLoginUsername;
	AnsiString FLoginPassword;
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
public:
	#pragma option push -w-inl
	/* TComponent.Create */ inline __fastcall virtual TauLoginComponent(Classes::TComponent* AOwner) : 
		Classes::TComponent(AOwner) { }
	#pragma option pop
	#pragma option push -w-inl
	/* TComponent.Destroy */ inline __fastcall virtual ~TauLoginComponent(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TauHTTPProgressEvent)(System::TObject* Sender, const AnsiString 
	ContentType, int DataSize, int BytesRead, int ElapsedTime, int EstimatedTimeLeft, Byte PercentsDone
	, float TransferRate, Classes::TStream* Stream);

typedef void __fastcall (__closure *TauHTTPUploadProgressEvent)(System::TObject* Sender, int DataSize
	, int BytesTransferred, int ElapsedTime, int EstimatedTimeLeft, Byte PercentsDone, float TransferRate
	);

typedef void __fastcall (__closure *TauHTTPUploadFieldRequest)(System::TObject* Sender, Word FileIndex
	, Classes::TMemoryStream* UploadStream, AnsiString &FieldName, AnsiString &FileName);

typedef void __fastcall (__closure *TauHTTPHeaderInfoEvent)(System::TObject* Sender, int ErrorCode, 
	const AnsiString RawHeadersCRLF, const AnsiString ContentType, const AnsiString ContentLanguage, const 
	AnsiString ContentEncoding, int ContentLength, const AnsiString Location, const System::TDateTime Date
	, const System::TDateTime LastModified, const System::TDateTime Expires, const AnsiString ETag, bool 
	&ContinueDownload);

typedef void __fastcall (__closure *TauHTTPStatusChanged)(System::TObject* Sender, unsigned StatusID
	, const AnsiString StatusStr);

typedef void __fastcall (__closure *TauHTTPRedirected)(System::TObject* Sender, const AnsiString NewURL
	);

typedef void __fastcall (__closure *TauHTTPDoneEvent)(System::TObject* Sender, const AnsiString ContentType
	, int FileSize, Classes::TStream* Stream);

typedef void __fastcall (__closure *TauHTTPConnLostEvent)(System::TObject* Sender, const AnsiString 
	ContentType, int FileSize, int BytesRead, Classes::TStream* Stream);

typedef void __fastcall (__closure *TauHTTPErrorEvent)(System::TObject* Sender, int ErrorCode, Classes::TStream* 
	Stream);

typedef void __fastcall (__closure *TauHTTPPasswordRequestEvent)(System::TObject* Sender, const AnsiString 
	Realm, bool &TryAgain);

typedef void __fastcall (__closure *TauHTTPProxyAuthenticationEvent)(System::TObject* Sender, AnsiString 
	&ProxyUsername, AnsiString &ProxyPassword, bool &TryAgain);

typedef void __fastcall (__closure *TauHTTPBeforeSendRequest)(System::TObject* Sender, void * hRequest
	);

#pragma option push -b-
enum TauHTTPPOSTMethod { pmFormURLEncoded, pmMultipartFormData };
#pragma option pop

#pragma option push -b-
enum TauHTTPRequestMethod { rmAutoDetect, rmGET, rmPOST };
#pragma option pop

#pragma option push -b-
enum TauHTTPAccessType { atPreconfig, atDirect, atUseProxy };
#pragma option pop

class DELPHICLASS TauHTTPProxy;
class PASCALIMPLEMENTATION TauHTTPProxy : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	TauHTTPAccessType FAccessType;
	int FProxyPort;
	AnsiString FProxyServer;
	AnsiString FProxyBypass;
	AnsiString FProxyUsername;
	AnsiString FProxyPassword;
	bool __fastcall IsUseProxy(void);
	
public:
	__fastcall TauHTTPProxy(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property TauHTTPAccessType AccessType = {read=FAccessType, write=FAccessType, default=0};
	__property int ProxyPort = {read=FProxyPort, write=FProxyPort, default=8080};
	__property AnsiString ProxyServer = {read=FProxyServer, write=FProxyServer, stored=IsUseProxy};
	__property AnsiString ProxyBypass = {read=FProxyBypass, write=FProxyBypass, stored=IsUseProxy};
	__property AnsiString ProxyUsername = {read=FProxyUsername, write=FProxyUsername};
	__property AnsiString ProxyPassword = {read=FProxyPassword, write=FProxyPassword};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TauHTTPProxy(void) { }
	#pragma option pop
	
};


class DELPHICLASS TauHTTPRange;
class PASCALIMPLEMENTATION TauHTTPRange : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	unsigned FStartRange;
	unsigned FEndRange;
	
public:
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property unsigned StartRange = {read=FStartRange, write=FStartRange, default=0};
	__property unsigned EndRange = {read=FEndRange, write=FEndRange, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TauHTTPRange(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TauHTTPRange(void) : Classes::TPersistent() { }
	#pragma option pop
	
};


class DELPHICLASS TauHTTPTimeouts;
class PASCALIMPLEMENTATION TauHTTPTimeouts : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	unsigned FConnectTimeout;
	unsigned FReceiveTimeout;
	unsigned FSendTimeout;
	
public:
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property unsigned ConnectTimeout = {read=FConnectTimeout, write=FConnectTimeout, default=0};
	__property unsigned ReceiveTimeout = {read=FReceiveTimeout, write=FReceiveTimeout, default=0};
	__property unsigned SendTimeout = {read=FSendTimeout, write=FSendTimeout, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TauHTTPTimeouts(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TObject.Create */ inline __fastcall TauHTTPTimeouts(void) : Classes::TPersistent() { }
	#pragma option pop
	
};


class DELPHICLASS TauOutputFileAttributes;
class PASCALIMPLEMENTATION TauOutputFileAttributes : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	Auutils::TauFileAttributes FComplete;
	Auutils::TauFileAttributes FIncomplete;
	void __fastcall SetComplete(const Auutils::TauFileAttributes Value);
	void __fastcall SetIncomplete(const Auutils::TauFileAttributes Value);
	
protected:
	DYNAMIC void __fastcall AttributesChanged(void);
	
public:
	__fastcall TauOutputFileAttributes(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Auutils::TauFileAttributes Complete = {read=FComplete, write=SetComplete, default=1};
	__property Auutils::TauFileAttributes Incomplete = {read=FIncomplete, write=SetIncomplete, default=17
		};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TauOutputFileAttributes(void) { }
	#pragma option pop
	
};


class DELPHICLASS TauFileStream;
class PASCALIMPLEMENTATION TauFileStream : public Classes::THandleStream 
{
	typedef Classes::THandleStream inherited;
	
public:
	__fastcall TauFileStream(const AnsiString FileName, bool CreateNew, bool TestFileAttributes);
	__fastcall virtual ~TauFileStream(void);
};


typedef int TauBufferSize;

#pragma option push -b-
enum TauInternetOption { ioIgnoreCertificateInvalid, ioIgnoreCertificateDateInvalid, ioIgnoreUnknownCertificateAuthority, 
	ioIgnoreRedirectToHTTP, ioIgnoreRedirectToHTTPS, ioKeepConnection, ioNoAuthentication, ioNoAutoRedirect, 
	ioNoCookies };
#pragma option pop

typedef Set<TauInternetOption, ioIgnoreCertificateInvalid, ioNoCookies>  TauInternetOptions;

#pragma option push -b-
enum TauCacheOption { coAlwaysReload, coReloadIfNoExpireInformation, coReloadUpdatedObjects, coPragmaNoCache, 
	coNoCacheWrite, coCreateTempFilesIfCantCache, coUseCacheIfNetFail };
#pragma option pop

typedef Set<TauCacheOption, coAlwaysReload, coUseCacheIfNetFail>  TauCacheOptions;

class DELPHICLASS TauCustomHTTP;
class PASCALIMPLEMENTATION TauCustomHTTP : public TauLoginComponent 
{
	typedef TauLoginComponent inherited;
	
private:
	Classes::TStrings* FAddHeaders;
	AnsiString FAcceptTypes;
	AnsiString FAgent;
	AnsiString FOutputFileName;
	TauOutputFileAttributes* FOutputFileAttributes;
	AnsiString FURL;
	AnsiString FPostData;
	AnsiString FReferer;
	TauCacheOptions FCacheOptions;
	TauInternetOptions FInternetOptions;
	TauHTTPRange* FRange;
	TauHTTPTimeouts* FTimeouts;
	TauBufferSize FTransferBufferSize;
	TauHTTPPOSTMethod FPOSTMethod;
	TauHTTPRequestMethod FRequestMethod;
	TauHTTPProxy* FProxy;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -