portal

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package portal calls XDG desktop portal methods that answer through a Request object, on the session bus.

Index

Constants

View Source
const (
	Name = "org.freedesktop.portal.Desktop"
	Path = "/org/freedesktop/portal/desktop"
)

Variables

View Source
var ErrDeclined = errors.New("portal: the user declined, or the request was cancelled")

ErrDeclined is a request the user declined or the portal cancelled.

Functions

func CloseSession

func CloseSession(conn *dbus.Conn, handle dbus.ObjectPath) error

CloseSession ends a portal session.

func Request

func Request(conn *dbus.Conn, iface, method string, lead []any, opts map[string]dbus.Variant) (map[string]dbus.Variant, error)

Request calls iface.method on the portal with lead arguments, then opts with a handle_token added, and waits for its Response's results.

func RequestPath

func RequestPath(sender, token string) dbus.ObjectPath

RequestPath is the object path a call with handle_token token answers on, for a caller whose unique bus name is sender.

func SessionHandle

func SessionHandle(res map[string]dbus.Variant) (dbus.ObjectPath, error)

SessionHandle reads the session_handle of a CreateSession response.

func Token

func Token() string

Token is a fresh handle_token or session_handle_token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL