"Fossies" - the Fresh Open Source Software Archive

Member "unrar/extract.hpp" (4 May 2022, 2159 Bytes) of package /linux/misc/unrarsrc-6.1.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "extract.hpp" see the Fossies "Dox" file reference documentation.

    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();
   10     bool ExtractFileCopy(File &New,wchar *ArcName,wchar *NameNew,wchar *NameExisting,size_t NameExistingSize);
   11     void ExtrPrepareName(Archive &Arc,const wchar *ArcFileName,wchar *DestName,size_t DestSize);
   12 #ifdef RARDLL
   13     bool ExtrDllGetPassword();
   14 #else
   15     bool ExtrGetPassword(Archive &Arc,const wchar *ArcFileName);
   16 #endif
   17 #if defined(_WIN_ALL) && !defined(SFX_MODULE)
   18     void ConvertDosPassword(Archive &Arc,SecPassword &DestPwd);
   19 #endif
   20     void ExtrCreateDir(Archive &Arc,const wchar *ArcFileName);
   21     bool ExtrCreateFile(Archive &Arc,File &CurFile);
   22     bool CheckUnpVer(Archive &Arc,const wchar *ArcFileName);
   23 #ifndef SFX_MODULE
   24     bool DetectStartVolume(const wchar *VolName,bool NewNumbering);
   25     void GetFirstVolIfFullSet(const wchar *SrcName,bool NewNumbering,wchar *DestName,size_t DestSize);
   26 #endif
   27 
   28     RarTime StartTime; // Time when extraction started.
   29 
   30     CommandData *Cmd;
   31 
   32     ComprDataIO DataIO;
   33     Unpack *Unp;
   34     unsigned long TotalFileCount;
   35 
   36     unsigned long FileCount;
   37     unsigned long MatchedArgs;
   38     bool FirstFile;
   39     bool AllMatchesExact;
   40     bool ReconstructDone;
   41     bool UseExactVolName;
   42 
   43     // If any non-zero solid file was successfully unpacked before current.
   44     // If true and if current encrypted file is broken, obviously
   45     // the password is correct and we can report broken CRC without
   46     // any wrong password hints.
   47     bool AnySolidDataUnpackedWell;
   48 
   49     wchar ArcName[NM];
   50 
   51     bool GlobalPassword;
   52     bool PrevProcessed; // If previous file was successfully extracted or tested.
   53     wchar DestFileName[NM];
   54     bool PasswordCancelled;
   55 #if defined(_WIN_ALL) && !defined(SFX_MODULE) && !defined(SILENT)
   56     bool Fat32,NotFat32;
   57 #endif
   58   public:
   59     CmdExtract(CommandData *Cmd);
   60     ~CmdExtract();
   61     void DoExtract();
   62     void ExtractArchiveInit(Archive &Arc);
   63     bool ExtractCurrentFile(Archive &Arc,size_t HeaderSize,bool &Repeat);
   64     static void UnstoreFile(ComprDataIO &DataIO,int64 DestUnpSize);
   65 };
   66 
   67 #endif