#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
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.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 (Show, Eq)
instance P.Enum ServerListenOptions where
fromEnum ServerListenOptionsHttps = 1
fromEnum ServerListenOptionsIpv4Only = 2
fromEnum ServerListenOptionsIpv6Only = 4
fromEnum (AnotherServerListenOptions k) = k
toEnum 1 = ServerListenOptionsHttps
toEnum 2 = ServerListenOptionsIpv4Only
toEnum 4 = ServerListenOptionsIpv6Only
toEnum k = AnotherServerListenOptions k
instance P.Ord ServerListenOptions where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "soup_server_listen_options_get_type" c_soup_server_listen_options_get_type ::
IO GType
instance BoxedFlags ServerListenOptions where
boxedFlagsType _ = c_soup_server_listen_options_get_type
instance IsGFlag ServerListenOptions
data MessageFlags =
MessageFlagsNoRedirect
| MessageFlagsCanRebuild
| MessageFlagsOverwriteChunks
| MessageFlagsContentDecoded
| MessageFlagsCertificateTrusted
| MessageFlagsNewConnection
| MessageFlagsIdempotent
| MessageFlagsIgnoreConnectionLimits
| MessageFlagsDoNotUseAuthCache
| AnotherMessageFlags Int
deriving (Show, Eq)
instance P.Enum MessageFlags where
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) = k
toEnum 2 = MessageFlagsNoRedirect
toEnum 4 = MessageFlagsCanRebuild
toEnum 8 = MessageFlagsOverwriteChunks
toEnum 16 = MessageFlagsContentDecoded
toEnum 32 = MessageFlagsCertificateTrusted
toEnum 64 = MessageFlagsNewConnection
toEnum 128 = MessageFlagsIdempotent
toEnum 256 = MessageFlagsIgnoreConnectionLimits
toEnum 512 = MessageFlagsDoNotUseAuthCache
toEnum k = AnotherMessageFlags k
instance P.Ord MessageFlags where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "soup_message_flags_get_type" c_soup_message_flags_get_type ::
IO GType
instance BoxedFlags MessageFlags where
boxedFlagsType _ = c_soup_message_flags_get_type
instance IsGFlag MessageFlags
data Expectation =
ExpectationUnrecognized
| ExpectationContinue
| AnotherExpectation Int
deriving (Show, Eq)
instance P.Enum Expectation where
fromEnum ExpectationUnrecognized = 1
fromEnum ExpectationContinue = 2
fromEnum (AnotherExpectation k) = k
toEnum 1 = ExpectationUnrecognized
toEnum 2 = ExpectationContinue
toEnum k = AnotherExpectation k
instance P.Ord Expectation where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "soup_expectation_get_type" c_soup_expectation_get_type ::
IO GType
instance BoxedFlags Expectation where
boxedFlagsType _ = c_soup_expectation_get_type
instance IsGFlag Expectation
data Cacheability =
CacheabilityCacheable
| CacheabilityUncacheable
| CacheabilityInvalidates
| CacheabilityValidates
| AnotherCacheability Int
deriving (Show, Eq)
instance P.Enum Cacheability where
fromEnum CacheabilityCacheable = 1
fromEnum CacheabilityUncacheable = 2
fromEnum CacheabilityInvalidates = 4
fromEnum CacheabilityValidates = 8
fromEnum (AnotherCacheability k) = k
toEnum 1 = CacheabilityCacheable
toEnum 2 = CacheabilityUncacheable
toEnum 4 = CacheabilityInvalidates
toEnum 8 = CacheabilityValidates
toEnum k = AnotherCacheability k
instance P.Ord Cacheability where
compare a b = P.compare (P.fromEnum a) (P.fromEnum b)
foreign import ccall "soup_cacheability_get_type" c_soup_cacheability_get_type ::
IO GType
instance BoxedFlags Cacheability where
boxedFlagsType _ = c_soup_cacheability_get_type
instance IsGFlag Cacheability