Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype RepoFinderAvahi = RepoFinderAvahi (ManagedPtr RepoFinderAvahi)
- class (GObject o, IsDescendantOf RepoFinderAvahi o) => IsRepoFinderAvahi o
- toRepoFinderAvahi :: (MonadIO m, IsRepoFinderAvahi o) => o -> m RepoFinderAvahi
- repoFinderAvahiNew :: (HasCallStack, MonadIO m) => Maybe MainContext -> m RepoFinderAvahi
- repoFinderAvahiStart :: (HasCallStack, MonadIO m, IsRepoFinderAvahi a) => a -> m ()
- repoFinderAvahiStop :: (HasCallStack, MonadIO m, IsRepoFinderAvahi a) => a -> m ()
Exported types
newtype RepoFinderAvahi Source #
Memory-managed wrapper type.
Instances
Eq RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi (==) :: RepoFinderAvahi -> RepoFinderAvahi -> Bool # (/=) :: RepoFinderAvahi -> RepoFinderAvahi -> Bool # | |
GObject RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi | |
ManagedPtrNewtype RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi | |
TypedObject RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi | |
HasParentTypes RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi | |
IsGValue (Maybe RepoFinderAvahi) Source # | Convert |
Defined in GI.OSTree.Objects.RepoFinderAvahi gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe RepoFinderAvahi -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe RepoFinderAvahi) # | |
type ParentTypes RepoFinderAvahi Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi |
class (GObject o, IsDescendantOf RepoFinderAvahi o) => IsRepoFinderAvahi o Source #
Type class for types which can be safely cast to RepoFinderAvahi
, for instance with toRepoFinderAvahi
.
Instances
(GObject o, IsDescendantOf RepoFinderAvahi o) => IsRepoFinderAvahi o Source # | |
Defined in GI.OSTree.Objects.RepoFinderAvahi |
toRepoFinderAvahi :: (MonadIO m, IsRepoFinderAvahi o) => o -> m RepoFinderAvahi Source #
Cast to RepoFinderAvahi
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, resolveAsync, resolveFinish, runDispose, start, stealData, stealQdata, stop, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata.
Setters
new
:: (HasCallStack, MonadIO m) | |
=> Maybe MainContext |
|
-> m RepoFinderAvahi | Returns: a new |
Create a new RepoFinderAvahi
instance. It is intended that one such
instance be created per process, and it be used to answer all resolution
requests from OstreeRepos
.
The calling code is responsible for ensuring that context
is iterated while
the RepoFinderAvahi
is running (after repoFinderAvahiStart
is called). This may be done from any thread.
If context
is Nothing
, the current thread-default MainContext
is used.
Since: 2018.6
start
:: (HasCallStack, MonadIO m, IsRepoFinderAvahi a) | |
=> a |
|
-> m () | (Can throw |
Start monitoring the local network for peers who are advertising OSTree
repositories, using Avahi. In order for this to work, the MainContext
passed to self
at construction time must be iterated (so it will typically
be the global MainContext
, or be a separate MainContext
in a worker
thread).
This will return an error (IOErrorEnumFailed
) if initialisation fails, or if
Avahi support is not available (IOErrorEnumNotSupported
). In either case,
the RepoFinderAvahi
instance is useless afterwards and should be
destroyed.
Call repoFinderAvahiStop
to stop the repo finder.
It is an error to call this function multiple times on the same
RepoFinderAvahi
instance, or to call it after
repoFinderAvahiStop
.
Since: 2018.6
stop
:: (HasCallStack, MonadIO m, IsRepoFinderAvahi a) | |
=> a |
|
-> m () |
Stop monitoring the local network for peers who are advertising OSTree
repositories. If any resolve tasks (from repoFinderResolveAsync
)
are in progress, they will be cancelled and will return IOErrorEnumCancelled
.
Call repoFinderAvahiStart
to start the repo finder.
It is an error to call this function multiple times on the same
RepoFinderAvahi
instance, or to call it before
repoFinderAvahiStart
.
Since: 2018.6