{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

The default implementation of GstPad used with 'GI.GstAudio.Objects.AudioAggregator.AudioAggregator'
-}

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

module GI.GstAudio.Objects.AudioAggregatorPad
    (

-- * Exported types
    AudioAggregatorPad(..)                  ,
    IsAudioAggregatorPad                    ,
    toAudioAggregatorPad                    ,
    noAudioAggregatorPad                    ,


    ) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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.Text as T
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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Objects.Object as Gst.Object
import qualified GI.Gst.Objects.Pad as Gst.Pad
import qualified GI.GstBase.Objects.AggregatorPad as GstBase.AggregatorPad

-- | Memory-managed wrapper type.
newtype AudioAggregatorPad = AudioAggregatorPad (ManagedPtr AudioAggregatorPad)
foreign import ccall "gst_audio_aggregator_pad_get_type"
    c_gst_audio_aggregator_pad_get_type :: IO GType

instance GObject AudioAggregatorPad where
    gobjectType = c_gst_audio_aggregator_pad_get_type


-- | Type class for types which can be safely cast to `AudioAggregatorPad`, for instance with `toAudioAggregatorPad`.
class (GObject o, O.IsDescendantOf AudioAggregatorPad o) => IsAudioAggregatorPad o
instance (GObject o, O.IsDescendantOf AudioAggregatorPad o) => IsAudioAggregatorPad o

instance O.HasParentTypes AudioAggregatorPad
type instance O.ParentTypes AudioAggregatorPad = '[GstBase.AggregatorPad.AggregatorPad, Gst.Pad.Pad, Gst.Object.Object, GObject.Object.Object]

-- | Cast to `AudioAggregatorPad`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toAudioAggregatorPad :: (MonadIO m, IsAudioAggregatorPad o) => o -> m AudioAggregatorPad
toAudioAggregatorPad = liftIO . unsafeCastTo AudioAggregatorPad

-- | A convenience alias for `Nothing` :: `Maybe` `AudioAggregatorPad`.
noAudioAggregatorPad :: Maybe AudioAggregatorPad
noAudioAggregatorPad = Nothing

