{-# LANGUAGE PatternSynonyms, ScopedTypeVariables, ViewPatterns #-}


-- | 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.Constants
    ( 
    pattern VERSION_MIN_REQUIRED            ,
    pattern MINOR_VERSION                   ,
    pattern MICRO_VERSION                   ,
    pattern MAJOR_VERSION                   ,
    pattern HTTP_URI_FLAGS                  ,
    pattern HSTS_POLICY_MAX_AGE_PAST        ,
    pattern FORM_MIME_TYPE_URLENCODED       ,
    pattern FORM_MIME_TYPE_MULTIPART        ,
    pattern COOKIE_MAX_AGE_ONE_YEAR         ,
    pattern COOKIE_MAX_AGE_ONE_WEEK         ,
    pattern COOKIE_MAX_AGE_ONE_HOUR         ,
    pattern COOKIE_MAX_AGE_ONE_DAY          ,

    ) 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
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)

#else

#endif

-- | A macro that should be defined by the user prior to including
-- @libsoup.h@.
-- 
-- The definition should be one of the predefined libsoup
-- version macros: @/SOUP_VERSION_2_24/@, @/SOUP_VERSION_2_26/@, ...
-- 
-- This macro defines the earliest version of libsoup that the package
-- is required to be able to compile against.
-- 
-- If the compiler is configured to warn about the use of deprecated
-- functions, then using functions that were deprecated in version
-- 'GI.Soup.Constants.VERSION_MIN_REQUIRED' or earlier will cause warnings (but
-- using functions deprecated in later releases will not).
pattern $mVERSION_MIN_REQUIRED :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bVERSION_MIN_REQUIRED :: Int32
VERSION_MIN_REQUIRED = 2 :: Int32

-- | Like [func/@getMinorVersion@/], but from the headers used at
-- application compile time, rather than from the library linked
-- against at application run time.
pattern $mMINOR_VERSION :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bMINOR_VERSION :: Int32
MINOR_VERSION = 4 :: Int32

-- | Like [func/@getMicroVersion@/], but from the headers used at
-- application compile time, rather than from the library linked
-- against at application run time.
pattern $mMICRO_VERSION :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bMICRO_VERSION :: Int32
MICRO_VERSION = 4 :: Int32

-- | Like [func/@getMajorVersion@/], but from the headers used at application
-- compile time, rather than from the library linked against at application run
-- time.
pattern $mMAJOR_VERSION :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bMAJOR_VERSION :: Int32
MAJOR_VERSION = 3 :: Int32

-- | The set of t'GI.GLib.Flags.UriFlags' libsoup expects all t'GI.GLib.Structs.Uri.Uri' to use.
pattern $mHTTP_URI_FLAGS :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bHTTP_URI_FLAGS :: Int32
HTTP_URI_FLAGS = 482 :: Int32

-- | An expiration date that is always in the past.
pattern $mHSTS_POLICY_MAX_AGE_PAST :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bHSTS_POLICY_MAX_AGE_PAST :: Int32
HSTS_POLICY_MAX_AGE_PAST = 0 :: Int32

-- | A macro containing the value
-- @application\/x-www-form-urlencoded@; the default
-- MIME type for POSTing HTML form data.
pattern $mFORM_MIME_TYPE_URLENCODED :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
$bFORM_MIME_TYPE_URLENCODED :: Text
FORM_MIME_TYPE_URLENCODED = "application/x-www-form-urlencoded" :: T.Text

-- | A macro containing the value
-- @multipart\/form-data@; the MIME type used for
-- posting form data that contains files to be uploaded.
pattern $mFORM_MIME_TYPE_MULTIPART :: forall {r}. Text -> ((# #) -> r) -> ((# #) -> r) -> r
$bFORM_MIME_TYPE_MULTIPART :: Text
FORM_MIME_TYPE_MULTIPART = "multipart/form-data" :: T.Text

-- | A constant corresponding to 1 year.
-- 
-- For use with [ctor/@cookie@/.new] and [method/@cookie@/.set_max_age].
pattern $mCOOKIE_MAX_AGE_ONE_YEAR :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOKIE_MAX_AGE_ONE_YEAR :: Int32
COOKIE_MAX_AGE_ONE_YEAR = 0 :: Int32

-- | A constant corresponding to 1 week.
-- 
-- For use with [ctor/@cookie@/.new] and [method/@cookie@/.set_max_age].
pattern $mCOOKIE_MAX_AGE_ONE_WEEK :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOKIE_MAX_AGE_ONE_WEEK :: Int32
COOKIE_MAX_AGE_ONE_WEEK = 0 :: Int32

-- | A constant corresponding to 1 hour.
-- 
-- For use with [ctor/@cookie@/.new] and [method/@cookie@/.set_max_age].
pattern $mCOOKIE_MAX_AGE_ONE_HOUR :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOKIE_MAX_AGE_ONE_HOUR :: Int32
COOKIE_MAX_AGE_ONE_HOUR = 3600 :: Int32

-- | A constant corresponding to 1 day.
-- 
-- For use with [ctor/@cookie@/.new] and [method/@cookie@/.set_max_age].
pattern $mCOOKIE_MAX_AGE_ONE_DAY :: forall {r}. Int32 -> ((# #) -> r) -> ((# #) -> r) -> r
$bCOOKIE_MAX_AGE_ONE_DAY :: Int32
COOKIE_MAX_AGE_ONE_DAY = 0 :: Int32