#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Soup.Flags
(
Cacheability(..) ,
Expectation(..) ,
MessageFlags(..) ,
ServerListenOptions(..) ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
data ServerListenOptions =
ServerListenOptionsHttps
| ServerListenOptionsIpv4Only
| ServerListenOptionsIpv6Only
| AnotherServerListenOptions Int
deriving (Int -> ServerListenOptions -> ShowS
[ServerListenOptions] -> ShowS
ServerListenOptions -> String
(Int -> ServerListenOptions -> ShowS)
-> (ServerListenOptions -> String)
-> ([ServerListenOptions] -> ShowS)
-> Show ServerListenOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServerListenOptions] -> ShowS
$cshowList :: [ServerListenOptions] -> ShowS
show :: ServerListenOptions -> String
$cshow :: ServerListenOptions -> String
showsPrec :: Int -> ServerListenOptions -> ShowS
$cshowsPrec :: Int -> ServerListenOptions -> ShowS
Show, ServerListenOptions -> ServerListenOptions -> Bool
(ServerListenOptions -> ServerListenOptions -> Bool)
-> (ServerListenOptions -> ServerListenOptions -> Bool)
-> Eq ServerListenOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServerListenOptions -> ServerListenOptions -> Bool
$c/= :: ServerListenOptions -> ServerListenOptions -> Bool
== :: ServerListenOptions -> ServerListenOptions -> Bool
$c== :: ServerListenOptions -> ServerListenOptions -> Bool
Eq)
instance P.Enum ServerListenOptions where
fromEnum :: ServerListenOptions -> Int
fromEnum ServerListenOptionsHttps = 1
fromEnum ServerListenOptionsIpv4Only = 2
fromEnum ServerListenOptionsIpv6Only = 4
fromEnum (AnotherServerListenOptions k :: Int
k) = Int
k
toEnum :: Int -> ServerListenOptions
toEnum 1 = ServerListenOptions
ServerListenOptionsHttps
toEnum 2 = ServerListenOptions
ServerListenOptionsIpv4Only
toEnum 4 = ServerListenOptions
ServerListenOptionsIpv6Only
toEnum k :: Int
k = Int -> ServerListenOptions
AnotherServerListenOptions Int
k
instance P.Ord ServerListenOptions where
compare :: ServerListenOptions -> ServerListenOptions -> Ordering
compare a :: ServerListenOptions
a b :: ServerListenOptions
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (ServerListenOptions -> Int
forall a. Enum a => a -> Int
P.fromEnum ServerListenOptions
a) (ServerListenOptions -> Int
forall a. Enum a => a -> Int
P.fromEnum ServerListenOptions
b)
foreign import ccall "soup_server_listen_options_get_type" c_soup_server_listen_options_get_type ::
IO GType
instance BoxedFlags ServerListenOptions where
boxedFlagsType :: Proxy ServerListenOptions -> IO GType
boxedFlagsType _ = IO GType
c_soup_server_listen_options_get_type
instance IsGFlag ServerListenOptions
data MessageFlags =
MessageFlagsNoRedirect
| MessageFlagsCanRebuild
| MessageFlagsOverwriteChunks
| MessageFlagsContentDecoded
| MessageFlagsCertificateTrusted
| MessageFlagsNewConnection
| MessageFlagsIdempotent
| MessageFlagsIgnoreConnectionLimits
| MessageFlagsDoNotUseAuthCache
| AnotherMessageFlags Int
deriving (Int -> MessageFlags -> ShowS
[MessageFlags] -> ShowS
MessageFlags -> String
(Int -> MessageFlags -> ShowS)
-> (MessageFlags -> String)
-> ([MessageFlags] -> ShowS)
-> Show MessageFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessageFlags] -> ShowS
$cshowList :: [MessageFlags] -> ShowS
show :: MessageFlags -> String
$cshow :: MessageFlags -> String
showsPrec :: Int -> MessageFlags -> ShowS
$cshowsPrec :: Int -> MessageFlags -> ShowS
Show, MessageFlags -> MessageFlags -> Bool
(MessageFlags -> MessageFlags -> Bool)
-> (MessageFlags -> MessageFlags -> Bool) -> Eq MessageFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessageFlags -> MessageFlags -> Bool
$c/= :: MessageFlags -> MessageFlags -> Bool
== :: MessageFlags -> MessageFlags -> Bool
$c== :: MessageFlags -> MessageFlags -> Bool
Eq)
instance P.Enum MessageFlags where
fromEnum :: MessageFlags -> Int
fromEnum MessageFlagsNoRedirect = 2
fromEnum MessageFlagsCanRebuild = 4
fromEnum MessageFlagsOverwriteChunks = 8
fromEnum MessageFlagsContentDecoded = 16
fromEnum MessageFlagsCertificateTrusted = 32
fromEnum MessageFlagsNewConnection = 64
fromEnum MessageFlagsIdempotent = 128
fromEnum MessageFlagsIgnoreConnectionLimits = 256
fromEnum MessageFlagsDoNotUseAuthCache = 512
fromEnum (AnotherMessageFlags k :: Int
k) = Int
k
toEnum :: Int -> MessageFlags
toEnum 2 = MessageFlags
MessageFlagsNoRedirect
toEnum 4 = MessageFlags
MessageFlagsCanRebuild
toEnum 8 = MessageFlags
MessageFlagsOverwriteChunks
toEnum 16 = MessageFlags
MessageFlagsContentDecoded
toEnum 32 = MessageFlags
MessageFlagsCertificateTrusted
toEnum 64 = MessageFlags
MessageFlagsNewConnection
toEnum 128 = MessageFlags
MessageFlagsIdempotent
toEnum 256 = MessageFlags
MessageFlagsIgnoreConnectionLimits
toEnum 512 = MessageFlags
MessageFlagsDoNotUseAuthCache
toEnum k :: Int
k = Int -> MessageFlags
AnotherMessageFlags Int
k
instance P.Ord MessageFlags where
compare :: MessageFlags -> MessageFlags -> Ordering
compare a :: MessageFlags
a b :: MessageFlags
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MessageFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageFlags
a) (MessageFlags -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageFlags
b)
foreign import ccall "soup_message_flags_get_type" c_soup_message_flags_get_type ::
IO GType
instance BoxedFlags MessageFlags where
boxedFlagsType :: Proxy MessageFlags -> IO GType
boxedFlagsType _ = IO GType
c_soup_message_flags_get_type
instance IsGFlag MessageFlags
data Expectation =
ExpectationUnrecognized
| ExpectationContinue
| AnotherExpectation Int
deriving (Int -> Expectation -> ShowS
[Expectation] -> ShowS
Expectation -> String
(Int -> Expectation -> ShowS)
-> (Expectation -> String)
-> ([Expectation] -> ShowS)
-> Show Expectation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Expectation] -> ShowS
$cshowList :: [Expectation] -> ShowS
show :: Expectation -> String
$cshow :: Expectation -> String
showsPrec :: Int -> Expectation -> ShowS
$cshowsPrec :: Int -> Expectation -> ShowS
Show, Expectation -> Expectation -> Bool
(Expectation -> Expectation -> Bool)
-> (Expectation -> Expectation -> Bool) -> Eq Expectation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Expectation -> Expectation -> Bool
$c/= :: Expectation -> Expectation -> Bool
== :: Expectation -> Expectation -> Bool
$c== :: Expectation -> Expectation -> Bool
Eq)
instance P.Enum Expectation where
fromEnum :: Expectation -> Int
fromEnum ExpectationUnrecognized = 1
fromEnum ExpectationContinue = 2
fromEnum (AnotherExpectation k :: Int
k) = Int
k
toEnum :: Int -> Expectation
toEnum 1 = Expectation
ExpectationUnrecognized
toEnum 2 = Expectation
ExpectationContinue
toEnum k :: Int
k = Int -> Expectation
AnotherExpectation Int
k
instance P.Ord Expectation where
compare :: Expectation -> Expectation -> Ordering
compare a :: Expectation
a b :: Expectation
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Expectation -> Int
forall a. Enum a => a -> Int
P.fromEnum Expectation
a) (Expectation -> Int
forall a. Enum a => a -> Int
P.fromEnum Expectation
b)
foreign import ccall "soup_expectation_get_type" c_soup_expectation_get_type ::
IO GType
instance BoxedFlags Expectation where
boxedFlagsType :: Proxy Expectation -> IO GType
boxedFlagsType _ = IO GType
c_soup_expectation_get_type
instance IsGFlag Expectation
data Cacheability =
CacheabilityCacheable
| CacheabilityUncacheable
| CacheabilityInvalidates
| CacheabilityValidates
| AnotherCacheability Int
deriving (Int -> Cacheability -> ShowS
[Cacheability] -> ShowS
Cacheability -> String
(Int -> Cacheability -> ShowS)
-> (Cacheability -> String)
-> ([Cacheability] -> ShowS)
-> Show Cacheability
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Cacheability] -> ShowS
$cshowList :: [Cacheability] -> ShowS
show :: Cacheability -> String
$cshow :: Cacheability -> String
showsPrec :: Int -> Cacheability -> ShowS
$cshowsPrec :: Int -> Cacheability -> ShowS
Show, Cacheability -> Cacheability -> Bool
(Cacheability -> Cacheability -> Bool)
-> (Cacheability -> Cacheability -> Bool) -> Eq Cacheability
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cacheability -> Cacheability -> Bool
$c/= :: Cacheability -> Cacheability -> Bool
== :: Cacheability -> Cacheability -> Bool
$c== :: Cacheability -> Cacheability -> Bool
Eq)
instance P.Enum Cacheability where
fromEnum :: Cacheability -> Int
fromEnum CacheabilityCacheable = 1
fromEnum CacheabilityUncacheable = 2
fromEnum CacheabilityInvalidates = 4
fromEnum CacheabilityValidates = 8
fromEnum (AnotherCacheability k :: Int
k) = Int
k
toEnum :: Int -> Cacheability
toEnum 1 = Cacheability
CacheabilityCacheable
toEnum 2 = Cacheability
CacheabilityUncacheable
toEnum 4 = Cacheability
CacheabilityInvalidates
toEnum 8 = Cacheability
CacheabilityValidates
toEnum k :: Int
k = Int -> Cacheability
AnotherCacheability Int
k
instance P.Ord Cacheability where
compare :: Cacheability -> Cacheability -> Ordering
compare a :: Cacheability
a b :: Cacheability
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Cacheability -> Int
forall a. Enum a => a -> Int
P.fromEnum Cacheability
a) (Cacheability -> Int
forall a. Enum a => a -> Int
P.fromEnum Cacheability
b)
foreign import ccall "soup_cacheability_get_type" c_soup_cacheability_get_type ::
IO GType
instance BoxedFlags Cacheability where
boxedFlagsType :: Proxy Cacheability -> IO GType
boxedFlagsType _ = IO GType
c_soup_cacheability_get_type
instance IsGFlag Cacheability