ZipRegistry.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // ZipRegistry.h
  2. #ifndef __ZIPREGISTRY_H
  3. #define __ZIPREGISTRY_H
  4. #include "Common/MyString.h"
  5. #include "Common/Types.h"
  6. #include "ExtractMode.h"
  7. namespace NExtract
  8. {
  9. struct CInfo
  10. {
  11. NPathMode::EEnum PathMode;
  12. NOverwriteMode::EEnum OverwriteMode;
  13. UStringVector Paths;
  14. bool ShowPassword;
  15. };
  16. }
  17. namespace NCompression {
  18. struct CFormatOptions
  19. {
  20. CSysString FormatID;
  21. UString Options;
  22. UString Method;
  23. UString EncryptionMethod;
  24. UInt32 Level;
  25. UInt32 Dictionary;
  26. UInt32 Order;
  27. UInt32 BlockLogSize;
  28. UInt32 NumThreads;
  29. void ResetForLevelChange()
  30. {
  31. BlockLogSize = NumThreads = Level = Dictionary = Order = UInt32(-1);
  32. Method.Empty();
  33. // EncryptionMethod.Empty();
  34. // Options.Empty();
  35. }
  36. CFormatOptions() { ResetForLevelChange(); }
  37. };
  38. struct CInfo
  39. {
  40. UStringVector HistoryArchives;
  41. UInt32 Level;
  42. UString ArchiveType;
  43. CObjectVector<CFormatOptions> FormatOptionsVector;
  44. bool ShowPassword;
  45. bool EncryptHeaders;
  46. };
  47. }
  48. namespace NWorkDir{
  49. namespace NMode
  50. {
  51. enum EEnum
  52. {
  53. kSystem,
  54. kCurrent,
  55. kSpecified
  56. };
  57. }
  58. struct CInfo
  59. {
  60. NMode::EEnum Mode;
  61. UString Path;
  62. bool ForRemovableOnly;
  63. void SetForRemovableOnlyDefault() { ForRemovableOnly = true; }
  64. void SetDefault()
  65. {
  66. Mode = NMode::kSystem;
  67. Path.Empty();
  68. SetForRemovableOnlyDefault();
  69. }
  70. };
  71. }
  72. void SaveExtractionInfo(const NExtract::CInfo &info);
  73. void ReadExtractionInfo(NExtract::CInfo &info);
  74. void SaveCompressionInfo(const NCompression::CInfo &info);
  75. void ReadCompressionInfo(NCompression::CInfo &info);
  76. void SaveWorkDirInfo(const NWorkDir::CInfo &info);
  77. void ReadWorkDirInfo(NWorkDir::CInfo &info);
  78. void SaveCascadedMenu(bool enabled);
  79. bool ReadCascadedMenu();
  80. void SaveContextMenuStatus(UInt32 value);
  81. bool ReadContextMenuStatus(UInt32 &value);
  82. #endif