Client


Object Hierarchy:

Object hierarchy for Client

Description:

[ CCode ( type_id = "g_paste_client_get_type ()" ) ]
public class Client : DBusProxy, AsyncInitable, DBusInterface, Initable

A proxy for the GPaste daemon's D-Bus interface.

Every method comes in a synchronous flavor and an async pair, and both report failures the same way, in one of two kinds of domain:

  • g_paste_error for a request the daemon understood and refused, e.g. g_paste_error_not_found for an unknown uuid. The daemon registers the domain with register_error_domain, so the code survives the round-trip and callers can switch on it instead of matching on the message.
  • g_dbus_error or g_io_error for a failure of the transport itself: no daemon on the bus, it went away mid-call, the call was cancelled. These say nothing about the request.

A caller that wants to tell "the daemon said no" from "the daemon is not there" should therefore check the domain with matches, not the bare code: the numbering of the two overlaps.

A call carrying a string that is not UTF-8, which is all D-Bus carries -- a file name in another encoding, a relative one joined to a working directory named in one -- fails with g_io_error_invalid_data without being sent.


Namespace: GPaste
Package: gpaste-3

Content:

Properties:

Static methods:

Creation methods:

Methods:

Signals:

Inherited Members:

All known members inherited from interface GLib.AsyncInitable
All known members inherited from interface GLib.DBusInterface
All known members inherited from interface GLib.Initable