dbus

package
v0.13.7 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: EPL-2.0 Imports: 12 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 dbus is a small session bus client written from the D-Bus specification: just enough to own a well-known name and to call or serve org.freedesktop.Application.Open and Activate. Little-endian only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathOf

func PathOf(id string) string

PathOf returns the object path of an application id: dots become slashes, dashes underscores.

Types

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

Conn is a session bus connection. One goroutine at a time: setup calls first, then Serve.

func Connect

func Connect() (*Conn, error)

Connect opens the session bus, authenticates with EXTERNAL and says Hello. A missing bus is an error.

func (*Conn) Close

func (c *Conn) Close() error

Close closes the connection, which releases the names it owns.

func (*Conn) Open

func (c *Conn) Open(name string, uris []string) error

Open calls org.freedesktop.Application.Open on the owner of name, or Activate when uris is empty.

func (*Conn) RequestName

func (c *Conn) RequestName(name string) (bool, error)

RequestName asks for name without queueing; true means this connection owns it now.

func (*Conn) Serve

func (c *Conn) Serve(onOpen func(uris []string)) error

Serve answers the calls that reach the owned name until the connection fails. onOpen gets the URIs of Open, and nil for Activate.

Jump to

Keyboard shortcuts

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