packages feed

gi-wireplumber-0.5.14.2: GI/Wp/Interfaces/PipewireObject.hs

{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- An interface for standard PipeWire objects.
-- The common characteristic of all objects that implement this interface is the presence of an \"info\" structure that contains additional properties for this object (in the form of a spa_dict \/ pw_properties) and optionally also some parameters that can be enumerated and set on the object.

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

module GI.Wp.Interfaces.PipewireObject
    ( 

-- * Exported types
    PipewireObject(..)                      ,
    IsPipewireObject                        ,
    toPipewireObject                        ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [abortActivation]("GI.Wp.Objects.Object#g:method:abortActivation"), [activate]("GI.Wp.Objects.Object#g:method:activate"), [activateClosure]("GI.Wp.Objects.Object#g:method:activateClosure"), [activateFinish]("GI.Wp.Objects.Object#g:method:activateFinish"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [deactivate]("GI.Wp.Objects.Object#g:method:deactivate"), [enumParams]("GI.Wp.Interfaces.PipewireObject#g:method:enumParams"), [enumParamsFinish]("GI.Wp.Interfaces.PipewireObject#g:method:enumParamsFinish"), [enumParamsSync]("GI.Wp.Interfaces.PipewireObject#g:method:enumParamsSync"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [newPropertiesIterator]("GI.Wp.Interfaces.PipewireObject#g:method:newPropertiesIterator"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [testActiveFeatures]("GI.Wp.Objects.Object#g:method:testActiveFeatures"), [testSupportedFeatures]("GI.Wp.Objects.Object#g:method:testSupportedFeatures"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [updateFeatures]("GI.Wp.Objects.Object#g:method:updateFeatures"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActiveFeatures]("GI.Wp.Objects.Object#g:method:getActiveFeatures"), [getBoundId]("GI.Wp.Objects.Proxy#g:method:getBoundId"), [getCore]("GI.Wp.Objects.Object#g:method:getCore"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getId]("GI.Wp.Objects.Object#g:method:getId"), [getInterfaceType]("GI.Wp.Objects.Proxy#g:method:getInterfaceType"), [getNativeInfo]("GI.Wp.Interfaces.PipewireObject#g:method:getNativeInfo"), [getParamInfo]("GI.Wp.Interfaces.PipewireObject#g:method:getParamInfo"), [getProperties]("GI.Wp.Interfaces.PipewireObject#g:method:getProperties"), [getProperty]("GI.Wp.Interfaces.PipewireObject#g:method:getProperty"), [getPwProxy]("GI.Wp.Objects.Proxy#g:method:getPwProxy"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSupportedFeatures]("GI.Wp.Objects.Object#g:method:getSupportedFeatures").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setParam]("GI.Wp.Interfaces.PipewireObject#g:method:setParam"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setPwProxy]("GI.Wp.Objects.Proxy#g:method:setPwProxy").

#if defined(ENABLE_OVERLOADING)
    ResolvePipewireObjectMethod             ,
#endif

-- ** enumParams #method:enumParams#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectEnumParamsMethodInfo      ,
#endif
    pipewireObjectEnumParams                ,


-- ** enumParamsFinish #method:enumParamsFinish#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectEnumParamsFinishMethodInfo,
#endif
    pipewireObjectEnumParamsFinish          ,


-- ** enumParamsSync #method:enumParamsSync#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectEnumParamsSyncMethodInfo  ,
#endif
    pipewireObjectEnumParamsSync            ,


-- ** getNativeInfo #method:getNativeInfo#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectGetNativeInfoMethodInfo   ,
#endif
    pipewireObjectGetNativeInfo             ,


-- ** getParamInfo #method:getParamInfo#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectGetParamInfoMethodInfo    ,
#endif
    pipewireObjectGetParamInfo              ,


-- ** getProperties #method:getProperties#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectGetPropertiesMethodInfo   ,
#endif
    pipewireObjectGetProperties             ,


-- ** getProperty #method:getProperty#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectGetPropertyMethodInfo     ,
#endif
    pipewireObjectGetProperty               ,


-- ** newPropertiesIterator #method:newPropertiesIterator#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectNewPropertiesIteratorMethodInfo,
#endif
    pipewireObjectNewPropertiesIterator     ,


-- ** setParam #method:setParam#

#if defined(ENABLE_OVERLOADING)
    PipewireObjectSetParamMethodInfo        ,
#endif
    pipewireObjectSetParam                  ,




 -- * Properties


-- ** nativeInfo #attr:nativeInfo#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    PipewireObjectNativeInfoPropertyInfo    ,
#endif
    getPipewireObjectNativeInfo             ,
#if defined(ENABLE_OVERLOADING)
    pipewireObjectNativeInfo                ,
#endif


-- ** paramInfo #attr:paramInfo#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    PipewireObjectParamInfoPropertyInfo     ,
#endif
    getPipewireObjectParamInfo              ,
#if defined(ENABLE_OVERLOADING)
    pipewireObjectParamInfo                 ,
#endif


-- ** properties #attr:properties#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    PipewireObjectPropertiesPropertyInfo    ,
#endif
    getPipewireObjectProperties             ,
#if defined(ENABLE_OVERLOADING)
    pipewireObjectProperties                ,
#endif




 -- * Signals


-- ** paramsChanged #signal:paramsChanged#

    PipewireObjectParamsChangedCallback     ,
#if defined(ENABLE_OVERLOADING)
    PipewireObjectParamsChangedSignalInfo   ,
#endif
    afterPipewireObjectParamsChanged        ,
    onPipewireObjectParamsChanged           ,




    ) 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)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Wp.Callbacks as Wp.Callbacks
import {-# SOURCE #-} qualified GI.Wp.Enums as Wp.Enums
import {-# SOURCE #-} qualified GI.Wp.Flags as Wp.Flags
import {-# SOURCE #-} qualified GI.Wp.Objects.Conf as Wp.Conf
import {-# SOURCE #-} qualified GI.Wp.Objects.Core as Wp.Core
import {-# SOURCE #-} qualified GI.Wp.Objects.Object as Wp.Object
import {-# SOURCE #-} qualified GI.Wp.Objects.ObjectManager as Wp.ObjectManager
import {-# SOURCE #-} qualified GI.Wp.Objects.Proxy as Wp.Proxy
import {-# SOURCE #-} qualified GI.Wp.Objects.SpaType as Wp.SpaType
import {-# SOURCE #-} qualified GI.Wp.Structs.Iterator as Wp.Iterator
import {-# SOURCE #-} qualified GI.Wp.Structs.IteratorMethods as Wp.IteratorMethods
import {-# SOURCE #-} qualified GI.Wp.Structs.ObjectInterest as Wp.ObjectInterest
import {-# SOURCE #-} qualified GI.Wp.Structs.Properties as Wp.Properties
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaJson as Wp.SpaJson
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaPod as Wp.SpaPod

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Wp.Objects.Object as Wp.Object
import {-# SOURCE #-} qualified GI.Wp.Objects.Proxy as Wp.Proxy
import {-# SOURCE #-} qualified GI.Wp.Structs.Iterator as Wp.Iterator
import {-# SOURCE #-} qualified GI.Wp.Structs.Properties as Wp.Properties
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaPod as Wp.SpaPod

#endif

-- interface PipewireObject 
-- | Memory-managed wrapper type.
newtype PipewireObject = PipewireObject (SP.ManagedPtr PipewireObject)
    deriving (Eq)

instance SP.ManagedPtrNewtype PipewireObject where
    toManagedPtr (PipewireObject p) = p

foreign import ccall "wp_pipewire_object_get_type"
    c_wp_pipewire_object_get_type :: IO B.Types.GType

instance B.Types.TypedObject PipewireObject where
    glibType = c_wp_pipewire_object_get_type

instance B.Types.GObject PipewireObject

-- | Type class for types which can be safely cast to t'PipewireObject', for instance with `toPipewireObject`.
class (SP.GObject o, O.IsDescendantOf PipewireObject o) => IsPipewireObject o
instance (SP.GObject o, O.IsDescendantOf PipewireObject o) => IsPipewireObject o

instance O.HasParentTypes PipewireObject
type instance O.ParentTypes PipewireObject = '[GObject.Object.Object, Wp.Proxy.Proxy, Wp.Object.Object]

-- | Cast to t'PipewireObject', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
toPipewireObject :: (MIO.MonadIO m, IsPipewireObject o) => o -> m PipewireObject
toPipewireObject = MIO.liftIO . B.ManagedPtr.unsafeCastTo PipewireObject

-- | Convert t'PipewireObject' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe PipewireObject) where
    gvalueGType_ = c_wp_pipewire_object_get_type
    gvalueSet_ gv P.Nothing = B.GValue.set_object gv (FP.nullPtr :: FP.Ptr PipewireObject)
    gvalueSet_ gv (P.Just obj) = B.ManagedPtr.withManagedPtr obj (B.GValue.set_object gv)
    gvalueGet_ gv = do
        ptr <- B.GValue.get_object gv :: IO (FP.Ptr PipewireObject)
        if ptr /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newObject PipewireObject ptr
        else return P.Nothing
        
    

-- VVV Prop "native-info"
   -- Type: TBasicType TPtr
   -- Flags: [PropertyReadable]
   -- Nullable: (Just True,Nothing)

-- | Get the value of the “@native-info@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pipewireObject #nativeInfo
-- @
getPipewireObjectNativeInfo :: (MonadIO m, IsPipewireObject o) => o -> m (Ptr ())
getPipewireObjectNativeInfo obj = MIO.liftIO $ B.Properties.getObjectPropertyPtr obj "native-info"

#if defined(ENABLE_OVERLOADING)
data PipewireObjectNativeInfoPropertyInfo
instance AttrInfo PipewireObjectNativeInfoPropertyInfo where
    type AttrAllowedOps PipewireObjectNativeInfoPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint PipewireObjectNativeInfoPropertyInfo = IsPipewireObject
    type AttrSetTypeConstraint PipewireObjectNativeInfoPropertyInfo = (~) ()
    type AttrTransferTypeConstraint PipewireObjectNativeInfoPropertyInfo = (~) ()
    type AttrTransferType PipewireObjectNativeInfoPropertyInfo = ()
    type AttrGetType PipewireObjectNativeInfoPropertyInfo = (Ptr ())
    type AttrLabel PipewireObjectNativeInfoPropertyInfo = "native-info"
    type AttrOrigin PipewireObjectNativeInfoPropertyInfo = PipewireObject
    attrGet = getPipewireObjectNativeInfo
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.nativeInfo"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#g:attr:nativeInfo"
        })
#endif

-- VVV Prop "param-info"
   -- Type: TVariant
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@param-info@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pipewireObject #paramInfo
-- @
getPipewireObjectParamInfo :: (MonadIO m, IsPipewireObject o) => o -> m (Maybe GVariant)
getPipewireObjectParamInfo obj = MIO.liftIO $ B.Properties.getObjectPropertyVariant obj "param-info"

#if defined(ENABLE_OVERLOADING)
data PipewireObjectParamInfoPropertyInfo
instance AttrInfo PipewireObjectParamInfoPropertyInfo where
    type AttrAllowedOps PipewireObjectParamInfoPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint PipewireObjectParamInfoPropertyInfo = IsPipewireObject
    type AttrSetTypeConstraint PipewireObjectParamInfoPropertyInfo = (~) ()
    type AttrTransferTypeConstraint PipewireObjectParamInfoPropertyInfo = (~) ()
    type AttrTransferType PipewireObjectParamInfoPropertyInfo = ()
    type AttrGetType PipewireObjectParamInfoPropertyInfo = (Maybe GVariant)
    type AttrLabel PipewireObjectParamInfoPropertyInfo = "param-info"
    type AttrOrigin PipewireObjectParamInfoPropertyInfo = PipewireObject
    attrGet = getPipewireObjectParamInfo
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.paramInfo"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#g:attr:paramInfo"
        })
#endif

-- VVV Prop "properties"
   -- Type: TInterface (Name {namespace = "Wp", name = "Properties"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@properties@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' pipewireObject #properties
-- @
getPipewireObjectProperties :: (MonadIO m, IsPipewireObject o) => o -> m (Maybe Wp.Properties.Properties)
getPipewireObjectProperties obj = MIO.liftIO $ B.Properties.getObjectPropertyBoxed obj "properties" Wp.Properties.Properties

#if defined(ENABLE_OVERLOADING)
data PipewireObjectPropertiesPropertyInfo
instance AttrInfo PipewireObjectPropertiesPropertyInfo where
    type AttrAllowedOps PipewireObjectPropertiesPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint PipewireObjectPropertiesPropertyInfo = IsPipewireObject
    type AttrSetTypeConstraint PipewireObjectPropertiesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint PipewireObjectPropertiesPropertyInfo = (~) ()
    type AttrTransferType PipewireObjectPropertiesPropertyInfo = ()
    type AttrGetType PipewireObjectPropertiesPropertyInfo = (Maybe Wp.Properties.Properties)
    type AttrLabel PipewireObjectPropertiesPropertyInfo = "properties"
    type AttrOrigin PipewireObjectPropertiesPropertyInfo = PipewireObject
    attrGet = getPipewireObjectProperties
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.properties"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#g:attr:properties"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PipewireObject
type instance O.AttributeList PipewireObject = PipewireObjectAttributeList
type PipewireObjectAttributeList = ('[ '("activeFeatures", Wp.Object.ObjectActiveFeaturesPropertyInfo), '("boundId", Wp.Proxy.ProxyBoundIdPropertyInfo), '("core", Wp.Object.ObjectCorePropertyInfo), '("id", Wp.Object.ObjectIdPropertyInfo), '("nativeInfo", PipewireObjectNativeInfoPropertyInfo), '("paramInfo", PipewireObjectParamInfoPropertyInfo), '("properties", PipewireObjectPropertiesPropertyInfo), '("pwProxy", Wp.Proxy.ProxyPwProxyPropertyInfo), '("supportedFeatures", Wp.Object.ObjectSupportedFeaturesPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
pipewireObjectNativeInfo :: AttrLabelProxy "nativeInfo"
pipewireObjectNativeInfo = AttrLabelProxy

pipewireObjectParamInfo :: AttrLabelProxy "paramInfo"
pipewireObjectParamInfo = AttrLabelProxy

pipewireObjectProperties :: AttrLabelProxy "properties"
pipewireObjectProperties = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type family ResolvePipewireObjectMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolvePipewireObjectMethod "abortActivation" o = Wp.Object.ObjectAbortActivationMethodInfo
    ResolvePipewireObjectMethod "activate" o = Wp.Object.ObjectActivateMethodInfo
    ResolvePipewireObjectMethod "activateClosure" o = Wp.Object.ObjectActivateClosureMethodInfo
    ResolvePipewireObjectMethod "activateFinish" o = Wp.Object.ObjectActivateFinishMethodInfo
    ResolvePipewireObjectMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePipewireObjectMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePipewireObjectMethod "deactivate" o = Wp.Object.ObjectDeactivateMethodInfo
    ResolvePipewireObjectMethod "enumParams" o = PipewireObjectEnumParamsMethodInfo
    ResolvePipewireObjectMethod "enumParamsFinish" o = PipewireObjectEnumParamsFinishMethodInfo
    ResolvePipewireObjectMethod "enumParamsSync" o = PipewireObjectEnumParamsSyncMethodInfo
    ResolvePipewireObjectMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePipewireObjectMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePipewireObjectMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePipewireObjectMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePipewireObjectMethod "newPropertiesIterator" o = PipewireObjectNewPropertiesIteratorMethodInfo
    ResolvePipewireObjectMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePipewireObjectMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePipewireObjectMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolvePipewireObjectMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePipewireObjectMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePipewireObjectMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePipewireObjectMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePipewireObjectMethod "testActiveFeatures" o = Wp.Object.ObjectTestActiveFeaturesMethodInfo
    ResolvePipewireObjectMethod "testSupportedFeatures" o = Wp.Object.ObjectTestSupportedFeaturesMethodInfo
    ResolvePipewireObjectMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePipewireObjectMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolvePipewireObjectMethod "updateFeatures" o = Wp.Object.ObjectUpdateFeaturesMethodInfo
    ResolvePipewireObjectMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePipewireObjectMethod "getActiveFeatures" o = Wp.Object.ObjectGetActiveFeaturesMethodInfo
    ResolvePipewireObjectMethod "getBoundId" o = Wp.Proxy.ProxyGetBoundIdMethodInfo
    ResolvePipewireObjectMethod "getCore" o = Wp.Object.ObjectGetCoreMethodInfo
    ResolvePipewireObjectMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePipewireObjectMethod "getId" o = Wp.Object.ObjectGetIdMethodInfo
    ResolvePipewireObjectMethod "getInterfaceType" o = Wp.Proxy.ProxyGetInterfaceTypeMethodInfo
    ResolvePipewireObjectMethod "getNativeInfo" o = PipewireObjectGetNativeInfoMethodInfo
    ResolvePipewireObjectMethod "getParamInfo" o = PipewireObjectGetParamInfoMethodInfo
    ResolvePipewireObjectMethod "getProperties" o = PipewireObjectGetPropertiesMethodInfo
    ResolvePipewireObjectMethod "getProperty" o = PipewireObjectGetPropertyMethodInfo
    ResolvePipewireObjectMethod "getPwProxy" o = Wp.Proxy.ProxyGetPwProxyMethodInfo
    ResolvePipewireObjectMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePipewireObjectMethod "getSupportedFeatures" o = Wp.Object.ObjectGetSupportedFeaturesMethodInfo
    ResolvePipewireObjectMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePipewireObjectMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePipewireObjectMethod "setParam" o = PipewireObjectSetParamMethodInfo
    ResolvePipewireObjectMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePipewireObjectMethod "setPwProxy" o = Wp.Proxy.ProxySetPwProxyMethodInfo
    ResolvePipewireObjectMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolvePipewireObjectMethod t PipewireObject, O.OverloadedMethod info PipewireObject p) => OL.IsLabel t (PipewireObject -> 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 ~ ResolvePipewireObjectMethod t PipewireObject, O.OverloadedMethod info PipewireObject p, R.HasField t PipewireObject p) => R.HasField t PipewireObject p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolvePipewireObjectMethod t PipewireObject, O.OverloadedMethodInfo info PipewireObject) => OL.IsLabel t (O.MethodProxy info PipewireObject) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- method PipewireObject::enum_params
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const gchar*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the parameter id to enumerate or NULL for all parameters"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "filter"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaPod" }
--           , argCType = Just "WpSpaPod*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a param filter or NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , argCType = Just "GCancellable*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a cancellable for the async operation"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , argCType = Just "GAsyncReadyCallback"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a callback to call with the result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 5
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , argCType = Just "gpointer"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "data to pass to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_enum_params" wp_pipewire_object_enum_params :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    CString ->                              -- id : TBasicType TUTF8
    Ptr Wp.SpaPod.SpaPod ->                 -- filter : TInterface (Name {namespace = "Wp", name = "SpaPod"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Enumerate object parameters.
-- 
-- 
-- This will asynchronously return the result, or an error, by calling the given /@callback@/. The result is going to be a WpIterator containing WpSpaPod objects, which can be retrieved with 'GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParamsFinish'.
pipewireObjectEnumParams ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: the pipewire object
    -> Maybe (T.Text)
    -- ^ /@id@/: the parameter id to enumerate or NULL for all parameters
    -> Maybe (Wp.SpaPod.SpaPod)
    -- ^ /@filter@/: a param filter or NULL
    -> Maybe (b)
    -- ^ /@cancellable@/: a cancellable for the async operation
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a callback to call with the result
    -> m ()
pipewireObjectEnumParams self id filter cancellable callback = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    maybeId <- case id of
        Nothing -> return FP.nullPtr
        Just jId -> do
            jId' <- textToCString jId
            return jId'
    maybeFilter <- case filter of
        Nothing -> return FP.nullPtr
        Just jFilter -> do
            jFilter' <- unsafeManagedPtrGetPtr jFilter
            return jFilter'
    maybeCancellable <- case cancellable of
        Nothing -> return FP.nullPtr
        Just jCancellable -> do
            jCancellable' <- unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    maybeCallback <- case callback of
        Nothing -> return FP.nullFunPtr
        Just jCallback -> do
            ptrcallback <- callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
            poke ptrcallback jCallback'
            return jCallback'
    let userData = nullPtr
    wp_pipewire_object_enum_params self' maybeId maybeFilter maybeCancellable maybeCallback userData
    touchManagedPtr self
    whenJust filter touchManagedPtr
    whenJust cancellable touchManagedPtr
    freeMem maybeId
    return ()

#if defined(ENABLE_OVERLOADING)
data PipewireObjectEnumParamsMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (Wp.SpaPod.SpaPod) -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsPipewireObject a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod PipewireObjectEnumParamsMethodInfo a signature where
    overloadedMethod = pipewireObjectEnumParams

instance O.OverloadedMethodInfo PipewireObjectEnumParamsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParams",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectEnumParams"
        })


#endif

-- method PipewireObject::enum_params_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "res"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , argCType = Just "GAsyncResult*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the async result" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "Iterator" })
-- throws : True
-- Skip return : False

foreign import ccall "wp_pipewire_object_enum_params_finish" wp_pipewire_object_enum_params_finish :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- res : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr Wp.Iterator.Iterator)

-- | Finishes an asynchronous parameter enumeration operation.
pipewireObjectEnumParamsFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@self@/: the pipewire object
    -> b
    -- ^ /@res@/: the async result
    -> m (Maybe Wp.Iterator.Iterator)
    -- ^ __Returns:__ an iterator to iterate over the collected params, or NULL if the operation resulted in error; the items in the iterator are WpSpaPod /(Can throw 'Data.GI.Base.GError.GError')/
pipewireObjectEnumParamsFinish self res = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    res' <- unsafeManagedPtrCastPtr res
    onException (do
        result <- propagateGError $ wp_pipewire_object_enum_params_finish self' res'
        maybeResult <- convertIfNonNull result $ \result' -> do
            result'' <- (wrapBoxed Wp.Iterator.Iterator) result'
            return result''
        touchManagedPtr self
        touchManagedPtr res
        return maybeResult
     ) (do
        return ()
     )

#if defined(ENABLE_OVERLOADING)
data PipewireObjectEnumParamsFinishMethodInfo
instance (signature ~ (b -> m (Maybe Wp.Iterator.Iterator)), MonadIO m, IsPipewireObject a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod PipewireObjectEnumParamsFinishMethodInfo a signature where
    overloadedMethod = pipewireObjectEnumParamsFinish

instance O.OverloadedMethodInfo PipewireObjectEnumParamsFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParamsFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectEnumParamsFinish"
        })


#endif

-- method PipewireObject::enum_params_sync
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const gchar*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parameter id to enumerate"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "filter"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaPod" }
--           , argCType = Just "WpSpaPod*"
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a param filter or NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "Iterator" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_enum_params_sync" wp_pipewire_object_enum_params_sync :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    CString ->                              -- id : TBasicType TUTF8
    Ptr Wp.SpaPod.SpaPod ->                 -- filter : TInterface (Name {namespace = "Wp", name = "SpaPod"})
    IO (Ptr Wp.Iterator.Iterator)

-- | This method can be used to retrieve object parameters in a synchronous way (in contrast with 'GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParams', which is async).
-- 
-- 
-- The WP_PIPEWIRE_OBJECT_FEATURE_PARAM_\<something> feature that corresponds to the specified /@id@/ must have been activated earlier. These features enable monitoring and caching of params underneath, so that they are always available for retrieval with this method.
-- Note, however, that cached params may be out-of-date if they have changed very recently on the remote object and the caching mechanism hasn\'t been able to update them yet, so if you really need up-to-date information you should only rely on 'GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParams' instead.
pipewireObjectEnumParamsSync ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> T.Text
    -- ^ /@id@/: the parameter id to enumerate
    -> Maybe (Wp.SpaPod.SpaPod)
    -- ^ /@filter@/: a param filter or NULL
    -> m (Maybe Wp.Iterator.Iterator)
    -- ^ __Returns:__ an iterator to iterate over cached parameters, or NULL if parameters for this /@id@/ are not cached; the items in the iterator are WpSpaPod
pipewireObjectEnumParamsSync self id filter = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    id' <- textToCString id
    maybeFilter <- case filter of
        Nothing -> return FP.nullPtr
        Just jFilter -> do
            jFilter' <- unsafeManagedPtrGetPtr jFilter
            return jFilter'
    result <- wp_pipewire_object_enum_params_sync self' id' maybeFilter
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- (wrapBoxed Wp.Iterator.Iterator) result'
        return result''
    touchManagedPtr self
    whenJust filter touchManagedPtr
    freeMem id'
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data PipewireObjectEnumParamsSyncMethodInfo
instance (signature ~ (T.Text -> Maybe (Wp.SpaPod.SpaPod) -> m (Maybe Wp.Iterator.Iterator)), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectEnumParamsSyncMethodInfo a signature where
    overloadedMethod = pipewireObjectEnumParamsSync

instance O.OverloadedMethodInfo PipewireObjectEnumParamsSyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParamsSync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectEnumParamsSync"
        })


#endif

-- method PipewireObject::get_native_info
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TPtr)
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_get_native_info" wp_pipewire_object_get_native_info :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    IO (Ptr ())

-- | Retrieves the native info structure of this object (pw_node_info, pw_port_info, etc...).
-- 
-- 
-- Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
pipewireObjectGetNativeInfo ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> m (Ptr ())
    -- ^ __Returns:__ the native pipewire info structure of this object
pipewireObjectGetNativeInfo self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_pipewire_object_get_native_info self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING)
data PipewireObjectGetNativeInfoMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectGetNativeInfoMethodInfo a signature where
    overloadedMethod = pipewireObjectGetNativeInfo

instance O.OverloadedMethodInfo PipewireObjectGetNativeInfoMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectGetNativeInfo",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectGetNativeInfo"
        })


#endif

-- method PipewireObject::get_param_info
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just TVariant
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_get_param_info" wp_pipewire_object_get_param_info :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    IO (Ptr GVariant)

-- | Returns the available parameters of this pipewire object.
-- 
-- 
-- The return value is a GVariant of type a{ss}, where the key of each map entry is a spa param type id (the same ids that you can pass in 'GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParams') and the value is a string that can contain the following letters, each of them representing a flag:
-- * r: the param is readable (SPA_PARAM_INFO_READ)
-- * w: the param is writable (SPA_PARAM_INFO_WRITE)
-- 
-- 
-- For params that are readable, you can query them with 'GI.Wp.Interfaces.PipewireObject.pipewireObjectEnumParams'
-- Params that are writable can be set with 'GI.Wp.Interfaces.PipewireObject.pipewireObjectSetParam'
-- Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
pipewireObjectGetParamInfo ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> m (Maybe GVariant)
    -- ^ __Returns:__ a variant of type a{ss} or NULL if the object does not support params at all
pipewireObjectGetParamInfo self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_pipewire_object_get_param_info self'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- B.GVariant.wrapGVariantPtr result'
        return result''
    touchManagedPtr self
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data PipewireObjectGetParamInfoMethodInfo
instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectGetParamInfoMethodInfo a signature where
    overloadedMethod = pipewireObjectGetParamInfo

instance O.OverloadedMethodInfo PipewireObjectGetParamInfoMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectGetParamInfo",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectGetParamInfo"
        })


#endif

-- method PipewireObject::get_properties
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "Properties" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_get_properties" wp_pipewire_object_get_properties :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    IO (Ptr Wp.Properties.Properties)

-- | Retrieves the PipeWire properties of this object.
-- 
-- 
-- Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
pipewireObjectGetProperties ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> m Wp.Properties.Properties
    -- ^ __Returns:__ the pipewire properties of this object; normally these are the properties that are part of the info structure
pipewireObjectGetProperties self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_pipewire_object_get_properties self'
    checkUnexpectedReturnNULL "pipewireObjectGetProperties" result
    result' <- (wrapBoxed Wp.Properties.Properties) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data PipewireObjectGetPropertiesMethodInfo
instance (signature ~ (m Wp.Properties.Properties), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectGetPropertiesMethodInfo a signature where
    overloadedMethod = pipewireObjectGetProperties

instance O.OverloadedMethodInfo PipewireObjectGetPropertiesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectGetProperties",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectGetProperties"
        })


#endif

-- method PipewireObject::get_property
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "key"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const gchar*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the property name" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_get_property" wp_pipewire_object_get_property :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    CString ->                              -- key : TBasicType TUTF8
    IO CString

-- | Returns the value of a single pipewire property.
-- 
-- 
-- This is the same as getting the whole properties structure with 'GI.Wp.Interfaces.PipewireObject.pipewireObjectGetProperties' and accessing a single property with 'GI.Wp.Structs.Properties.propertiesGet', but saves one call and having to clean up the WpProperties reference count afterwards.
-- The value is owned by the proxy, but it is guaranteed to stay alive until execution returns back to the event loop.
-- Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
pipewireObjectGetProperty ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> T.Text
    -- ^ /@key@/: the property name
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the value of the pipewire property /@key@/ or NULL if the property doesn\'t exist
pipewireObjectGetProperty self key = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    key' <- textToCString key
    result <- wp_pipewire_object_get_property self' key'
    maybeResult <- convertIfNonNull result $ \result' -> do
        result'' <- cstringToText result'
        return result''
    touchManagedPtr self
    freeMem key'
    return maybeResult

#if defined(ENABLE_OVERLOADING)
data PipewireObjectGetPropertyMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectGetPropertyMethodInfo a signature where
    overloadedMethod = pipewireObjectGetProperty

instance O.OverloadedMethodInfo PipewireObjectGetPropertyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectGetProperty",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectGetProperty"
        })


