| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- //---------------------------------------------------------------------------
- #ifndef CopyParamH
- #define CopyParamH
- #include "FileMasks.h"
- #include "RemoteFiles.h"
- //---------------------------------------------------------------------------
- // When adding new options, mind TCopyParamType::GetLogStr()
- enum TOperationSide { osLocal, osRemote, osCurrent };
- enum TFileNameCase { ncNoChange, ncUpperCase, ncLowerCase, ncFirstUpperCase, ncLowerCaseShort };
- // TScript::OptionProc depend on the order
- enum TTransferMode { tmBinary, tmAscii, tmAutomatic };
- enum TResumeSupport { rsOn, rsSmart, rsOff };
- class THierarchicalStorage;
- //---------------------------------------------------------------------------
- class TCopyParamType {
- private:
- TFileMasks FAsciiFileMask;
- TFileNameCase FFileNameCase;
- bool FPreserveReadOnly;
- bool FPreserveTime;
- TRights FRights;
- TTransferMode FTransferMode;
- bool FAddXToDirectories;
- bool FPreserveRights;
- TResumeSupport FResumeSupport;
- __int64 FResumeThreshold;
- AnsiString __fastcall GetLogStr() const;
- bool FReplaceInvalidChars;
- AnsiString FLocalInvalidChars;
- bool FCalculateSize;
- AnsiString FFileMask;
- TFileMasks FExcludeFileMask;
- bool FNegativeExclude;
- bool FClearArchive;
- public:
- __fastcall TCopyParamType();
- __fastcall TCopyParamType(const TCopyParamType & Source);
- virtual __fastcall ~TCopyParamType();
- TCopyParamType & __fastcall operator =(const TCopyParamType & rhp);
- virtual void __fastcall Assign(const TCopyParamType * Source);
- virtual void __fastcall Default();
- AnsiString __fastcall ChangeFileName(AnsiString FileName,
- TOperationSide Side, bool FirstLevel) const;
- int __fastcall LocalFileAttrs(const TRights & Rights) const;
- TRights __fastcall RemoteFileRights(int Attrs) const;
- bool __fastcall UseAsciiTransfer(AnsiString FileName, TOperationSide Side) const;
- bool __fastcall AllowResume(__int64 Size) const;
- AnsiString __fastcall ValidLocalFileName(AnsiString FileName) const;
- bool __fastcall AllowTransfer(AnsiString FileName, TOperationSide Side) const;
- void __fastcall Load(THierarchicalStorage * Storage);
- void __fastcall Save(THierarchicalStorage * Storage) const;
- AnsiString __fastcall GetInfoStr(AnsiString Separator) const;
- bool __fastcall operator==(const TCopyParamType & rhp) const;
- __property TFileMasks AsciiFileMask = { read = FAsciiFileMask, write = FAsciiFileMask };
- __property TFileNameCase FileNameCase = { read = FFileNameCase, write = FFileNameCase };
- __property bool PreserveReadOnly = { read = FPreserveReadOnly, write = FPreserveReadOnly };
- __property bool PreserveTime = { read = FPreserveTime, write = FPreserveTime };
- __property TRights Rights = { read = FRights, write = FRights };
- __property TTransferMode TransferMode = { read = FTransferMode, write = FTransferMode };
- __property AnsiString LogStr = { read=GetLogStr };
- __property bool AddXToDirectories = { read=FAddXToDirectories, write=FAddXToDirectories };
- __property bool PreserveRights = { read = FPreserveRights, write = FPreserveRights };
- __property TResumeSupport ResumeSupport = { read = FResumeSupport, write = FResumeSupport };
- __property __int64 ResumeThreshold = { read = FResumeThreshold, write = FResumeThreshold };
- __property bool ReplaceInvalidChars = { read = FReplaceInvalidChars, write = FReplaceInvalidChars };
- __property AnsiString LocalInvalidChars = { read = FLocalInvalidChars, write = FLocalInvalidChars };
- __property bool CalculateSize = { read = FCalculateSize, write = FCalculateSize };
- __property AnsiString FileMask = { read = FFileMask, write = FFileMask };
- __property TFileMasks ExcludeFileMask = { read = FExcludeFileMask, write = FExcludeFileMask };
- __property bool NegativeExclude = { read = FNegativeExclude, write = FNegativeExclude };
- __property bool ClearArchive = { read = FClearArchive, write = FClearArchive };
- };
- //---------------------------------------------------------------------------
- #endif
|