webcopy.hpp

来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 374 行 · 第 1/2 页

HPP
374
字号
// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Webcopy.pas' rev: 10.00

#ifndef WebcopyHPP
#define WebcopyHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Wininet.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Shellapi.hpp>	// Pascal unit
#include <Wcbase64.hpp>	// Pascal unit
#include <Wclogin.hpp>	// Pascal unit

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

#pragma link "wininet.lib"


namespace Webcopy
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TWebCopyAuthentication { waNever, waAlways, waAuto };
#pragma option pop

class DELPHICLASS TWCopyThread;
class DELPHICLASS TWebCopy;
class DELPHICLASS TWebCopyItems;
class DELPHICLASS TWebCopyItem;
class PASCALIMPLEMENTATION TWebCopyItems : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	TWebCopyItem* operator[](int Index) { return Items[Index]; }
	
private:
	Classes::TComponent* FOwner;
	HIDESBASE TWebCopyItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, TWebCopyItem* Value);
	int __fastcall GetActiveItems(void);
	int __fastcall GetSuccessCount(void);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	
public:
	__fastcall TWebCopyItems(Classes::TComponent* AOwner);
	HIDESBASE TWebCopyItem* __fastcall Add(void);
	HIDESBASE TWebCopyItem* __fastcall Insert(int Index);
	__property TWebCopyItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	__property int ActiveItems = {read=GetActiveItems, nodefault};
	__property int SuccessCount = {read=GetSuccessCount, nodefault};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TWebCopyItems(void) { }
	#pragma option pop
	
};


typedef void __fastcall (__closure *TWebCopyError)(System::TObject* Sender, int ErrorCode);

typedef void __fastcall (__closure *TWebCopyErrorInfo)(System::TObject* Sender, int ErrorCode, AnsiString ErrorInfo);

typedef void __fastcall (__closure *TWebCopyThreadDone)(System::TObject* Sender);

typedef void __fastcall (__closure *TWebCopyFileDone)(System::TObject* Sender, int idx);

typedef void __fastcall (__closure *TWebCopyFileStart)(System::TObject* Sender, int idx);

typedef void __fastcall (__closure *TWebCopyConnectError)(System::TObject* Sender);

typedef void __fastcall (__closure *TWebCopyURLNotFound)(System::TObject* Sender, AnsiString url);

typedef void __fastcall (__closure *TWebCopyCancel)(System::TObject* Sender);

typedef void __fastcall (__closure *TWebCopyOverwrite)(System::TObject* Sender, AnsiString tgtfile, bool &allow);

typedef void __fastcall (__closure *TWebCopyProgress)(System::TObject* Sender, int fileidx, unsigned size, unsigned totsize);

typedef void __fastcall (__closure *TWebCopyBeforeDialogShow)(System::TObject* Sender, Forms::TForm* ADialog);

typedef void __fastcall (__closure *TWebCopyNoNewFile)(System::TObject* Sender, AnsiString tgtfile, System::TDateTime curdate, System::TDateTime newdate);

typedef void __fastcall (__closure *TWebCopyFileDateCheck)(System::TObject* Sender, int idx, System::TDateTime newdate, bool &allow);

typedef void __fastcall (__closure *TWebRemoveFileDone)(System::TObject* Sender, int idx);

typedef void __fastcall (__closure *TWebRemoveFileFailed)(System::TObject* Sender, int idx);

#pragma option push -b-
enum TWebCopyHTTPCommand { hcPost, hcPut };
#pragma option pop

class PASCALIMPLEMENTATION TWebCopy : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
private:
	bool FAlwaysOnTop;
	int FFileNum;
	bool FCancelled;
	Forms::TForm* FForm;
	bool FFormClosed;
	Comctrls::TProgressBar* FProgress;
	Stdctrls::TLabel* FFileLbl;
	Stdctrls::TLabel* FSizeLbl;
	Stdctrls::TLabel* FRateLbl;
	Stdctrls::TLabel* FTimeLbl;
	Stdctrls::TButton* FCancelBtn;
	Stdctrls::TButton* FBtnShowFile;
	Stdctrls::TButton* FBtnShowFolder;
	Comctrls::TAnimate* FAnim;
	AnsiString FLastFile;
	AnsiString FLastDir;
	AnsiString FDlgCaption;
	AnsiString FDlgUpload;
	AnsiString FFileLabel;
	AnsiString FProgressLabel;
	AnsiString FRateLabel;
	AnsiString FTimeLabel;
	AnsiString FProxy;
	AnsiString FProxyUserID;
	AnsiString FProxyPassword;
	TWebCopyItems* FItems;
	void *FHinternet;
	TWebCopyError FOnError;
	TWebCopyErrorInfo FOnErrorInfo;
	TWebCopyThreadDone FOnCopyDone;
	TWebCopyFileDone FOnFileDone;
	TWebCopyFileStart FOnFileStart;
	TWebCopyConnectError FOnConnectError;
	TWebCopyURLNotFound FOnURLNotFound;
	TWebCopyCancel FOnCopyCancel;
	TWebCopyOverwrite FOnCopyOverwrite;
	TWebCopyProgress FOnCopyProgress;
	TWebCopyBeforeDialogShow FOnBeforeDialogShow;
	bool FShowDialog;
	AnsiString FFileOfLabel;
	AnsiString FFromServerLabel;
	AnsiString FToServerLabel;
	bool FShowOpenFolder;
	bool FShowOpenFile;
	bool FFTPPassive;
	bool FShowTime;
	bool FShowCompletion;
	bool FShowServer;
	AnsiString FDlgCompleted;
	AnsiString FDlgDwnload;
	AnsiString FDlgCopying;
	bool FCopyCompleted;
	TWebCopyNoNewFile FOnNoNewFile;
	AnsiString FDlgCancel;
	AnsiString FDlgClose;
	AnsiString FDlgOpenFolder;
	AnsiString FDlgOpenFile;
	bool FKeepAlive;
	TWebCopyFileDateCheck FOnFileDateCheck;
	bool FShowFileName;
	void *FFTPconnect;
	AnsiString FPrevConnect;
	AnsiString FPrevTarget;
	bool FShowDialogOnTop;
	TWebRemoveFileDone FOnRemovedFile;
	TWebRemoveFileFailed FOnRemovedFileFailed;
	bool __fastcall HttpGetFile(int idx, AnsiString url, AnsiString tgtdir, AnsiString tgtfn, bool UseDate, System::TDateTime &FileDate, bool &NoNew, TWebCopyAuthentication Auth, AnsiString UserId, AnsiString Password);
	bool __fastcall HttpPutFile(AnsiString url, AnsiString tgtdir, AnsiString tgtfn, TWebCopyHTTPCommand HttpCommand);
	bool __fastcall FileGetFile(int idx, AnsiString FUserid, AnsiString FPassword, AnsiString FHost, int FPort, AnsiString url, AnsiString tgtdir, AnsiString tgtfn, bool UseDate, System::TDateTime &FileDate, bool &NoNew);

⌨️ 快捷键说明

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