-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Soup.Enums
    ( 

 -- * Enumerations


-- ** CacheType #enum:CacheType#

    CacheType(..)                           ,


-- ** CookieJarAcceptPolicy #enum:CookieJarAcceptPolicy#

    CookieJarAcceptPolicy(..)               ,


-- ** DateFormat #enum:DateFormat#

    DateFormat(..)                          ,


-- ** Encoding #enum:Encoding#

    Encoding(..)                            ,


-- ** HTTPVersion #enum:HTTPVersion#

    HTTPVersion(..)                         ,


-- ** LoggerLogLevel #enum:LoggerLogLevel#

    LoggerLogLevel(..)                      ,


-- ** MemoryUse #enum:MemoryUse#

    MemoryUse(..)                           ,


-- ** MessageHeadersType #enum:MessageHeadersType#

    MessageHeadersType(..)                  ,


-- ** MessagePriority #enum:MessagePriority#

    MessagePriority(..)                     ,


-- ** SameSitePolicy #enum:SameSitePolicy#

    SameSitePolicy(..)                      ,


-- ** SessionError #enum:SessionError#

    SessionError(..)                        ,
    catchSessionError                       ,
    handleSessionError                      ,


-- ** Status #enum:Status#

    Status(..)                              ,


-- ** TLDError #enum:TLDError#

    TLDError(..)                            ,
    catchTLDError                           ,
    handleTLDError                          ,


-- ** URIComponent #enum:URIComponent#

    URIComponent(..)                        ,


-- ** WebsocketCloseCode #enum:WebsocketCloseCode#

    WebsocketCloseCode(..)                  ,


-- ** WebsocketConnectionType #enum:WebsocketConnectionType#

    WebsocketConnectionType(..)             ,


-- ** WebsocketDataType #enum:WebsocketDataType#

    WebsocketDataType(..)                   ,


-- ** WebsocketError #enum:WebsocketError#

    WebsocketError(..)                      ,
    catchWebsocketError                     ,
    handleWebsocketError                    ,


-- ** WebsocketState #enum:WebsocketState#

    WebsocketState(..)                      ,




    ) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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 Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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
import qualified GHC.Records as R


-- Enum WebsocketState
-- | The state of the WebSocket connection.
data WebsocketState = 
      WebsocketStateOpen
    -- ^ the connection is ready to send messages
    | WebsocketStateClosing
    -- ^ the connection is in the process of
    --   closing down; messages may be received, but not sent
    | WebsocketStateClosed
    -- ^ the connection is completely closed down
    | AnotherWebsocketState Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketState -> ShowS
[WebsocketState] -> ShowS
WebsocketState -> String
(Int -> WebsocketState -> ShowS)
-> (WebsocketState -> String)
-> ([WebsocketState] -> ShowS)
-> Show WebsocketState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsocketState -> ShowS
showsPrec :: Int -> WebsocketState -> ShowS
$cshow :: WebsocketState -> String
show :: WebsocketState -> String
$cshowList :: [WebsocketState] -> ShowS
showList :: [WebsocketState] -> ShowS
Show, WebsocketState -> WebsocketState -> Bool
(WebsocketState -> WebsocketState -> Bool)
-> (WebsocketState -> WebsocketState -> Bool) -> Eq WebsocketState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketState -> WebsocketState -> Bool
== :: WebsocketState -> WebsocketState -> Bool
$c/= :: WebsocketState -> WebsocketState -> Bool
/= :: WebsocketState -> WebsocketState -> Bool
Eq)

instance P.Enum WebsocketState where
    fromEnum :: WebsocketState -> Int
fromEnum WebsocketState
WebsocketStateOpen = Int
1
    fromEnum WebsocketState
WebsocketStateClosing = Int
2
    fromEnum WebsocketState
WebsocketStateClosed = Int
3
    fromEnum (AnotherWebsocketState Int
k) = Int
k

    toEnum :: Int -> WebsocketState
toEnum Int
1 = WebsocketState
WebsocketStateOpen
    toEnum Int
2 = WebsocketState
WebsocketStateClosing
    toEnum Int
3 = WebsocketState
WebsocketStateClosed
    toEnum Int
k = Int -> WebsocketState
AnotherWebsocketState Int
k

instance P.Ord WebsocketState where
    compare :: WebsocketState -> WebsocketState -> Ordering
compare WebsocketState
a WebsocketState
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketState -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketState
a) (WebsocketState -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketState
b)

type instance O.ParentTypes WebsocketState = '[]
instance O.HasParentTypes WebsocketState

foreign import ccall "soup_websocket_state_get_type" c_soup_websocket_state_get_type :: 
    IO GType

instance B.Types.TypedObject WebsocketState where
    glibType :: IO GType
glibType = IO GType
c_soup_websocket_state_get_type

instance B.Types.BoxedEnum WebsocketState

-- Enum WebsocketError
-- | WebSocket-related errors.
data WebsocketError = 
      WebsocketErrorFailed
    -- ^ a generic error
    | WebsocketErrorNotWebsocket
    -- ^ attempted to handshake with a
    --   server that does not appear to understand WebSockets.
    | WebsocketErrorBadHandshake
    -- ^ the WebSocket handshake failed
    --   because some detail was invalid (eg, incorrect accept key).
    | WebsocketErrorBadOrigin
    -- ^ the WebSocket handshake failed
    --   because the \"Origin\" header was not an allowed value.
    | AnotherWebsocketError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketError -> ShowS
[WebsocketError] -> ShowS
WebsocketError -> String
(Int -> WebsocketError -> ShowS)
-> (WebsocketError -> String)
-> ([WebsocketError] -> ShowS)
-> Show WebsocketError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsocketError -> ShowS
showsPrec :: Int -> WebsocketError -> ShowS
$cshow :: WebsocketError -> String
show :: WebsocketError -> String
$cshowList :: [WebsocketError] -> ShowS
showList :: [WebsocketError] -> ShowS
Show, WebsocketError -> WebsocketError -> Bool
(WebsocketError -> WebsocketError -> Bool)
-> (WebsocketError -> WebsocketError -> Bool) -> Eq WebsocketError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketError -> WebsocketError -> Bool
== :: WebsocketError -> WebsocketError -> Bool
$c/= :: WebsocketError -> WebsocketError -> Bool
/= :: WebsocketError -> WebsocketError -> Bool
Eq)

instance P.Enum WebsocketError where
    fromEnum :: WebsocketError -> Int
fromEnum WebsocketError
WebsocketErrorFailed = Int
0
    fromEnum WebsocketError
WebsocketErrorNotWebsocket = Int
1
    fromEnum WebsocketError
WebsocketErrorBadHandshake = Int
2
    fromEnum WebsocketError
WebsocketErrorBadOrigin = Int
3
    fromEnum (AnotherWebsocketError Int
k) = Int
k

    toEnum :: Int -> WebsocketError
toEnum Int
0 = WebsocketError
WebsocketErrorFailed
    toEnum Int
1 = WebsocketError
WebsocketErrorNotWebsocket
    toEnum Int
2 = WebsocketError
WebsocketErrorBadHandshake
    toEnum Int
3 = WebsocketError
WebsocketErrorBadOrigin
    toEnum Int
k = Int -> WebsocketError
AnotherWebsocketError Int
k

instance P.Ord WebsocketError where
    compare :: WebsocketError -> WebsocketError -> Ordering
compare WebsocketError
a WebsocketError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketError -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketError
a) (WebsocketError -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketError
b)

instance GErrorClass WebsocketError where
    gerrorClassDomain :: WebsocketError -> Text
gerrorClassDomain WebsocketError
_ = Text
"soup-websocket-error-quark"

