dbus: github.com/godbus/dbus/introspect Index | Files

package introspect

import "github.com/godbus/dbus/introspect"

Package introspect provides some utilities for dealing with the DBus introspection format.

Index

Package Files

call.go introspect.go introspectable.go

Constants

const IntrospectDataString = "" /* 160 byte string literal not displayed */

The introspection data for the org.freedesktop.DBus.Introspectable interface, as a string.

const IntrospectDeclarationString = "" /* 149 byte string literal not displayed */

XML document type declaration of the introspection format version 1.0

Variables

var IntrospectData = Interface{
    Name: "org.freedesktop.DBus.Introspectable",
    Methods: []Method{
        {
            Name: "Introspect",
            Args: []Arg{
                {"out", "s", "out"},
            },
        },
    },
}

The introspection data for the org.freedesktop.DBus.Introspectable interface.

type Annotation Uses

type Annotation struct {
    Name  string `xml:"name,attr"`
    Value string `xml:"value,attr"`
}

Annotation is an annotation in the introspection format.

type Arg Uses

type Arg struct {
    Name      string `xml:"name,attr,omitempty"`
    Type      string `xml:"type,attr"`
    Direction string `xml:"direction,attr,omitempty"`
}

Arg represents an argument of a method or a signal.

type Interface Uses

type Interface struct {
    Name        string       `xml:"name,attr"`
    Methods     []Method     `xml:"method"`
    Signals     []Signal     `xml:"signal"`
    Properties  []Property   `xml:"property"`
    Annotations []Annotation `xml:"annotation"`
}

Interface describes a DBus interface that is available on the message bus.

type Introspectable Uses

type Introspectable string

Introspectable implements org.freedesktop.Introspectable.

You can create it by converting the XML-formatted introspection data from a string to an Introspectable or call NewIntrospectable with a Node. Then, export it as org.freedesktop.Introspectable on you object.

func NewIntrospectable Uses

func NewIntrospectable(n *Node) Introspectable

NewIntrospectable returns an Introspectable that returns the introspection data that corresponds to the given Node. If n.Interfaces doesn't contain the data for org.freedesktop.DBus.Introspectable, it is added automatically.

func (Introspectable) Introspect Uses

func (i Introspectable) Introspect() (string, *dbus.Error)

Introspect implements org.freedesktop.Introspectable.Introspect.

type Method Uses

type Method struct {
    Name        string       `xml:"name,attr"`
    Args        []Arg        `xml:"arg"`
    Annotations []Annotation `xml:"annotation"`
}

Method describes a Method on an Interface as retured by an introspection.

func Methods Uses

func Methods(v interface{}) []Method

Methods returns the description of the methods of v. This can be used to create a Node which can be passed to NewIntrospectable.

type Node Uses

type Node struct {
    XMLName    xml.Name    `xml:"node"`
    Name       string      `xml:"name,attr,omitempty"`
    Interfaces []Interface `xml:"interface"`
    Children   []Node      `xml:"node,omitempty"`
}

Node is the root element of an introspection.

func Call Uses

func Call(o dbus.BusObject) (*Node, error)

Call calls org.freedesktop.Introspectable.Introspect on a remote object and returns the introspection data.

type Property Uses

type Property struct {
    Name        string       `xml:"name,attr"`
    Type        string       `xml:"type,attr"`
    Access      string       `xml:"access,attr"`
    Annotations []Annotation `xml:"annotation"`
}

Property describes a property of an Interface.

type Signal Uses

type Signal struct {
    Name        string       `xml:"name,attr"`
    Args        []Arg        `xml:"arg"`
    Annotations []Annotation `xml:"annotation"`
}

Signal describes a Signal emitted on an Interface.

Package introspect imports 4 packages (graph) and is imported by 57 packages. Updated 2019-09-06. Refresh now. Tools for package owners.