util_wait_for_daemon


Description:


public async bool util_wait_for_daemon (Client client, Cancellable? cancellable) throws Error

Wait for a daemon to serve client before calling it, starting one if none runs (g_paste_client_follow_daemon ()).

A daemon owns the name before it serves anything, settling its storage first -- one just started, one re-executing -- and a call made in between finds no object to answer it. The wait lasts for as long as the client deems one on its way, two minutes without a history served at most, bar a GPaste 45 or 50 an update left running, which owns the name and never serves this interface: asked once whether that is who owns it, the wait fails at once, saying how to restart it.

Parameters:

client

a Client

cancellable

a Cancellable

callback

called once a daemon serves, or none will

user_data

data for callback


Namespace: GPaste
Package: gpaste-3