misc/libphysfs/lzma/CPP/7zip/UI/Common/UpdateAction.h
changeset 13886 99b265e0d1d0
parent 13885 5f819b90d479
child 13887 b172a5d40eee
equal deleted inserted replaced
13885:5f819b90d479 13886:99b265e0d1d0
     1 // UpdateAction.h
       
     2 
       
     3 #ifndef __UPDATE_ACTION_H
       
     4 #define __UPDATE_ACTION_H
       
     5 
       
     6 namespace NUpdateArchive {
       
     7 
       
     8   namespace NPairState 
       
     9   {
       
    10     const int kNumValues = 7;
       
    11     enum EEnum
       
    12     {
       
    13       kNotMasked = 0,
       
    14       kOnlyInArchive,
       
    15       kOnlyOnDisk,
       
    16       kNewInArchive,
       
    17       kOldInArchive,
       
    18       kSameFiles,
       
    19       kUnknowNewerFiles
       
    20     };
       
    21   }
       
    22   namespace NPairAction
       
    23   {
       
    24     enum EEnum
       
    25     {
       
    26       kIgnore = 0,
       
    27       kCopy,
       
    28       kCompress,
       
    29       kCompressAsAnti
       
    30     };
       
    31   }
       
    32   struct CActionSet
       
    33   {
       
    34     NPairAction::EEnum StateActions[NPairState::kNumValues];
       
    35     bool NeedScanning() const
       
    36     {
       
    37       int i;
       
    38       for (i = 0; i < NPairState::kNumValues; i++)
       
    39         if (StateActions[i] == NPairAction::kCompress)
       
    40           return true;
       
    41       for (i = 1; i < NPairState::kNumValues; i++)
       
    42         if (StateActions[i] != NPairAction::kIgnore)
       
    43           return true;
       
    44       return false;
       
    45     }
       
    46   };
       
    47   extern const CActionSet kAddActionSet;
       
    48   extern const CActionSet kUpdateActionSet;
       
    49   extern const CActionSet kFreshActionSet;
       
    50   extern const CActionSet kSynchronizeActionSet;
       
    51   extern const CActionSet kDeleteActionSet;
       
    52 };
       
    53 
       
    54 
       
    55 #endif
       
    56 
       
    57