dbusHelper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConvertDevAddr = errors.New("Can't convert given device ObjectPath to HardwareAddr")
)

Functions

func DBusDevPathToHwAddr

func DBusDevPathToHwAddr(devPath dbus.ObjectPath) (res net.HardwareAddr, err error)

Types

type BusType

type BusType int
const (
	SystemBus  BusType = 0
	SessionBus BusType = 1
)

type Client

type Client struct {
	*sync.Mutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(busType BusType, destination string, Interface string, Path dbus.ObjectPath) (client *Client)

func (Client) Call

func (c Client) Call(methodName string, methodArgs ...interface{}) (res *dbus.Call, err error)

func (*Client) Connect

func (c *Client) Connect() (err error)

func (*Client) Disconnect

func (c *Client) Disconnect()

func (*Client) GetAllProperties

func (c *Client) GetAllProperties() (res map[string]dbus.Variant, err error)

func (*Client) GetPath

func (c *Client) GetPath() (path dbus.ObjectPath)

func (*Client) GetProperty

func (c *Client) GetProperty(name string) (res dbus.Variant, err error)

func (Client) IsConnected

func (c Client) IsConnected() bool

func (*Client) SetProperty

func (c *Client) SetProperty(name string, value interface{}) (err error)

type DBusObjects

type DBusObjects map[dbus.ObjectPath]map[string]map[string]dbus.Variant

type ObjectManager

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

func NewObjectManager

func NewObjectManager() (om *ObjectManager, err error)

func (*ObjectManager) Close

func (om *ObjectManager) Close()

func (*ObjectManager) GetAllObjectsOfInterface

func (om *ObjectManager) GetAllObjectsOfInterface(interfaceString string) (resultObjs DBusObjects, err error)

func (*ObjectManager) GetAllObjectsPathOfInterface

func (om *ObjectManager) GetAllObjectsPathOfInterface(interfaceString string) (results []dbus.ObjectPath, err error)

func (*ObjectManager) GetManagedObjects

func (om *ObjectManager) GetManagedObjects() (o DBusObjects)

func (*ObjectManager) GetObject

func (om *ObjectManager) GetObject(objectPath dbus.ObjectPath) (bluezObj map[string]map[string]dbus.Variant, exists bool, err error)

func (*ObjectManager) UpdateManagedObjects

func (om *ObjectManager) UpdateManagedObjects() (err error)

Jump to

Keyboard shortcuts

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