packages feed

gi-wireplumber-0.5.14: GI/Wp/Objects/Object.hs

{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- Base class for objects that have activatable features.

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

module GI.Wp.Objects.Object
    ( 

-- * Exported types
    Object(..)                              ,
    IsObject                                ,
    toObject                                ,


 -- * 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"), [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"), [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"), [getCore]("GI.Wp.Objects.Object#g:method:getCore"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [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
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveObjectMethod                     ,
#endif

-- ** abortActivation #method:abortActivation#

#if defined(ENABLE_OVERLOADING)
    ObjectAbortActivationMethodInfo         ,
#endif
    objectAbortActivation                   ,


-- ** activate #method:activate#

#if defined(ENABLE_OVERLOADING)
    ObjectActivateMethodInfo                ,
#endif
    objectActivate                          ,


-- ** activateClosure #method:activateClosure#

#if defined(ENABLE_OVERLOADING)
    ObjectActivateClosureMethodInfo         ,
#endif
    objectActivateClosure                   ,


-- ** activateFinish #method:activateFinish#

#if defined(ENABLE_OVERLOADING)
    ObjectActivateFinishMethodInfo          ,
#endif
    objectActivateFinish                    ,


-- ** deactivate #method:deactivate#

#if defined(ENABLE_OVERLOADING)
    ObjectDeactivateMethodInfo              ,
#endif
    objectDeactivate                        ,


-- ** getActiveFeatures #method:getActiveFeatures#

#if defined(ENABLE_OVERLOADING)
    ObjectGetActiveFeaturesMethodInfo       ,
#endif
    objectGetActiveFeatures                 ,


-- ** getCore #method:getCore#

#if defined(ENABLE_OVERLOADING)
    ObjectGetCoreMethodInfo                 ,
#endif
    objectGetCore                           ,


-- ** getId #method:getId#

#if defined(ENABLE_OVERLOADING)
    ObjectGetIdMethodInfo                   ,
#endif
    objectGetId                             ,


-- ** getSupportedFeatures #method:getSupportedFeatures#

#if defined(ENABLE_OVERLOADING)
    ObjectGetSupportedFeaturesMethodInfo    ,
#endif
    objectGetSupportedFeatures              ,


-- ** testActiveFeatures #method:testActiveFeatures#

#if defined(ENABLE_OVERLOADING)
    ObjectTestActiveFeaturesMethodInfo      ,
#endif
    objectTestActiveFeatures                ,


-- ** testSupportedFeatures #method:testSupportedFeatures#

#if defined(ENABLE_OVERLOADING)
    ObjectTestSupportedFeaturesMethodInfo   ,
#endif
    objectTestSupportedFeatures             ,


-- ** updateFeatures #method:updateFeatures#

#if defined(ENABLE_OVERLOADING)
    ObjectUpdateFeaturesMethodInfo          ,
#endif
    objectUpdateFeatures                    ,




 -- * Properties


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

#if defined(ENABLE_OVERLOADING)
    ObjectActiveFeaturesPropertyInfo        ,
#endif
    getObjectActiveFeatures                 ,
#if defined(ENABLE_OVERLOADING)
    objectActiveFeatures                    ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    ObjectCorePropertyInfo                  ,
#endif
    constructObjectCore                     ,
    getObjectCore                           ,
#if defined(ENABLE_OVERLOADING)
    objectCore                              ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    ObjectIdPropertyInfo                    ,
#endif
    getObjectId                             ,
#if defined(ENABLE_OVERLOADING)
    objectId                                ,
#endif


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

#if defined(ENABLE_OVERLOADING)
    ObjectSupportedFeaturesPropertyInfo     ,
#endif
    getObjectSupportedFeatures              ,
#if defined(ENABLE_OVERLOADING)
    objectSupportedFeatures                 ,
#endif




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- 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.ObjectManager as Wp.ObjectManager
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

#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.Core as Wp.Core

#endif

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

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

foreign import ccall "wp_object_get_type"
    c_wp_object_get_type :: IO B.Types.GType

instance B.Types.TypedObject Object where
    glibType = c_wp_object_get_type

instance B.Types.GObject Object

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

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

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

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

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

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

#endif

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

#endif

-- VVV Prop "active-features"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@active-features@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' object #activeFeatures
-- @
getObjectActiveFeatures :: (MonadIO m, IsObject o) => o -> m Word32
getObjectActiveFeatures obj = MIO.liftIO $ B.Properties.getObjectPropertyUInt32 obj "active-features"

#if defined(ENABLE_OVERLOADING)
data ObjectActiveFeaturesPropertyInfo
instance AttrInfo ObjectActiveFeaturesPropertyInfo where
    type AttrAllowedOps ObjectActiveFeaturesPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint ObjectActiveFeaturesPropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectActiveFeaturesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint ObjectActiveFeaturesPropertyInfo = (~) ()
    type AttrTransferType ObjectActiveFeaturesPropertyInfo = ()
    type AttrGetType ObjectActiveFeaturesPropertyInfo = Word32
    type AttrLabel ObjectActiveFeaturesPropertyInfo = "active-features"
    type AttrOrigin ObjectActiveFeaturesPropertyInfo = Object
    attrGet = getObjectActiveFeatures
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.Object.activeFeatures"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-Object.html#g:attr:activeFeatures"
        })
