-- GENERATED by C->Haskell Compiler, version 0.28.6 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}
module Codec.Archive.Foreign.Archive.Macros ( archiveVersionNumberMacro
                                            , archiveVersionOnlyString
                                            , archiveVersionStringMacro
                                            , archiveReadFormatCapsNone
                                            , archiveReadFormatCapsEncryptData
                                            , archiveReadFormatCapsEncryptMetadata
                                            , archiveMatchMTime
                                            , archiveMatchCTime
                                            , archiveMatchNewer
                                            , archiveMatchOlder
                                            , archiveMatchEqual
                                            , archiveExtractOwner
                                            , archiveExtractPerm
                                            , archiveExtractNoOverwrite
                                            , archiveExtractUnlink
                                            , archiveExtractACL
                                            , archiveExtractFFlags
                                            , archiveExtractXattr
                                            , archiveExtractSecureSymlinks
                                            , archiveExtractSecureNoDotDot
                                            , archiveExtractTime
                                            , archiveExtractNoAutodir
                                            , archiveExtractSparse
                                            , archiveExtractMacMetadata
                                            , archiveExtractNoHfsCompression
                                            , archiveExtractHfsCompressionForced
                                            , archiveExtractSecureNoAbsolutePaths
                                            , archiveExtractClearNoChangeFFlags
                                            , archiveExtractNoOverwriteNewer
                                            , archiveReadDiskRestoreATime
                                            , archiveReadDiskHonorNoDump
                                            , archiveReadDiskMacCopyFile
                                            , archiveReadDiskNoTraverseMounts
                                            , archiveReadDiskNoXattr
                                            , archiveReadDiskNoAcl
                                            , archiveReadDiskNoFFlags
                                            -- * Conversion functions
                                            , encryptionResult
                                            ) where



import Codec.Archive.Types
import Data.Bits (Bits (..))
import Foreign.C.Types



