{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.Wp.Structs.SpaPodParser
    ( 

-- * Exported types
    SpaPodParser(..)                        ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [end]("GI.Wp.Structs.SpaPodParser#g:method:end"), [ref]("GI.Wp.Structs.SpaPodParser#g:method:ref"), [unref]("GI.Wp.Structs.SpaPodParser#g:method:unref").
-- 
-- ==== Getters
-- [getBoolean]("GI.Wp.Structs.SpaPodParser#g:method:getBoolean"), [getBytes]("GI.Wp.Structs.SpaPodParser#g:method:getBytes"), [getDouble]("GI.Wp.Structs.SpaPodParser#g:method:getDouble"), [getFd]("GI.Wp.Structs.SpaPodParser#g:method:getFd"), [getFloat]("GI.Wp.Structs.SpaPodParser#g:method:getFloat"), [getFraction]("GI.Wp.Structs.SpaPodParser#g:method:getFraction"), [getId]("GI.Wp.Structs.SpaPodParser#g:method:getId"), [getInt]("GI.Wp.Structs.SpaPodParser#g:method:getInt"), [getLong]("GI.Wp.Structs.SpaPodParser#g:method:getLong"), [getPod]("GI.Wp.Structs.SpaPodParser#g:method:getPod"), [getPointer]("GI.Wp.Structs.SpaPodParser#g:method:getPointer"), [getRectangle]("GI.Wp.Structs.SpaPodParser#g:method:getRectangle"), [getString]("GI.Wp.Structs.SpaPodParser#g:method:getString").
-- 
-- ==== Setters
-- /None/.

#if defined(ENABLE_OVERLOADING)
    ResolveSpaPodParserMethod               ,
#endif

-- ** end #method:end#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserEndMethodInfo               ,
#endif
    spaPodParserEnd                         ,


-- ** getBoolean #method:getBoolean#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetBooleanMethodInfo        ,
#endif
    spaPodParserGetBoolean                  ,


-- ** getBytes #method:getBytes#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetBytesMethodInfo          ,
#endif
    spaPodParserGetBytes                    ,


-- ** getDouble #method:getDouble#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetDoubleMethodInfo         ,
#endif
    spaPodParserGetDouble                   ,


-- ** getFd #method:getFd#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetFdMethodInfo             ,
#endif
    spaPodParserGetFd                       ,


-- ** getFloat #method:getFloat#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetFloatMethodInfo          ,
#endif
    spaPodParserGetFloat                    ,


-- ** getFraction #method:getFraction#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetFractionMethodInfo       ,
#endif
    spaPodParserGetFraction                 ,


-- ** getId #method:getId#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetIdMethodInfo             ,
#endif
    spaPodParserGetId                       ,


-- ** getInt #method:getInt#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetIntMethodInfo            ,
#endif
    spaPodParserGetInt                      ,


-- ** getLong #method:getLong#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetLongMethodInfo           ,
#endif
    spaPodParserGetLong                     ,


-- ** getPod #method:getPod#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetPodMethodInfo            ,
#endif
    spaPodParserGetPod                      ,


-- ** getPointer #method:getPointer#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetPointerMethodInfo        ,
#endif
    spaPodParserGetPointer                  ,


-- ** getRectangle #method:getRectangle#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetRectangleMethodInfo      ,
#endif
    spaPodParserGetRectangle                ,


-- ** getString #method:getString#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserGetStringMethodInfo         ,
#endif
    spaPodParserGetString                   ,


-- ** newObject #method:newObject#

    spaPodParserNewObject                   ,


-- ** newStruct #method:newStruct#

    spaPodParserNewStruct                   ,


-- ** ref #method:ref#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserRefMethodInfo               ,
#endif
    spaPodParserRef                         ,


-- ** unref #method:unref#

#if defined(ENABLE_OVERLOADING)
    SpaPodParserUnrefMethodInfo             ,
#endif
    spaPodParserUnref                       ,




    ) 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.Wp.Callbacks as Wp.Callbacks
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.SpaPod as Wp.SpaPod

#else
import {-# SOURCE #-} qualified GI.Wp.Structs.SpaPod as Wp.SpaPod

#endif

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

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

foreign import ccall "wp_spa_pod_parser_get_type" c_wp_spa_pod_parser_get_type :: 
    IO GType

type instance O.ParentTypes SpaPodParser = '[]
instance O.HasParentTypes SpaPodParser

instance B.Types.TypedObject SpaPodParser where
    glibType = c_wp_spa_pod_parser_get_type

instance B.Types.GBoxed SpaPodParser

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


#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList SpaPodParser
type instance O.AttributeList SpaPodParser = SpaPodParserAttributeList
type SpaPodParserAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif

-- method SpaPodParser::new_object
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "pod"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaPod" }
--           , argCType = Just "WpSpaPod*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the object spa pod to parse"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "id_name"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char**"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the Id name of the object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "SpaPodParser" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_new_object" wp_spa_pod_parser_new_object :: 
    Ptr Wp.SpaPod.SpaPod ->                 -- pod : TInterface (Name {namespace = "Wp", name = "SpaPod"})
    CString ->                              -- id_name : TBasicType TUTF8
    IO (Ptr SpaPodParser)

-- | Creates an object spa pod parser. The /@pod@/ object must be valid for the entire life-cycle of the returned parser.
spaPodParserNewObject ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Wp.SpaPod.SpaPod
    -- ^ /@pod@/: the object spa pod to parse
    -> T.Text
    -- ^ /@idName@/: the Id name of the object
    -> m SpaPodParser
    -- ^ __Returns:__ The new spa pod parser
spaPodParserNewObject pod idName = liftIO $ do
    pod' <- unsafeManagedPtrGetPtr pod
    idName' <- textToCString idName
    result <- wp_spa_pod_parser_new_object pod' idName'
    checkUnexpectedReturnNULL "spaPodParserNewObject" result
    result' <- (wrapBoxed SpaPodParser) result
    touchManagedPtr pod
    freeMem idName'
    return result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method SpaPodParser::new_struct
-- method type : Constructor
-- Args: [ Arg
--           { argCName = "pod"
--           , argType = TInterface Name { namespace = "Wp" , name = "SpaPod" }
--           , argCType = Just "WpSpaPod*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the struct spa pod to parse"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Wp" , name = "SpaPodParser" })
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_new_struct" wp_spa_pod_parser_new_struct :: 
    Ptr Wp.SpaPod.SpaPod ->                 -- pod : TInterface (Name {namespace = "Wp", name = "SpaPod"})
    IO (Ptr SpaPodParser)

-- | Creates an struct spa pod parser. The /@pod@/ object must be valid for the entire life-cycle of the returned parser.
spaPodParserNewStruct ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Wp.SpaPod.SpaPod
    -- ^ /@pod@/: the struct spa pod to parse
    -> m SpaPodParser
    -- ^ __Returns:__ The new spa pod parser
spaPodParserNewStruct pod = liftIO $ do
    pod' <- unsafeManagedPtrGetPtr pod
    result <- wp_spa_pod_parser_new_struct pod'
    checkUnexpectedReturnNULL "spaPodParserNewStruct" result
    result' <- (wrapBoxed SpaPodParser) result
    touchManagedPtr pod
    return result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method SpaPodParser::end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser 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_spa_pod_parser_end" wp_spa_pod_parser_end :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    IO ()

-- | Ends the parser process.
spaPodParserEnd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ()
spaPodParserEnd self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    wp_spa_pod_parser_end self'
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data SpaPodParserEndMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod SpaPodParserEndMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserEnd

instance O.OverloadedMethodInfo SpaPodParserEndMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserEnd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserEnd"
        })


#endif

-- method SpaPodParser::get_boolean
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TBoolean
--           , argCType = Just "gboolean*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the boolean value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_boolean" wp_spa_pod_parser_get_boolean :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr CInt ->                             -- value : TBasicType TBoolean
    IO CInt

-- | Gets the boolean value from a spa pod parser.
spaPodParserGetBoolean ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Bool))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetBoolean self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr CInt)
    result <- wp_spa_pod_parser_get_boolean self' value
    let result' = (/= 0) result
    value' <- peek value
    let value'' = (/= 0) value'
    touchManagedPtr self
    freeMem value
    return (result', value'')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetBooleanMethodInfo
instance (signature ~ (m ((Bool, Bool))), MonadIO m) => O.OverloadedMethod SpaPodParserGetBooleanMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetBoolean

instance O.OverloadedMethodInfo SpaPodParserGetBooleanMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetBoolean",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetBoolean"
        })