#endif

-- method PipewireObject::new_properties_iterator
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "Iterator" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_new_properties_iterator" wp_pipewire_object_new_properties_iterator :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    IO (Ptr Wp.Iterator.Iterator)

-- | Iterates over the object\'s PipeWire properties.
-- 
-- 
-- Requires WP_PIPEWIRE_OBJECT_FEATURE_INFO
pipewireObjectNewPropertiesIterator ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> m Wp.Iterator.Iterator
    -- ^ __Returns:__ an iterator that iterates over the pipewire properties of this object. Use @/wp_properties_iterator_item_get_key()/@ and @/wp_properties_iterator_item_get_value()/@ to parse the items returned by this iterator.
pipewireObjectNewPropertiesIterator self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_pipewire_object_new_properties_iterator self'
    checkUnexpectedReturnNULL "pipewireObjectNewPropertiesIterator" result
    result' <- (wrapBoxed Wp.Iterator.Iterator) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data PipewireObjectNewPropertiesIteratorMethodInfo
instance (signature ~ (m Wp.Iterator.Iterator), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectNewPropertiesIteratorMethodInfo a signature where
    overloadedMethod = pipewireObjectNewPropertiesIterator

instance O.OverloadedMethodInfo PipewireObjectNewPropertiesIteratorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectNewPropertiesIterator",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectNewPropertiesIterator"
        })