#endif

-- VVV Prop "core"
   -- Type: TInterface (Name {namespace = "Wp", name = "Core"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

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

-- | Construct a t'GValueConstruct' with valid value for the “@core@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructObjectCore :: (IsObject o, MIO.MonadIO m, Wp.Core.IsCore a) => a -> m (GValueConstruct o)
constructObjectCore val = MIO.liftIO $ do
    MIO.liftIO $ B.Properties.constructObjectPropertyObject "core" (P.Just val)

#if defined(ENABLE_OVERLOADING)
data ObjectCorePropertyInfo
instance AttrInfo ObjectCorePropertyInfo where
    type AttrAllowedOps ObjectCorePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ObjectCorePropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectCorePropertyInfo = Wp.Core.IsCore
    type AttrTransferTypeConstraint ObjectCorePropertyInfo = Wp.Core.IsCore
    type AttrTransferType ObjectCorePropertyInfo = Wp.Core.Core
    type AttrGetType ObjectCorePropertyInfo = (Maybe Wp.Core.Core)
    type AttrLabel ObjectCorePropertyInfo = "core"
    type AttrOrigin ObjectCorePropertyInfo = Object
    attrGet = getObjectCore
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ v = do
        unsafeCastTo Wp.Core.Core v
    attrConstruct = constructObjectCore
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.Object.core"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-Object.html#g:attr:core"
        })
#endif

-- VVV Prop "id"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@id@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' object #id
-- @
getObjectId :: (MonadIO m, IsObject o) => o -> m Word32
getObjectId obj = MIO.liftIO $ B.Properties.getObjectPropertyUInt32 obj "id"

#if defined(ENABLE_OVERLOADING)
data ObjectIdPropertyInfo
instance AttrInfo ObjectIdPropertyInfo where
    type AttrAllowedOps ObjectIdPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint ObjectIdPropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectIdPropertyInfo = (~) ()
    type AttrTransferTypeConstraint ObjectIdPropertyInfo = (~) ()
    type AttrTransferType ObjectIdPropertyInfo = ()
    type AttrGetType ObjectIdPropertyInfo = Word32
    type AttrLabel ObjectIdPropertyInfo = "id"
    type AttrOrigin ObjectIdPropertyInfo = Object
    attrGet = getObjectId
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.Object.id"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-Object.html#g:attr:id"
        })
#endif

-- VVV Prop "supported-features"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@supported-features@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' object #supportedFeatures
-- @
getObjectSupportedFeatures :: (MonadIO m, IsObject o) => o -> m Word32
getObjectSupportedFeatures obj = MIO.liftIO $ B.Properties.getObjectPropertyUInt32 obj "supported-features"

#if defined(ENABLE_OVERLOADING)
data ObjectSupportedFeaturesPropertyInfo
instance AttrInfo ObjectSupportedFeaturesPropertyInfo where
    type AttrAllowedOps ObjectSupportedFeaturesPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint ObjectSupportedFeaturesPropertyInfo = IsObject
    type AttrSetTypeConstraint ObjectSupportedFeaturesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint ObjectSupportedFeaturesPropertyInfo = (~) ()
    type AttrTransferType ObjectSupportedFeaturesPropertyInfo = ()
    type AttrGetType ObjectSupportedFeaturesPropertyInfo = Word32
    type AttrLabel ObjectSupportedFeaturesPropertyInfo = "supported-features"
    type AttrOrigin ObjectSupportedFeaturesPropertyInfo = Object
    attrGet = getObjectSupportedFeatures
    attrSet = undefined
    attrPut = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Objects.Object.supportedFeatures"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14/docs/GI-Wp-Objects-Object.html#g:attr:supportedFeatures"
        })
#endif

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

#if defined(ENABLE_OVERLOADING)
objectActiveFeatures :: AttrLabelProxy "activeFeatures"
objectActiveFeatures = AttrLabelProxy

objectCore :: AttrLabelProxy "core"
objectCore = AttrLabelProxy

objectId :: AttrLabelProxy "id"
objectId = AttrLabelProxy

objectSupportedFeatures :: AttrLabelProxy "supportedFeatures"
objectSupportedFeatures = AttrLabelProxy

#endif

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

#endif