#endif

-- method SpaPodParser::get_bytes
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TPtr
--           , argCType = Just "gconstpointer*"
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the bytes value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "len"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the length of the bytes value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_bytes" wp_spa_pod_parser_get_bytes :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr (Ptr ()) ->                         -- value : TBasicType TPtr
    Ptr Word32 ->                           -- len : TBasicType TUInt32
    IO CInt

-- | Gets the bytes value and its length from a spa pod parser object.
spaPodParserGetBytes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Ptr (), Word32))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetBytes self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- callocMem :: IO (Ptr (Ptr ()))
    len <- allocMem :: IO (Ptr Word32)
    result <- wp_spa_pod_parser_get_bytes self' value len
    let result' = (/= 0) result
    value' <- peek value
    len' <- peek len
    touchManagedPtr self
    freeMem value
    freeMem len
    return (result', value', len')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetBytesMethodInfo
instance (signature ~ (m ((Bool, Ptr (), Word32))), MonadIO m) => O.OverloadedMethod SpaPodParserGetBytesMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetBytes

instance O.OverloadedMethodInfo SpaPodParserGetBytesMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetBytes",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetBytes"
        })


#endif

-- method SpaPodParser::get_double
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TDouble
--           , argCType = Just "double*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the double value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_double" wp_spa_pod_parser_get_double :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr CDouble ->                          -- value : TBasicType TDouble
    IO CInt

