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