#endif

-- method PipewireObject::set_param
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PipewireObject" }
--           , argCType = Just "WpPipewireObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pipewire object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const gchar*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parameter id to set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "optional flags or 0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "param"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaPod" }
--           , argCType = Just "WpSpaPod*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the parameter to set"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_pipewire_object_set_param" wp_pipewire_object_set_param :: 
    Ptr PipewireObject ->                   -- self : TInterface (Name {namespace = "Wp", name = "PipewireObject"})
    CString ->                              -- id : TBasicType TUTF8
    Word32 ->                               -- flags : TBasicType TUInt32
    Ptr Wp.SpaPod.SpaPod ->                 -- param : TInterface (Name {namespace = "Wp", name = "SpaPod"})
    IO CInt

-- | Sets a parameter on the object.
pipewireObjectSetParam ::
    (B.CallStack.HasCallStack, MonadIO m, IsPipewireObject a) =>
    a
    -- ^ /@self@/: the pipewire object
    -> T.Text
    -- ^ /@id@/: the parameter id to set
    -> Word32
    -- ^ /@flags@/: optional flags or 0
    -> Wp.SpaPod.SpaPod
    -- ^ /@param@/: the parameter to set
    -> m Bool
    -- ^ __Returns:__ TRUE on success, FALSE if setting the param failed