-- | Gets the double value from a spa pod parser object.
spaPodParserGetDouble ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Double))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetDouble self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr CDouble)
    result <- wp_spa_pod_parser_get_double self' value
    let result' = (/= 0) result
    value' <- peek value
    let value'' = realToFrac value'
    touchManagedPtr self
    freeMem value
    return (result', value'')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetDoubleMethodInfo
instance (signature ~ (m ((Bool, Double))), MonadIO m) => O.OverloadedMethod SpaPodParserGetDoubleMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetDouble

instance O.OverloadedMethodInfo SpaPodParserGetDoubleMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetDouble",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetDouble"
        })


#endif

-- method SpaPodParser::get_fd
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TInt64
--           , argCType = Just "gint64*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the Fd value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_fd" wp_spa_pod_parser_get_fd :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Int64 ->                            -- value : TBasicType TInt64
    IO CInt

-- | Gets the Fd value from a spa pod parser object.
spaPodParserGetFd ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Int64))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetFd self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr Int64)
    result <- wp_spa_pod_parser_get_fd self' value
    let result' = (/= 0) result
    value' <- peek value
    touchManagedPtr self
    freeMem value
    return (result', value')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetFdMethodInfo
instance (signature ~ (m ((Bool, Int64))), MonadIO m) => O.OverloadedMethod SpaPodParserGetFdMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetFd

instance O.OverloadedMethodInfo SpaPodParserGetFdMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetFd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetFd"
        })


#endif

-- method SpaPodParser::get_float
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TFloat
--           , argCType = Just "float*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the float value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_float" wp_spa_pod_parser_get_float :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr CFloat ->                           -- value : TBasicType TFloat
    IO CInt

-- | Gets the float value from a spa pod parser object.
spaPodParserGetFloat ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Float))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetFloat self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr CFloat)
    result <- wp_spa_pod_parser_get_float self' value
    let result' = (/= 0) result
    value' <- peek value
    let value'' = realToFrac value'
    touchManagedPtr self
    freeMem value
    return (result', value'')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetFloatMethodInfo
instance (signature ~ (m ((Bool, Float))), MonadIO m) => O.OverloadedMethod SpaPodParserGetFloatMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetFloat

instance O.OverloadedMethodInfo SpaPodParserGetFloatMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetFloat",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetFloat"
        })


