- public ItemKind item_kind_from_string (string kind)
- public unowned string? item_kind_to_string (ItemKind kind)
- public unowned KeybindingInfo[] keybindings ()
Get the keyboard shortcuts GPaste defines, in the order they should be
shown.
- public bool storage_is_encrypted (Storage storage_kind)
- public void util_activate_ui (string action, Variant? arg)
Activate an action on a GPaste app.
- public bool util_activate_ui_sync (string action, Variant? arg) throws Error
Activate an action on a GPaste app, and wait for the call to have been
made.
- public void util_cancel_storage_migration (uint64 revision)
Restore the migration gate after a failed re-execution.
- public async bool util_daemon_is_legacy (Client client, Cancellable? cancellable) throws Error
Ask whether the daemon owning the name is a GPaste 45 or 50, which
serves an interface of its own rather than this one: what a package update leaves running until the session ends, and what a client of
this version can never reach (g_paste_util_reexecute_legacy_daemon ()).
- public string util_display_string (string value, ItemKind kind)
Compose what a client draws for an item: its value, with
the decoration its kind calls for around it.
- public List<ClientHistory> util_get_dbus_histories_result (Variant variant)
Get the g_paste_histories_variant_string
Variant as a list of histories
- public ClientItem? util_get_dbus_item_result (Variant variant)
Get an item out of the
g_paste_item_variant_string Variant the daemon answers every
single-item method with
- public List<ClientItem> util_get_dbus_items_result (Variant variant)
Get the g_paste_items_variant_string
Variant as a list of items, those g_paste_util_get_dbus_item_result ()
reads no item out of left out
- public bool util_has_gnome_shell ()
Check whether gnome-shell is installed or not
- public async bool util_has_gnome_shell_extension (Cancellable? cancellable)
Check whether GPaste's GNOME Shell extension is installed or not
- public bool util_history_name_is_valid (string? name)
Whether name names a history and nothing else.
- public string util_one_line (string text)
Fold text onto a single line, replacing every carriage
return, line feed, tabulation and Unicode line break -- the next-line, line and paragraph separators (U+0085, U+2028, U+2029), which
Pango breaks a line at too -- with a space.
- public bool util_open_storage_migration (out uint64 revision) throws Error
Open the storage-migration gate before requesting daemon re-execution.
- public uint util_password_strength (string? password, out string? hint)
GNOME-style password rating via libpwquality (as gnome-control-center
does): map the 0-100 score to a 0-4 meter level and produce an actionable hint.
- public uint64 util_prepare_storage_migration ()
Open the storage-migration gate, as
g_paste_util_open_storage_migration () does, without saying whether it opened.
- public bool util_pwquality_available ()
Whether this build can rate a password at all, i.
- public Pid util_read_pid_file (string component)
Read the pid file
- public bool util_reexecute_daemon (Client client) throws Error
Ask the daemon to re-execute itself through client.
- public bool util_reexecute_legacy_daemon (Client client) throws Error
Have a GPaste 45 or 50 owning the name re-execute, which it does on
SIGUSR1: a package update has replaced its binary, so what comes back is this version's daemon.
- public void util_spawn (string app)
spawn a GPaste app
- public bool util_spawn_sync (string app) throws Error
spawn a GPaste app
- 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 ()).
- public void util_write_pid_file (string component)
Write the pid file