-- | Catch exceptions of type `WebsocketError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchWebsocketError ::
    IO a ->
    (WebsocketError -> GErrorMessage -> IO a) ->
    IO a
catchWebsocketError :: forall a. IO a -> (WebsocketError -> Text -> IO a) -> IO a
catchWebsocketError = IO a -> (WebsocketError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `WebsocketError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleWebsocketError ::
    (WebsocketError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleWebsocketError :: forall a. (WebsocketError -> Text -> IO a) -> IO a -> IO a
handleWebsocketError = (WebsocketError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes WebsocketError = '[]
instance O.HasParentTypes WebsocketError

foreign import ccall "soup_websocket_error_get_type" c_soup_websocket_error_get_type :: 
    IO GType

instance B.Types.TypedObject WebsocketError where
    glibType :: IO GType
glibType = IO GType
c_soup_websocket_error_get_type

instance B.Types.BoxedEnum WebsocketError

-- Enum WebsocketDataType
-- | The type of data contained in a [signal/@websocketConnection@/[message](#g:signal:message)] signal.
data WebsocketDataType = 
      WebsocketDataTypeText
    -- ^ UTF-8 text
    | WebsocketDataTypeBinary
    -- ^ binary data
    | AnotherWebsocketDataType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketDataType -> ShowS
[WebsocketDataType] -> ShowS
WebsocketDataType -> String
(Int -> WebsocketDataType -> ShowS)
-> (WebsocketDataType -> String)
-> ([WebsocketDataType] -> ShowS)
-> Show WebsocketDataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsocketDataType -> ShowS
showsPrec :: Int -> WebsocketDataType -> ShowS
$cshow :: WebsocketDataType -> String
show :: WebsocketDataType -> String
$cshowList :: [WebsocketDataType] -> ShowS
showList :: [WebsocketDataType] -> ShowS
Show, WebsocketDataType -> WebsocketDataType -> Bool
(WebsocketDataType -> WebsocketDataType -> Bool)
-> (WebsocketDataType -> WebsocketDataType -> Bool)
-> Eq WebsocketDataType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketDataType -> WebsocketDataType -> Bool
== :: WebsocketDataType -> WebsocketDataType -> Bool
$c/= :: WebsocketDataType -> WebsocketDataType -> Bool
/= :: WebsocketDataType -> WebsocketDataType -> Bool
Eq)

instance P.Enum WebsocketDataType where
    fromEnum :: WebsocketDataType -> Int
fromEnum WebsocketDataType
WebsocketDataTypeText = Int
1
    fromEnum WebsocketDataType
WebsocketDataTypeBinary = Int
2
    fromEnum (AnotherWebsocketDataType Int
k) = Int
k

    toEnum :: Int -> WebsocketDataType
toEnum Int
1 = WebsocketDataType
WebsocketDataTypeText
    toEnum Int
2 = WebsocketDataType
WebsocketDataTypeBinary
    toEnum Int
k = Int -> WebsocketDataType
AnotherWebsocketDataType Int
k

instance P.Ord WebsocketDataType where
    compare :: WebsocketDataType -> WebsocketDataType -> Ordering
compare WebsocketDataType
a WebsocketDataType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketDataType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketDataType
a) (WebsocketDataType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketDataType
b)

type instance O.ParentTypes WebsocketDataType = '[]
instance O.HasParentTypes WebsocketDataType

foreign import ccall "soup_websocket_data_type_get_type" c_soup_websocket_data_type_get_type :: 
    IO GType

instance B.Types.TypedObject WebsocketDataType where
    glibType :: IO GType
glibType = IO GType
c_soup_websocket_data_type_get_type

instance B.Types.BoxedEnum WebsocketDataType

-- Enum WebsocketConnectionType
-- | The type of a [class/@websocketConnection@/].
data WebsocketConnectionType = 
      WebsocketConnectionTypeUnknown
    -- ^ unknown\/invalid connection
    | WebsocketConnectionTypeClient
    -- ^ a client-side connection
    | WebsocketConnectionTypeServer
    -- ^ a server-side connection
    | AnotherWebsocketConnectionType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketConnectionType -> ShowS
[WebsocketConnectionType] -> ShowS
WebsocketConnectionType -> String
(Int -> WebsocketConnectionType -> ShowS)
-> (WebsocketConnectionType -> String)
-> ([WebsocketConnectionType] -> ShowS)
-> Show WebsocketConnectionType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsocketConnectionType -> ShowS
showsPrec :: Int -> WebsocketConnectionType -> ShowS
$cshow :: WebsocketConnectionType -> String
show :: WebsocketConnectionType -> String
$cshowList :: [WebsocketConnectionType] -> ShowS
showList :: [WebsocketConnectionType] -> ShowS
Show, WebsocketConnectionType -> WebsocketConnectionType -> Bool
(WebsocketConnectionType -> WebsocketConnectionType -> Bool)
-> (WebsocketConnectionType -> WebsocketConnectionType -> Bool)
-> Eq WebsocketConnectionType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
== :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
$c/= :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
/= :: WebsocketConnectionType -> WebsocketConnectionType -> Bool
Eq)

instance P.Enum WebsocketConnectionType where
    fromEnum :: WebsocketConnectionType -> Int
fromEnum WebsocketConnectionType
WebsocketConnectionTypeUnknown = Int
0
    fromEnum WebsocketConnectionType
WebsocketConnectionTypeClient = Int
1
    fromEnum WebsocketConnectionType
WebsocketConnectionTypeServer = Int
2
    fromEnum (AnotherWebsocketConnectionType Int
k) = Int
k

    toEnum :: Int -> WebsocketConnectionType
toEnum Int
0 = WebsocketConnectionType
WebsocketConnectionTypeUnknown
    toEnum Int
1 = WebsocketConnectionType
WebsocketConnectionTypeClient
    toEnum Int
2 = WebsocketConnectionType
WebsocketConnectionTypeServer
    toEnum Int
k = Int -> WebsocketConnectionType
AnotherWebsocketConnectionType Int
k

instance P.Ord WebsocketConnectionType where
    compare :: WebsocketConnectionType -> WebsocketConnectionType -> Ordering
compare WebsocketConnectionType
a WebsocketConnectionType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketConnectionType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketConnectionType
a) (WebsocketConnectionType -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketConnectionType
b)

type instance O.ParentTypes WebsocketConnectionType = '[]
instance O.HasParentTypes WebsocketConnectionType

foreign import ccall "soup_websocket_connection_type_get_type" c_soup_websocket_connection_type_get_type :: 
    IO GType

instance B.Types.TypedObject WebsocketConnectionType where
    glibType :: IO GType
glibType = IO GType
c_soup_websocket_connection_type_get_type

instance B.Types.BoxedEnum WebsocketConnectionType

-- Enum WebsocketCloseCode
-- | Pre-defined close codes that can be passed to
-- [method/@websocketConnection@/.close] or received from
-- [method/@websocketConnection@/.get_close_code].
-- 
-- However, other codes are also allowed.
data WebsocketCloseCode = 
      WebsocketCloseCodeNormal
    -- ^ a normal, non-error close
    | WebsocketCloseCodeGoingAway
    -- ^ the client\/server is going away
    | WebsocketCloseCodeProtocolError
    -- ^ a protocol error occurred
    | WebsocketCloseCodeUnsupportedData
    -- ^ the endpoint received data
    --   of a type that it does not support.
    | WebsocketCloseCodeNoStatus
    -- ^ reserved value indicating that
    --   no close code was present; must not be sent.
    | WebsocketCloseCodeAbnormal
    -- ^ reserved value indicating that
    --   the connection was closed abnormally; must not be sent.
    | WebsocketCloseCodeBadData
    -- ^ the endpoint received data that
    --   was invalid (eg, non-UTF-8 data in a text message).
    | WebsocketCloseCodePolicyViolation
    -- ^ generic error code
    --   indicating some sort of policy violation.
    | WebsocketCloseCodeTooBig
    -- ^ the endpoint received a message
    --   that is too big to process.
    | WebsocketCloseCodeNoExtension
    -- ^ the client is closing the
    --   connection because the server failed to negotiate a required
    --   extension.
    | WebsocketCloseCodeServerError
    -- ^ the server is closing the
    --   connection because it was unable to fulfill the request.
    | WebsocketCloseCodeTlsHandshake
    -- ^ reserved value indicating that
    --   the TLS handshake failed; must not be sent.
    | AnotherWebsocketCloseCode Int
    -- ^ Catch-all for unknown values
    deriving (Int -> WebsocketCloseCode -> ShowS
[WebsocketCloseCode] -> ShowS
WebsocketCloseCode -> String
(Int -> WebsocketCloseCode -> ShowS)
-> (WebsocketCloseCode -> String)
-> ([WebsocketCloseCode] -> ShowS)
-> Show WebsocketCloseCode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> WebsocketCloseCode -> ShowS
showsPrec :: Int -> WebsocketCloseCode -> ShowS
$cshow :: WebsocketCloseCode -> String
show :: WebsocketCloseCode -> String
$cshowList :: [WebsocketCloseCode] -> ShowS
showList :: [WebsocketCloseCode] -> ShowS
Show, WebsocketCloseCode -> WebsocketCloseCode -> Bool
(WebsocketCloseCode -> WebsocketCloseCode -> Bool)
-> (WebsocketCloseCode -> WebsocketCloseCode -> Bool)
-> Eq WebsocketCloseCode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
== :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
$c/= :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
/= :: WebsocketCloseCode -> WebsocketCloseCode -> Bool
Eq)

instance P.Enum WebsocketCloseCode where
    fromEnum :: WebsocketCloseCode -> Int
fromEnum WebsocketCloseCode
WebsocketCloseCodeNormal = Int
1000
    fromEnum WebsocketCloseCode
WebsocketCloseCodeGoingAway = Int
1001
    fromEnum WebsocketCloseCode
WebsocketCloseCodeProtocolError = Int
1002
    fromEnum WebsocketCloseCode
WebsocketCloseCodeUnsupportedData = Int
1003
    fromEnum WebsocketCloseCode
WebsocketCloseCodeNoStatus = Int
1005
    fromEnum WebsocketCloseCode
WebsocketCloseCodeAbnormal = Int
1006
    fromEnum WebsocketCloseCode
WebsocketCloseCodeBadData = Int
1007
    fromEnum WebsocketCloseCode
WebsocketCloseCodePolicyViolation = Int
1008
    fromEnum WebsocketCloseCode
WebsocketCloseCodeTooBig = Int
1009
    fromEnum WebsocketCloseCode
WebsocketCloseCodeNoExtension = Int
1010
    fromEnum WebsocketCloseCode
WebsocketCloseCodeServerError = Int
1011
    fromEnum WebsocketCloseCode
WebsocketCloseCodeTlsHandshake = Int
1015
    fromEnum (AnotherWebsocketCloseCode Int
k) = Int
k

    toEnum :: Int -> WebsocketCloseCode
toEnum Int
1000 = WebsocketCloseCode
WebsocketCloseCodeNormal
    toEnum Int
1001 = WebsocketCloseCode
WebsocketCloseCodeGoingAway
    toEnum Int
1002 = WebsocketCloseCode
WebsocketCloseCodeProtocolError
    toEnum Int
1003 = WebsocketCloseCode
WebsocketCloseCodeUnsupportedData
    toEnum Int
1005 = WebsocketCloseCode
WebsocketCloseCodeNoStatus
    toEnum Int
1006 = WebsocketCloseCode
WebsocketCloseCodeAbnormal
    toEnum Int
1007 = WebsocketCloseCode
WebsocketCloseCodeBadData
    toEnum Int
1008 = WebsocketCloseCode
WebsocketCloseCodePolicyViolation
    toEnum Int
1009 = WebsocketCloseCode
WebsocketCloseCodeTooBig
    toEnum Int
1010 = WebsocketCloseCode
WebsocketCloseCodeNoExtension
    toEnum Int
1011 = WebsocketCloseCode
WebsocketCloseCodeServerError
    toEnum Int
1015 = WebsocketCloseCode
WebsocketCloseCodeTlsHandshake
    toEnum Int
k = Int -> WebsocketCloseCode
AnotherWebsocketCloseCode Int
k

instance P.Ord WebsocketCloseCode where
    compare :: WebsocketCloseCode -> WebsocketCloseCode -> Ordering
