bus

package
v0.0.0-...-0000000 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: GPL-3.0, GPL-3.0 Imports: 5 Imported by: 6

Documentation

Overview

Package bus provides a simplified (and more testable?) interface to DBus.

Index

Constants

This section is empty.

Variables

View Source
var BusDaemonAddress = Address{
	dbus.BUS_DAEMON_NAME,
	string(dbus.BUS_DAEMON_PATH),
	dbus.BUS_DAEMON_IFACE,
}

Functions

func Args

func Args(args ...interface{}) []interface{}

Args helps build arguments for endpoint Call().

Types

type Address

type Address struct {
	Name      string
	Path      string
	Interface string
}

bus.Address is just a bag of configuration

type Bus

type Bus interface {
	String() string
	Endpoint(Address, logger.Logger) Endpoint
}

This is the Bus itself.

var (
	SessionBus Bus = concreteBus(dbus.SessionBus)
	SystemBus  Bus = concreteBus(dbus.SystemBus)
)

no bus.Bus constructor, just two standard, constant, busses

type BusMethod

type BusMethod func(string, []interface{}, []interface{}) ([]interface{}, error)

type Cancellable

type Cancellable interface {
	Cancel() error
}

Cancellable can be canceled.

type DispatchMap

type DispatchMap map[string]BusMethod

type Endpoint

type Endpoint interface {
	GrabName(allowReplacement bool) <-chan error
	WatchSignal(member string, f func(...interface{}), d func()) (Cancellable, error)
	WatchMethod(DispatchMap, string, ...interface{})
	Signal(string, string, []interface{}) error
	Call(member string, args []interface{}, rvs ...interface{}) error
	GetProperty(property string) (interface{}, error)
	SetProperty(property string, suffix string, value interface{}) error
	WatchProperties(f func(map[string]dbus.Variant, []string), d func()) (Cancellable, error)
	Dial() error
	Close()
	String() string
}

bus.Endpoint represents the DBus connection itself.

Directories

Path Synopsis
Package connectivity implements a single, simple stream of booleans to answer the question "are we connected?".
Package connectivity implements a single, simple stream of booleans to answer the question "are we connected?".
Package emblemcounter can present notifications as a counter on an emblem on an item in the launcher.
Package emblemcounter can present notifications as a counter on an emblem on an item in the launcher.
Package haptic can present notifications as a vibration pattern using the usensord/haptic interface
Package haptic can present notifications as a vibration pattern using the usensord/haptic interface
Package networkmanager wraps a couple of NetworkManager's DBus API points: the org.freedesktop.NetworkManager.state call, and listening for the StateChange signal, similarly for the primary connection and wireless enabled state.
Package networkmanager wraps a couple of NetworkManager's DBus API points: the org.freedesktop.NetworkManager.state call, and listening for the StateChange signal, similarly for the primary connection and wireless enabled state.
Package notifications wraps a couple of Notifications's DBus API points: the org.freedesktop.Notifications.Notify call, and listening for the ActionInvoked signal.
Package notifications wraps a couple of Notifications's DBus API points: the org.freedesktop.Notifications.Notify call, and listening for the ActionInvoked signal.
Package polld wraps the account-polld dbus interface
Package polld wraps the account-polld dbus interface
Package powerd is an interface to powerd via dbus.
Package powerd is an interface to powerd via dbus.
Package systemimage is a mimimal wrapper for the system-image dbus API.
Package systemimage is a mimimal wrapper for the system-image dbus API.
Package testing provides an implementation of bus.Bus and bus.Endpoint suitable for testing.
Package testing provides an implementation of bus.Bus and bus.Endpoint suitable for testing.
Package unitygreeter retrieves information about the Unity Greeter using Unity's dbus interface
Package unitygreeter retrieves information about the Unity Greeter using Unity's dbus interface
Package urfkill wraps a couple of URfkill's DBus API points to watch for flight mode state changes.
Package urfkill wraps a couple of URfkill's DBus API points to watch for flight mode state changes.
Package windowstack retrieves information about the windowstack using Unity's dbus interface
Package windowstack retrieves information about the windowstack using Unity's dbus interface

Jump to

Keyboard shortcuts

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