#if ENABLE_OVERLOADING
type family ResolveAudioAggregatorPadMethod (t :: Symbol) (o :: *) :: * where
    ResolveAudioAggregatorPadMethod "activateMode" o = Gst.Pad.PadActivateModeMethodInfo
    ResolveAudioAggregatorPadMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
    ResolveAudioAggregatorPadMethod "addProbe" o = Gst.Pad.PadAddProbeMethodInfo
    ResolveAudioAggregatorPadMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAudioAggregatorPadMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAudioAggregatorPadMethod "canLink" o = Gst.Pad.PadCanLinkMethodInfo
    ResolveAudioAggregatorPadMethod "chain" o = Gst.Pad.PadChainMethodInfo
    ResolveAudioAggregatorPadMethod "chainList" o = Gst.Pad.PadChainListMethodInfo
    ResolveAudioAggregatorPadMethod "checkReconfigure" o = Gst.Pad.PadCheckReconfigureMethodInfo
    ResolveAudioAggregatorPadMethod "createStreamId" o = Gst.Pad.PadCreateStreamIdMethodInfo
    ResolveAudioAggregatorPadMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
    ResolveAudioAggregatorPadMethod "dropBuffer" o = GstBase.AggregatorPad.AggregatorPadDropBufferMethodInfo
    ResolveAudioAggregatorPadMethod "eventDefault" o = Gst.Pad.PadEventDefaultMethodInfo
    ResolveAudioAggregatorPadMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAudioAggregatorPadMethod "forward" o = Gst.Pad.PadForwardMethodInfo
    ResolveAudioAggregatorPadMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAudioAggregatorPadMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAudioAggregatorPadMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
    ResolveAudioAggregatorPadMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
    ResolveAudioAggregatorPadMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
    ResolveAudioAggregatorPadMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
    ResolveAudioAggregatorPadMethod "hasBuffer" o = GstBase.AggregatorPad.AggregatorPadHasBufferMethodInfo
    ResolveAudioAggregatorPadMethod "hasCurrentCaps" o = Gst.Pad.PadHasCurrentCapsMethodInfo
    ResolveAudioAggregatorPadMethod "isActive" o = Gst.Pad.PadIsActiveMethodInfo
    ResolveAudioAggregatorPadMethod "isBlocked" o = Gst.Pad.PadIsBlockedMethodInfo
    ResolveAudioAggregatorPadMethod "isBlocking" o = Gst.Pad.PadIsBlockingMethodInfo
    ResolveAudioAggregatorPadMethod "isEos" o = GstBase.AggregatorPad.AggregatorPadIsEosMethodInfo
    ResolveAudioAggregatorPadMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAudioAggregatorPadMethod "isLinked" o = Gst.Pad.PadIsLinkedMethodInfo
    ResolveAudioAggregatorPadMethod "iterateInternalLinks" o = Gst.Pad.PadIterateInternalLinksMethodInfo
    ResolveAudioAggregatorPadMethod "iterateInternalLinksDefault" o = Gst.Pad.PadIterateInternalLinksDefaultMethodInfo
    ResolveAudioAggregatorPadMethod "link" o = Gst.Pad.PadLinkMethodInfo
    ResolveAudioAggregatorPadMethod "linkFull" o = Gst.Pad.PadLinkFullMethodInfo
    ResolveAudioAggregatorPadMethod "linkMaybeGhosting" o = Gst.Pad.PadLinkMaybeGhostingMethodInfo
    ResolveAudioAggregatorPadMethod "linkMaybeGhostingFull" o = Gst.Pad.PadLinkMaybeGhostingFullMethodInfo
    ResolveAudioAggregatorPadMethod "markReconfigure" o = Gst.Pad.PadMarkReconfigureMethodInfo
    ResolveAudioAggregatorPadMethod "needsReconfigure" o = Gst.Pad.PadNeedsReconfigureMethodInfo
    ResolveAudioAggregatorPadMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAudioAggregatorPadMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAudioAggregatorPadMethod "pauseTask" o = Gst.Pad.PadPauseTaskMethodInfo
    ResolveAudioAggregatorPadMethod "peekBuffer" o = GstBase.AggregatorPad.AggregatorPadPeekBufferMethodInfo
    ResolveAudioAggregatorPadMethod "peerQuery" o = Gst.Pad.PadPeerQueryMethodInfo
    ResolveAudioAggregatorPadMethod "peerQueryAcceptCaps" o = Gst.Pad.PadPeerQueryAcceptCapsMethodInfo
    ResolveAudioAggregatorPadMethod "peerQueryCaps" o = Gst.Pad.PadPeerQueryCapsMethodInfo
    ResolveAudioAggregatorPadMethod "peerQueryConvert" o = Gst.Pad.PadPeerQueryConvertMethodInfo
    ResolveAudioAggregatorPadMethod "peerQueryDuration" o = Gst.Pad.PadPeerQueryDurationMethodInfo
    ResolveAudioAggregatorPadMethod "peerQueryPosition" o = Gst.Pad.PadPeerQueryPositionMethodInfo
    ResolveAudioAggregatorPadMethod "popBuffer" o = GstBase.AggregatorPad.AggregatorPadPopBufferMethodInfo
    ResolveAudioAggregatorPadMethod "proxyQueryAcceptCaps" o = Gst.Pad.PadProxyQueryAcceptCapsMethodInfo
    ResolveAudioAggregatorPadMethod "proxyQueryCaps" o = Gst.Pad.PadProxyQueryCapsMethodInfo
    ResolveAudioAggregatorPadMethod "pullRange" o = Gst.Pad.PadPullRangeMethodInfo
    ResolveAudioAggregatorPadMethod "push" o = Gst.Pad.PadPushMethodInfo
    ResolveAudioAggregatorPadMethod "pushEvent" o = Gst.Pad.PadPushEventMethodInfo
    ResolveAudioAggregatorPadMethod "pushList" o = Gst.Pad.PadPushListMethodInfo
    ResolveAudioAggregatorPadMethod "query" o = Gst.Pad.PadQueryMethodInfo
    ResolveAudioAggregatorPadMethod "queryAcceptCaps" o = Gst.Pad.PadQueryAcceptCapsMethodInfo
    ResolveAudioAggregatorPadMethod "queryCaps" o = Gst.Pad.PadQueryCapsMethodInfo
    ResolveAudioAggregatorPadMethod "queryConvert" o = Gst.Pad.PadQueryConvertMethodInfo
    ResolveAudioAggregatorPadMethod "queryDefault" o = Gst.Pad.PadQueryDefaultMethodInfo
    ResolveAudioAggregatorPadMethod "queryDuration" o = Gst.Pad.PadQueryDurationMethodInfo
    ResolveAudioAggregatorPadMethod "queryPosition" o = Gst.Pad.PadQueryPositionMethodInfo
    ResolveAudioAggregatorPadMethod "ref" o = Gst.Object.ObjectRefMethodInfo
    ResolveAudioAggregatorPadMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAudioAggregatorPadMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
    ResolveAudioAggregatorPadMethod "removeProbe" o = Gst.Pad.PadRemoveProbeMethodInfo
    ResolveAudioAggregatorPadMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAudioAggregatorPadMethod "sendEvent" o = Gst.Pad.PadSendEventMethodInfo
    ResolveAudioAggregatorPadMethod "startTask" o = Gst.Pad.PadStartTaskMethodInfo
    ResolveAudioAggregatorPadMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAudioAggregatorPadMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAudioAggregatorPadMethod "stickyEventsForeach" o = Gst.Pad.PadStickyEventsForeachMethodInfo
    ResolveAudioAggregatorPadMethod "stopTask" o = Gst.Pad.PadStopTaskMethodInfo
    ResolveAudioAggregatorPadMethod "storeStickyEvent" o = Gst.Pad.PadStoreStickyEventMethodInfo
    ResolveAudioAggregatorPadMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
    ResolveAudioAggregatorPadMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
    ResolveAudioAggregatorPadMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAudioAggregatorPadMethod "unlink" o = Gst.Pad.PadUnlinkMethodInfo
    ResolveAudioAggregatorPadMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
    ResolveAudioAggregatorPadMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
    ResolveAudioAggregatorPadMethod "useFixedCaps" o = Gst.Pad.PadUseFixedCapsMethodInfo
    ResolveAudioAggregatorPadMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAudioAggregatorPadMethod "getAllowedCaps" o = Gst.Pad.PadGetAllowedCapsMethodInfo
    ResolveAudioAggregatorPadMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
    ResolveAudioAggregatorPadMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
    ResolveAudioAggregatorPadMethod "getCurrentCaps" o = Gst.Pad.PadGetCurrentCapsMethodInfo
    ResolveAudioAggregatorPadMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAudioAggregatorPadMethod "getDirection" o = Gst.Pad.PadGetDirectionMethodInfo
    ResolveAudioAggregatorPadMethod "getElementPrivate" o = Gst.Pad.PadGetElementPrivateMethodInfo
    ResolveAudioAggregatorPadMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
    ResolveAudioAggregatorPadMethod "getLastFlowReturn" o = Gst.Pad.PadGetLastFlowReturnMethodInfo
    ResolveAudioAggregatorPadMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
    ResolveAudioAggregatorPadMethod "getOffset" o = Gst.Pad.PadGetOffsetMethodInfo
    ResolveAudioAggregatorPadMethod "getPadTemplate" o = Gst.Pad.PadGetPadTemplateMethodInfo
    ResolveAudioAggregatorPadMethod "getPadTemplateCaps" o = Gst.Pad.PadGetPadTemplateCapsMethodInfo
    ResolveAudioAggregatorPadMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
    ResolveAudioAggregatorPadMethod "getParentElement" o = Gst.Pad.PadGetParentElementMethodInfo
    ResolveAudioAggregatorPadMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
    ResolveAudioAggregatorPadMethod "getPeer" o = Gst.Pad.PadGetPeerMethodInfo
    ResolveAudioAggregatorPadMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAudioAggregatorPadMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAudioAggregatorPadMethod "getRange" o = Gst.Pad.PadGetRangeMethodInfo
    ResolveAudioAggregatorPadMethod "getStickyEvent" o = Gst.Pad.PadGetStickyEventMethodInfo
    ResolveAudioAggregatorPadMethod "getStream" o = Gst.Pad.PadGetStreamMethodInfo
    ResolveAudioAggregatorPadMethod "getStreamId" o = Gst.Pad.PadGetStreamIdMethodInfo
    ResolveAudioAggregatorPadMethod "getTaskState" o = Gst.Pad.PadGetTaskStateMethodInfo
    ResolveAudioAggregatorPadMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
    ResolveAudioAggregatorPadMethod "setActivateFunctionFull" o = Gst.Pad.PadSetActivateFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setActivatemodeFunctionFull" o = Gst.Pad.PadSetActivatemodeFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setActive" o = Gst.Pad.PadSetActiveMethodInfo
    ResolveAudioAggregatorPadMethod "setChainFunctionFull" o = Gst.Pad.PadSetChainFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setChainListFunctionFull" o = Gst.Pad.PadSetChainListFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
    ResolveAudioAggregatorPadMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
    ResolveAudioAggregatorPadMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
    ResolveAudioAggregatorPadMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAudioAggregatorPadMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAudioAggregatorPadMethod "setElementPrivate" o = Gst.Pad.PadSetElementPrivateMethodInfo
    ResolveAudioAggregatorPadMethod "setEventFullFunctionFull" o = Gst.Pad.PadSetEventFullFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setEventFunctionFull" o = Gst.Pad.PadSetEventFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setGetrangeFunctionFull" o = Gst.Pad.PadSetGetrangeFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setIterateInternalLinksFunctionFull" o = Gst.Pad.PadSetIterateInternalLinksFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setLinkFunctionFull" o = Gst.Pad.PadSetLinkFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
    ResolveAudioAggregatorPadMethod "setOffset" o = Gst.Pad.PadSetOffsetMethodInfo
    ResolveAudioAggregatorPadMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
    ResolveAudioAggregatorPadMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAudioAggregatorPadMethod "setQueryFunctionFull" o = Gst.Pad.PadSetQueryFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod "setUnlinkFunctionFull" o = Gst.Pad.PadSetUnlinkFunctionFullMethodInfo
    ResolveAudioAggregatorPadMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAudioAggregatorPadMethod t AudioAggregatorPad, O.MethodInfo info AudioAggregatorPad p) => OL.IsLabel t (AudioAggregatorPad -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList AudioAggregatorPad
type instance O.AttributeList AudioAggregatorPad = AudioAggregatorPadAttributeList
type AudioAggregatorPadAttributeList = ('[ '("caps", Gst.Pad.PadCapsPropertyInfo), '("direction", Gst.Pad.PadDirectionPropertyInfo), '("emitSignals", GstBase.AggregatorPad.AggregatorPadEmitSignalsPropertyInfo), '("name", Gst.Object.ObjectNamePropertyInfo), '("offset", Gst.Pad.PadOffsetPropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo), '("template", Gst.Pad.PadTemplatePropertyInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
#endif

#if ENABLE_OVERLOADING
type instance O.SignalList AudioAggregatorPad = AudioAggregatorPadSignalList
type AudioAggregatorPadSignalList = ('[ '("bufferConsumed", GstBase.AggregatorPad.AggregatorPadBufferConsumedSignalInfo), '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("linked", Gst.Pad.PadLinkedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("unlinked", Gst.Pad.PadUnlinkedSignalInfo)] :: [(Symbol, *)])

#endif