compare WebsocketCloseCode
a WebsocketCloseCode
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (WebsocketCloseCode -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketCloseCode
a) (WebsocketCloseCode -> Int
forall a. Enum a => a -> Int
P.fromEnum WebsocketCloseCode
b)

type instance O.ParentTypes WebsocketCloseCode = '[]
instance O.HasParentTypes WebsocketCloseCode

foreign import ccall "soup_websocket_close_code_get_type" c_soup_websocket_close_code_get_type :: 
    IO GType

instance B.Types.TypedObject WebsocketCloseCode where
    glibType :: IO GType
glibType = IO GType
c_soup_websocket_close_code_get_type

instance B.Types.BoxedEnum WebsocketCloseCode

-- Enum URIComponent
-- | Enum values passed to [func/@uriCopy@/] to indicate the components of
-- the URI that should be updated with the given values.
data URIComponent = 
      URIComponentNone
    -- ^ no component
    | URIComponentScheme
    -- ^ the URI scheme component
    | URIComponentUser
    -- ^ the URI user component
    | URIComponentPassword
    -- ^ the URI password component
    | URIComponentAuthParams
    -- ^ the URI authentication parameters component
    | URIComponentHost
    -- ^ the URI host component
    | URIComponentPort
    -- ^ the URI port component
    | URIComponentPath
    -- ^ the URI path component
    | URIComponentQuery
    -- ^ the URI query component
    | URIComponentFragment
    -- ^ the URI fragment component
    | AnotherURIComponent Int
    -- ^ Catch-all for unknown values
    deriving (Int -> URIComponent -> ShowS
[URIComponent] -> ShowS
URIComponent -> String
(Int -> URIComponent -> ShowS)
-> (URIComponent -> String)
-> ([URIComponent] -> ShowS)
-> Show URIComponent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> URIComponent -> ShowS
showsPrec :: Int -> URIComponent -> ShowS
$cshow :: URIComponent -> String
show :: URIComponent -> String
$cshowList :: [URIComponent] -> ShowS
showList :: [URIComponent] -> ShowS
Show, URIComponent -> URIComponent -> Bool
(URIComponent -> URIComponent -> Bool)
-> (URIComponent -> URIComponent -> Bool) -> Eq URIComponent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: URIComponent -> URIComponent -> Bool
== :: URIComponent -> URIComponent -> Bool
$c/= :: URIComponent -> URIComponent -> Bool
/= :: URIComponent -> URIComponent -> Bool
Eq)

instance P.Enum URIComponent where
    fromEnum :: URIComponent -> Int
fromEnum URIComponent
URIComponentNone = Int
0
    fromEnum URIComponent
URIComponentScheme = Int
1
    fromEnum URIComponent
URIComponentUser = Int
2
    fromEnum URIComponent
URIComponentPassword = Int
3
    fromEnum URIComponent
URIComponentAuthParams = Int
4
    fromEnum URIComponent
URIComponentHost = Int
5
    fromEnum URIComponent
URIComponentPort = Int
6
    fromEnum URIComponent
URIComponentPath = Int
7
    fromEnum URIComponent
URIComponentQuery = Int
8
    fromEnum URIComponent
URIComponentFragment = Int
9
    fromEnum (AnotherURIComponent Int
k) = Int
k

    toEnum :: Int -> URIComponent
toEnum Int
0 = URIComponent
URIComponentNone
    toEnum Int
1 = URIComponent
URIComponentScheme
    toEnum Int
2 = URIComponent
URIComponentUser
    toEnum Int
3 = URIComponent
URIComponentPassword
    toEnum Int
4 = URIComponent
URIComponentAuthParams
    toEnum Int
5 = URIComponent
URIComponentHost
    toEnum Int
6 = URIComponent
URIComponentPort
    toEnum Int
7 = URIComponent
URIComponentPath
    toEnum Int
8 = URIComponent
URIComponentQuery
    toEnum Int
9 = URIComponent
URIComponentFragment
    toEnum Int
k = Int -> URIComponent
AnotherURIComponent Int
k

instance P.Ord URIComponent where
    compare :: URIComponent -> URIComponent -> Ordering
compare URIComponent
a URIComponent
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (URIComponent -> Int
forall a. Enum a => a -> Int
P.fromEnum URIComponent
a) (URIComponent -> Int
forall a. Enum a => a -> Int
P.fromEnum URIComponent
b)

type instance O.ParentTypes URIComponent = '[]
instance O.HasParentTypes URIComponent

foreign import ccall "soup_uri_component_get_type" c_soup_uri_component_get_type :: 
    IO GType

instance B.Types.TypedObject URIComponent where
    glibType :: IO GType
glibType = IO GType
c_soup_uri_component_get_type

instance B.Types.BoxedEnum URIComponent

-- Enum TLDError
-- | Error codes for @/SOUP_TLD_ERROR/@.
data TLDError = 
      TLDErrorInvalidHostname
    -- ^ A hostname was syntactically
    --   invalid.
    | TLDErrorIsIpAddress
    -- ^ The passed-in \"hostname\" was
    --   actually an IP address (and thus has no base domain or
    --   public suffix).
    | TLDErrorNotEnoughDomains
    -- ^ The passed-in hostname
    --   did not have enough components. Eg, calling
    --   [func/@tldGetBaseDomain@/] on \<literal>\"co.uk\"\<\/literal>.
    | TLDErrorNoBaseDomain
    -- ^ The passed-in hostname has
    --   no recognized public suffix.
    | TLDErrorNoPslData
    -- ^ The Public Suffix List was not
    --   available.
    | AnotherTLDError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> TLDError -> ShowS
[TLDError] -> ShowS
TLDError -> String
(Int -> TLDError -> ShowS)
-> (TLDError -> String) -> ([TLDError] -> ShowS) -> Show TLDError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TLDError -> ShowS
showsPrec :: Int -> TLDError -> ShowS
$cshow :: TLDError -> String
show :: TLDError -> String
$cshowList :: [TLDError] -> ShowS
showList :: [TLDError] -> ShowS
Show, TLDError -> TLDError -> Bool
(TLDError -> TLDError -> Bool)
-> (TLDError -> TLDError -> Bool) -> Eq TLDError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TLDError -> TLDError -> Bool
== :: TLDError -> TLDError -> Bool
$c/= :: TLDError -> TLDError -> Bool
/= :: TLDError -> TLDError -> Bool
Eq)

instance P.Enum TLDError where
    fromEnum :: TLDError -> Int
fromEnum TLDError
TLDErrorInvalidHostname = Int
0
    fromEnum TLDError
TLDErrorIsIpAddress = Int
1
    fromEnum TLDError
TLDErrorNotEnoughDomains = Int
2
    fromEnum TLDError
TLDErrorNoBaseDomain = Int
3
    fromEnum TLDError
TLDErrorNoPslData = Int
4
    fromEnum (AnotherTLDError Int
k) = Int
k

    toEnum :: Int -> TLDError
toEnum Int
0 = TLDError
TLDErrorInvalidHostname
    toEnum Int
1 = TLDError
TLDErrorIsIpAddress
    toEnum Int
2 = TLDError
TLDErrorNotEnoughDomains
    toEnum Int
3 = TLDError
TLDErrorNoBaseDomain
    toEnum Int
4 = TLDError
TLDErrorNoPslData
    toEnum Int
k = Int -> TLDError
AnotherTLDError Int
k

instance P.Ord TLDError where
    compare :: TLDError -> TLDError -> Ordering
compare TLDError
a TLDError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (TLDError -> Int
forall a. Enum a => a -> Int
P.fromEnum TLDError
a) (TLDError -> Int
forall a. Enum a => a -> Int
P.fromEnum TLDError
b)

instance GErrorClass TLDError where
    gerrorClassDomain :: TLDError -> Text
gerrorClassDomain TLDError
_ = Text
"soup-tld-error-quark"

