{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Soup.Objects.WebsocketExtensionManager
(
WebsocketExtensionManager(..) ,
IsWebsocketExtensionManager ,
toWebsocketExtensionManager ,
#if defined(ENABLE_OVERLOADING)
ResolveWebsocketExtensionManagerMethod ,
#endif
) 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
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Enums as Gio.Enums
import qualified GI.Gio.Flags as Gio.Flags
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Interfaces.ProxyResolver as Gio.ProxyResolver
import qualified GI.Gio.Interfaces.SocketConnectable as Gio.SocketConnectable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.IOStream as Gio.IOStream
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
import qualified GI.Gio.Objects.Socket as Gio.Socket
import qualified GI.Gio.Objects.SocketAddress as Gio.SocketAddress
import qualified GI.Gio.Objects.TlsCertificate as Gio.TlsCertificate
import qualified GI.Gio.Objects.TlsDatabase as Gio.TlsDatabase
import qualified GI.Gio.Objects.TlsInteraction as Gio.TlsInteraction
import qualified GI.Soup.Callbacks as Soup.Callbacks
import {-# SOURCE #-} qualified GI.Soup.Enums as Soup.Enums
import {-# SOURCE #-} qualified GI.Soup.Flags as Soup.Flags
import {-# SOURCE #-} qualified GI.Soup.Interfaces.SessionFeature as Soup.SessionFeature
import {-# SOURCE #-} qualified GI.Soup.Objects.Address as Soup.Address
import {-# SOURCE #-} qualified GI.Soup.Objects.Auth as Soup.Auth
import {-# SOURCE #-} qualified GI.Soup.Objects.Message as Soup.Message
import {-# SOURCE #-} qualified GI.Soup.Objects.Request as Soup.Request
import {-# SOURCE #-} qualified GI.Soup.Objects.RequestHTTP as Soup.RequestHTTP
import {-# SOURCE #-} qualified GI.Soup.Objects.Session as Soup.Session
import {-# SOURCE #-} qualified GI.Soup.Objects.Socket as Soup.Socket
import {-# SOURCE #-} qualified GI.Soup.Objects.WebsocketConnection as Soup.WebsocketConnection
import {-# SOURCE #-} qualified GI.Soup.Objects.WebsocketExtension as Soup.WebsocketExtension
import {-# SOURCE #-} qualified GI.Soup.Structs.Buffer as Soup.Buffer
import {-# SOURCE #-} qualified GI.Soup.Structs.MessageBody as Soup.MessageBody
import {-# SOURCE #-} qualified GI.Soup.Structs.MessageHeaders as Soup.MessageHeaders
import {-# SOURCE #-} qualified GI.Soup.Structs.Range as Soup.Range
import {-# SOURCE #-} qualified GI.Soup.Structs.URI as Soup.URI
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Soup.Interfaces.SessionFeature as Soup.SessionFeature
#endif
newtype WebsocketExtensionManager = WebsocketExtensionManager (SP.ManagedPtr WebsocketExtensionManager)
deriving (WebsocketExtensionManager -> WebsocketExtensionManager -> Bool
(WebsocketExtensionManager -> WebsocketExtensionManager -> Bool)
-> (WebsocketExtensionManager -> WebsocketExtensionManager -> Bool)
-> Eq WebsocketExtensionManager
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebsocketExtensionManager -> WebsocketExtensionManager -> Bool
== :: WebsocketExtensionManager -> WebsocketExtensionManager -> Bool
$c/= :: WebsocketExtensionManager -> WebsocketExtensionManager -> Bool
/= :: WebsocketExtensionManager -> WebsocketExtensionManager -> Bool
Eq)
instance SP.ManagedPtrNewtype WebsocketExtensionManager where
toManagedPtr :: WebsocketExtensionManager -> ManagedPtr WebsocketExtensionManager
toManagedPtr (WebsocketExtensionManager ManagedPtr WebsocketExtensionManager
p) = ManagedPtr WebsocketExtensionManager
p
foreign import ccall "soup_websocket_extension_manager_get_type"
c_soup_websocket_extension_manager_get_type :: IO B.Types.GType
instance B.Types.TypedObject WebsocketExtensionManager where
glibType :: IO GType
glibType = IO GType
c_soup_websocket_extension_manager_get_type
instance B.Types.GObject WebsocketExtensionManager
class (SP.GObject o, O.IsDescendantOf WebsocketExtensionManager o) => IsWebsocketExtensionManager o
instance (SP.GObject o, O.IsDescendantOf WebsocketExtensionManager o) => IsWebsocketExtensionManager o
instance O.HasParentTypes WebsocketExtensionManager
type instance O.ParentTypes WebsocketExtensionManager = '[GObject.Object.Object, Soup.SessionFeature.SessionFeature]
toWebsocketExtensionManager :: (MIO.MonadIO m, IsWebsocketExtensionManager o) => o -> m WebsocketExtensionManager
toWebsocketExtensionManager :: forall (m :: * -> *) o.
(MonadIO m, IsWebsocketExtensionManager o) =>
o -> m WebsocketExtensionManager
toWebsocketExtensionManager = IO WebsocketExtensionManager -> m WebsocketExtensionManager
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WebsocketExtensionManager -> m WebsocketExtensionManager)
-> (o -> IO WebsocketExtensionManager)
-> o
-> m WebsocketExtensionManager
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WebsocketExtensionManager -> WebsocketExtensionManager)
-> o -> IO WebsocketExtensionManager
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WebsocketExtensionManager -> WebsocketExtensionManager
WebsocketExtensionManager
instance B.GValue.IsGValue (Maybe WebsocketExtensionManager) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_soup_websocket_extension_manager_get_type
gvalueSet_ :: Ptr GValue -> Maybe WebsocketExtensionManager -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WebsocketExtensionManager
P.Nothing = Ptr GValue -> Ptr WebsocketExtensionManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WebsocketExtensionManager
forall a. Ptr a
FP.nullPtr :: FP.Ptr WebsocketExtensionManager)
gvalueSet_ Ptr GValue
gv (P.Just WebsocketExtensionManager
obj) = WebsocketExtensionManager
-> (Ptr WebsocketExtensionManager -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WebsocketExtensionManager
obj (Ptr GValue -> Ptr WebsocketExtensionManager -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe WebsocketExtensionManager)
gvalueGet_ Ptr GValue
gv = do
Ptr WebsocketExtensionManager
ptr <- Ptr GValue -> IO (Ptr WebsocketExtensionManager)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WebsocketExtensionManager)
if Ptr WebsocketExtensionManager
ptr Ptr WebsocketExtensionManager
-> Ptr WebsocketExtensionManager -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WebsocketExtensionManager
forall a. Ptr a
FP.nullPtr
then WebsocketExtensionManager -> Maybe WebsocketExtensionManager
forall a. a -> Maybe a
P.Just (WebsocketExtensionManager -> Maybe WebsocketExtensionManager)
-> IO WebsocketExtensionManager
-> IO (Maybe WebsocketExtensionManager)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WebsocketExtensionManager -> WebsocketExtensionManager)
-> Ptr WebsocketExtensionManager -> IO WebsocketExtensionManager
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WebsocketExtensionManager -> WebsocketExtensionManager
WebsocketExtensionManager Ptr WebsocketExtensionManager
ptr
else Maybe WebsocketExtensionManager
-> IO (Maybe WebsocketExtensionManager)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WebsocketExtensionManager
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWebsocketExtensionManagerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveWebsocketExtensionManagerMethod "addFeature" o = Soup.SessionFeature.SessionFeatureAddFeatureMethodInfo
ResolveWebsocketExtensionManagerMethod "attach" o = Soup.SessionFeature.SessionFeatureAttachMethodInfo
ResolveWebsocketExtensionManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWebsocketExtensionManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWebsocketExtensionManagerMethod "detach" o = Soup.SessionFeature.SessionFeatureDetachMethodInfo
ResolveWebsocketExtensionManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWebsocketExtensionManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWebsocketExtensionManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWebsocketExtensionManagerMethod "hasFeature" o = Soup.SessionFeature.SessionFeatureHasFeatureMethodInfo
ResolveWebsocketExtensionManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWebsocketExtensionManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWebsocketExtensionManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWebsocketExtensionManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWebsocketExtensionManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWebsocketExtensionManagerMethod "removeFeature" o = Soup.SessionFeature.SessionFeatureRemoveFeatureMethodInfo
ResolveWebsocketExtensionManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWebsocketExtensionManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWebsocketExtensionManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWebsocketExtensionManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWebsocketExtensionManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWebsocketExtensionManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWebsocketExtensionManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWebsocketExtensionManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWebsocketExtensionManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWebsocketExtensionManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWebsocketExtensionManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWebsocketExtensionManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWebsocketExtensionManagerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWebsocketExtensionManagerMethod t WebsocketExtensionManager, O.OverloadedMethod info WebsocketExtensionManager p) => OL.IsLabel t (WebsocketExtensionManager -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWebsocketExtensionManagerMethod t WebsocketExtensionManager, O.OverloadedMethod info WebsocketExtensionManager p, R.HasField t WebsocketExtensionManager p) => R.HasField t WebsocketExtensionManager p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveWebsocketExtensionManagerMethod t WebsocketExtensionManager, O.OverloadedMethodInfo info WebsocketExtensionManager) => OL.IsLabel t (O.MethodProxy info WebsocketExtensionManager) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WebsocketExtensionManager
type instance O.AttributeList WebsocketExtensionManager = WebsocketExtensionManagerAttributeList
type WebsocketExtensionManagerAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WebsocketExtensionManager = WebsocketExtensionManagerSignalList
type WebsocketExtensionManagerSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif