OSTree.RepoFinderAvahi

g GObject.GInterface GObject.GInterface OSTree.RepoFinder OSTree.RepoFinder GObject.GInterface->OSTree.RepoFinder GObject.Object GObject.Object OSTree.RepoFinderAvahi OSTree.RepoFinderAvahi GObject.Object->OSTree.RepoFinderAvahi OSTree.RepoFinder->OSTree.RepoFinderAvahi

Subclasses:

None

Methods

Inherited:

GObject.Object (37), OSTree.RepoFinder (4)

Structs:

GObject.ObjectClass (5)

class

new (context)

start ()

stop ()

Virtual Methods

Inherited:

GObject.Object (7), OSTree.RepoFinder (2)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class OSTree.RepoFinderAvahi(**kwargs)
Bases:

GObject.Object, OSTree.RepoFinder

Abstract:

No

Structure:

OSTree.RepoFinderAvahiClass

classmethod new(context)
Parameters:

context (GLib.MainContext or None) – a GLib.MainContext for processing Avahi events in, or None to use the current thread-default

Returns:

a new OSTree.RepoFinderAvahi

Return type:

OSTree.RepoFinderAvahi

Create a new OSTree.RepoFinderAvahi instance. It is intended that one such instance be created per process, and it be used to answer all resolution requests from OSTree.Repos.

The calling code is responsible for ensuring that context is iterated while the OSTree.RepoFinderAvahi is running (after OSTree.RepoFinderAvahi.start() is called). This may be done from any thread.

If context is None, the current thread-default GLib.MainContext is used.

New in version 2018.6.

start()
Raises:

GLib.Error

Start monitoring the local network for peers who are advertising OSTree repositories, using Avahi. In order for this to work, the GLib.MainContext passed to self at construction time must be iterated (so it will typically be the global GLib.MainContext, or be a separate GLib.MainContext in a worker thread).

This will return an error (Gio.IOErrorEnum.FAILED) if initialisation fails, or if Avahi support is not available (Gio.IOErrorEnum.NOT_SUPPORTED). In either case, the OSTree.RepoFinderAvahi instance is useless afterwards and should be destroyed.

Call OSTree.RepoFinderAvahi.stop() to stop the repo finder.

It is an error to call this function multiple times on the same OSTree.RepoFinderAvahi instance, or to call it after OSTree.RepoFinderAvahi.stop().

New in version 2018.6.

stop()

Stop monitoring the local network for peers who are advertising OSTree repositories. If any resolve tasks (from OSTree.RepoFinder.resolve_async()) are in progress, they will be cancelled and will return Gio.IOErrorEnum.CANCELLED.

Call OSTree.RepoFinderAvahi.start() to start the repo finder.

It is an error to call this function multiple times on the same OSTree.RepoFinderAvahi instance, or to call it before OSTree.RepoFinderAvahi.start().

New in version 2018.6.