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


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The WpPermissionManager class is in charge of updating automatically permissions on interested objects every time they are added or removed for a particular client.
-- WpPermissionManager API.

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

module GI.Wp.Objects.PermissionManager
    ( 

-- * Exported types
    PermissionManager(..)                   ,
    IsPermissionManager                     ,
    toPermissionManager                     ,


 -- * 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"), [addInterestMatch]("GI.Wp.Objects.PermissionManager#g:method:addInterestMatch"), [addInterestMatchClosure]("GI.Wp.Objects.PermissionManager#g:method:addInterestMatchClosure"), [addInterestMatchSimple]("GI.Wp.Objects.PermissionManager#g:method:addInterestMatchSimple"), [addRulesMatch]("GI.Wp.Objects.PermissionManager#g:method:addRulesMatch"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [deactivate]("GI.Wp.Objects.Object#g:method:deactivate"), [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"), [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"), [removeMatch]("GI.Wp.Objects.PermissionManager#g:method:removeMatch"), [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"), [updatePermissions]("GI.Wp.Objects.PermissionManager#g:method:updatePermissions"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActiveFeatures]("GI.Wp.Objects.Object#g:method:getActiveFeatures"), [getCore]("GI.Wp.Objects.Object#g:method:getCore"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDefaultPermissions]("GI.Wp.Objects.PermissionManager#g:method:getDefaultPermissions"), [getId]("GI.Wp.Objects.Object#g:method:getId"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSupportedFeatures]("GI.Wp.Objects.Object#g:method:getSupportedFeatures").
-- 
-- ==== Setters
-- [setCorePermissions]("GI.Wp.Objects.PermissionManager#g:method:setCorePermissions"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDefaultPermissions]("GI.Wp.Objects.PermissionManager#g:method:setDefaultPermissions"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolvePermissionManagerMethod          ,
#endif

-- ** addInterestMatch #method:addInterestMatch#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerAddInterestMatchMethodInfo,
#endif
    permissionManagerAddInterestMatch       ,


-- ** addInterestMatchClosure #method:addInterestMatchClosure#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerAddInterestMatchClosureMethodInfo,
#endif
    permissionManagerAddInterestMatchClosure,


-- ** addInterestMatchSimple #method:addInterestMatchSimple#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerAddInterestMatchSimpleMethodInfo,
#endif
    permissionManagerAddInterestMatchSimple ,


-- ** addRulesMatch #method:addRulesMatch#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerAddRulesMatchMethodInfo,
#endif
    permissionManagerAddRulesMatch          ,


-- ** getDefaultPermissions #method:getDefaultPermissions#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerGetDefaultPermissionsMethodInfo,
#endif
    permissionManagerGetDefaultPermissions  ,


-- ** new #method:new#

    permissionManagerNew                    ,


-- ** removeMatch #method:removeMatch#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerRemoveMatchMethodInfo  ,
#endif
    permissionManagerRemoveMatch            ,


-- ** setCorePermissions #method:setCorePermissions#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerSetCorePermissionsMethodInfo,
#endif
    permissionManagerSetCorePermissions     ,


-- ** setDefaultPermissions #method:setDefaultPermissions#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerSetDefaultPermissionsMethodInfo,
#endif
    permissionManagerSetDefaultPermissions  ,


-- ** updatePermissions #method:updatePermissions#

#if defined(ENABLE_OVERLOADING)
    PermissionManagerUpdatePermissionsMethodInfo,
#endif
    permissionManagerUpdatePermissions      ,




 -- * Signals


-- ** clientPropertiesChanged #signal:clientPropertiesChanged#

    PermissionManagerClientPropertiesChangedCallback,
#if defined(ENABLE_OVERLOADING)
    PermissionManagerClientPropertiesChangedSignalInfo,
#endif
    afterPermissionManagerClientPropertiesChanged,
    onPermissionManagerClientPropertiesChanged,




    ) 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.Interfaces.PipewireObject as Wp.PipewireObject
import {-# SOURCE #-} qualified GI.Wp.Objects.Client as Wp.Client
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.GlobalProxy as Wp.GlobalProxy
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.Wp.Callbacks as Wp.Callbacks
import {-# SOURCE #-} qualified GI.Wp.Objects.Client as Wp.Client
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.Structs.ObjectInterest as Wp.ObjectInterest
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaJson as Wp.SpaJson

#endif

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

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

foreign import ccall "wp_permission_manager_get_type"
    c_wp_permission_manager_get_type :: IO B.Types.GType

instance B.Types.TypedObject PermissionManager where
    glibType = c_wp_permission_manager_get_type

instance B.Types.GObject PermissionManager

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

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

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

-- | Convert t'PermissionManager' 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 PermissionManager) where
    gvalueGType_ = c_wp_permission_manager_get_type
    gvalueSet_ gv P.Nothing = B.GValue.set_object gv (FP.nullPtr :: FP.Ptr PermissionManager)
    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 PermissionManager)
        if ptr /= FP.nullPtr
        then P.Just <$> B.ManagedPtr.newObject PermissionManager ptr
        else return P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolvePermissionManagerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolvePermissionManagerMethod "abortActivation" o = Wp.Object.ObjectAbortActivationMethodInfo
    ResolvePermissionManagerMethod "activate" o = Wp.Object.ObjectActivateMethodInfo
    ResolvePermissionManagerMethod "activateClosure" o = Wp.Object.ObjectActivateClosureMethodInfo
    ResolvePermissionManagerMethod "activateFinish" o = Wp.Object.ObjectActivateFinishMethodInfo
    ResolvePermissionManagerMethod "addInterestMatch" o = PermissionManagerAddInterestMatchMethodInfo
    ResolvePermissionManagerMethod "addInterestMatchClosure" o = PermissionManagerAddInterestMatchClosureMethodInfo
    ResolvePermissionManagerMethod "addInterestMatchSimple" o = PermissionManagerAddInterestMatchSimpleMethodInfo
    ResolvePermissionManagerMethod "addRulesMatch" o = PermissionManagerAddRulesMatchMethodInfo
    ResolvePermissionManagerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePermissionManagerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePermissionManagerMethod "deactivate" o = Wp.Object.ObjectDeactivateMethodInfo
    ResolvePermissionManagerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePermissionManagerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePermissionManagerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePermissionManagerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePermissionManagerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePermissionManagerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePermissionManagerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolvePermissionManagerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePermissionManagerMethod "removeMatch" o = PermissionManagerRemoveMatchMethodInfo
    ResolvePermissionManagerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePermissionManagerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePermissionManagerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePermissionManagerMethod "testActiveFeatures" o = Wp.Object.ObjectTestActiveFeaturesMethodInfo
    ResolvePermissionManagerMethod "testSupportedFeatures" o = Wp.Object.ObjectTestSupportedFeaturesMethodInfo
    ResolvePermissionManagerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePermissionManagerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolvePermissionManagerMethod "updateFeatures" o = Wp.Object.ObjectUpdateFeaturesMethodInfo
    ResolvePermissionManagerMethod "updatePermissions" o = PermissionManagerUpdatePermissionsMethodInfo
    ResolvePermissionManagerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePermissionManagerMethod "getActiveFeatures" o = Wp.Object.ObjectGetActiveFeaturesMethodInfo
    ResolvePermissionManagerMethod "getCore" o = Wp.Object.ObjectGetCoreMethodInfo
    ResolvePermissionManagerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePermissionManagerMethod "getDefaultPermissions" o = PermissionManagerGetDefaultPermissionsMethodInfo
    ResolvePermissionManagerMethod "getId" o = Wp.Object.ObjectGetIdMethodInfo
    ResolvePermissionManagerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolvePermissionManagerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePermissionManagerMethod "getSupportedFeatures" o = Wp.Object.ObjectGetSupportedFeaturesMethodInfo
    ResolvePermissionManagerMethod "setCorePermissions" o = PermissionManagerSetCorePermissionsMethodInfo
    ResolvePermissionManagerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePermissionManagerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePermissionManagerMethod "setDefaultPermissions" o = PermissionManagerSetDefaultPermissionsMethodInfo
    ResolvePermissionManagerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePermissionManagerMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif

-- signal PermissionManager::client-properties-changed
-- | /No description available in the introspection data./
type PermissionManagerClientPropertiesChangedCallback =
    Wp.Client.Client
    -> IO ()

type C_PermissionManagerClientPropertiesChangedCallback =
    Ptr PermissionManager ->                -- object
    Ptr Wp.Client.Client ->
    Ptr () ->                               -- user_data
    IO ()

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

wrap_PermissionManagerClientPropertiesChangedCallback :: 
    GObject a => (a -> PermissionManagerClientPropertiesChangedCallback) ->
    C_PermissionManagerClientPropertiesChangedCallback
wrap_PermissionManagerClientPropertiesChangedCallback gi'cb gi'selfPtr object _ = do
    object' <- (newObject Wp.Client.Client) object
    B.ManagedPtr.withNewObject gi'selfPtr $ \gi'self -> gi'cb (Coerce.coerce gi'self)  object'