-- | Catch exceptions of type `TLDError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchTLDError ::
    IO a ->
    (TLDError -> GErrorMessage -> IO a) ->
    IO a
catchTLDError :: forall a. IO a -> (TLDError -> Text -> IO a) -> IO a
catchTLDError = IO a -> (TLDError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `TLDError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleTLDError ::
    (TLDError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleTLDError :: forall a. (TLDError -> Text -> IO a) -> IO a -> IO a
handleTLDError = (TLDError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes TLDError = '[]
instance O.HasParentTypes TLDError

foreign import ccall "soup_tld_error_get_type" c_soup_tld_error_get_type :: 
    IO GType

instance B.Types.TypedObject TLDError where
    glibType :: IO GType
glibType = IO GType
c_soup_tld_error_get_type

instance B.Types.BoxedEnum TLDError

-- Enum Status
-- | These represent the known HTTP status code values, plus various
-- network and internal errors.
-- 
-- Note that no libsoup functions take or return this type directly;
-- any function that works with status codes will accept unrecognized
-- status codes as well.
data Status = 
      StatusNone
    -- ^ No status available. (Eg, the message has not
    -- been sent yet)
    | StatusContinue
    -- ^ 100 Continue (HTTP)
    | StatusSwitchingProtocols
    -- ^ 101 Switching Protocols (HTTP)
    | StatusProcessing
    -- ^ 102 Processing (WebDAV)
    | StatusOk
    -- ^ 200 Success (HTTP). Also used by many lower-level
    -- soup routines to indicate success.
    | StatusCreated
    -- ^ 201 Created (HTTP)
    | StatusAccepted
    -- ^ 202 Accepted (HTTP)
    | StatusNonAuthoritative
    -- ^ 203 Non-Authoritative Information
    -- (HTTP)
    | StatusNoContent
    -- ^ 204 No Content (HTTP)
    | StatusResetContent
    -- ^ 205 Reset Content (HTTP)
    | StatusPartialContent
    -- ^ 206 Partial Content (HTTP)
    | StatusMultiStatus
    -- ^ 207 Multi-Status (WebDAV)
    | StatusMultipleChoices
    -- ^ 300 Multiple Choices (HTTP)
    | StatusMovedPermanently
    -- ^ 301 Moved Permanently (HTTP)
    | StatusFound
    -- ^ 302 Found (HTTP)
    | StatusMovedTemporarily
    -- ^ 302 Moved Temporarily (old name,
    -- RFC 2068)
    | StatusSeeOther
    -- ^ 303 See Other (HTTP)
    | StatusNotModified
    -- ^ 304 Not Modified (HTTP)
    | StatusUseProxy
    -- ^ 305 Use Proxy (HTTP)
    | StatusNotAppearingInThisProtocol
    -- ^ 306 [Unused] (HTTP)
    | StatusTemporaryRedirect
    -- ^ 307 Temporary Redirect (HTTP)
    | StatusPermanentRedirect
    -- ^ 308 Permanent Redirect (HTTP)
    | StatusBadRequest
    -- ^ 400 Bad Request (HTTP)
    | StatusUnauthorized
    -- ^ 401 Unauthorized (HTTP)
    | StatusPaymentRequired
    -- ^ 402 Payment Required (HTTP)
    | StatusForbidden
    -- ^ 403 Forbidden (HTTP)
    | StatusNotFound
    -- ^ 404 Not Found (HTTP)
    | StatusMethodNotAllowed
    -- ^ 405 Method Not Allowed (HTTP)
    | StatusNotAcceptable
    -- ^ 406 Not Acceptable (HTTP)
    | StatusProxyAuthenticationRequired
    -- ^ 407 Proxy Authentication
    -- Required (HTTP)
    | StatusProxyUnauthorized
    -- ^ shorter alias for
    -- 'GI.Soup.Enums.StatusProxyAuthenticationRequired'
    | StatusRequestTimeout
    -- ^ 408 Request Timeout (HTTP)
    | StatusConflict
    -- ^ 409 Conflict (HTTP)
    | StatusGone
    -- ^ 410 Gone (HTTP)
    | StatusLengthRequired
    -- ^ 411 Length Required (HTTP)
    | StatusPreconditionFailed
    -- ^ 412 Precondition Failed (HTTP)
    | StatusRequestEntityTooLarge
    -- ^ 413 Request Entity Too Large
    -- (HTTP)
    | StatusRequestUriTooLong
    -- ^ 414 Request-URI Too Long (HTTP)
    | StatusUnsupportedMediaType
    -- ^ 415 Unsupported Media Type
    -- (HTTP)
    | StatusRequestedRangeNotSatisfiable
    -- ^ 416 Requested Range
    -- Not Satisfiable (HTTP)
    | StatusInvalidRange
    -- ^ shorter alias for
    -- 'GI.Soup.Enums.StatusRequestedRangeNotSatisfiable'
    | StatusExpectationFailed
    -- ^ 417 Expectation Failed (HTTP)
    | StatusMisdirectedRequest
    -- ^ 421 Misdirected Request
    | StatusUnprocessableEntity
    -- ^ 422 Unprocessable Entity
    -- (WebDAV)
    | StatusLocked
    -- ^ 423 Locked (WebDAV)
    | StatusFailedDependency
    -- ^ 424 Failed Dependency (WebDAV)
    | StatusInternalServerError
    -- ^ 500 Internal Server Error
    -- (HTTP)
    | StatusNotImplemented
    -- ^ 501 Not Implemented (HTTP)
    | StatusBadGateway
    -- ^ 502 Bad Gateway (HTTP)
    | StatusServiceUnavailable
    -- ^ 503 Service Unavailable (HTTP)
    | StatusGatewayTimeout
    -- ^ 504 Gateway Timeout (HTTP)
    | StatusHttpVersionNotSupported
    -- ^ 505 HTTP Version Not
    -- Supported (HTTP)
    | StatusInsufficientStorage
    -- ^ 507 Insufficient Storage
    -- (WebDAV)
    | StatusNotExtended
    -- ^ 510 Not Extended (RFC 2774)
    | AnotherStatus Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Status -> ShowS
[Status] -> ShowS
Status -> String
(Int -> Status -> ShowS)
-> (Status -> String) -> ([Status] -> ShowS) -> Show Status
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Status -> ShowS
showsPrec :: Int -> Status -> ShowS
$cshow :: Status -> String
show :: Status -> String
$cshowList :: [Status] -> ShowS
showList :: [Status] -> ShowS
Show, Status -> Status -> Bool
(Status -> Status -> Bool)
-> (Status -> Status -> Bool) -> Eq Status
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Status -> Status -> Bool
== :: Status -> Status -> Bool
$c/= :: Status -> Status -> Bool
/= :: Status -> Status -> Bool
Eq)

instance P.Enum Status where
    fromEnum :: Status -> Int
fromEnum Status
StatusNone = Int
0
    fromEnum Status
StatusContinue = Int
100
    fromEnum Status
StatusSwitchingProtocols = Int
101
    fromEnum Status
StatusProcessing = Int
102
    fromEnum Status
StatusOk = Int
200
    fromEnum Status
StatusCreated = Int
201
    fromEnum Status
StatusAccepted = Int
202
    fromEnum Status
StatusNonAuthoritative = Int
203
    fromEnum Status
StatusNoContent = Int
204
    fromEnum Status
StatusResetContent = Int
205
    fromEnum Status
StatusPartialContent = Int
206
    fromEnum Status
StatusMultiStatus = Int
207
    fromEnum Status
StatusMultipleChoices = Int
300
    fromEnum Status
StatusMovedPermanently = Int
301
    fromEnum Status
StatusFound = Int
302
    fromEnum Status
StatusMovedTemporarily = Int
302
    fromEnum Status
StatusSeeOther = Int
303
    fromEnum Status
StatusNotModified = Int
304
    fromEnum Status
StatusUseProxy = Int
305
    fromEnum Status
StatusNotAppearingInThisProtocol = Int
306
    fromEnum Status
StatusTemporaryRedirect = Int
307
    fromEnum Status
StatusPermanentRedirect = Int
308
    fromEnum Status
StatusBadRequest = Int
400
    fromEnum Status
StatusUnauthorized = Int
401
    fromEnum Status
StatusPaymentRequired = Int
402
    fromEnum Status
StatusForbidden = Int
403
    fromEnum Status
StatusNotFound = Int
404
    fromEnum Status
StatusMethodNotAllowed = Int
405
    fromEnum Status
StatusNotAcceptable = Int
406
    fromEnum Status
StatusProxyAuthenticationRequired = Int
407
    fromEnum Status
StatusProxyUnauthorized = Int
407
    fromEnum Status
StatusRequestTimeout = Int
408
    fromEnum Status
StatusConflict = Int
409
    fromEnum Status
StatusGone = Int
410
    fromEnum Status
StatusLengthRequired = Int
411
    fromEnum Status
StatusPreconditionFailed = Int
412
    fromEnum Status
StatusRequestEntityTooLarge = Int
413
    fromEnum Status
StatusRequestUriTooLong = Int
414
    fromEnum Status
StatusUnsupportedMediaType = Int
415
    fromEnum Status
StatusRequestedRangeNotSatisfiable = Int
416
    fromEnum Status
StatusInvalidRange = Int
416
    fromEnum Status
StatusExpectationFailed = Int
417
    fromEnum Status
StatusMisdirectedRequest = Int
421
    fromEnum Status
StatusUnprocessableEntity = Int
422
    fromEnum Status
StatusLocked = Int
423
    fromEnum Status
StatusFailedDependency = Int
424
    fromEnum Status
StatusInternalServerError = Int
500
    fromEnum Status
StatusNotImplemented = Int
501
    fromEnum Status
StatusBadGateway = Int
502
    fromEnum Status
StatusServiceUnavailable = Int
503
    fromEnum Status
StatusGatewayTimeout = Int
504
    fromEnum Status
StatusHttpVersionNotSupported = Int
505
    fromEnum Status
StatusInsufficientStorage = Int
507
    fromEnum Status
StatusNotExtended = Int
510
    fromEnum (AnotherStatus Int
k) = Int
k

    toEnum :: Int -> Status
toEnum Int
0 = Status
StatusNone
    toEnum Int
100 = Status
StatusContinue
    toEnum Int
101 = Status
StatusSwitchingProtocols
    toEnum Int
102 = Status
StatusProcessing
    toEnum Int
200 = Status
StatusOk
    toEnum Int
201 = Status
StatusCreated
    toEnum Int
202 = Status
StatusAccepted
    toEnum Int
203 = Status
StatusNonAuthoritative
    toEnum Int
204 = Status
StatusNoContent
    toEnum Int
205 = Status
StatusResetContent
    toEnum Int
206 = Status
StatusPartialContent
    toEnum Int
207 = Status
StatusMultiStatus
    toEnum Int
300 = Status
StatusMultipleChoices
    toEnum Int
301 = Status
StatusMovedPermanently
    toEnum Int
302 = Status
StatusFound
    toEnum Int
303 = Status
StatusSeeOther
    toEnum Int
304 = Status
StatusNotModified
    toEnum Int
305 = Status
StatusUseProxy
    toEnum Int
306 = Status
StatusNotAppearingInThisProtocol
    toEnum Int
307 = Status
StatusTemporaryRedirect
    toEnum Int
308 = Status
StatusPermanentRedirect
    toEnum Int
400 = Status
StatusBadRequest
    toEnum Int
401 = Status
StatusUnauthorized
    toEnum Int
402 = Status
StatusPaymentRequired
    toEnum Int
403 = Status
StatusForbidden
    toEnum Int
404 = Status
StatusNotFound
    toEnum Int
405 = Status
StatusMethodNotAllowed
    toEnum Int
406 = Status
StatusNotAcceptable
    toEnum Int
407 = Status
StatusProxyAuthenticationRequired
    toEnum Int
408 = Status
StatusRequestTimeout
    toEnum Int
409 = Status
StatusConflict
    toEnum Int
410 = Status
StatusGone
    toEnum Int
411 = Status
StatusLengthRequired
    toEnum Int
412 = Status
StatusPreconditionFailed
    toEnum Int
413 = Status
StatusRequestEntityTooLarge
    toEnum Int
414 = Status
StatusRequestUriTooLong
    toEnum Int
415 = Status
StatusUnsupportedMediaType
    toEnum Int
416 = Status
StatusRequestedRangeNotSatisfiable
    toEnum Int
417 = Status
StatusExpectationFailed
    toEnum Int
421 = Status
StatusMisdirectedRequest
    toEnum Int
422 = Status
StatusUnprocessableEntity
    toEnum Int
423 = Status
StatusLocked
    toEnum Int
424 = Status
StatusFailedDependency
    toEnum Int
500 = Status
StatusInternalServerError
    toEnum Int
501 = Status
StatusNotImplemented
    toEnum Int
502 = Status
StatusBadGateway
    toEnum Int
503 = Status
StatusServiceUnavailable
    toEnum Int
504 = Status
StatusGatewayTimeout
    toEnum Int
505 = Status
StatusHttpVersionNotSupported
    toEnum Int
507 = Status
StatusInsufficientStorage
    toEnum Int
510 = Status
StatusNotExtended
    toEnum Int
k = Int -> Status
AnotherStatus Int
k

instance P.Ord Status where
    compare :: Status -> Status -> Ordering
compare Status
a Status
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Status -> Int
forall a. Enum a => a -> Int
P.fromEnum Status
a) (Status -> Int
forall a. Enum a => a -> Int
P.fromEnum Status
b)

