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

/No description available in the introspection data./
-}

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

module GI.OSTree.Objects.RepoFinderConfig
    (

-- * Exported types
    RepoFinderConfig(..)                    ,
    IsRepoFinderConfig                      ,
    toRepoFinderConfig                      ,
    noRepoFinderConfig                      ,


 -- * Methods
-- ** new #method:new#

    repoFinderConfigNew                     ,




    ) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.RepoFinder as OSTree.RepoFinder

-- | Memory-managed wrapper type.
newtype RepoFinderConfig = RepoFinderConfig (ManagedPtr RepoFinderConfig)
foreign import ccall "ostree_repo_finder_config_get_type"
    c_ostree_repo_finder_config_get_type :: IO GType

instance GObject RepoFinderConfig where
    gobjectType _ = c_ostree_repo_finder_config_get_type


-- | Type class for types which can be safely cast to `RepoFinderConfig`, for instance with `toRepoFinderConfig`.
class GObject o => IsRepoFinderConfig o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError RepoFinderConfig a) =>
    IsRepoFinderConfig a
#endif
instance IsRepoFinderConfig RepoFinderConfig
instance GObject.Object.IsObject RepoFinderConfig
instance OSTree.RepoFinder.IsRepoFinder RepoFinderConfig

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

-- | A convenience alias for `Nothing` :: `Maybe` `RepoFinderConfig`.
noRepoFinderConfig :: Maybe RepoFinderConfig
noRepoFinderConfig = Nothing

#if ENABLE_OVERLOADING
type family ResolveRepoFinderConfigMethod (t :: Symbol) (o :: *) :: * where
    ResolveRepoFinderConfigMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveRepoFinderConfigMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveRepoFinderConfigMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveRepoFinderConfigMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveRepoFinderConfigMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveRepoFinderConfigMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveRepoFinderConfigMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveRepoFinderConfigMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveRepoFinderConfigMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveRepoFinderConfigMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveRepoFinderConfigMethod "resolveAsync" o = OSTree.RepoFinder.RepoFinderResolveAsyncMethodInfo
    ResolveRepoFinderConfigMethod "resolveFinish" o = OSTree.RepoFinder.RepoFinderResolveFinishMethodInfo
    ResolveRepoFinderConfigMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveRepoFinderConfigMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveRepoFinderConfigMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveRepoFinderConfigMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveRepoFinderConfigMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveRepoFinderConfigMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveRepoFinderConfigMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveRepoFinderConfigMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveRepoFinderConfigMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveRepoFinderConfigMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveRepoFinderConfigMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveRepoFinderConfigMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveRepoFinderConfigMethod t RepoFinderConfig, O.MethodInfo info RepoFinderConfig p) => O.IsLabelProxy t (RepoFinderConfig -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveRepoFinderConfigMethod t RepoFinderConfig, O.MethodInfo info RepoFinderConfig p) => O.IsLabel t (RepoFinderConfig -> 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

#endif

#if ENABLE_OVERLOADING
instance O.HasAttributeList RepoFinderConfig
type instance O.AttributeList RepoFinderConfig = RepoFinderConfigAttributeList
type RepoFinderConfigAttributeList = ('[ ] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
#endif

#if ENABLE_OVERLOADING
type instance O.SignalList RepoFinderConfig = RepoFinderConfigSignalList
type RepoFinderConfigSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

-- method RepoFinderConfig::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "OSTree", name = "RepoFinderConfig"}))
-- throws : False
-- Skip return : False

foreign import ccall "ostree_repo_finder_config_new" ostree_repo_finder_config_new ::
    IO (Ptr RepoFinderConfig)

{- |
Create a new 'GI.OSTree.Objects.RepoFinderConfig.RepoFinderConfig'.

@since 2018.6
-}
repoFinderConfigNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m RepoFinderConfig
    {- ^ __Returns:__ a new 'GI.OSTree.Objects.RepoFinderConfig.RepoFinderConfig' -}
repoFinderConfigNew  = liftIO $ do
    result <- ostree_repo_finder_config_new
    checkUnexpectedReturnNULL "repoFinderConfigNew" result
    result' <- (wrapObject RepoFinderConfig) result
    return result'

#if ENABLE_OVERLOADING
#endif