{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.OSTree.Objects.RepoFinderAvahi
(
RepoFinderAvahi(..) ,
IsRepoFinderAvahi ,
toRepoFinderAvahi ,
noRepoFinderAvahi ,
#if defined(ENABLE_OVERLOADING)
ResolveRepoFinderAvahiMethod ,
#endif
repoFinderAvahiNew ,
#if defined(ENABLE_OVERLOADING)
RepoFinderAvahiStartMethodInfo ,
#endif
repoFinderAvahiStart ,
#if defined(ENABLE_OVERLOADING)
RepoFinderAvahiStopMethodInfo ,
#endif
repoFinderAvahiStop ,
) 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.GI.Base.Signals as B.Signals
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.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.OSTree.Interfaces.RepoFinder as OSTree.RepoFinder
newtype RepoFinderAvahi = RepoFinderAvahi (ManagedPtr RepoFinderAvahi)
deriving (Eq)
foreign import ccall "ostree_repo_finder_avahi_get_type"
c_ostree_repo_finder_avahi_get_type :: IO GType
instance GObject RepoFinderAvahi where
gobjectType = c_ostree_repo_finder_avahi_get_type
instance B.GValue.IsGValue RepoFinderAvahi where
toGValue o = do
gtype <- c_ostree_repo_finder_avahi_get_type
B.ManagedPtr.withManagedPtr o (B.GValue.buildGValue gtype B.GValue.set_object)
fromGValue gv = do
ptr <- B.GValue.get_object gv :: IO (Ptr RepoFinderAvahi)
B.ManagedPtr.newObject RepoFinderAvahi ptr
class (GObject o, O.IsDescendantOf RepoFinderAvahi o) => IsRepoFinderAvahi o
instance (GObject o, O.IsDescendantOf RepoFinderAvahi o) => IsRepoFinderAvahi o
instance O.HasParentTypes RepoFinderAvahi
type instance O.ParentTypes RepoFinderAvahi = '[GObject.Object.Object, OSTree.RepoFinder.RepoFinder]
toRepoFinderAvahi :: (MonadIO m, IsRepoFinderAvahi o) => o -> m RepoFinderAvahi
toRepoFinderAvahi = liftIO . unsafeCastTo RepoFinderAvahi
noRepoFinderAvahi :: Maybe RepoFinderAvahi
noRepoFinderAvahi = Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveRepoFinderAvahiMethod (t :: Symbol) (o :: *) :: * where
ResolveRepoFinderAvahiMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveRepoFinderAvahiMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveRepoFinderAvahiMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveRepoFinderAvahiMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveRepoFinderAvahiMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveRepoFinderAvahiMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveRepoFinderAvahiMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveRepoFinderAvahiMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveRepoFinderAvahiMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveRepoFinderAvahiMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveRepoFinderAvahiMethod "resolveAsync" o = OSTree.RepoFinder.RepoFinderResolveAsyncMethodInfo
ResolveRepoFinderAvahiMethod "resolveFinish" o = OSTree.RepoFinder.RepoFinderResolveFinishMethodInfo
ResolveRepoFinderAvahiMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveRepoFinderAvahiMethod "start" o = RepoFinderAvahiStartMethodInfo
ResolveRepoFinderAvahiMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveRepoFinderAvahiMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveRepoFinderAvahiMethod "stop" o = RepoFinderAvahiStopMethodInfo
ResolveRepoFinderAvahiMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveRepoFinderAvahiMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveRepoFinderAvahiMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveRepoFinderAvahiMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveRepoFinderAvahiMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveRepoFinderAvahiMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveRepoFinderAvahiMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveRepoFinderAvahiMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveRepoFinderAvahiMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveRepoFinderAvahiMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveRepoFinderAvahiMethod t RepoFinderAvahi, O.MethodInfo info RepoFinderAvahi p) => OL.IsLabel t (RepoFinderAvahi -> 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 RepoFinderAvahi
type instance O.AttributeList RepoFinderAvahi = RepoFinderAvahiAttributeList
type RepoFinderAvahiAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList RepoFinderAvahi = RepoFinderAvahiSignalList
type RepoFinderAvahiSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "ostree_repo_finder_avahi_new" ostree_repo_finder_avahi_new ::
Ptr GLib.MainContext.MainContext ->
IO (Ptr RepoFinderAvahi)
repoFinderAvahiNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
GLib.MainContext.MainContext
-> m RepoFinderAvahi
repoFinderAvahiNew context = liftIO $ do
context' <- unsafeManagedPtrGetPtr context
result <- ostree_repo_finder_avahi_new context'
checkUnexpectedReturnNULL "repoFinderAvahiNew" result
result' <- (wrapObject RepoFinderAvahi) result
touchManagedPtr context
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "ostree_repo_finder_avahi_start" ostree_repo_finder_avahi_start ::
Ptr RepoFinderAvahi ->
Ptr (Ptr GError) ->
IO ()
repoFinderAvahiStart ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFinderAvahi a) =>
a
-> m ()
repoFinderAvahiStart self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
onException (do
propagateGError $ ostree_repo_finder_avahi_start self'
touchManagedPtr self
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data RepoFinderAvahiStartMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepoFinderAvahi a) => O.MethodInfo RepoFinderAvahiStartMethodInfo a signature where
overloadedMethod = repoFinderAvahiStart
#endif
foreign import ccall "ostree_repo_finder_avahi_stop" ostree_repo_finder_avahi_stop ::
Ptr RepoFinderAvahi ->
IO ()
repoFinderAvahiStop ::
(B.CallStack.HasCallStack, MonadIO m, IsRepoFinderAvahi a) =>
a
-> m ()
repoFinderAvahiStop self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
ostree_repo_finder_avahi_stop self'
touchManagedPtr self
return ()
#if defined(ENABLE_OVERLOADING)
data RepoFinderAvahiStopMethodInfo
instance (signature ~ (m ()), MonadIO m, IsRepoFinderAvahi a) => O.MethodInfo RepoFinderAvahiStopMethodInfo a signature where
overloadedMethod = repoFinderAvahiStop
#endif