Documentation
¶
Overview ¶
Package dbus provides a cross-platform abstraction for D-Bus communication. On Linux, it uses the godbus library. On other platforms, it provides no-op stubs.
Index ¶
- func IsAvailable() bool
- type Connection
- type Object
- func (o *Object) Call(ctx context.Context, method string, args ...any) error
- func (o *Object) CallWithReturn(ctx context.Context, method string, args ...any) ([]any, error)
- func (o *Object) GetProperty(ctx context.Context, property string) (any, error)
- func (o *Object) SetProperty(ctx context.Context, property string, value any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAvailable ¶
func IsAvailable() bool
IsAvailable checks if D-Bus is available on this platform.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection represents a D-Bus connection.
func SessionBus ¶
func SessionBus(ctx context.Context) (*Connection, error)
SessionBus connects to the session bus.
func SystemBus ¶
func SystemBus(ctx context.Context) (*Connection, error)
SystemBus connects to the system bus.
func (*Connection) ListNames ¶
func (c *Connection) ListNames(ctx context.Context) ([]string, error)
ListNames lists all available names on the bus.
func (*Connection) Object ¶
func (c *Connection) Object(dest, path string) *Object
Object gets a D-Bus object.
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
Object represents a D-Bus object.
func (*Object) CallWithReturn ¶
CallWithReturn invokes a D-Bus method and returns the result.
func (*Object) GetProperty ¶
GetProperty gets a D-Bus property.
Click to show internal directories.
Click to hide internal directories.