#endif

-- method SpaPodParser::get_fraction
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the fractions's numerator value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "denom"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the fractions's denominator value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_fraction" wp_spa_pod_parser_get_fraction :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Word32 ->                           -- num : TBasicType TUInt32
    Ptr Word32 ->                           -- denom : TBasicType TUInt32
    IO CInt

-- | Gets the fractions\'s numerator and denominator value from a spa pod parser object.
spaPodParserGetFraction ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Word32, Word32))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetFraction self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    num <- allocMem :: IO (Ptr Word32)
    denom <- allocMem :: IO (Ptr Word32)
    result <- wp_spa_pod_parser_get_fraction self' num denom
    let result' = (/= 0) result
    num' <- peek num
    denom' <- peek denom
    touchManagedPtr self
    freeMem num
    freeMem denom
    return (result', num', denom')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetFractionMethodInfo
instance (signature ~ (m ((Bool, Word32, Word32))), MonadIO m) => O.OverloadedMethod SpaPodParserGetFractionMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetFraction

instance O.OverloadedMethodInfo SpaPodParserGetFractionMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetFraction",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetFraction"
        })


#endif

-- method SpaPodParser::get_id
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the Id value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_id" wp_spa_pod_parser_get_id :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Word32 ->                           -- value : TBasicType TUInt32
    IO CInt

-- | Gets the Id value from a spa pod parser object.
spaPodParserGetId ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Word32))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetId self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr Word32)
    result <- wp_spa_pod_parser_get_id self' value
    let result' = (/= 0) result
    value' <- peek value
    touchManagedPtr self
    freeMem value
    return (result', value')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetIdMethodInfo
instance (signature ~ (m ((Bool, Word32))), MonadIO m) => O.OverloadedMethod SpaPodParserGetIdMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetId

instance O.OverloadedMethodInfo SpaPodParserGetIdMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetId",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetId"
        })


#endif

-- method SpaPodParser::get_int
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TInt32
--           , argCType = Just "gint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the int value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_int" wp_spa_pod_parser_get_int :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Int32 ->                            -- value : TBasicType TInt32
    IO CInt

-- | Gets the int value from a spa pod parser object.
spaPodParserGetInt ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Int32))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetInt self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr Int32)
    result <- wp_spa_pod_parser_get_int self' value
    let result' = (/= 0) result
    value' <- peek value
    touchManagedPtr self
    freeMem value
    return (result', value')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetIntMethodInfo
instance (signature ~ (m ((Bool, Int32))), MonadIO m) => O.OverloadedMethod SpaPodParserGetIntMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetInt

instance O.OverloadedMethodInfo SpaPodParserGetIntMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetInt",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetInt"
        })


#endif

-- method SpaPodParser::get_long
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TInt64
--           , argCType = Just "gint64*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the long value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_long" wp_spa_pod_parser_get_long :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Int64 ->                            -- value : TBasicType TInt64
    IO CInt

-- | Gets the long value from a spa pod parser object.
spaPodParserGetLong ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Int64))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetLong self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- allocMem :: IO (Ptr Int64)
    result <- wp_spa_pod_parser_get_long self' value
    let result' = (/= 0) result
    value' <- peek value
    touchManagedPtr self
    freeMem value
    return (result', value')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetLongMethodInfo
instance (signature ~ (m ((Bool, Int64))), MonadIO m) => O.OverloadedMethod SpaPodParserGetLongMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetLong

instance O.OverloadedMethodInfo SpaPodParserGetLongMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetLong",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetLong"
        })


#endif

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

foreign import ccall "wp_spa_pod_parser_get_pod" wp_spa_pod_parser_get_pod :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    IO (Ptr Wp.SpaPod.SpaPod)

