HandlerOut.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // HandlerOut.h
  2. #ifndef __HANDLER_OUT_H
  3. #define __HANDLER_OUT_H
  4. #include "../../Common/MethodProps.h"
  5. #include "../../Common/CreateCoder.h"
  6. namespace NArchive {
  7. struct COneMethodInfo
  8. {
  9. CObjectVector<CProp> Properties;
  10. UString MethodName;
  11. };
  12. class COutHandler
  13. {
  14. public:
  15. HRESULT SetProperty(const wchar_t *name, const PROPVARIANT &value);
  16. HRESULT SetSolidSettings(const UString &s);
  17. HRESULT SetSolidSettings(const PROPVARIANT &value);
  18. #ifdef COMPRESS_MT
  19. UInt32 _numThreads;
  20. #endif
  21. UInt32 _crcSize;
  22. CObjectVector<COneMethodInfo> _methods;
  23. bool _removeSfxBlock;
  24. UInt64 _numSolidFiles;
  25. UInt64 _numSolidBytes;
  26. bool _numSolidBytesDefined;
  27. bool _solidExtension;
  28. bool _compressHeaders;
  29. bool _encryptHeaders;
  30. bool WriteModified;
  31. bool WriteCreated;
  32. bool WriteAccessed;
  33. bool _autoFilter;
  34. UInt32 _level;
  35. bool _volumeMode;
  36. HRESULT SetParam(COneMethodInfo &oneMethodInfo, const UString &name, const UString &value);
  37. HRESULT SetParams(COneMethodInfo &oneMethodInfo, const UString &srcString);
  38. void SetCompressionMethod2(COneMethodInfo &oneMethodInfo
  39. #ifdef COMPRESS_MT
  40. , UInt32 numThreads
  41. #endif
  42. );
  43. void InitSolidFiles() { _numSolidFiles = (UInt64)(Int64)(-1); }
  44. void InitSolidSize() { _numSolidBytes = (UInt64)(Int64)(-1); }
  45. void InitSolid()
  46. {
  47. InitSolidFiles();
  48. InitSolidSize();
  49. _solidExtension = false;
  50. _numSolidBytesDefined = false;
  51. }
  52. void Init();
  53. COutHandler() { Init(); }
  54. void BeforeSetProperty();
  55. UInt32 minNumber;
  56. UInt32 numProcessors;
  57. UInt32 mainDicSize;
  58. UInt32 mainDicMethodIndex;
  59. DECL_EXTERNAL_CODECS_VARS
  60. };
  61. }
  62. #endif