-- | Connect a signal handler for the [clientPropertiesChanged](#signal:clientPropertiesChanged) 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' permissionManager #clientPropertiesChanged callback
-- @
-- 
-- 
onPermissionManagerClientPropertiesChanged :: (IsPermissionManager a, MonadIO m) => a -> ((?self :: a) => PermissionManagerClientPropertiesChangedCallback) -> m SignalHandlerId
onPermissionManagerClientPropertiesChanged obj cb = liftIO $ do
    let wrapped self = let ?self = self in cb
    let wrapped' = wrap_PermissionManagerClientPropertiesChangedCallback wrapped
    wrapped'' <- mk_PermissionManagerClientPropertiesChangedCallback wrapped'
    connectSignalFunPtr obj "client-properties-changed" wrapped'' SignalConnectBefore Nothing

-- | Connect a signal handler for the [clientPropertiesChanged](#signal:clientPropertiesChanged) 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' permissionManager #clientPropertiesChanged 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.
-- 
afterPermissionManagerClientPropertiesChanged :: (IsPermissionManager a, MonadIO m) => a -> ((?self :: a) => PermissionManagerClientPropertiesChangedCallback) -> m SignalHandlerId
afterPermissionManagerClientPropertiesChanged obj cb = liftIO $ do
    let wrapped self = let ?self = self in cb
    let wrapped' = wrap_PermissionManagerClientPropertiesChangedCallback wrapped
    wrapped'' <- mk_PermissionManagerClientPropertiesChangedCallback wrapped'
    connectSignalFunPtr obj "client-properties-changed" wrapped'' SignalConnectAfter Nothing


#if defined(ENABLE_OVERLOADING)
data PermissionManagerClientPropertiesChangedSignalInfo
instance SignalInfo PermissionManagerClientPropertiesChangedSignalInfo where
    type HaskellCallbackType PermissionManagerClientPropertiesChangedSignalInfo = PermissionManagerClientPropertiesChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_PermissionManagerClientPropertiesChangedCallback cb
        cb'' <- mk_PermissionManagerClientPropertiesChangedCallback cb'
        connectSignalFunPtr obj "client-properties-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.PermissionManager::client-properties-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Objects-PermissionManager.html#g:signal:clientPropertiesChanged"})

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PermissionManager
type instance O.AttributeList PermissionManager = PermissionManagerAttributeList
type PermissionManagerAttributeList = ('[ '("activeFeatures", Wp.Object.ObjectActiveFeaturesPropertyInfo), '("core", Wp.Object.ObjectCorePropertyInfo), '("id", Wp.Object.ObjectIdPropertyInfo), '("supportedFeatures", Wp.Object.ObjectSupportedFeaturesPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PermissionManager = PermissionManagerSignalList
type PermissionManagerSignalList = ('[ '("clientPropertiesChanged", PermissionManagerClientPropertiesChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method PermissionManager::new
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "core"
--           , argType = TInterface Name { namespace = "Wp" , name = "Core" }
--           , argCType = Just "WpCore*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the WpCore" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Wp" , name = "PermissionManager" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_permission_manager_new" wp_permission_manager_new :: 
    Ptr Wp.Core.Core ->                     -- core : TInterface (Name {namespace = "Wp", name = "Core"})
    IO (Ptr PermissionManager)

-- | Creates a new WpPermissionManager object.
permissionManagerNew ::
    (B.CallStack.HasCallStack, MonadIO m, Wp.Core.IsCore a) =>
    a
    -- ^ /@core@/: the WpCore
    -> m PermissionManager
    -- ^ __Returns:__ a new WpPermissionManager object
permissionManagerNew core = liftIO $ do
    core' <- unsafeManagedPtrCastPtr core
    result <- wp_permission_manager_new core'
    checkUnexpectedReturnNULL "permissionManagerNew" result
    result' <- (wrapObject PermissionManager) result
    touchManagedPtr core
    return result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method PermissionManager::add_interest_match
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface
--                 Name { namespace = "Wp" , name = "PermissionMatchCallback" }
--           , argCType = Just "WpPermissionMatchCallback"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permissions match callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 2
--           , 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
--           }
--       , Arg
--           { argCName = "interest"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "ObjectInterest" }
--           , argCType = Just "WpObjectInterest*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the interest" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "wp_permission_manager_add_interest_match" wp_permission_manager_add_interest_match :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    FunPtr Wp.Callbacks.C_PermissionMatchCallback -> -- callback : TInterface (Name {namespace = "Wp", name = "PermissionMatchCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    Ptr Wp.ObjectInterest.ObjectInterest -> -- interest : TInterface (Name {namespace = "Wp", name = "ObjectInterest"})
    IO Word32

-- | Adds an interest match to apply permissions with callback in matched objects.
-- 
-- 
-- Interest consists of a GType that the object must be an ancestor of ('GI.GObject.Functions.typeIsA' must match) and optionally, a set of additional constraints on certain properties of the object. Refer to WpObjectInterest for more details.
permissionManagerAddInterestMatch ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Wp.Callbacks.PermissionMatchCallback
    -- ^ /@callback@/: the permissions match callback
    -> Wp.ObjectInterest.ObjectInterest
    -- ^ /@interest@/: the interest
    -> m Word32
    -- ^ __Returns:__ the added match ID, or SPA_ID_INVALID if error
permissionManagerAddInterestMatch self callback interest = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    ptrcallback <- callocMem :: IO (Ptr (FunPtr Wp.Callbacks.C_PermissionMatchCallback))
    callback' <- Wp.Callbacks.mk_PermissionMatchCallback (Wp.Callbacks.wrap_PermissionMatchCallback (Just ptrcallback) (Wp.Callbacks.drop_closures_PermissionMatchCallback callback))
    poke ptrcallback callback'
    interest' <- B.ManagedPtr.disownBoxed interest
    let userData = nullPtr
    result <- wp_permission_manager_add_interest_match self' callback' userData interest'
    touchManagedPtr self
    touchManagedPtr interest
    return result

#if defined(ENABLE_OVERLOADING)
data PermissionManagerAddInterestMatchMethodInfo
instance (signature ~ (Wp.Callbacks.PermissionMatchCallback -> Wp.ObjectInterest.ObjectInterest -> m Word32), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerAddInterestMatchMethodInfo a signature where
    overloadedMethod = permissionManagerAddInterestMatch

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


#endif

-- method PermissionManager::add_interest_match_closure
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "closure"
--           , argType = TGClosure Nothing
--           , argCType = Just "GClosure*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the closure to apply permissions"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "interest"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "ObjectInterest" }
--           , argCType = Just "WpObjectInterest*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the interest" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "wp_permission_manager_add_interest_match_closure" wp_permission_manager_add_interest_match_closure :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Ptr (GClosure ()) ->                    -- closure : TGClosure Nothing
    Ptr Wp.ObjectInterest.ObjectInterest -> -- interest : TInterface (Name {namespace = "Wp", name = "ObjectInterest"})
    IO Word32

-- | Adds an interest match to apply permissions with closure in matched objects.
-- 
-- 
-- Interest consists of a GType that the object must be an ancestor of ('GI.GObject.Functions.typeIsA' must match) and optionally, a set of additional constraints on certain properties of the object. Refer to WpObjectInterest for more details.
permissionManagerAddInterestMatchClosure ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> GClosure b
    -- ^ /@closure@/: the closure to apply permissions
    -> Wp.ObjectInterest.ObjectInterest
    -- ^ /@interest@/: the interest
    -> m Word32
    -- ^ __Returns:__ the added match ID, or SPA_ID_INVALID if error
permissionManagerAddInterestMatchClosure self closure interest = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    closure' <- FP.castPtr <$> B.GClosure.disownGClosure closure
    interest' <- B.ManagedPtr.disownBoxed interest
    result <- wp_permission_manager_add_interest_match_closure self' closure' interest'
    touchManagedPtr self
    touchManagedPtr closure
    touchManagedPtr interest
    return result

#if defined(ENABLE_OVERLOADING)
data PermissionManagerAddInterestMatchClosureMethodInfo
instance (signature ~ (GClosure b -> Wp.ObjectInterest.ObjectInterest -> m Word32), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerAddInterestMatchClosureMethodInfo a signature where
    overloadedMethod = permissionManagerAddInterestMatchClosure

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


#endif

-- method PermissionManager::add_interest_match_simple
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "permissions"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permissions to apply"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "interest"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "ObjectInterest" }
--           , argCType = Just "WpObjectInterest*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the interest" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "wp_permission_manager_add_interest_match_simple" wp_permission_manager_add_interest_match_simple :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Word32 ->                               -- permissions : TBasicType TUInt32
    Ptr Wp.ObjectInterest.ObjectInterest -> -- interest : TInterface (Name {namespace = "Wp", name = "ObjectInterest"})
    IO Word32

-- | Adds an interest match to apply same permissions in matched objects.
-- 
-- 
-- Interest consists of a GType that the object must be an ancestor of ('GI.GObject.Functions.typeIsA' must match) and optionally, a set of additional constraints on certain properties of the object. Refer to WpObjectInterest for more details.
permissionManagerAddInterestMatchSimple ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Word32
    -- ^ /@permissions@/: the permissions to apply
    -> Wp.ObjectInterest.ObjectInterest
    -- ^ /@interest@/: the interest
    -> m Word32
    -- ^ __Returns:__ the added match ID, or SPA_ID_INVALID if error
permissionManagerAddInterestMatchSimple self permissions interest = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    interest' <- B.ManagedPtr.disownBoxed interest
    result <- wp_permission_manager_add_interest_match_simple self' permissions interest'
    touchManagedPtr self
    touchManagedPtr interest
    return result

#if defined(ENABLE_OVERLOADING)
data PermissionManagerAddInterestMatchSimpleMethodInfo
instance (signature ~ (Word32 -> Wp.ObjectInterest.ObjectInterest -> m Word32), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerAddInterestMatchSimpleMethodInfo a signature where
    overloadedMethod = permissionManagerAddInterestMatchSimple

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


#endif

-- method PermissionManager::add_rules_match
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rules"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaJson" }
--           , argCType = Just "WpSpaJson*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the JSON rules" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "wp_permission_manager_add_rules_match" wp_permission_manager_add_rules_match :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Ptr Wp.SpaJson.SpaJson ->               -- rules : TInterface (Name {namespace = "Wp", name = "SpaJson"})
    IO Word32

-- | Adds a rules match to apply permissions in matched objects.
-- 
-- 
-- The rules must be defined in a JSON object using the same format as all the wireplumber\/pipewire rules.
permissionManagerAddRulesMatch ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Wp.SpaJson.SpaJson
    -- ^ /@rules@/: the JSON rules
    -> m Word32
    -- ^ __Returns:__ the added match ID, or SPA_ID_INVALID if error
permissionManagerAddRulesMatch self rules = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    rules' <- B.ManagedPtr.disownBoxed rules
    result <- wp_permission_manager_add_rules_match self' rules'
    touchManagedPtr self
    touchManagedPtr rules
    return result

#if defined(ENABLE_OVERLOADING)
data PermissionManagerAddRulesMatchMethodInfo
instance (signature ~ (Wp.SpaJson.SpaJson -> m Word32), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerAddRulesMatchMethodInfo a signature where
    overloadedMethod = permissionManagerAddRulesMatch

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


#endif

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

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

-- | Gets the default permissions that are applied to all objects that don\'t match any interest.
permissionManagerGetDefaultPermissions ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> m Word32
    -- ^ __Returns:__ the default permissions
permissionManagerGetDefaultPermissions self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_permission_manager_get_default_permissions self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING)
data PermissionManagerGetDefaultPermissionsMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerGetDefaultPermissionsMethodInfo a signature where
    overloadedMethod = permissionManagerGetDefaultPermissions

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


#endif

-- method PermissionManager::remove_match
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "match_id"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the match ID to remove"
--                 , 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_permission_manager_remove_match" wp_permission_manager_remove_match :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Word32 ->                               -- match_id : TBasicType TUInt32
    IO ()

-- | Removes the previously added match so that the associated permissions are not applied anymore.
permissionManagerRemoveMatch ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Word32
    -- ^ /@matchId@/: the match ID to remove
    -> m ()
permissionManagerRemoveMatch self matchId = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_permission_manager_remove_match self' matchId
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data PermissionManagerRemoveMatchMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerRemoveMatchMethodInfo a signature where
    overloadedMethod = permissionManagerRemoveMatch

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


#endif

-- method PermissionManager::set_core_permissions
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "permissions"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permissions to apply to the core object"
--                 , 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_permission_manager_set_core_permissions" wp_permission_manager_set_core_permissions :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Word32 ->                               -- permissions : TBasicType TUInt32
    IO ()

-- | Sets the permissions that will be applied to the core object (ID 0).
-- 
-- 
-- The core object is not visible to the permission manager\'s object manager because it is implicit in the PipeWire connection and not sent through the registry. This method allows setting explicit permissions on it, independent of the default permissions.
-- If not set (or set to PW_PERM_INVALID), the core inherits default_permissions.
permissionManagerSetCorePermissions ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Word32
    -- ^ /@permissions@/: the permissions to apply to the core object
    -> m ()
permissionManagerSetCorePermissions self permissions = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_permission_manager_set_core_permissions self' permissions
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data PermissionManagerSetCorePermissionsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerSetCorePermissionsMethodInfo a signature where
    overloadedMethod = permissionManagerSetCorePermissions

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


#endif

-- method PermissionManager::set_default_permissions
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "permissions"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the default permissions to apply"
--                 , 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_permission_manager_set_default_permissions" wp_permission_manager_set_default_permissions :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    Word32 ->                               -- permissions : TBasicType TUInt32
    IO ()

-- | Sets the default permissions that will be applied to all objects that don\'t match any interest.
permissionManagerSetDefaultPermissions ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> Word32
    -- ^ /@permissions@/: the default permissions to apply
    -> m ()
permissionManagerSetDefaultPermissions self permissions = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_permission_manager_set_default_permissions self' permissions
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data PermissionManagerSetDefaultPermissionsMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerSetDefaultPermissionsMethodInfo a signature where
    overloadedMethod = permissionManagerSetDefaultPermissions

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


#endif

-- method PermissionManager::update_permissions
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "PermissionManager" }
--           , argCType = Just "WpPermissionManager*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the permission manager"
--                 , 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_permission_manager_update_permissions" wp_permission_manager_update_permissions :: 
    Ptr PermissionManager ->                -- self : TInterface (Name {namespace = "Wp", name = "PermissionManager"})
    IO ()

-- | Updates permissions on all clients the permission manager has.
-- 
-- 
-- The permission manager already updates permissions on all clients automatically when a new client or object is added, however, this might be needed if interests with closures or callbacks were added and something changed externally.
permissionManagerUpdatePermissions ::
    (B.CallStack.HasCallStack, MonadIO m, IsPermissionManager a) =>
    a
    -- ^ /@self@/: the permission manager
    -> m ()
permissionManagerUpdatePermissions self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_permission_manager_update_permissions self'
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data PermissionManagerUpdatePermissionsMethodInfo
instance (signature ~ (m ()), MonadIO m, IsPermissionManager a) => O.OverloadedMethod PermissionManagerUpdatePermissionsMethodInfo a signature where
    overloadedMethod = permissionManagerUpdatePermissions

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


#endif