archiveVersionNumberMacro :: Int
archiveVersionNumberMacro :: Int
archiveVersionNumberMacro = Int
3004003
{-# LINE 48 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveVersionOnlyString :: String
archiveVersionOnlyString = "3.4.3"
{-# LINE 51 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveVersionStringMacro :: String
archiveVersionStringMacro :: String
archiveVersionStringMacro = String
"libarchive 3.4.3"
{-# LINE 54 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


-- Extraction flags
archiveExtractOwner :: Flags
archiveExtractOwner :: Flags
archiveExtractOwner = CInt -> Flags
Flags CInt
0x1
{-# LINE 58 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractPerm :: Flags
archiveExtractPerm :: Flags
archiveExtractPerm = CInt -> Flags
Flags CInt
0x2
{-# LINE 61 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractTime :: Flags
archiveExtractTime :: Flags
archiveExtractTime = CInt -> Flags
Flags CInt
0x4
{-# LINE 64 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractNoOverwrite :: Flags
archiveExtractNoOverwrite :: Flags
archiveExtractNoOverwrite = CInt -> Flags
Flags CInt
0x8
{-# LINE 67 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractUnlink :: Flags
archiveExtractUnlink :: Flags
archiveExtractUnlink = CInt -> Flags
Flags CInt
0x10
{-# LINE 70 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractACL :: Flags
archiveExtractACL :: Flags
archiveExtractACL = CInt -> Flags
Flags CInt
0x20
{-# LINE 73 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractFFlags :: Flags
archiveExtractFFlags :: Flags
archiveExtractFFlags = CInt -> Flags
Flags CInt
0x40
{-# LINE 76 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractXattr :: Flags
archiveExtractXattr :: Flags
archiveExtractXattr = CInt -> Flags
Flags CInt
0x80
{-# LINE 79 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractSecureSymlinks :: Flags
archiveExtractSecureSymlinks :: Flags
archiveExtractSecureSymlinks = CInt -> Flags
Flags CInt
0x100
{-# LINE 82 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractSecureNoDotDot :: Flags
archiveExtractSecureNoDotDot :: Flags
archiveExtractSecureNoDotDot = CInt -> Flags
Flags CInt
0x200
{-# LINE 85 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractNoAutodir :: Flags
archiveExtractNoAutodir :: Flags
archiveExtractNoAutodir = CInt -> Flags
Flags CInt
0x400
{-# LINE 88 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractNoOverwriteNewer :: Flags
archiveExtractNoOverwriteNewer :: Flags
archiveExtractNoOverwriteNewer = CInt -> Flags
Flags CInt
0x800
{-# LINE 91 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractSparse :: Flags
archiveExtractSparse :: Flags
archiveExtractSparse = CInt -> Flags
Flags CInt
0x1000
{-# LINE 94 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractMacMetadata :: Flags
archiveExtractMacMetadata :: Flags
archiveExtractMacMetadata = CInt -> Flags
Flags CInt
0x2000
{-# LINE 97 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractNoHfsCompression :: Flags
archiveExtractNoHfsCompression :: Flags
archiveExtractNoHfsCompression = CInt -> Flags
Flags CInt
0x4000
{-# LINE 100 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractHfsCompressionForced :: Flags
archiveExtractHfsCompressionForced :: Flags
archiveExtractHfsCompressionForced = CInt -> Flags
Flags CInt
0x8000
{-# LINE 103 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractSecureNoAbsolutePaths :: Flags
archiveExtractSecureNoAbsolutePaths :: Flags
archiveExtractSecureNoAbsolutePaths = CInt -> Flags
Flags CInt
0x10000
{-# LINE 106 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveExtractClearNoChangeFFlags :: Flags
archiveExtractClearNoChangeFFlags :: Flags
archiveExtractClearNoChangeFFlags = CInt -> Flags
Flags CInt
0x20000
{-# LINE 109 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


encryptionResult :: CInt -> ArchiveEncryption
encryptionResult :: CInt -> ArchiveEncryption
encryptionResult CInt
0                                                        = ArchiveEncryption
NoEncryption
encryptionResult CInt
1                                                        = ArchiveEncryption
HasEncryption
encryptionResult (-2) = ArchiveEncryption
EncryptionUnsupported
encryptionResult (-1)   = ArchiveEncryption
EncryptionUnknown
encryptionResult CInt
_                                                        = String -> ArchiveEncryption
forall a. HasCallStack => String -> a
error String
"Should not happen."

archiveReadFormatCapsNone :: ArchiveCapabilities
archiveReadFormatCapsNone :: ArchiveCapabilities
archiveReadFormatCapsNone = CInt -> ArchiveCapabilities
ArchiveCapabilities CInt
0
{-# LINE 119 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


(<<) :: Bits a => a -> Int -> a
a
m << :: a -> Int -> a
<< Int
n = a
m a -> Int -> a
forall a. Bits a => a -> Int -> a
`shift` Int
n

archiveReadFormatCapsEncryptData :: ArchiveCapabilities
archiveReadFormatCapsEncryptData :: ArchiveCapabilities
archiveReadFormatCapsEncryptData = CInt -> ArchiveCapabilities
ArchiveCapabilities (CInt
1 CInt -> Int -> CInt
forall a. Bits a => a -> Int -> a
<< Int
0)

archiveReadFormatCapsEncryptMetadata :: ArchiveCapabilities
archiveReadFormatCapsEncryptMetadata :: ArchiveCapabilities
archiveReadFormatCapsEncryptMetadata = CInt -> ArchiveCapabilities
ArchiveCapabilities (CInt
1 CInt -> Int -> CInt
forall a. Bits a => a -> Int -> a
<< Int
0)

archiveReadDiskRestoreATime :: ReadDiskFlags
archiveReadDiskRestoreATime :: ReadDiskFlags
archiveReadDiskRestoreATime = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x1
{-# LINE 131 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveReadDiskHonorNoDump :: ReadDiskFlags
archiveReadDiskHonorNoDump :: ReadDiskFlags
archiveReadDiskHonorNoDump = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x2
{-# LINE 134 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveReadDiskMacCopyFile :: ReadDiskFlags
archiveReadDiskMacCopyFile :: ReadDiskFlags
archiveReadDiskMacCopyFile = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x4
{-# LINE 137 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveReadDiskNoTraverseMounts :: ReadDiskFlags
archiveReadDiskNoTraverseMounts :: ReadDiskFlags
archiveReadDiskNoTraverseMounts = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x8
{-# LINE 140 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveReadDiskNoXattr :: ReadDiskFlags
archiveReadDiskNoXattr :: ReadDiskFlags
archiveReadDiskNoXattr = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x10
{-# LINE 143 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


-- | @since 2.1.1.0
archiveReadDiskNoAcl :: ReadDiskFlags
archiveReadDiskNoAcl :: ReadDiskFlags
archiveReadDiskNoAcl = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x20
{-# LINE 147 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


-- | @since 2.1.1.0
archiveReadDiskNoFFlags :: ReadDiskFlags
archiveReadDiskNoFFlags :: ReadDiskFlags
archiveReadDiskNoFFlags = CInt -> ReadDiskFlags
ReadDiskFlags CInt
0x40
{-# LINE 151 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveMatchMTime :: TimeFlag
archiveMatchMTime :: TimeFlag
archiveMatchMTime = CInt -> TimeFlag
TimeFlag CInt
0x100
{-# LINE 154 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveMatchCTime :: TimeFlag
archiveMatchCTime :: TimeFlag
archiveMatchCTime = CInt -> TimeFlag
TimeFlag CInt
0x200
{-# LINE 157 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveMatchNewer :: TimeFlag
archiveMatchNewer :: TimeFlag
archiveMatchNewer = CInt -> TimeFlag
TimeFlag CInt
0x1
{-# LINE 160 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveMatchOlder :: TimeFlag
archiveMatchOlder :: TimeFlag
archiveMatchOlder = CInt -> TimeFlag
TimeFlag CInt
0x2
{-# LINE 163 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}


archiveMatchEqual :: TimeFlag
archiveMatchEqual :: TimeFlag
archiveMatchEqual = CInt -> TimeFlag
TimeFlag CInt
0x10
{-# LINE 166 "src/Codec/Archive/Foreign/Archive/Macros.chs" #-}