-- | Gets the spa pod value from a spa pod parser object.
spaPodParserGetPod ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m Wp.SpaPod.SpaPod
    -- ^ __Returns:__ The spa pod value or NULL if it could not be obtained
spaPodParserGetPod self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    result <- wp_spa_pod_parser_get_pod self'
    checkUnexpectedReturnNULL "spaPodParserGetPod" result
    result' <- (wrapBoxed Wp.SpaPod.SpaPod) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetPodMethodInfo
instance (signature ~ (m Wp.SpaPod.SpaPod), MonadIO m) => O.OverloadedMethod SpaPodParserGetPodMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetPod

instance O.OverloadedMethodInfo SpaPodParserGetPodMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetPod",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetPod"
        })


#endif

-- method SpaPodParser::get_pointer
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TPtr
--           , argCType = Just "gconstpointer*"
--           , direction = DirectionOut
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the pointer value" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_pointer" wp_spa_pod_parser_get_pointer :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr (Ptr ()) ->                         -- value : TBasicType TPtr
    IO CInt

-- | Gets the pointer value and its type name from a spa pod parser object.
spaPodParserGetPointer ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Ptr ()))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetPointer self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- callocMem :: IO (Ptr (Ptr ()))
    result <- wp_spa_pod_parser_get_pointer self' value
    let result' = (/= 0) result
    value' <- peek value
    touchManagedPtr self
    freeMem value
    return (result', value')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetPointerMethodInfo
instance (signature ~ (m ((Bool, Ptr ()))), MonadIO m) => O.OverloadedMethod SpaPodParserGetPointerMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetPointer

instance O.OverloadedMethodInfo SpaPodParserGetPointerMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetPointer",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetPointer"
        })


#endif

-- method SpaPodParser::get_rectangle
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "width"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the rectangle's width value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "height"
--           , argType = TBasicType TUInt32
--           , argCType = Just "guint32*"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the rectangle's height value"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "wp_spa_pod_parser_get_rectangle" wp_spa_pod_parser_get_rectangle :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr Word32 ->                           -- width : TBasicType TUInt32
    Ptr Word32 ->                           -- height : TBasicType TUInt32
    IO CInt

-- | Gets the rectangle\'s width and height value from a spa pod parser object.
spaPodParserGetRectangle ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, Word32, Word32))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetRectangle self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    width <- allocMem :: IO (Ptr Word32)
    height <- allocMem :: IO (Ptr Word32)
    result <- wp_spa_pod_parser_get_rectangle self' width height
    let result' = (/= 0) result
    width' <- peek width
    height' <- peek height
    touchManagedPtr self
    freeMem width
    freeMem height
    return (result', width', height')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetRectangleMethodInfo
instance (signature ~ (m ((Bool, Word32, Word32))), MonadIO m) => O.OverloadedMethod SpaPodParserGetRectangleMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetRectangle

instance O.OverloadedMethodInfo SpaPodParserGetRectangleMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetRectangle",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetRectangle"
        })


#endif

-- method SpaPodParser::get_string
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the spa pod parser object"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "value"
--           , argType = TBasicType TUTF8
--           , argCType = Just "const char**"
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the string value" , 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_spa_pod_parser_get_string" wp_spa_pod_parser_get_string :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    Ptr CString ->                          -- value : TBasicType TUTF8
    IO CInt

-- | Gets the string value from a spa pod parser object.
spaPodParserGetString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: the spa pod parser object
    -> m ((Bool, T.Text))
    -- ^ __Returns:__ TRUE if the value was obtained, FALSE otherwise
spaPodParserGetString self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    value <- callocMem :: IO (Ptr CString)
    result <- wp_spa_pod_parser_get_string self' value
    let result' = (/= 0) result
    value' <- peek value
    value'' <- cstringToText value'
    touchManagedPtr self
    freeMem value
    return (result', value'')

#if defined(ENABLE_OVERLOADING)
data SpaPodParserGetStringMethodInfo
instance (signature ~ (m ((Bool, T.Text))), MonadIO m) => O.OverloadedMethod SpaPodParserGetStringMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserGetString

instance O.OverloadedMethodInfo SpaPodParserGetStringMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserGetString",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserGetString"
        })


