"Fossies" - the Fresh Open Source Software Archive

Member "unrar/options.hpp" (4 May 2022, 5558 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 "options.hpp" see the Fossies "Dox" file reference documentation.

    1 #ifndef _RAR_OPTIONS_
    2 #define _RAR_OPTIONS_
    3 
    4 #define DEFAULT_RECOVERY     -3
    5 
    6 #define DEFAULT_RECVOLUMES  -10
    7 
    8 #define VOLSIZE_AUTO   INT64NDF // Automatically detect the volume size.
    9 
   10 enum PATH_EXCL_MODE {
   11   EXCL_UNCHANGED=0,    // Process paths as is (default).
   12   EXCL_SKIPWHOLEPATH,  // -ep  (exclude the path completely)
   13   EXCL_BASEPATH,       // -ep1 (exclude the base part of path)
   14   EXCL_SAVEFULLPATH,   // -ep2 (the full path without the disk letter)
   15   EXCL_ABSPATH         // -ep3 (the full path with the disk letter)
   16 };
   17 
   18 enum {SOLID_NONE=0,SOLID_NORMAL=1,SOLID_COUNT=2,SOLID_FILEEXT=4,
   19       SOLID_VOLUME_DEPENDENT=8,SOLID_VOLUME_INDEPENDENT=16};
   20 
   21 enum {ARCTIME_NONE=0,ARCTIME_KEEP,ARCTIME_LATEST};
   22 
   23 enum EXTTIME_MODE {
   24   EXTTIME_NONE=0,EXTTIME_1S,EXTTIME_MAX
   25 };
   26 
   27 enum {NAMES_ORIGINALCASE=0,NAMES_UPPERCASE,NAMES_LOWERCASE};
   28 
   29 enum MESSAGE_TYPE {MSG_STDOUT=0,MSG_STDERR,MSG_ERRONLY,MSG_NULL};
   30 
   31 enum RECURSE_MODE 
   32 {
   33   RECURSE_NONE=0,    // no recurse switches
   34   RECURSE_DISABLE,   // switch -r-
   35   RECURSE_ALWAYS,    // switch -r
   36   RECURSE_WILDCARDS, // switch -r0
   37 };
   38 
   39 enum OVERWRITE_MODE 
   40 {
   41   OVERWRITE_DEFAULT=0, // Ask when extracting, silently overwrite when archiving.
   42   OVERWRITE_ALL,
   43   OVERWRITE_NONE,
   44   OVERWRITE_AUTORENAME,
   45   OVERWRITE_FORCE_ASK
   46 };
   47 
   48 
   49 enum QOPEN_MODE { QOPEN_NONE, QOPEN_AUTO, QOPEN_ALWAYS };
   50 
   51 enum RAR_CHARSET { RCH_DEFAULT=0,RCH_ANSI,RCH_OEM,RCH_UNICODE,RCH_UTF8 };
   52 
   53 #define     MAX_FILTER_TYPES           16
   54 enum FilterState {FILTER_DEFAULT=0,FILTER_AUTO,FILTER_FORCE,FILTER_DISABLE};
   55 
   56 
   57 enum SAVECOPY_MODE {
   58   SAVECOPY_NONE=0, SAVECOPY_SILENT, SAVECOPY_LIST, SAVECOPY_LISTEXIT,
   59   SAVECOPY_DUPLISTEXIT
   60 };
   61 
   62 enum APPENDARCNAME_MODE
   63 {
   64   APPENDARCNAME_NONE=0,APPENDARCNAME_DESTPATH,APPENDARCNAME_OWNSUBDIR,
   65   APPENDARCNAME_OWNDIR
   66 };
   67 
   68 enum POWER_MODE {
   69   POWERMODE_KEEP=0,POWERMODE_OFF,POWERMODE_HIBERNATE,POWERMODE_SLEEP,
   70   POWERMODE_RESTART
   71 };
   72 
   73 
   74 // Need "forced off" state to turn off sound in GUI command line.
   75 enum SOUND_NOTIFY_MODE {SOUND_NOTIFY_DEFAULT=0,SOUND_NOTIFY_ON,SOUND_NOTIFY_OFF};
   76 
   77 struct FilterMode
   78 {
   79   FilterState State;
   80   int Param1;
   81   int Param2;
   82 };
   83 
   84 #define MAX_GENERATE_MASK  128
   85 
   86 
   87 class RAROptions
   88 {
   89   public:
   90     RAROptions();
   91     ~RAROptions();
   92     void Init();
   93 
   94     uint ExclFileAttr;
   95     uint InclFileAttr;
   96 
   97     // We handle -ed and -e+d with special flags instead of attribute mask,
   98     // so it works with both Windows and Unix archives.
   99     bool ExclDir;
  100     bool InclDir;
  101 
  102     bool InclAttrSet;
  103     size_t WinSize;
  104     wchar TempPath[NM];
  105     wchar SFXModule[NM];
  106 
  107 #ifdef USE_QOPEN
  108     QOPEN_MODE QOpenMode;
  109 #endif
  110 
  111     bool ConfigDisabled; // Switch -cfg-.
  112     wchar ExtrPath[NM];
  113     wchar CommentFile[NM];
  114     RAR_CHARSET CommentCharset;
  115     RAR_CHARSET FilelistCharset;
  116     RAR_CHARSET ErrlogCharset;
  117     RAR_CHARSET RedirectCharset;
  118 
  119     wchar ArcPath[NM]; // For -ap<path>.
  120     wchar ExclArcPath[NM]; // For -ep4<path> switch.
  121     SecPassword Password;
  122     bool EncryptHeaders;
  123     bool SkipEncrypted;
  124     
  125     bool ManualPassword; // Password entered manually during operation, might need to clean for next archive.
  126 
  127     wchar LogName[NM];
  128     MESSAGE_TYPE MsgStream;
  129     SOUND_NOTIFY_MODE Sound;
  130     OVERWRITE_MODE Overwrite;
  131     int Method;
  132     HASH_TYPE HashType;
  133     int Recovery;
  134     int RecVolNumber;
  135     bool DisablePercentage;
  136     bool DisableCopyright;
  137     bool DisableDone;
  138     bool DisableNames;
  139     bool PrintVersion;
  140     int Solid;
  141     int SolidCount;
  142     bool ClearArc;
  143     bool AddArcOnly;
  144     bool DisableComment;
  145     bool FreshFiles;
  146     bool UpdateFiles;
  147     PATH_EXCL_MODE ExclPath;
  148     RECURSE_MODE Recurse;
  149     int64 VolSize;
  150     Array<int64> NextVolSizes;
  151     uint CurVolNum;
  152     bool AllYes;
  153     bool VerboseOutput; // -iv, display verbose output, used only in "WinRAR t" now.
  154     bool DisableSortSolid;
  155     int ArcTime;
  156     int ConvertNames;
  157     bool ProcessOwners;
  158     bool SaveSymLinks;
  159     bool SaveHardLinks;
  160     bool AbsoluteLinks;
  161     int Priority;
  162     int SleepTime;
  163     bool KeepBroken;
  164     bool OpenShared;
  165     bool DeleteFiles;
  166 
  167 #ifdef _WIN_ALL
  168     bool AllowIncompatNames; // Allow names with trailing dots and spaces.
  169 #endif
  170 
  171 
  172 #ifndef SFX_MODULE
  173     bool GenerateArcName;
  174     wchar GenerateMask[MAX_GENERATE_MASK];
  175     wchar DefGenerateMask[MAX_GENERATE_MASK];
  176 #endif
  177     bool SyncFiles;
  178     bool ProcessEA;
  179     bool SaveStreams;
  180     bool SetCompressedAttr;
  181     bool IgnoreGeneralAttr;
  182     RarTime FileMtimeBefore,FileCtimeBefore,FileAtimeBefore;
  183     bool FileMtimeBeforeOR,FileCtimeBeforeOR,FileAtimeBeforeOR;
  184     RarTime FileMtimeAfter,FileCtimeAfter,FileAtimeAfter;
  185     bool FileMtimeAfterOR,FileCtimeAfterOR,FileAtimeAfterOR;
  186     int64 FileSizeLess;
  187     int64 FileSizeMore;
  188     bool Lock;
  189     bool Test;
  190     bool VolumePause;
  191     FilterMode FilterModes[MAX_FILTER_TYPES];
  192     wchar EmailTo[NM];
  193     uint VersionControl;
  194     APPENDARCNAME_MODE AppendArcNameToPath;
  195     POWER_MODE Shutdown;
  196     EXTTIME_MODE xmtime; // Extended time modes (time precision to store).
  197     EXTTIME_MODE xctime;
  198     EXTTIME_MODE xatime;
  199     bool PreserveAtime;
  200 
  201     // Read data from stdin and store in archive under a name specified here
  202     // when archiving. Read an archive from stdin if any non-empty string
  203     // is specified here when extracting.
  204     wchar UseStdin[NM];
  205 
  206     uint Threads; // We use it to init hash even if RAR_SMP is not defined.
  207 
  208 
  209 
  210 
  211 
  212 #ifdef RARDLL
  213     wchar DllDestName[NM];
  214     int DllOpMode;
  215     int DllError;
  216     LPARAM UserData;
  217     UNRARCALLBACK Callback;
  218     CHANGEVOLPROC ChangeVolProc;
  219     PROCESSDATAPROC ProcessDataProc;
  220 #endif
  221 };
  222 #endif