-- method Object::abort_activation
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "msg"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const gchar*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the message used in the transition error"
--                 , 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_object_abort_activation" wp_object_abort_activation :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    CString ->                              -- msg : TBasicType TUTF8
    IO ()

-- | Aborts the current object activation by returning a transition error if any transitions are pending.
-- 
-- 
-- This is usually used to stop any pending activation if an error happened.
-- 
-- /Since: 0.4.6/
objectAbortActivation ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> T.Text
    -- ^ /@msg@/: the message used in the transition error
    -> m ()
objectAbortActivation self msg = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    msg' <- textToCString msg
    wp_object_abort_activation self' msg'
    touchManagedPtr self
    freeMem msg'
    return ()

#if defined(ENABLE_OVERLOADING)
data ObjectAbortActivationMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectAbortActivationMethodInfo a signature where
    overloadedMethod = objectAbortActivation

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


#endif

-- method Object::activate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features to enable"
--                 , 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 function to call when activation is complete"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , 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 for @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_object_activate" wp_object_activate :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- features : TBasicType TUInt
    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 ()

-- | Callback version of 'GI.Wp.Objects.Object.objectActivateClosure'.
objectActivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@features@/: the features to enable
    -> Maybe (b)
    -- ^ /@cancellable@/: a cancellable for the async operation
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: a function to call when activation is complete
    -> m ()
objectActivate self features cancellable callback = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    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_object_activate self' features maybeCancellable maybeCallback userData
    touchManagedPtr self
    whenJust cancellable touchManagedPtr
    return ()

#if defined(ENABLE_OVERLOADING)
data ObjectActivateMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsObject a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod ObjectActivateMethodInfo a signature where
    overloadedMethod = objectActivate

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


#endif

-- method Object::activate_closure
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features to enable"
--                 , 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 = "closure"
--           , argType = TGClosure Nothing
--           , argCType = Just "GClosure*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the closure to use when activation is completed"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "wp_object_activate_closure" wp_object_activate_closure :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- features : TBasicType TUInt
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (GClosure ()) ->                    -- closure : TGClosure Nothing
    IO ()

-- | Activates the requested /@features@/ and invokes /@closure@/ when this is done. /@features@/ may contain unsupported or already active features. The operation will filter them and activate only ones that are supported and inactive.
-- 
-- 
-- If multiple calls to this method is done, the operations will be executed one after the other to ensure features only get activated once.
-- /@closure@/ may be invoked in sync while this method is being called, if there are no features to activate.
objectActivateClosure ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@features@/: the features to enable
    -> Maybe (b)
    -- ^ /@cancellable@/: a cancellable for the async operation
    -> GClosure c
    -- ^ /@closure@/: the closure to use when activation is completed
    -> m ()
objectActivateClosure self features cancellable closure = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    maybeCancellable <- case cancellable of
        Nothing -> return FP.nullPtr
        Just jCancellable -> do
            jCancellable' <- unsafeManagedPtrCastPtr jCancellable
            return jCancellable'
    closure' <- FP.castPtr <$> B.GClosure.disownGClosure closure
    wp_object_activate_closure self' features maybeCancellable closure'
    touchManagedPtr self
    whenJust cancellable touchManagedPtr
    touchManagedPtr closure
    return ()

#if defined(ENABLE_OVERLOADING)
data ObjectActivateClosureMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> GClosure c -> m ()), MonadIO m, IsObject a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod ObjectActivateClosureMethodInfo a signature where
    overloadedMethod = objectActivateClosure

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


#endif

-- method Object::activate_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the 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 operation result"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

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

-- | Finishes the async operation that was started with 'GI.Wp.Objects.Object.objectActivate'.
objectActivateFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@self@/: the object
    -> b
    -- ^ /@res@/: the async operation result
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
objectActivateFinish self res = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    res' <- unsafeManagedPtrCastPtr res
    onException (do
        _ <- propagateGError $ wp_object_activate_finish self' res'
        touchManagedPtr self
        touchManagedPtr res
        return ()
     ) (do
        return ()
     )

#if defined(ENABLE_OVERLOADING)
data ObjectActivateFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsObject a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod ObjectActivateFinishMethodInfo a signature where
    overloadedMethod = objectActivateFinish

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


#endif

-- method Object::deactivate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features to deactivate"
--                 , 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_object_deactivate" wp_object_deactivate :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- features : TBasicType TUInt
    IO ()

-- | Deactivates the given /@features@/, leaving the object in the state it was before they were enabled.
-- 
-- 
-- This is seldom needed to call manually, but it can be used to save resources if some features are no longer needed.
objectDeactivate ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@features@/: the features to deactivate
    -> m ()
objectDeactivate self features = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_object_deactivate self' features
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data ObjectDeactivateMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectDeactivateMethodInfo a signature where
    overloadedMethod = objectDeactivate

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