type instance O.ParentTypes Status = '[]
instance O.HasParentTypes Status

foreign import ccall "soup_status_get_type" c_soup_status_get_type :: 
    IO GType

instance B.Types.TypedObject Status where
    glibType :: IO GType
glibType = IO GType
c_soup_status_get_type

instance B.Types.BoxedEnum Status

-- Enum SessionError
-- | A t'GI.Soup.Objects.Session.Session' error.
data SessionError = 
      SessionErrorParsing
    -- ^ the server\'s response could not
    --   be parsed
    | SessionErrorEncoding
    -- ^ the server\'s response was in an
    --   unsupported format
    | SessionErrorTooManyRedirects
    -- ^ the message has been redirected
    --   too many times
    | SessionErrorTooManyRestarts
    -- ^ the message has been restarted
    --   too many times
    | SessionErrorRedirectNoLocation
    -- ^ failed to redirect message because
    --   Location header was missing or empty in response
    | SessionErrorRedirectBadUri
    -- ^ failed to redirect message because
    --   Location header contains an invalid URI
    | SessionErrorMessageAlreadyInQueue
    -- ^ the message is already in the
    --   session queue. Messages can only be reused after unqueued.
    | AnotherSessionError Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SessionError -> ShowS
[SessionError] -> ShowS
SessionError -> String
(Int -> SessionError -> ShowS)
-> (SessionError -> String)
-> ([SessionError] -> ShowS)
-> Show SessionError
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SessionError -> ShowS
showsPrec :: Int -> SessionError -> ShowS
$cshow :: SessionError -> String
show :: SessionError -> String
$cshowList :: [SessionError] -> ShowS
showList :: [SessionError] -> ShowS
Show, SessionError -> SessionError -> Bool
(SessionError -> SessionError -> Bool)
-> (SessionError -> SessionError -> Bool) -> Eq SessionError
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SessionError -> SessionError -> Bool
== :: SessionError -> SessionError -> Bool
$c/= :: SessionError -> SessionError -> Bool
/= :: SessionError -> SessionError -> Bool
Eq)

instance P.Enum SessionError where
    fromEnum :: SessionError -> Int
fromEnum SessionError
SessionErrorParsing = Int
0
    fromEnum SessionError
SessionErrorEncoding = Int
1
    fromEnum SessionError
SessionErrorTooManyRedirects = Int
2
    fromEnum SessionError
SessionErrorTooManyRestarts = Int
3
    fromEnum SessionError
SessionErrorRedirectNoLocation = Int
4
    fromEnum SessionError
SessionErrorRedirectBadUri = Int
5
    fromEnum SessionError
SessionErrorMessageAlreadyInQueue = Int
6
    fromEnum (AnotherSessionError Int
k) = Int
k

    toEnum :: Int -> SessionError
toEnum Int
0 = SessionError
SessionErrorParsing
    toEnum Int
1 = SessionError
SessionErrorEncoding
    toEnum Int
2 = SessionError
SessionErrorTooManyRedirects
    toEnum Int
3 = SessionError
SessionErrorTooManyRestarts
    toEnum Int
4 = SessionError
SessionErrorRedirectNoLocation
    toEnum Int
5 = SessionError
SessionErrorRedirectBadUri
    toEnum Int
6 = SessionError
SessionErrorMessageAlreadyInQueue
    toEnum Int
k = Int -> SessionError
AnotherSessionError Int
k

instance P.Ord SessionError where
    compare :: SessionError -> SessionError -> Ordering
compare SessionError
a SessionError
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SessionError -> Int
forall a. Enum a => a -> Int
P.fromEnum SessionError
a) (SessionError -> Int
forall a. Enum a => a -> Int
P.fromEnum SessionError
b)

instance GErrorClass SessionError where
    gerrorClassDomain :: SessionError -> Text
gerrorClassDomain SessionError
_ = Text
"soup-session-error-quark"

-- | Catch exceptions of type `SessionError`. This is a specialized version of `Data.GI.Base.GError.catchGErrorJustDomain`.
catchSessionError ::
    IO a ->
    (SessionError -> GErrorMessage -> IO a) ->
    IO a
catchSessionError :: forall a. IO a -> (SessionError -> Text -> IO a) -> IO a
catchSessionError = IO a -> (SessionError -> Text -> IO a) -> IO a
forall err a.
GErrorClass err =>
IO a -> (err -> Text -> IO a) -> IO a
catchGErrorJustDomain

-- | Handle exceptions of type `SessionError`. This is a specialized version of `Data.GI.Base.GError.handleGErrorJustDomain`.
handleSessionError ::
    (SessionError -> GErrorMessage -> IO a) ->
    IO a ->
    IO a
handleSessionError :: forall a. (SessionError -> Text -> IO a) -> IO a -> IO a
handleSessionError = (SessionError -> Text -> IO a) -> IO a -> IO a
forall err a.
GErrorClass err =>
(err -> Text -> IO a) -> IO a -> IO a
handleGErrorJustDomain

type instance O.ParentTypes SessionError = '[]
instance O.HasParentTypes SessionError

foreign import ccall "soup_session_error_get_type" c_soup_session_error_get_type :: 
    IO GType

instance B.Types.TypedObject SessionError where
    glibType :: IO GType
glibType = IO GType
c_soup_session_error_get_type

instance B.Types.BoxedEnum SessionError

-- Enum SameSitePolicy
-- | Represents the same-site policies of a cookie.
data SameSitePolicy = 
      SameSitePolicyNone
    -- ^ The cookie is exposed with both cross-site and same-site requests
    | SameSitePolicyLax
    -- ^ The cookie is withheld on cross-site requests but exposed on cross-site navigations
    | SameSitePolicyStrict
    -- ^ The cookie is only exposed for same-site requests
    | AnotherSameSitePolicy Int
    -- ^ Catch-all for unknown values
    deriving (Int -> SameSitePolicy -> ShowS
[SameSitePolicy] -> ShowS
SameSitePolicy -> String
(Int -> SameSitePolicy -> ShowS)
-> (SameSitePolicy -> String)
-> ([SameSitePolicy] -> ShowS)
-> Show SameSitePolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SameSitePolicy -> ShowS
showsPrec :: Int -> SameSitePolicy -> ShowS
$cshow :: SameSitePolicy -> String
show :: SameSitePolicy -> String
$cshowList :: [SameSitePolicy] -> ShowS
showList :: [SameSitePolicy] -> ShowS
Show, SameSitePolicy -> SameSitePolicy -> Bool
(SameSitePolicy -> SameSitePolicy -> Bool)
-> (SameSitePolicy -> SameSitePolicy -> Bool) -> Eq SameSitePolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SameSitePolicy -> SameSitePolicy -> Bool
== :: SameSitePolicy -> SameSitePolicy -> Bool
$c/= :: SameSitePolicy -> SameSitePolicy -> Bool
/= :: SameSitePolicy -> SameSitePolicy -> Bool
Eq)

instance P.Enum SameSitePolicy where
    fromEnum :: SameSitePolicy -> Int
fromEnum SameSitePolicy
SameSitePolicyNone = Int
0
    fromEnum SameSitePolicy
SameSitePolicyLax = Int
1
    fromEnum SameSitePolicy
SameSitePolicyStrict = Int
2
    fromEnum (AnotherSameSitePolicy Int
k) = Int
k

    toEnum :: Int -> SameSitePolicy
toEnum Int
0 = SameSitePolicy
SameSitePolicyNone
    toEnum Int
1 = SameSitePolicy
SameSitePolicyLax
    toEnum Int
2 = SameSitePolicy
SameSitePolicyStrict
    toEnum Int
k = Int -> SameSitePolicy
AnotherSameSitePolicy Int
k

instance P.Ord SameSitePolicy where
    compare :: SameSitePolicy -> SameSitePolicy -> Ordering
compare SameSitePolicy
a SameSitePolicy
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (SameSitePolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum SameSitePolicy
a) (SameSitePolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum SameSitePolicy
b)

type instance O.ParentTypes SameSitePolicy = '[]
instance O.HasParentTypes SameSitePolicy

foreign import ccall "soup_same_site_policy_get_type" c_soup_same_site_policy_get_type :: 
    IO GType

instance B.Types.TypedObject SameSitePolicy where
    glibType :: IO GType
glibType = IO GType
c_soup_same_site_policy_get_type

instance B.Types.BoxedEnum SameSitePolicy

