extract.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef _RAR_EXTRACT_
  2. #define _RAR_EXTRACT_
  3. enum EXTRACT_ARC_CODE {EXTRACT_ARC_NEXT,EXTRACT_ARC_REPEAT};
  4. class CmdExtract
  5. {
  6. private:
  7. EXTRACT_ARC_CODE ExtractArchive(CommandData *Cmd);
  8. RarTime StartTime; // time when extraction started
  9. ComprDataIO DataIO;
  10. Unpack *Unp;
  11. unsigned long TotalFileCount;
  12. unsigned long FileCount;
  13. unsigned long MatchedArgs;
  14. bool FirstFile;
  15. bool AllMatchesExact;
  16. bool ReconstructDone;
  17. // If any non-zero solid file was successfully unpacked before current.
  18. // If true and if current encrypted file is broken, obviously
  19. // the password is correct and we can report broken CRC without
  20. // any wrong password hints.
  21. bool AnySolidDataUnpackedWell;
  22. char ArcName[NM];
  23. wchar ArcNameW[NM];
  24. wchar Password[MAXPASSWORD];
  25. bool PasswordAll;
  26. bool PrevExtracted;
  27. char DestFileName[NM];
  28. wchar DestFileNameW[NM];
  29. bool PasswordCancelled;
  30. public:
  31. CmdExtract();
  32. ~CmdExtract();
  33. void DoExtract(CommandData *Cmd);
  34. void ExtractArchiveInit(CommandData *Cmd,Archive &Arc);
  35. bool ExtractCurrentFile(CommandData *Cmd,Archive &Arc,size_t HeaderSize,
  36. bool &Repeat);
  37. static void UnstoreFile(ComprDataIO &DataIO,int64 DestUnpSize);
  38. bool SignatureFound;
  39. };
  40. #endif