{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- This is a base class for anything that can be added to a t'GI.Gst.Objects.Plugin.Plugin'.

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

module GI.Gst.Objects.PluginFeature
    ( 

-- * Exported types
    PluginFeature(..)                       ,
    IsPluginFeature                         ,
    toPluginFeature                         ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolvePluginFeatureMethod              ,
#endif


-- ** checkVersion #method:checkVersion#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureCheckVersionMethodInfo     ,
#endif
    pluginFeatureCheckVersion               ,


-- ** getPlugin #method:getPlugin#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureGetPluginMethodInfo        ,
#endif
    pluginFeatureGetPlugin                  ,


-- ** getPluginName #method:getPluginName#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureGetPluginNameMethodInfo    ,
#endif
    pluginFeatureGetPluginName              ,


-- ** getRank #method:getRank#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureGetRankMethodInfo          ,
#endif
    pluginFeatureGetRank                    ,


-- ** listCopy #method:listCopy#

    pluginFeatureListCopy                   ,


-- ** listDebug #method:listDebug#

    pluginFeatureListDebug                  ,


-- ** listFree #method:listFree#

    pluginFeatureListFree                   ,


-- ** load #method:load#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureLoadMethodInfo             ,
#endif
    pluginFeatureLoad                       ,


-- ** rankCompareFunc #method:rankCompareFunc#

    pluginFeatureRankCompareFunc            ,


-- ** setRank #method:setRank#

#if defined(ENABLE_OVERLOADING)
    PluginFeatureSetRankMethodInfo          ,
#endif
    pluginFeatureSetRank                    ,




    ) 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.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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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 {-# SOURCE #-} qualified GI.Gst.Objects.Object as Gst.Object
import {-# SOURCE #-} qualified GI.Gst.Objects.Plugin as Gst.Plugin

-- | Memory-managed wrapper type.
newtype PluginFeature = PluginFeature (SP.ManagedPtr PluginFeature)
    deriving (PluginFeature -> PluginFeature -> Bool
(PluginFeature -> PluginFeature -> Bool)
-> (PluginFeature -> PluginFeature -> Bool) -> Eq PluginFeature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PluginFeature -> PluginFeature -> Bool
$c/= :: PluginFeature -> PluginFeature -> Bool
== :: PluginFeature -> PluginFeature -> Bool
$c== :: PluginFeature -> PluginFeature -> Bool
Eq)

instance SP.ManagedPtrNewtype PluginFeature where
    toManagedPtr :: PluginFeature -> ManagedPtr PluginFeature
toManagedPtr (PluginFeature ManagedPtr PluginFeature
p) = ManagedPtr PluginFeature
p

foreign import ccall "gst_plugin_feature_get_type"
    c_gst_plugin_feature_get_type :: IO B.Types.GType

instance B.Types.TypedObject PluginFeature where
    glibType :: IO GType
glibType = IO GType
c_gst_plugin_feature_get_type

instance B.Types.GObject PluginFeature

-- | Convert 'PluginFeature' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue PluginFeature where
    toGValue :: PluginFeature -> IO GValue
toGValue PluginFeature
o = do
        GType
gtype <- IO GType
c_gst_plugin_feature_get_type
        PluginFeature -> (Ptr PluginFeature -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr PluginFeature
o (GType
-> (GValue -> Ptr PluginFeature -> IO ())
-> Ptr PluginFeature
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr PluginFeature -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO PluginFeature
fromGValue GValue
gv = do
        Ptr PluginFeature
ptr <- GValue -> IO (Ptr PluginFeature)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr PluginFeature)
        (ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature Ptr PluginFeature
ptr
        
    

-- | Type class for types which can be safely cast to `PluginFeature`, for instance with `toPluginFeature`.
class (SP.GObject o, O.IsDescendantOf PluginFeature o) => IsPluginFeature o
instance (SP.GObject o, O.IsDescendantOf PluginFeature o) => IsPluginFeature o

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

-- | Cast to `PluginFeature`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toPluginFeature :: (MonadIO m, IsPluginFeature o) => o -> m PluginFeature
toPluginFeature :: o -> m PluginFeature
toPluginFeature = IO PluginFeature -> m PluginFeature
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PluginFeature -> m PluginFeature)
-> (o -> IO PluginFeature) -> o -> m PluginFeature
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr PluginFeature -> PluginFeature)
-> o -> IO PluginFeature
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr PluginFeature -> PluginFeature
PluginFeature

#if defined(ENABLE_OVERLOADING)
type family ResolvePluginFeatureMethod (t :: Symbol) (o :: *) :: * where
    ResolvePluginFeatureMethod "addControlBinding" o = Gst.Object.ObjectAddControlBindingMethodInfo
    ResolvePluginFeatureMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolvePluginFeatureMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolvePluginFeatureMethod "checkVersion" o = PluginFeatureCheckVersionMethodInfo
    ResolvePluginFeatureMethod "defaultError" o = Gst.Object.ObjectDefaultErrorMethodInfo
    ResolvePluginFeatureMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolvePluginFeatureMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolvePluginFeatureMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolvePluginFeatureMethod "hasActiveControlBindings" o = Gst.Object.ObjectHasActiveControlBindingsMethodInfo
    ResolvePluginFeatureMethod "hasAncestor" o = Gst.Object.ObjectHasAncestorMethodInfo
    ResolvePluginFeatureMethod "hasAsAncestor" o = Gst.Object.ObjectHasAsAncestorMethodInfo
    ResolvePluginFeatureMethod "hasAsParent" o = Gst.Object.ObjectHasAsParentMethodInfo
    ResolvePluginFeatureMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolvePluginFeatureMethod "load" o = PluginFeatureLoadMethodInfo
    ResolvePluginFeatureMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolvePluginFeatureMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolvePluginFeatureMethod "ref" o = Gst.Object.ObjectRefMethodInfo
    ResolvePluginFeatureMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolvePluginFeatureMethod "removeControlBinding" o = Gst.Object.ObjectRemoveControlBindingMethodInfo
    ResolvePluginFeatureMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolvePluginFeatureMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolvePluginFeatureMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolvePluginFeatureMethod "suggestNextSync" o = Gst.Object.ObjectSuggestNextSyncMethodInfo
    ResolvePluginFeatureMethod "syncValues" o = Gst.Object.ObjectSyncValuesMethodInfo
    ResolvePluginFeatureMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolvePluginFeatureMethod "unparent" o = Gst.Object.ObjectUnparentMethodInfo
    ResolvePluginFeatureMethod "unref" o = Gst.Object.ObjectUnrefMethodInfo
    ResolvePluginFeatureMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolvePluginFeatureMethod "getControlBinding" o = Gst.Object.ObjectGetControlBindingMethodInfo
    ResolvePluginFeatureMethod "getControlRate" o = Gst.Object.ObjectGetControlRateMethodInfo
    ResolvePluginFeatureMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolvePluginFeatureMethod "getGValueArray" o = Gst.Object.ObjectGetGValueArrayMethodInfo
    ResolvePluginFeatureMethod "getName" o = Gst.Object.ObjectGetNameMethodInfo
    ResolvePluginFeatureMethod "getParent" o = Gst.Object.ObjectGetParentMethodInfo
    ResolvePluginFeatureMethod "getPathString" o = Gst.Object.ObjectGetPathStringMethodInfo
    ResolvePluginFeatureMethod "getPlugin" o = PluginFeatureGetPluginMethodInfo
    ResolvePluginFeatureMethod "getPluginName" o = PluginFeatureGetPluginNameMethodInfo
    ResolvePluginFeatureMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolvePluginFeatureMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolvePluginFeatureMethod "getRank" o = PluginFeatureGetRankMethodInfo
    ResolvePluginFeatureMethod "getValue" o = Gst.Object.ObjectGetValueMethodInfo
    ResolvePluginFeatureMethod "setControlBindingDisabled" o = Gst.Object.ObjectSetControlBindingDisabledMethodInfo
    ResolvePluginFeatureMethod "setControlBindingsDisabled" o = Gst.Object.ObjectSetControlBindingsDisabledMethodInfo
    ResolvePluginFeatureMethod "setControlRate" o = Gst.Object.ObjectSetControlRateMethodInfo
    ResolvePluginFeatureMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolvePluginFeatureMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolvePluginFeatureMethod "setName" o = Gst.Object.ObjectSetNameMethodInfo
    ResolvePluginFeatureMethod "setParent" o = Gst.Object.ObjectSetParentMethodInfo
    ResolvePluginFeatureMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolvePluginFeatureMethod "setRank" o = PluginFeatureSetRankMethodInfo
    ResolvePluginFeatureMethod l o = O.MethodResolutionFailed l o

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

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList PluginFeature
type instance O.AttributeList PluginFeature = PluginFeatureAttributeList
type PluginFeatureAttributeList = ('[ '("name", Gst.Object.ObjectNamePropertyInfo), '("parent", Gst.Object.ObjectParentPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList PluginFeature = PluginFeatureSignalList
type PluginFeatureSignalList = ('[ '("deepNotify", Gst.Object.ObjectDeepNotifySignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method PluginFeature::check_version
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a feature" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_major"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "minimum required major version"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_minor"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "minimum required minor version"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "min_micro"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "minimum required micro version"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_check_version" gst_plugin_feature_check_version :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    Word32 ->                               -- min_major : TBasicType TUInt
    Word32 ->                               -- min_minor : TBasicType TUInt
    Word32 ->                               -- min_micro : TBasicType TUInt
    IO CInt

-- | Checks whether the given plugin feature is at least
--  the required version
pluginFeatureCheckVersion ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: a feature
    -> Word32
    -- ^ /@minMajor@/: minimum required major version
    -> Word32
    -- ^ /@minMinor@/: minimum required minor version
    -> Word32
    -- ^ /@minMicro@/: minimum required micro version
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the plugin feature has at least
    --  the required version, otherwise 'P.False'.
pluginFeatureCheckVersion :: a -> Word32 -> Word32 -> Word32 -> m Bool
pluginFeatureCheckVersion a
feature Word32
minMajor Word32
minMinor Word32
minMicro = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    CInt
result <- Ptr PluginFeature -> Word32 -> Word32 -> Word32 -> IO CInt
gst_plugin_feature_check_version Ptr PluginFeature
feature' Word32
minMajor Word32
minMinor Word32
minMicro
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data PluginFeatureCheckVersionMethodInfo
instance (signature ~ (Word32 -> Word32 -> Word32 -> m Bool), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureCheckVersionMethodInfo a signature where
    overloadedMethod = pluginFeatureCheckVersion

#endif

-- method PluginFeature::get_plugin
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a feature" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Gst" , name = "Plugin" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_get_plugin" gst_plugin_feature_get_plugin :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    IO (Ptr Gst.Plugin.Plugin)

-- | Get the plugin that provides this feature.
pluginFeatureGetPlugin ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: a feature
    -> m (Maybe Gst.Plugin.Plugin)
    -- ^ __Returns:__ the plugin that provides this
    --     feature, or 'P.Nothing'.  Unref with 'GI.Gst.Objects.Object.objectUnref' when no
    --     longer needed.
pluginFeatureGetPlugin :: a -> m (Maybe Plugin)
pluginFeatureGetPlugin a
feature = IO (Maybe Plugin) -> m (Maybe Plugin)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Plugin) -> m (Maybe Plugin))
-> IO (Maybe Plugin) -> m (Maybe Plugin)
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    Ptr Plugin
result <- Ptr PluginFeature -> IO (Ptr Plugin)
gst_plugin_feature_get_plugin Ptr PluginFeature
feature'
    Maybe Plugin
maybeResult <- Ptr Plugin -> (Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Plugin
result ((Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin))
-> (Ptr Plugin -> IO Plugin) -> IO (Maybe Plugin)
forall a b. (a -> b) -> a -> b
$ \Ptr Plugin
result' -> do
        Plugin
result'' <- ((ManagedPtr Plugin -> Plugin) -> Ptr Plugin -> IO Plugin
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Plugin -> Plugin
Gst.Plugin.Plugin) Ptr Plugin
result'
        Plugin -> IO Plugin
forall (m :: * -> *) a. Monad m => a -> m a
return Plugin
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    Maybe Plugin -> IO (Maybe Plugin)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Plugin
maybeResult

#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetPluginMethodInfo
instance (signature ~ (m (Maybe Gst.Plugin.Plugin)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetPluginMethodInfo a signature where
    overloadedMethod = pluginFeatureGetPlugin

#endif

-- method PluginFeature::get_plugin_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a feature" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_get_plugin_name" gst_plugin_feature_get_plugin_name :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    IO CString

-- | Get the name of the plugin that provides this feature.
-- 
-- /Since: 1.2/
pluginFeatureGetPluginName ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: a feature
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the name of the plugin that provides this
    --     feature, or 'P.Nothing' if the feature is not associated with a
    --     plugin.
pluginFeatureGetPluginName :: a -> m (Maybe Text)
pluginFeatureGetPluginName a
feature = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    CString
result <- Ptr PluginFeature -> IO CString
gst_plugin_feature_get_plugin_name Ptr PluginFeature
feature'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetPluginNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetPluginNameMethodInfo a signature where
    overloadedMethod = pluginFeatureGetPluginName

#endif

-- method PluginFeature::get_rank
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a feature" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_get_rank" gst_plugin_feature_get_rank :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    IO Word32

-- | Gets the rank of a plugin feature.
pluginFeatureGetRank ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: a feature
    -> m Word32
    -- ^ __Returns:__ The rank of the feature
pluginFeatureGetRank :: a -> m Word32
pluginFeatureGetRank a
feature = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    Word32
result <- Ptr PluginFeature -> IO Word32
gst_plugin_feature_get_rank Ptr PluginFeature
feature'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data PluginFeatureGetRankMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureGetRankMethodInfo a signature where
    overloadedMethod = pluginFeatureGetRank

#endif

-- method PluginFeature::load
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the plugin feature to check"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gst" , name = "PluginFeature" })
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_load" gst_plugin_feature_load :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    IO (Ptr PluginFeature)

-- | Loads the plugin containing /@feature@/ if it\'s not already loaded. /@feature@/ is
-- unaffected; use the return value instead.
-- 
-- Normally this function is used like this:
-- 
-- === /C code/
-- >
-- >GstPluginFeature *loaded_feature;
-- >
-- >loaded_feature = gst_plugin_feature_load (feature);
-- >// presumably, we're no longer interested in the potentially-unloaded feature
-- >gst_object_unref (feature);
-- >feature = loaded_feature;
pluginFeatureLoad ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: the plugin feature to check
    -> m (Maybe PluginFeature)
    -- ^ __Returns:__ a reference to the loaded
    -- feature, or 'P.Nothing' on error
pluginFeatureLoad :: a -> m (Maybe PluginFeature)
pluginFeatureLoad a
feature = IO (Maybe PluginFeature) -> m (Maybe PluginFeature)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe PluginFeature) -> m (Maybe PluginFeature))
-> IO (Maybe PluginFeature) -> m (Maybe PluginFeature)
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    Ptr PluginFeature
result <- Ptr PluginFeature -> IO (Ptr PluginFeature)
gst_plugin_feature_load Ptr PluginFeature
feature'
    Maybe PluginFeature
maybeResult <- Ptr PluginFeature
-> (Ptr PluginFeature -> IO PluginFeature)
-> IO (Maybe PluginFeature)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr PluginFeature
result ((Ptr PluginFeature -> IO PluginFeature)
 -> IO (Maybe PluginFeature))
-> (Ptr PluginFeature -> IO PluginFeature)
-> IO (Maybe PluginFeature)
forall a b. (a -> b) -> a -> b
$ \Ptr PluginFeature
result' -> do
        PluginFeature
result'' <- ((ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature) Ptr PluginFeature
result'
        PluginFeature -> IO PluginFeature
forall (m :: * -> *) a. Monad m => a -> m a
return PluginFeature
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    Maybe PluginFeature -> IO (Maybe PluginFeature)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe PluginFeature
maybeResult

#if defined(ENABLE_OVERLOADING)
data PluginFeatureLoadMethodInfo
instance (signature ~ (m (Maybe PluginFeature)), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureLoadMethodInfo a signature where
    overloadedMethod = pluginFeatureLoad

#endif

-- method PluginFeature::set_rank
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "feature"
--           , argType =
--               TInterface Name { namespace = "Gst" , name = "PluginFeature" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "feature to rank" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "rank"
--           , argType = TBasicType TUInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "rank value - higher number means more priority rank"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_set_rank" gst_plugin_feature_set_rank :: 
    Ptr PluginFeature ->                    -- feature : TInterface (Name {namespace = "Gst", name = "PluginFeature"})
    Word32 ->                               -- rank : TBasicType TUInt
    IO ()

-- | Specifies a rank for a plugin feature, so that autoplugging uses
-- the most appropriate feature.
pluginFeatureSetRank ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    a
    -- ^ /@feature@/: feature to rank
    -> Word32
    -- ^ /@rank@/: rank value - higher number means more priority rank
    -> m ()
pluginFeatureSetRank :: a -> Word32 -> m ()
pluginFeatureSetRank a
feature Word32
rank = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr PluginFeature
feature' <- a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
feature
    Ptr PluginFeature -> Word32 -> IO ()
gst_plugin_feature_set_rank Ptr PluginFeature
feature' Word32
rank
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
feature
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data PluginFeatureSetRankMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsPluginFeature a) => O.MethodInfo PluginFeatureSetRankMethodInfo a signature where
    overloadedMethod = pluginFeatureSetRank

#endif

-- method PluginFeature::list_copy
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TGList
--                 (TInterface Name { namespace = "Gst" , name = "PluginFeature" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "list\n    of #GstPluginFeature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TGList
--                  (TInterface Name { namespace = "Gst" , name = "PluginFeature" }))
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_list_copy" gst_plugin_feature_list_copy :: 
    Ptr (GList (Ptr PluginFeature)) ->      -- list : TGList (TInterface (Name {namespace = "Gst", name = "PluginFeature"}))
    IO (Ptr (GList (Ptr PluginFeature)))

-- | Copies the list of features. Caller should call /@gstPluginFeatureListFree@/
-- when done with the list.
pluginFeatureListCopy ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    [a]
    -- ^ /@list@/: list
    --     of t'GI.Gst.Objects.PluginFeature.PluginFeature'
    -> m [PluginFeature]
    -- ^ __Returns:__ a copy of /@list@/,
    --     with each feature\'s reference count incremented.
pluginFeatureListCopy :: [a] -> m [PluginFeature]
pluginFeatureListCopy [a]
list = IO [PluginFeature] -> m [PluginFeature]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [PluginFeature] -> m [PluginFeature])
-> IO [PluginFeature] -> m [PluginFeature]
forall a b. (a -> b) -> a -> b
$ do
    [Ptr PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
list
    Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
    Ptr (GList (Ptr PluginFeature))
result <- Ptr (GList (Ptr PluginFeature))
-> IO (Ptr (GList (Ptr PluginFeature)))
gst_plugin_feature_list_copy Ptr (GList (Ptr PluginFeature))
list''
    [Ptr PluginFeature]
result' <- Ptr (GList (Ptr PluginFeature)) -> IO [Ptr PluginFeature]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr PluginFeature))
result
    [PluginFeature]
result'' <- (Ptr PluginFeature -> IO PluginFeature)
-> [Ptr PluginFeature] -> IO [PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr PluginFeature -> PluginFeature)
-> Ptr PluginFeature -> IO PluginFeature
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr PluginFeature -> PluginFeature
PluginFeature) [Ptr PluginFeature]
result'
    Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
result
    (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
    Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
list''
    [PluginFeature] -> IO [PluginFeature]
forall (m :: * -> *) a. Monad m => a -> m a
return [PluginFeature]
result''

#if defined(ENABLE_OVERLOADING)
#endif

-- method PluginFeature::list_debug
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TGList
--                 (TInterface Name { namespace = "Gst" , name = "PluginFeature" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GList of\n    plugin features"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_list_debug" gst_plugin_feature_list_debug :: 
    Ptr (GList (Ptr PluginFeature)) ->      -- list : TGList (TInterface (Name {namespace = "Gst", name = "PluginFeature"}))
    IO ()

-- | Debug the plugin feature names in /@list@/.
pluginFeatureListDebug ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    [a]
    -- ^ /@list@/: a t'GI.GLib.Structs.List.List' of
    --     plugin features
    -> m ()
pluginFeatureListDebug :: [a] -> m ()
pluginFeatureListDebug [a]
list = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    [Ptr PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [a]
list
    Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
    Ptr (GList (Ptr PluginFeature)) -> IO ()
gst_plugin_feature_list_debug Ptr (GList (Ptr PluginFeature))
list''
    (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
    Ptr (GList (Ptr PluginFeature)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr PluginFeature))
list''
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method PluginFeature::list_free
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "list"
--           , argType =
--               TGList
--                 (TInterface Name { namespace = "Gst" , name = "PluginFeature" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "list\n    of #GstPluginFeature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_list_free" gst_plugin_feature_list_free :: 
    Ptr (GList (Ptr PluginFeature)) ->      -- list : TGList (TInterface (Name {namespace = "Gst", name = "PluginFeature"}))
    IO ()

-- | Unrefs each member of /@list@/, then frees the list.
pluginFeatureListFree ::
    (B.CallStack.HasCallStack, MonadIO m, IsPluginFeature a) =>
    [a]
    -- ^ /@list@/: list
    --     of t'GI.Gst.Objects.PluginFeature.PluginFeature'
    -> m ()
pluginFeatureListFree :: [a] -> m ()
pluginFeatureListFree [a]
list = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    [Ptr PluginFeature]
list' <- (a -> IO (Ptr PluginFeature)) -> [a] -> IO [Ptr PluginFeature]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM a -> IO (Ptr PluginFeature)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject [a]
list
    Ptr (GList (Ptr PluginFeature))
list'' <- [Ptr PluginFeature] -> IO (Ptr (GList (Ptr PluginFeature)))
forall a. [Ptr a] -> IO (Ptr (GList (Ptr a)))
packGList [Ptr PluginFeature]
list'
    Ptr (GList (Ptr PluginFeature)) -> IO ()
gst_plugin_feature_list_free Ptr (GList (Ptr PluginFeature))
list''
    (a -> IO ()) -> [a] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [a]
list
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
#endif

-- method PluginFeature::rank_compare_func
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "p1"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstPluginFeature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "p2"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GstPluginFeature"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TInt)
-- throws : False
-- Skip return : False

foreign import ccall "gst_plugin_feature_rank_compare_func" gst_plugin_feature_rank_compare_func :: 
    Ptr () ->                               -- p1 : TBasicType TPtr
    Ptr () ->                               -- p2 : TBasicType TPtr
    IO Int32

-- | Compares the two given t'GI.Gst.Objects.PluginFeature.PluginFeature' instances. This function can be
-- used as a t'GI.GLib.Callbacks.CompareFunc' when sorting by rank and then by name.
pluginFeatureRankCompareFunc ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr ()
    -- ^ /@p1@/: a t'GI.Gst.Objects.PluginFeature.PluginFeature'
    -> Ptr ()
    -- ^ /@p2@/: a t'GI.Gst.Objects.PluginFeature.PluginFeature'
    -> m Int32
    -- ^ __Returns:__ negative value if the rank of p1 > the rank of p2 or the ranks are
    -- equal but the name of p1 comes before the name of p2; zero if the rank
    -- and names are equal; positive value if the rank of p1 \< the rank of p2 or the
    -- ranks are equal but the name of p2 comes before the name of p1
pluginFeatureRankCompareFunc :: Ptr () -> Ptr () -> m Int32
pluginFeatureRankCompareFunc Ptr ()
p1 Ptr ()
p2 = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Int32
result <- Ptr () -> Ptr () -> IO Int32
gst_plugin_feature_rank_compare_func Ptr ()
p1 Ptr ()
p2
    Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
#endif