#endif

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

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

-- | Increases the reference count of a spa pod parser.
spaPodParserRef ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: a spa pod sparser object
    -> m SpaPodParser
    -- ^ __Returns:__ /@self@/ with an additional reference count on it
spaPodParserRef self = liftIO $ do
    self' <- unsafeManagedPtrGetPtr self
    result <- wp_spa_pod_parser_ref self'
    checkUnexpectedReturnNULL "spaPodParserRef" result
    result' <- (wrapBoxed SpaPodParser) result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING)
data SpaPodParserRefMethodInfo
instance (signature ~ (m SpaPodParser), MonadIO m) => O.OverloadedMethod SpaPodParserRefMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserRef

instance O.OverloadedMethodInfo SpaPodParserRefMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserRef",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserRef"
        })


#endif

-- method SpaPodParser::unref
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Wp" , name = "SpaPodParser" }
--           , argCType = Just "WpSpaPodParser*"
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a spa pod parser object"
--                 , 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_spa_pod_parser_unref" wp_spa_pod_parser_unref :: 
    Ptr SpaPodParser ->                     -- self : TInterface (Name {namespace = "Wp", name = "SpaPodParser"})
    IO ()

-- | Decreases the reference count on /@self@/ and frees it when the ref count reaches zero.
spaPodParserUnref ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    SpaPodParser
    -- ^ /@self@/: a spa pod parser object
    -> m ()
spaPodParserUnref self = liftIO $ do
    self' <- B.ManagedPtr.disownBoxed self
    wp_spa_pod_parser_unref self'
    touchManagedPtr self
    return ()

#if defined(ENABLE_OVERLOADING)
data SpaPodParserUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod SpaPodParserUnrefMethodInfo SpaPodParser signature where
    overloadedMethod = spaPodParserUnref

instance O.OverloadedMethodInfo SpaPodParserUnrefMethodInfo SpaPodParser where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Wp.Structs.SpaPodParser.spaPodParserUnref",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-wireplumber-0.5.14.2/docs/GI-Wp-Structs-SpaPodParser.html#v:spaPodParserUnref"
        })


#endif

#if defined(ENABLE_OVERLOADING)
type family ResolveSpaPodParserMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveSpaPodParserMethod "end" o = SpaPodParserEndMethodInfo
    ResolveSpaPodParserMethod "ref" o = SpaPodParserRefMethodInfo
    ResolveSpaPodParserMethod "unref" o = SpaPodParserUnrefMethodInfo
    ResolveSpaPodParserMethod "getBoolean" o = SpaPodParserGetBooleanMethodInfo
    ResolveSpaPodParserMethod "getBytes" o = SpaPodParserGetBytesMethodInfo
    ResolveSpaPodParserMethod "getDouble" o = SpaPodParserGetDoubleMethodInfo
    ResolveSpaPodParserMethod "getFd" o = SpaPodParserGetFdMethodInfo
    ResolveSpaPodParserMethod "getFloat" o = SpaPodParserGetFloatMethodInfo
    ResolveSpaPodParserMethod "getFraction" o = SpaPodParserGetFractionMethodInfo
    ResolveSpaPodParserMethod "getId" o = SpaPodParserGetIdMethodInfo
    ResolveSpaPodParserMethod "getInt" o = SpaPodParserGetIntMethodInfo
    ResolveSpaPodParserMethod "getLong" o = SpaPodParserGetLongMethodInfo
    ResolveSpaPodParserMethod "getPod" o = SpaPodParserGetPodMethodInfo
    ResolveSpaPodParserMethod "getPointer" o = SpaPodParserGetPointerMethodInfo
    ResolveSpaPodParserMethod "getRectangle" o = SpaPodParserGetRectangleMethodInfo
    ResolveSpaPodParserMethod "getString" o = SpaPodParserGetStringMethodInfo
    ResolveSpaPodParserMethod l o = O.MethodResolutionFailed l o

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

#endif

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

#endif