-- Enum MessagePriority
-- | Priorities that can be set on a [class/@message@/] to instruct the message queue
-- to process it before any other message with lower priority.
data MessagePriority = 
      MessagePriorityVeryLow
    -- ^ The lowest priority, the messages
    --   with this priority will be the last ones to be attended.
    | MessagePriorityLow
    -- ^ Use this for low priority messages, a
    --   t'GI.Soup.Objects.Message.Message' with the default priority will be processed first.
    | MessagePriorityNormal
    -- ^ The default priotity, this is the
    --   priority assigned to the t'GI.Soup.Objects.Message.Message' by default.
    | MessagePriorityHigh
    -- ^ High priority, a t'GI.Soup.Objects.Message.Message' with
    --   this priority will be processed before the ones with the default
    --   priority.
    | MessagePriorityVeryHigh
    -- ^ The highest priority, use this
    --   for very urgent t'GI.Soup.Objects.Message.Message' as they will be the first ones to be
    --   attended.
    | AnotherMessagePriority Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MessagePriority -> ShowS
[MessagePriority] -> ShowS
MessagePriority -> String
(Int -> MessagePriority -> ShowS)
-> (MessagePriority -> String)
-> ([MessagePriority] -> ShowS)
-> Show MessagePriority
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MessagePriority -> ShowS
showsPrec :: Int -> MessagePriority -> ShowS
$cshow :: MessagePriority -> String
show :: MessagePriority -> String
$cshowList :: [MessagePriority] -> ShowS
showList :: [MessagePriority] -> ShowS
Show, MessagePriority -> MessagePriority -> Bool
(MessagePriority -> MessagePriority -> Bool)
-> (MessagePriority -> MessagePriority -> Bool)
-> Eq MessagePriority
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MessagePriority -> MessagePriority -> Bool
== :: MessagePriority -> MessagePriority -> Bool
$c/= :: MessagePriority -> MessagePriority -> Bool
/= :: MessagePriority -> MessagePriority -> Bool
Eq)

instance P.Enum MessagePriority where
    fromEnum :: MessagePriority -> Int
fromEnum MessagePriority
MessagePriorityVeryLow = Int
0
    fromEnum MessagePriority
MessagePriorityLow = Int
1
    fromEnum MessagePriority
MessagePriorityNormal = Int
2
    fromEnum MessagePriority
MessagePriorityHigh = Int
3
    fromEnum MessagePriority
MessagePriorityVeryHigh = Int
4
    fromEnum (AnotherMessagePriority Int
k) = Int
k

    toEnum :: Int -> MessagePriority
toEnum Int
0 = MessagePriority
MessagePriorityVeryLow
    toEnum Int
1 = MessagePriority
MessagePriorityLow
    toEnum Int
2 = MessagePriority
MessagePriorityNormal
    toEnum Int
3 = MessagePriority
MessagePriorityHigh
    toEnum Int
4 = MessagePriority
MessagePriorityVeryHigh
    toEnum Int
k = Int -> MessagePriority
AnotherMessagePriority Int
k

instance P.Ord MessagePriority where
    compare :: MessagePriority -> MessagePriority -> Ordering
compare MessagePriority
a MessagePriority
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MessagePriority -> Int
forall a. Enum a => a -> Int
P.fromEnum MessagePriority
a) (MessagePriority -> Int
forall a. Enum a => a -> Int
P.fromEnum MessagePriority
b)

type instance O.ParentTypes MessagePriority = '[]
instance O.HasParentTypes MessagePriority

foreign import ccall "soup_message_priority_get_type" c_soup_message_priority_get_type :: 
    IO GType

instance B.Types.TypedObject MessagePriority where
    glibType :: IO GType
glibType = IO GType
c_soup_message_priority_get_type

instance B.Types.BoxedEnum MessagePriority

-- Enum MessageHeadersType
-- | Value passed to [ctor/@messageHeaders@/.new] to set certain default
-- behaviors.
data MessageHeadersType = 
      MessageHeadersTypeRequest
    -- ^ request headers
    | MessageHeadersTypeResponse
    -- ^ response headers
    | MessageHeadersTypeMultipart
    -- ^ multipart body part headers
    | AnotherMessageHeadersType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MessageHeadersType -> ShowS
[MessageHeadersType] -> ShowS
MessageHeadersType -> String
(Int -> MessageHeadersType -> ShowS)
-> (MessageHeadersType -> String)
-> ([MessageHeadersType] -> ShowS)
-> Show MessageHeadersType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MessageHeadersType -> ShowS
showsPrec :: Int -> MessageHeadersType -> ShowS
$cshow :: MessageHeadersType -> String
show :: MessageHeadersType -> String
$cshowList :: [MessageHeadersType] -> ShowS
showList :: [MessageHeadersType] -> ShowS
Show, MessageHeadersType -> MessageHeadersType -> Bool
(MessageHeadersType -> MessageHeadersType -> Bool)
-> (MessageHeadersType -> MessageHeadersType -> Bool)
-> Eq MessageHeadersType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MessageHeadersType -> MessageHeadersType -> Bool
== :: MessageHeadersType -> MessageHeadersType -> Bool
$c/= :: MessageHeadersType -> MessageHeadersType -> Bool
/= :: MessageHeadersType -> MessageHeadersType -> Bool
Eq)

instance P.Enum MessageHeadersType where
    fromEnum :: MessageHeadersType -> Int
fromEnum MessageHeadersType
MessageHeadersTypeRequest = Int
0
    fromEnum MessageHeadersType
MessageHeadersTypeResponse = Int
1
    fromEnum MessageHeadersType
MessageHeadersTypeMultipart = Int
2
    fromEnum (AnotherMessageHeadersType Int
k) = Int
k

    toEnum :: Int -> MessageHeadersType
toEnum Int
0 = MessageHeadersType
MessageHeadersTypeRequest
    toEnum Int
1 = MessageHeadersType
MessageHeadersTypeResponse
    toEnum Int
2 = MessageHeadersType
MessageHeadersTypeMultipart
    toEnum Int
k = Int -> MessageHeadersType
AnotherMessageHeadersType Int
k

instance P.Ord MessageHeadersType where
    compare :: MessageHeadersType -> MessageHeadersType -> Ordering
compare MessageHeadersType
a MessageHeadersType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MessageHeadersType -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageHeadersType
a) (MessageHeadersType -> Int
forall a. Enum a => a -> Int
P.fromEnum MessageHeadersType
b)

type instance O.ParentTypes MessageHeadersType = '[]
instance O.HasParentTypes MessageHeadersType

foreign import ccall "soup_message_headers_type_get_type" c_soup_message_headers_type_get_type :: 
    IO GType

instance B.Types.TypedObject MessageHeadersType where
    glibType :: IO GType
glibType = IO GType
c_soup_message_headers_type_get_type

instance B.Types.BoxedEnum MessageHeadersType

-- Enum MemoryUse
-- | The lifetime of the memory being passed.
data MemoryUse = 
      MemoryUseStatic
    -- ^ The memory is statically allocated and
    --   constant; libsoup can use the passed-in buffer directly and not
    --   need to worry about it being modified or freed.
    | MemoryUseTake
    -- ^ The caller has allocated the memory and libsoup
    --   will assume ownership of it and free it with 'GI.GLib.Functions.free'.
    | MemoryUseCopy
    -- ^ The passed-in data belongs to the caller and
    --   libsoup will copy it into new memory leaving the caller free
    --   to reuse the original memory.
    | AnotherMemoryUse Int
    -- ^ Catch-all for unknown values
    deriving (Int -> MemoryUse -> ShowS
[MemoryUse] -> ShowS
MemoryUse -> String
(Int -> MemoryUse -> ShowS)
-> (MemoryUse -> String)
-> ([MemoryUse] -> ShowS)
-> Show MemoryUse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MemoryUse -> ShowS
showsPrec :: Int -> MemoryUse -> ShowS
$cshow :: MemoryUse -> String
show :: MemoryUse -> String
$cshowList :: [MemoryUse] -> ShowS
showList :: [MemoryUse] -> ShowS
Show, MemoryUse -> MemoryUse -> Bool
(MemoryUse -> MemoryUse -> Bool)
-> (MemoryUse -> MemoryUse -> Bool) -> Eq MemoryUse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MemoryUse -> MemoryUse -> Bool
== :: MemoryUse -> MemoryUse -> Bool
$c/= :: MemoryUse -> MemoryUse -> Bool
/= :: MemoryUse -> MemoryUse -> Bool
Eq)

instance P.Enum MemoryUse where
    fromEnum :: MemoryUse -> Int
fromEnum MemoryUse
MemoryUseStatic = Int
0
    fromEnum MemoryUse
MemoryUseTake = Int
1
    fromEnum MemoryUse
MemoryUseCopy = Int
2
    fromEnum (AnotherMemoryUse Int
k) = Int
k

    toEnum :: Int -> MemoryUse
toEnum Int
0 = MemoryUse
MemoryUseStatic
    toEnum Int
1 = MemoryUse
MemoryUseTake
    toEnum Int
2 = MemoryUse
MemoryUseCopy
    toEnum Int
k = Int -> MemoryUse
AnotherMemoryUse Int
k

instance P.Ord MemoryUse where
    compare :: MemoryUse -> MemoryUse -> Ordering
compare MemoryUse
a MemoryUse
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (MemoryUse -> Int
forall a. Enum a => a -> Int
P.fromEnum MemoryUse
a) (MemoryUse -> Int
forall a. Enum a => a -> Int
P.fromEnum MemoryUse
b)

type instance O.ParentTypes MemoryUse = '[]
instance O.HasParentTypes MemoryUse

foreign import ccall "soup_memory_use_get_type" c_soup_memory_use_get_type :: 
    IO GType

instance B.Types.TypedObject MemoryUse where
    glibType :: IO GType
glibType = IO GType
c_soup_memory_use_get_type

instance B.Types.BoxedEnum MemoryUse

