objtree

package module
v0.0.0-...-9e3c5b5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: MIT Imports: 9 Imported by: 0

README

objtree

objtree provides an abstraction on top of godbus that provides automatic introspection for generic go objects.

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BusManager

type BusManager struct {
	*Object
	// contains filtered or unexported fields
}

Acts as a root to the object tree

func NewAnonymousBusManager

func NewAnonymousBusManager(
	busfn func(dbus.Handler, dbus.SignalHandler) (*dbus.Conn, error),
) (*BusManager, error)

func NewAnonymousSessionBusManager

func NewAnonymousSessionBusManager() (*BusManager, error)

func NewAnonymousSystemBusManager

func NewAnonymousSystemBusManager() (*BusManager, error)

func NewBusManager

func NewBusManager(
	busfn func(dbus.Handler, dbus.SignalHandler) (*dbus.Conn, error),
	name string,
) (*BusManager, error)

func NewSessionBusManager

func NewSessionBusManager(name string) (*BusManager, error)

func NewSystemBusManager

func NewSystemBusManager(name string) (*BusManager, error)

func (*BusManager) Call

func (mgr *BusManager) Call(
	path dbus.ObjectPath,
	ifaceName string,
	method string,
	args ...interface{},
) ([]interface{}, error)

func (*BusManager) Conn

func (mgr *BusManager) Conn() *dbus.Conn

func (*BusManager) DeliverSignal

func (mgr *BusManager) DeliverSignal(iface, member string, signal *dbus.Signal)

func (*BusManager) LookupObject

func (mgr *BusManager) LookupObject(path dbus.ObjectPath) (dbus.ServerObject, bool)

func (*BusManager) RequestName

func (mgr *BusManager) RequestName(name string) error

type Interface

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

func (*Interface) Introspect

func (intf *Interface) Introspect() introspect.Interface

func (*Interface) LookupMethod

func (intf *Interface) LookupMethod(name string) (dbus.Method, bool)

type Method

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

func (*Method) ArgumentValue

func (method *Method) ArgumentValue(position int) interface{}

func (*Method) Call

func (method *Method) Call(args ...interface{}) ([]interface{}, error)

func (*Method) DecodeArguments

func (method *Method) DecodeArguments(
	conn *dbus.Conn,
	sender string,
	msg *dbus.Message,
	args []interface{},
) ([]interface{}, error)

func (*Method) Introspect

func (method *Method) Introspect() introspect.Method

func (*Method) NumArguments

func (method *Method) NumArguments() int

func (*Method) NumReturns

func (method *Method) NumReturns() int

func (*Method) ReturnValue

func (method *Method) ReturnValue(position int) interface{}

type Object

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

func (*Object) Call

func (o *Object) Call(
	ifaceName, method string,
	args ...interface{},
) ([]interface{}, error)

func (*Object) DeleteObject

func (o *Object) DeleteObject(path dbus.ObjectPath)

func (*Object) DeliverSignal

func (o *Object) DeliverSignal(iface, member string, signal *dbus.Signal)

Deliver the signal to this object's listeners and all child objects

func (*Object) Implements

func (o *Object) Implements(name string, obj interface{}) error

func (*Object) ImplementsMap

func (o *Object) ImplementsMap(
	name string,
	obj interface{},
	mapfn func(string) string,
) error

func (*Object) ImplementsTable

func (o *Object) ImplementsTable(
	name string,
	table map[string]interface{},
) error

func (*Object) Introspect

func (o *Object) Introspect() introspect.Node

func (*Object) LookupInterface

func (o *Object) LookupInterface(name string) (dbus.Interface, bool)

func (*Object) LookupObject

func (o *Object) LookupObject(name string) (*Object, bool)

func (*Object) NewObject

func (o *Object) NewObject(path dbus.ObjectPath, val interface{}) *Object

func (*Object) NewObjectFromTable

func (o *Object) NewObjectFromTable(
	path dbus.ObjectPath,
	table map[string]interface{},
) *Object

func (*Object) NewObjectMap

func (o *Object) NewObjectMap(
	path dbus.ObjectPath,
	val interface{},
	mapfn func(string) string,
) *Object

func (*Object) Receives

func (o *Object) Receives(
	dbusIfaceName string,
	obj interface{},
	mapfn func(string) string,
) error

Call for each D-Bus interface to receive signals from

func (*Object) ReceivesTable

func (o *Object) ReceivesTable(
	dbusIfaceName string,
	table map[string]interface{},
) error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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