module System.Posix.PAM.Types where
import Foreign.C
import Foreign.Ptr
data PamMessage = PamMessage { PamMessage -> String
pmString :: String
, PamMessage -> PamStyle
pmStyle :: PamStyle
}
deriving (Int -> PamMessage -> ShowS
[PamMessage] -> ShowS
PamMessage -> String
(Int -> PamMessage -> ShowS)
-> (PamMessage -> String)
-> ([PamMessage] -> ShowS)
-> Show PamMessage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamMessage] -> ShowS
$cshowList :: [PamMessage] -> ShowS
show :: PamMessage -> String
$cshow :: PamMessage -> String
showsPrec :: Int -> PamMessage -> ShowS
$cshowsPrec :: Int -> PamMessage -> ShowS
Show, PamMessage -> PamMessage -> Bool
(PamMessage -> PamMessage -> Bool)
-> (PamMessage -> PamMessage -> Bool) -> Eq PamMessage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamMessage -> PamMessage -> Bool
$c/= :: PamMessage -> PamMessage -> Bool
== :: PamMessage -> PamMessage -> Bool
$c== :: PamMessage -> PamMessage -> Bool
Eq)
data PamStyle = PamPromptEchoOff
| PamPromptEchoOn
| PamErrorMsg
| PamTextInfo
deriving (Int -> PamStyle -> ShowS
[PamStyle] -> ShowS
PamStyle -> String
(Int -> PamStyle -> ShowS)
-> (PamStyle -> String) -> ([PamStyle] -> ShowS) -> Show PamStyle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamStyle] -> ShowS
$cshowList :: [PamStyle] -> ShowS
show :: PamStyle -> String
$cshow :: PamStyle -> String
showsPrec :: Int -> PamStyle -> ShowS
$cshowsPrec :: Int -> PamStyle -> ShowS
Show, PamStyle -> PamStyle -> Bool
(PamStyle -> PamStyle -> Bool)
-> (PamStyle -> PamStyle -> Bool) -> Eq PamStyle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamStyle -> PamStyle -> Bool
$c/= :: PamStyle -> PamStyle -> Bool
== :: PamStyle -> PamStyle -> Bool
$c== :: PamStyle -> PamStyle -> Bool
Eq)
data PamResponse = PamResponse String
deriving (Int -> PamResponse -> ShowS
[PamResponse] -> ShowS
PamResponse -> String
(Int -> PamResponse -> ShowS)
-> (PamResponse -> String)
-> ([PamResponse] -> ShowS)
-> Show PamResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamResponse] -> ShowS
$cshowList :: [PamResponse] -> ShowS
show :: PamResponse -> String
$cshow :: PamResponse -> String
showsPrec :: Int -> PamResponse -> ShowS
$cshowsPrec :: Int -> PamResponse -> ShowS
Show, PamResponse -> PamResponse -> Bool
(PamResponse -> PamResponse -> Bool)
-> (PamResponse -> PamResponse -> Bool) -> Eq PamResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamResponse -> PamResponse -> Bool
$c/= :: PamResponse -> PamResponse -> Bool
== :: PamResponse -> PamResponse -> Bool
$c== :: PamResponse -> PamResponse -> Bool
Eq)
data PamRetCode = PamSuccess
| PamRetCode Int
deriving (Int -> PamRetCode -> ShowS
[PamRetCode] -> ShowS
PamRetCode -> String
(Int -> PamRetCode -> ShowS)
-> (PamRetCode -> String)
-> ([PamRetCode] -> ShowS)
-> Show PamRetCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamRetCode] -> ShowS
$cshowList :: [PamRetCode] -> ShowS
show :: PamRetCode -> String
$cshow :: PamRetCode -> String
showsPrec :: Int -> PamRetCode -> ShowS
$cshowsPrec :: Int -> PamRetCode -> ShowS
Show, PamRetCode -> PamRetCode -> Bool
(PamRetCode -> PamRetCode -> Bool)
-> (PamRetCode -> PamRetCode -> Bool) -> Eq PamRetCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamRetCode -> PamRetCode -> Bool
$c/= :: PamRetCode -> PamRetCode -> Bool
== :: PamRetCode -> PamRetCode -> Bool
$c== :: PamRetCode -> PamRetCode -> Bool
Eq)
data PamFlag = PamSilent
| PamDisallowNullAuthTok
| PamEstablishCred
| PamDeleteCred
| PamReinitializeCred
| PamRefreshCred
| PamChangeExpiredAuthTok
| PamNone
deriving (Int -> PamFlag -> ShowS
[PamFlag] -> ShowS
PamFlag -> String
(Int -> PamFlag -> ShowS)
-> (PamFlag -> String) -> ([PamFlag] -> ShowS) -> Show PamFlag
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamFlag] -> ShowS
$cshowList :: [PamFlag] -> ShowS
show :: PamFlag -> String
$cshow :: PamFlag -> String
showsPrec :: Int -> PamFlag -> ShowS
$cshowsPrec :: Int -> PamFlag -> ShowS
Show, PamFlag -> PamFlag -> Bool
(PamFlag -> PamFlag -> Bool)
-> (PamFlag -> PamFlag -> Bool) -> Eq PamFlag
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamFlag -> PamFlag -> Bool
$c/= :: PamFlag -> PamFlag -> Bool
== :: PamFlag -> PamFlag -> Bool
$c== :: PamFlag -> PamFlag -> Bool
Eq, Int -> PamFlag
PamFlag -> Int
PamFlag -> [PamFlag]
PamFlag -> PamFlag
PamFlag -> PamFlag -> [PamFlag]
PamFlag -> PamFlag -> PamFlag -> [PamFlag]
(PamFlag -> PamFlag)
-> (PamFlag -> PamFlag)
-> (Int -> PamFlag)
-> (PamFlag -> Int)
-> (PamFlag -> [PamFlag])
-> (PamFlag -> PamFlag -> [PamFlag])
-> (PamFlag -> PamFlag -> [PamFlag])
-> (PamFlag -> PamFlag -> PamFlag -> [PamFlag])
-> Enum PamFlag
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: PamFlag -> PamFlag -> PamFlag -> [PamFlag]
$cenumFromThenTo :: PamFlag -> PamFlag -> PamFlag -> [PamFlag]
enumFromTo :: PamFlag -> PamFlag -> [PamFlag]
$cenumFromTo :: PamFlag -> PamFlag -> [PamFlag]
enumFromThen :: PamFlag -> PamFlag -> [PamFlag]
$cenumFromThen :: PamFlag -> PamFlag -> [PamFlag]
enumFrom :: PamFlag -> [PamFlag]
$cenumFrom :: PamFlag -> [PamFlag]
fromEnum :: PamFlag -> Int
$cfromEnum :: PamFlag -> Int
toEnum :: Int -> PamFlag
$ctoEnum :: Int -> PamFlag
pred :: PamFlag -> PamFlag
$cpred :: PamFlag -> PamFlag
succ :: PamFlag -> PamFlag
$csucc :: PamFlag -> PamFlag
Enum)
type PamConv = Ptr () -> [PamMessage] -> IO [PamResponse]
data PamHandle = PamHandle { PamHandle -> Ptr ()
cPamHandle :: Ptr ()
, PamHandle
-> FunPtr
(CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt)
cPamCallback :: FunPtr (CInt -> Ptr (Ptr ()) -> Ptr (Ptr ()) -> Ptr () -> IO CInt)
}
deriving (Int -> PamHandle -> ShowS
[PamHandle] -> ShowS
PamHandle -> String
(Int -> PamHandle -> ShowS)
-> (PamHandle -> String)
-> ([PamHandle] -> ShowS)
-> Show PamHandle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PamHandle] -> ShowS
$cshowList :: [PamHandle] -> ShowS
show :: PamHandle -> String
$cshow :: PamHandle -> String
showsPrec :: Int -> PamHandle -> ShowS
$cshowsPrec :: Int -> PamHandle -> ShowS
Show, PamHandle -> PamHandle -> Bool
(PamHandle -> PamHandle -> Bool)
-> (PamHandle -> PamHandle -> Bool) -> Eq PamHandle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PamHandle -> PamHandle -> Bool
$c/= :: PamHandle -> PamHandle -> Bool
== :: PamHandle -> PamHandle -> Bool
$c== :: PamHandle -> PamHandle -> Bool
Eq)