-- Enum LoggerLogLevel
-- | Describes the level of logging output to provide.
data LoggerLogLevel = 
      LoggerLogLevelNone
    -- ^ No logging
    | LoggerLogLevelMinimal
    -- ^ Log the Request-Line or Status-Line and
    --   the Soup-Debug pseudo-headers
    | LoggerLogLevelHeaders
    -- ^ Log the full request\/response headers
    | LoggerLogLevelBody
    -- ^ Log the full headers and request\/response bodies
    | AnotherLoggerLogLevel Int
    -- ^ Catch-all for unknown values
    deriving (Int -> LoggerLogLevel -> ShowS
[LoggerLogLevel] -> ShowS
LoggerLogLevel -> String
(Int -> LoggerLogLevel -> ShowS)
-> (LoggerLogLevel -> String)
-> ([LoggerLogLevel] -> ShowS)
-> Show LoggerLogLevel
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LoggerLogLevel -> ShowS
showsPrec :: Int -> LoggerLogLevel -> ShowS
$cshow :: LoggerLogLevel -> String
show :: LoggerLogLevel -> String
$cshowList :: [LoggerLogLevel] -> ShowS
showList :: [LoggerLogLevel] -> ShowS
Show, LoggerLogLevel -> LoggerLogLevel -> Bool
(LoggerLogLevel -> LoggerLogLevel -> Bool)
-> (LoggerLogLevel -> LoggerLogLevel -> Bool) -> Eq LoggerLogLevel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LoggerLogLevel -> LoggerLogLevel -> Bool
== :: LoggerLogLevel -> LoggerLogLevel -> Bool
$c/= :: LoggerLogLevel -> LoggerLogLevel -> Bool
/= :: LoggerLogLevel -> LoggerLogLevel -> Bool
Eq)

instance P.Enum LoggerLogLevel where
    fromEnum :: LoggerLogLevel -> Int
fromEnum LoggerLogLevel
LoggerLogLevelNone = Int
0
    fromEnum LoggerLogLevel
LoggerLogLevelMinimal = Int
1
    fromEnum LoggerLogLevel
LoggerLogLevelHeaders = Int
2
    fromEnum LoggerLogLevel
LoggerLogLevelBody = Int
3
    fromEnum (AnotherLoggerLogLevel Int
k) = Int
k

    toEnum :: Int -> LoggerLogLevel
toEnum Int
0 = LoggerLogLevel
LoggerLogLevelNone
    toEnum Int
1 = LoggerLogLevel
LoggerLogLevelMinimal
    toEnum Int
2 = LoggerLogLevel
LoggerLogLevelHeaders
    toEnum Int
3 = LoggerLogLevel
LoggerLogLevelBody
    toEnum Int
k = Int -> LoggerLogLevel
AnotherLoggerLogLevel Int
k

instance P.Ord LoggerLogLevel where
    compare :: LoggerLogLevel -> LoggerLogLevel -> Ordering
compare LoggerLogLevel
a LoggerLogLevel
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (LoggerLogLevel -> Int
forall a. Enum a => a -> Int
P.fromEnum LoggerLogLevel
a) (LoggerLogLevel -> Int
forall a. Enum a => a -> Int
P.fromEnum LoggerLogLevel
b)

type instance O.ParentTypes LoggerLogLevel = '[]
instance O.HasParentTypes LoggerLogLevel

foreign import ccall "soup_logger_log_level_get_type" c_soup_logger_log_level_get_type :: 
    IO GType

instance B.Types.TypedObject LoggerLogLevel where
    glibType :: IO GType
glibType = IO GType
c_soup_logger_log_level_get_type

instance B.Types.BoxedEnum LoggerLogLevel

-- Enum HTTPVersion
-- | Indicates the HTTP protocol version being used.
data HTTPVersion = 
      HTTPVersionHttp10
    -- ^ HTTP 1.0 (RFC 1945)
    | HTTPVersionHttp11
    -- ^ HTTP 1.1 (RFC 2616)
    | HTTPVersionHttp20
    -- ^ HTTP 2.0 (RFC 7540)
    | AnotherHTTPVersion Int
    -- ^ Catch-all for unknown values
    deriving (Int -> HTTPVersion -> ShowS
[HTTPVersion] -> ShowS
HTTPVersion -> String
(Int -> HTTPVersion -> ShowS)
-> (HTTPVersion -> String)
-> ([HTTPVersion] -> ShowS)
-> Show HTTPVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> HTTPVersion -> ShowS
showsPrec :: Int -> HTTPVersion -> ShowS
$cshow :: HTTPVersion -> String
show :: HTTPVersion -> String
$cshowList :: [HTTPVersion] -> ShowS
showList :: [HTTPVersion] -> ShowS
Show, HTTPVersion -> HTTPVersion -> Bool
(HTTPVersion -> HTTPVersion -> Bool)
-> (HTTPVersion -> HTTPVersion -> Bool) -> Eq HTTPVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: HTTPVersion -> HTTPVersion -> Bool
== :: HTTPVersion -> HTTPVersion -> Bool
$c/= :: HTTPVersion -> HTTPVersion -> Bool
/= :: HTTPVersion -> HTTPVersion -> Bool
Eq)

instance P.Enum HTTPVersion where
    fromEnum :: HTTPVersion -> Int
fromEnum HTTPVersion
HTTPVersionHttp10 = Int
0
    fromEnum HTTPVersion
HTTPVersionHttp11 = Int
1
    fromEnum HTTPVersion
HTTPVersionHttp20 = Int
2
    fromEnum (AnotherHTTPVersion Int
k) = Int
k

    toEnum :: Int -> HTTPVersion
toEnum Int
0 = HTTPVersion
HTTPVersionHttp10
    toEnum Int
1 = HTTPVersion
HTTPVersionHttp11
    toEnum Int
2 = HTTPVersion
HTTPVersionHttp20
    toEnum Int
k = Int -> HTTPVersion
AnotherHTTPVersion Int
k

instance P.Ord HTTPVersion where
    compare :: HTTPVersion -> HTTPVersion -> Ordering
compare HTTPVersion
a HTTPVersion
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (HTTPVersion -> Int
forall a. Enum a => a -> Int
P.fromEnum HTTPVersion
a) (HTTPVersion -> Int
forall a. Enum a => a -> Int
P.fromEnum HTTPVersion
b)

type instance O.ParentTypes HTTPVersion = '[]
instance O.HasParentTypes HTTPVersion

foreign import ccall "soup_http_version_get_type" c_soup_http_version_get_type :: 
    IO GType

instance B.Types.TypedObject HTTPVersion where
    glibType :: IO GType
glibType = IO GType
c_soup_http_version_get_type

instance B.Types.BoxedEnum HTTPVersion

-- Enum Encoding
-- | How a message body is encoded for transport
data Encoding = 
      EncodingUnrecognized
    -- ^ unknown \/ error
    | EncodingNone
    -- ^ no body is present (which is not the same as a
    --   0-length body, and only occurs in certain places)
    | EncodingContentLength
    -- ^ Content-Length encoding
    | EncodingEof
    -- ^ Response body ends when the connection is closed
    | EncodingChunked
    -- ^ chunked encoding (currently only supported
    --   for response)
    | EncodingByteranges
    -- ^ multipart\/byteranges (Reserved for future
    --   use: NOT CURRENTLY IMPLEMENTED)
    | AnotherEncoding Int
    -- ^ Catch-all for unknown values
    deriving (Int -> Encoding -> ShowS
[Encoding] -> ShowS
Encoding -> String
(Int -> Encoding -> ShowS)
-> (Encoding -> String) -> ([Encoding] -> ShowS) -> Show Encoding
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Encoding -> ShowS
showsPrec :: Int -> Encoding -> ShowS
$cshow :: Encoding -> String
show :: Encoding -> String
$cshowList :: [Encoding] -> ShowS
showList :: [Encoding] -> ShowS
Show, Encoding -> Encoding -> Bool
(Encoding -> Encoding -> Bool)
-> (Encoding -> Encoding -> Bool) -> Eq Encoding
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Encoding -> Encoding -> Bool
== :: Encoding -> Encoding -> Bool
$c/= :: Encoding -> Encoding -> Bool
/= :: Encoding -> Encoding -> Bool
Eq)

instance P.Enum Encoding where
    fromEnum :: Encoding -> Int
fromEnum Encoding
EncodingUnrecognized = Int
0
    fromEnum Encoding
EncodingNone = Int
1
    fromEnum Encoding
EncodingContentLength = Int
2
    fromEnum Encoding
EncodingEof = Int
3
    fromEnum Encoding
EncodingChunked = Int
4
    fromEnum Encoding
EncodingByteranges = Int
5
    fromEnum (AnotherEncoding Int
k) = Int
k

    toEnum :: Int -> Encoding
toEnum Int
0 = Encoding
EncodingUnrecognized
    toEnum Int
1 = Encoding
EncodingNone
    toEnum Int
2 = Encoding
EncodingContentLength
    toEnum Int
3 = Encoding
EncodingEof
    toEnum Int
4 = Encoding
EncodingChunked
    toEnum Int
5 = Encoding
EncodingByteranges
    toEnum Int
k = Int -> Encoding
AnotherEncoding Int
k

instance P.Ord Encoding where
    compare :: Encoding -> Encoding -> Ordering
compare Encoding
a Encoding
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (Encoding -> Int
forall a. Enum a => a -> Int
P.fromEnum Encoding
a) (Encoding -> Int
forall a. Enum a => a -> Int
P.fromEnum Encoding
b)

type instance O.ParentTypes Encoding = '[]
instance O.HasParentTypes Encoding

foreign import ccall "soup_encoding_get_type" c_soup_encoding_get_type :: 
    IO GType

instance B.Types.TypedObject Encoding where
    glibType :: IO GType
glibType = IO GType
c_soup_encoding_get_type

instance B.Types.BoxedEnum Encoding