pipewireObjectSetParam self id flags param = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    id' <- textToCString id
    param' <- B.ManagedPtr.disownBoxed param
    result <- wp_pipewire_object_set_param self' id' flags param'
    let result' = (/= 0) result
    touchManagedPtr self
    touchManagedPtr param
    freeMem id'
    return result'

#if defined(ENABLE_OVERLOADING)
data PipewireObjectSetParamMethodInfo
instance (signature ~ (T.Text -> Word32 -> Wp.SpaPod.SpaPod -> m Bool), MonadIO m, IsPipewireObject a) => O.OverloadedMethod PipewireObjectSetParamMethodInfo a signature where
    overloadedMethod = pipewireObjectSetParam

instance O.OverloadedMethodInfo PipewireObjectSetParamMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject.pipewireObjectSetParam",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#v:pipewireObjectSetParam"
        })


#endif

-- signal PipewireObject::params-changed
-- | /No description available in the introspection data./
type PipewireObjectParamsChangedCallback =
    T.Text
    -> IO ()

type C_PipewireObjectParamsChangedCallback =
    Ptr PipewireObject ->                   -- object
    CString ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_PipewireObjectParamsChangedCallback`.
foreign import ccall "wrapper"
    mk_PipewireObjectParamsChangedCallback :: C_PipewireObjectParamsChangedCallback -> IO (FunPtr C_PipewireObjectParamsChangedCallback)

wrap_PipewireObjectParamsChangedCallback :: 
    GObject a => (a -> PipewireObjectParamsChangedCallback) ->
    C_PipewireObjectParamsChangedCallback
wrap_PipewireObjectParamsChangedCallback gi'cb gi'selfPtr object _ = do
    object' <- cstringToText object
    B.ManagedPtr.withNewObject gi'selfPtr $ \gi'self -> gi'cb (Coerce.coerce gi'self)  object'


-- | Connect a signal handler for the [paramsChanged](#signal:paramsChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' pipewireObject #paramsChanged callback
-- @
-- 
-- 
onPipewireObjectParamsChanged :: (IsPipewireObject a, MonadIO m) => a -> ((?self :: a) => PipewireObjectParamsChangedCallback) -> m SignalHandlerId
onPipewireObjectParamsChanged obj cb = liftIO $ do
    let wrapped self = let ?self = self in cb
    let wrapped' = wrap_PipewireObjectParamsChangedCallback wrapped
    wrapped'' <- mk_PipewireObjectParamsChangedCallback wrapped'
    connectSignalFunPtr obj "params-changed" wrapped'' SignalConnectBefore Nothing

-- | Connect a signal handler for the [paramsChanged](#signal:paramsChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' pipewireObject #paramsChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterPipewireObjectParamsChanged :: (IsPipewireObject a, MonadIO m) => a -> ((?self :: a) => PipewireObjectParamsChangedCallback) -> m SignalHandlerId
afterPipewireObjectParamsChanged obj cb = liftIO $ do
    let wrapped self = let ?self = self in cb
    let wrapped' = wrap_PipewireObjectParamsChangedCallback wrapped
    wrapped'' <- mk_PipewireObjectParamsChangedCallback wrapped'
    connectSignalFunPtr obj "params-changed" wrapped'' SignalConnectAfter Nothing


#if defined(ENABLE_OVERLOADING)
data PipewireObjectParamsChangedSignalInfo
instance SignalInfo PipewireObjectParamsChangedSignalInfo where
    type HaskellCallbackType PipewireObjectParamsChangedSignalInfo = PipewireObjectParamsChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_PipewireObjectParamsChangedCallback cb
        cb'' <- mk_PipewireObjectParamsChangedCallback cb'
        connectSignalFunPtr obj "params-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Interfaces.PipewireObject::params-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Interfaces-PipewireObject.html#g:signal:paramsChanged"})

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PipewireObject = PipewireObjectSignalList
type PipewireObjectSignalList = ('[ '("bound", Wp.Proxy.ProxyBoundSignalInfo), '("error", Wp.Proxy.ProxyErrorSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("paramsChanged", PipewireObjectParamsChangedSignalInfo), '("pwProxyCreated", Wp.Proxy.ProxyPwProxyCreatedSignalInfo), '("pwProxyDestroyed", Wp.Proxy.ProxyPwProxyDestroyedSignalInfo)] :: [(Symbol, DK.Type)])

#endif