client

package
v0.0.0-...-602244f Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SessionBus uses the session bus
	SessionBus = 0
	// SystemBus uses the system bus
	SystemBus = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config *Config
	// contains filtered or unexported fields
}

Client implement a DBus client

func NewClient

func NewClient(config *Config) *Client

NewClient create a new client

func (*Client) Call

func (c *Client) Call(method string, flags dbus.Flags, args ...interface{}) *dbus.Call

Call a DBus method

func (*Client) Connect

func (c *Client) Connect() error

Connect connect to DBus

func (*Client) Disconnect

func (c *Client) Disconnect()

Disconnect from DBus

func (*Client) GetProperties

func (c *Client) GetProperties(props interface{}) error

GetProperties load all the properties for an interface

func (*Client) GetProperty

func (c *Client) GetProperty(p string) (dbus.Variant, error)

GetProperty return a property value

func (*Client) Register

func (c *Client) Register(path string, iface string) (chan *dbus.Signal, error)

Register for signals

func (*Client) Unregister

func (c *Client) Unregister(path string, iface string) error

Unregister for signals

type Config

type Config struct {
	Name  string
	Iface string
	Path  string
	Bus   int
}

Config pass configuration to a DBUS client

type DeviceManager

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

DeviceManager client

func NewDeviceManager

func NewDeviceManager() *DeviceManager

NewDeviceManager create a new DeviceManager client

func (*DeviceManager) Create

Create a new device

func (*DeviceManager) Delete

func (d *DeviceManager) Delete(id string) (bool, error)

Delete a device definition

func (*DeviceManager) Find

Find a list of device

func (*DeviceManager) Read

Read a device definition

func (*DeviceManager) Update

func (d *DeviceManager) Update(id string, dev objects.DeviceDefinition) (bool, error)

Update a device

Jump to

Keyboard shortcuts

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