-- Enum DateFormat
-- | Date formats that [func/@dateTimeToString@/] can use.
-- 
-- /@sOUPDATEHTTP@/ and /@sOUPDATECOOKIE@/ always coerce the time to
-- UTC.
-- 
-- This enum may be extended with more values in future releases.
data DateFormat = 
      DateFormatHttp
    -- ^ RFC 1123 format, used by the HTTP \"Date\" header. Eg
    --   \"Sun, 06 Nov 1994 08:49:37 GMT\".
    | DateFormatCookie
    -- ^ The format for the \"Expires\" timestamp in the
    --   Netscape cookie specification. Eg, \"Sun, 06-Nov-1994 08:49:37 GMT\".
    | AnotherDateFormat Int
    -- ^ Catch-all for unknown values
    deriving (Int -> DateFormat -> ShowS
[DateFormat] -> ShowS
DateFormat -> String
(Int -> DateFormat -> ShowS)
-> (DateFormat -> String)
-> ([DateFormat] -> ShowS)
-> Show DateFormat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> DateFormat -> ShowS
showsPrec :: Int -> DateFormat -> ShowS
$cshow :: DateFormat -> String
show :: DateFormat -> String
$cshowList :: [DateFormat] -> ShowS
showList :: [DateFormat] -> ShowS
Show, DateFormat -> DateFormat -> Bool
(DateFormat -> DateFormat -> Bool)
-> (DateFormat -> DateFormat -> Bool) -> Eq DateFormat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DateFormat -> DateFormat -> Bool
== :: DateFormat -> DateFormat -> Bool
$c/= :: DateFormat -> DateFormat -> Bool
/= :: DateFormat -> DateFormat -> Bool
Eq)

instance P.Enum DateFormat where
    fromEnum :: DateFormat -> Int
fromEnum DateFormat
DateFormatHttp = Int
1
    fromEnum DateFormat
DateFormatCookie = Int
2
    fromEnum (AnotherDateFormat Int
k) = Int
k

    toEnum :: Int -> DateFormat
toEnum Int
1 = DateFormat
DateFormatHttp
    toEnum Int
2 = DateFormat
DateFormatCookie
    toEnum Int
k = Int -> DateFormat
AnotherDateFormat Int
k

instance P.Ord DateFormat where
    compare :: DateFormat -> DateFormat -> Ordering
compare DateFormat
a DateFormat
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (DateFormat -> Int
forall a. Enum a => a -> Int
P.fromEnum DateFormat
a) (DateFormat -> Int
forall a. Enum a => a -> Int
P.fromEnum DateFormat
b)

type instance O.ParentTypes DateFormat = '[]
instance O.HasParentTypes DateFormat

foreign import ccall "soup_date_format_get_type" c_soup_date_format_get_type :: 
    IO GType

instance B.Types.TypedObject DateFormat where
    glibType :: IO GType
glibType = IO GType
c_soup_date_format_get_type

instance B.Types.BoxedEnum DateFormat

-- Enum CookieJarAcceptPolicy
-- | The policy for accepting or rejecting cookies returned in
-- responses.
data CookieJarAcceptPolicy = 
      CookieJarAcceptPolicyAlways
    -- ^ accept all cookies unconditionally.
    | CookieJarAcceptPolicyNever
    -- ^ reject all cookies unconditionally.
    | CookieJarAcceptPolicyNoThirdParty
    -- ^ accept all cookies set by the main
    --   document loaded in the application using libsoup. An example of the most
    --   common case, web browsers, would be: If http:\/\/www.example.com is the page
    --   loaded, accept all cookies set by example.com, but if a resource from
    --   http:\/\/www.third-party.com is loaded from that page reject any cookie that
    --   it could try to set. For libsoup to be able to tell apart first party
    --   cookies from the rest, the application must call
    --   [method/@message@/.set_first_party] on each outgoing [class/@message@/], setting
    --   the [struct/@gLib@/.Uri] of the main document. If no first party is set in a
    --   message when this policy is in effect, cookies will be assumed to be third
    --   party by default.
    | CookieJarAcceptPolicyGrandfatheredThirdParty
    -- ^ accept all cookies set by
    --   the main document loaded in the application using libsoup, and from domains
    --   that have previously set at least one cookie when loaded as the main
    --   document. An example of the most common case, web browsers, would be: if
    --   http:\/\/www.example.com is the page loaded, accept all cookies set by
    --   example.com, but if a resource from http:\/\/www.third-party.com is loaded
    --   from that page, reject any cookie that it could try to set unless it
    --   already has a cookie in the cookie jar. For libsoup to be able to tell
    --   apart first party cookies from the rest, the application must call
    --   [method/@message@/.set_first_party] on each outgoing t'GI.Soup.Objects.Message.Message', setting the
    --   [struct/@gLib@/.Uri] of the main document. If no first party is set in a
    --   message when this policy is in effect, cookies will be assumed to be third
    --   party by default.
    | AnotherCookieJarAcceptPolicy Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CookieJarAcceptPolicy -> ShowS
[CookieJarAcceptPolicy] -> ShowS
CookieJarAcceptPolicy -> String
(Int -> CookieJarAcceptPolicy -> ShowS)
-> (CookieJarAcceptPolicy -> String)
-> ([CookieJarAcceptPolicy] -> ShowS)
-> Show CookieJarAcceptPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CookieJarAcceptPolicy -> ShowS
showsPrec :: Int -> CookieJarAcceptPolicy -> ShowS
$cshow :: CookieJarAcceptPolicy -> String
show :: CookieJarAcceptPolicy -> String
$cshowList :: [CookieJarAcceptPolicy] -> ShowS
showList :: [CookieJarAcceptPolicy] -> ShowS
Show, CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
(CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool)
-> (CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool)
-> Eq CookieJarAcceptPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
== :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
$c/= :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
/= :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Bool
Eq)

instance P.Enum CookieJarAcceptPolicy where
    fromEnum :: CookieJarAcceptPolicy -> Int
fromEnum CookieJarAcceptPolicy
CookieJarAcceptPolicyAlways = Int
0
    fromEnum CookieJarAcceptPolicy
CookieJarAcceptPolicyNever = Int
1
    fromEnum CookieJarAcceptPolicy
CookieJarAcceptPolicyNoThirdParty = Int
2
    fromEnum CookieJarAcceptPolicy
CookieJarAcceptPolicyGrandfatheredThirdParty = Int
3
    fromEnum (AnotherCookieJarAcceptPolicy Int
k) = Int
k

    toEnum :: Int -> CookieJarAcceptPolicy
toEnum Int
0 = CookieJarAcceptPolicy
CookieJarAcceptPolicyAlways
    toEnum Int
1 = CookieJarAcceptPolicy
CookieJarAcceptPolicyNever
    toEnum Int
2 = CookieJarAcceptPolicy
CookieJarAcceptPolicyNoThirdParty
    toEnum Int
3 = CookieJarAcceptPolicy
CookieJarAcceptPolicyGrandfatheredThirdParty
    toEnum Int
k = Int -> CookieJarAcceptPolicy
AnotherCookieJarAcceptPolicy Int
k

instance P.Ord CookieJarAcceptPolicy where
    compare :: CookieJarAcceptPolicy -> CookieJarAcceptPolicy -> Ordering
compare CookieJarAcceptPolicy
a CookieJarAcceptPolicy
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CookieJarAcceptPolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum CookieJarAcceptPolicy
a) (CookieJarAcceptPolicy -> Int
forall a. Enum a => a -> Int
P.fromEnum CookieJarAcceptPolicy
b)

type instance O.ParentTypes CookieJarAcceptPolicy = '[]
instance O.HasParentTypes CookieJarAcceptPolicy

foreign import ccall "soup_cookie_jar_accept_policy_get_type" c_soup_cookie_jar_accept_policy_get_type :: 
    IO GType

instance B.Types.TypedObject CookieJarAcceptPolicy where
    glibType :: IO GType
glibType = IO GType
c_soup_cookie_jar_accept_policy_get_type

instance B.Types.BoxedEnum CookieJarAcceptPolicy

-- Enum CacheType
-- | The type of cache; this affects what kinds of responses will be
-- saved.
data CacheType = 
      CacheTypeSingleUser
    -- ^ a single-user cache
    | CacheTypeShared
    -- ^ a shared cache
    | AnotherCacheType Int
    -- ^ Catch-all for unknown values
    deriving (Int -> CacheType -> ShowS
[CacheType] -> ShowS
CacheType -> String
(Int -> CacheType -> ShowS)
-> (CacheType -> String)
-> ([CacheType] -> ShowS)
-> Show CacheType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CacheType -> ShowS
showsPrec :: Int -> CacheType -> ShowS
$cshow :: CacheType -> String
show :: CacheType -> String
$cshowList :: [CacheType] -> ShowS
showList :: [CacheType] -> ShowS
Show, CacheType -> CacheType -> Bool
(CacheType -> CacheType -> Bool)
-> (CacheType -> CacheType -> Bool) -> Eq CacheType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CacheType -> CacheType -> Bool
== :: CacheType -> CacheType -> Bool
$c/= :: CacheType -> CacheType -> Bool
/= :: CacheType -> CacheType -> Bool
Eq)

instance P.Enum CacheType where
    fromEnum :: CacheType -> Int
fromEnum CacheType
CacheTypeSingleUser = Int
0
    fromEnum CacheType
CacheTypeShared = Int
1
    fromEnum (AnotherCacheType Int
k) = Int
k

    toEnum :: Int -> CacheType
toEnum Int
0 = CacheType
CacheTypeSingleUser
    toEnum Int
1 = CacheType
CacheTypeShared
    toEnum Int
k = Int -> CacheType
AnotherCacheType Int
k

instance P.Ord CacheType where
    compare :: CacheType -> CacheType -> Ordering
compare CacheType
a CacheType
b = Int -> Int -> Ordering
forall a. Ord a => a -> a -> Ordering
P.compare (CacheType -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheType
a) (CacheType -> Int
forall a. Enum a => a -> Int
P.fromEnum CacheType
b)

type instance O.ParentTypes CacheType = '[]
instance O.HasParentTypes CacheType

foreign import ccall "soup_cache_type_get_type" c_soup_cache_type_get_type :: 
    IO GType

instance B.Types.TypedObject CacheType where
    glibType :: IO GType
glibType = IO GType
c_soup_cache_type_get_type

instance B.Types.BoxedEnum CacheType