#endif

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

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

-- | Gets the active features of this object.
objectGetActiveFeatures ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> m Word32
    -- ^ __Returns:__ A bitset containing the active features of this object
objectGetActiveFeatures self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_get_active_features self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING)
data ObjectGetActiveFeaturesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetActiveFeaturesMethodInfo a signature where
    overloadedMethod = objectGetActiveFeatures

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


#endif

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

foreign import ccall "wp_object_get_core" wp_object_get_core :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    IO (Ptr Wp.Core.Core)

-- | Gets the core associated with this object.
objectGetCore ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> m Wp.Core.Core
    -- ^ __Returns:__ the core associated with this object
objectGetCore self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_get_core self'
    checkUnexpectedReturnNULL "objectGetCore" result
    result' <- (wrapObject Wp.Core.Core) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data ObjectGetCoreMethodInfo
instance (signature ~ (m Wp.Core.Core), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetCoreMethodInfo a signature where
    overloadedMethod = objectGetCore

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


#endif

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

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

-- | Gets the unique wireplumber Id of this object.
objectGetId ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the session item
    -> m Word32
objectGetId self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_get_id self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING)
data ObjectGetIdMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetIdMethodInfo a signature where
    overloadedMethod = objectGetId

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


#endif

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

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

-- | Gets the supported features of this object.
objectGetSupportedFeatures ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> m Word32
    -- ^ __Returns:__ A bitset containing the supported features of this object; note that supported features may change at runtime
objectGetSupportedFeatures self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_get_supported_features self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING)
data ObjectGetSupportedFeaturesMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsObject a) => O.OverloadedMethod ObjectGetSupportedFeaturesMethodInfo a signature where
    overloadedMethod = objectGetSupportedFeatures

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


#endif

-- method Object::test_active_features
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features to check"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_object_test_active_features" wp_object_test_active_features :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- features : TBasicType TUInt
    IO CInt

-- | Checks if the given features are active on this object.
-- 
-- /Since: 0.5.0/
objectTestActiveFeatures ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@features@/: the features to check
    -> m Bool
    -- ^ __Returns:__ TRUE if all the given features are active on this object
objectTestActiveFeatures self features = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_test_active_features self' features
    let result' = (/= 0) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data ObjectTestActiveFeaturesMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsObject a) => O.OverloadedMethod ObjectTestActiveFeaturesMethodInfo a signature where
    overloadedMethod = objectTestActiveFeatures

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


#endif

-- method Object::test_supported_features
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "features"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features to check"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_object_test_supported_features" wp_object_test_supported_features :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- features : TBasicType TUInt
    IO CInt

-- | Checks if the given features are supported on this object.
-- 
-- /Since: 0.5.0/
objectTestSupportedFeatures ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@features@/: the features to check
    -> m Bool
    -- ^ __Returns:__ TRUE if all the given features are supported on this object
objectTestSupportedFeatures self features = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- wp_object_test_supported_features self' features
    let result' = (/= 0) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data ObjectTestSupportedFeaturesMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsObject a) => O.OverloadedMethod ObjectTestSupportedFeaturesMethodInfo a signature where
    overloadedMethod = objectTestSupportedFeatures

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


#endif

-- method Object::update_features
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType = TInterface Name { namespace = "Wp" , name = "Object" }
--           , argCType = Just "WpObject*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "activated"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features that were activated, or 0"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "deactivated"
--           , argType = TBasicType TUInt
--           , argCType = Just "WpObjectFeatures"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the features that were deactivated, or 0"
--                 , 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_object_update_features" wp_object_update_features :: 
    Ptr Object ->                           -- self : TInterface (Name {namespace = "Wp", name = "Object"})
    Word32 ->                               -- activated : TBasicType TUInt
    Word32 ->                               -- deactivated : TBasicType TUInt
    IO ()

-- | Allows subclasses to update the currently active features.
-- 
-- 
-- /@activated@/ should contain new features and /@deactivated@/ should contain features that were just deactivated. Calling this method also advances the activation transitions.
-- Private method to be called by subclasses only.
objectUpdateFeatures ::
    (B.CallStack.HasCallStack, MonadIO m, IsObject a) =>
    a
    -- ^ /@self@/: the object
    -> Word32
    -- ^ /@activated@/: the features that were activated, or 0
    -> Word32
    -- ^ /@deactivated@/: the features that were deactivated, or 0
    -> m ()
objectUpdateFeatures self activated deactivated = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    wp_object_update_features self' activated deactivated
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data ObjectUpdateFeaturesMethodInfo
instance (signature ~ (Word32 -> Word32 -> m ()), MonadIO m, IsObject a) => O.OverloadedMethod ObjectUpdateFeaturesMethodInfo a signature where
    overloadedMethod = objectUpdateFeatures

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


#endif