Documentation
¶
Overview ¶
Package portal calls XDG desktop portal methods that answer through a Request object, on the session bus.
Index ¶
- Constants
- Variables
- func CloseSession(conn *dbus.Conn, handle dbus.ObjectPath) error
- func Request(conn *dbus.Conn, iface, method string, lead []any, ...) (map[string]dbus.Variant, error)
- func RequestPath(sender, token string) dbus.ObjectPath
- func SessionHandle(res map[string]dbus.Variant) (dbus.ObjectPath, error)
- func Token() string
Constants ¶
const ( Name = "org.freedesktop.portal.Desktop" Path = "/org/freedesktop/portal/desktop" )
Variables ¶
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 ¶
SessionHandle reads the session_handle of a CreateSession response.
Types ¶
This section is empty.