dbus

package
v0.0.0-...-0dfd57a Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Service dbus provides access to DBUS notifications and system state.

Index

Constants

This section is empty.

Variables

View Source
var Module = &services.Module{
	Name:        "dbus",
	Version:     "1.0",
	NewInstance: NewService,
}

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Log    sfproto.Logger
	Client sarif.Client
}

type LogindObject

type LogindObject struct {
	dbus.BusObject
}

func NewLogindObject

func NewLogindObject(conn *dbus.Conn) *LogindObject

func (*LogindObject) PowerOff

func (o *LogindObject) PowerOff() error

type MprisPlayer

type MprisPlayer struct {
	Id       string `json:"-"`
	Name     string `json:"name"`
	Identity string `json:"identity"`
	Status   string `json:"status"`

	Title  string `json:"title,omitempty"`
	Artist string `json:"artist,omitempty"`
	Album  string `json:"album,omitempty"`
	Url    string `json:"url,omitempty"`
}

func (*MprisPlayer) UpdateProperties

func (p *MprisPlayer) UpdateProperties(props map[string]dbus.Variant)

type NotificationObject

type NotificationObject struct {
	dbus.BusObject
}

func NewNotificationObject

func NewNotificationObject(conn *dbus.Conn) *NotificationObject

func (*NotificationObject) Notify

func (o *NotificationObject) Notify(summary, body string) error

type Service

type Service struct {
	Log     sfproto.Logger
	Session *dbus.Conn
	System  *dbus.Conn
	sarif.Client

	Players map[string]*MprisPlayer
}

func NewService

func NewService(deps *Dependencies) *Service

func (*Service) Enable

func (s *Service) Enable() (err error)

Jump to

Keyboard shortcuts

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