Documentation ¶
Index ¶
- Constants
- type AuthDbusCookieSha1
- type AuthExternal
- type Authenticator
- type BusDaemon
- func (o *BusDaemon) AddMatch(rule string) (err error)
- func (o *BusDaemon) GetConnectionUnixProcessID(busName string) (process uint32, err error)
- func (o *BusDaemon) GetConnectionUnixUser(busName string) (user uint32, err error)
- func (o *BusDaemon) GetId() (busId string, err error)
- func (o *BusDaemon) GetNameOwner(name string) (owner string, err error)
- func (o *BusDaemon) Hello() (uniqueName string, err error)
- func (o *BusDaemon) ListActivatableNames() (names []string, err error)
- func (o *BusDaemon) ListNames() (names []string, err error)
- func (o *BusDaemon) ListQueuedOwners(name string) (owners []string, err error)
- func (o *BusDaemon) NameHasOwner(name string) (hasOwner bool, err error)
- func (o *BusDaemon) ReleaseName(name string) (result uint32, err error)
- func (o *BusDaemon) RemoveMatch(rule string) (err error)
- func (o *BusDaemon) RequestName(name string, flags uint32) (result uint32, err error)
- func (o *BusDaemon) StartServiceByName(name string, flags uint32) (result uint32, err error)
- func (o *BusDaemon) UpdateActivationEnvironment(env map[string]string) (err error)
- type BusName
- type Connection
- func (p *Connection) Authenticate() (err error)
- func (p *Connection) Close() error
- func (p *Connection) Object(dest string, path ObjectPath) *ObjectProxy
- func (p *Connection) RegisterMessageFilter(filter func(*Message) *Message) *MessageFilter
- func (p *Connection) RegisterObjectPath(path ObjectPath, handler chan<- *Message)
- func (p *Connection) RequestName(busName string, flags NameFlags, nameAcquired func(*BusName), ...) *BusName
- func (p *Connection) Send(msg *Message) error
- func (p *Connection) SendWithReply(msg *Message) (*Message, error)
- func (p *Connection) UnregisterMessageFilter(filter *MessageFilter)
- func (p *Connection) UnregisterObjectPath(path ObjectPath)
- func (p *Connection) WatchName(busName string, handler func(newOwner string)) (watch *NameWatch, err error)
- func (p *Connection) WatchSignal(rule *MatchRule, handler func(*Message)) (*SignalWatch, error)
- type Error
- type HasObjectPath
- type InterfaceData
- type Introspect
- type Introspectable
- type MatchRule
- type Message
- func NewErrorMessage(methodCall *Message, errorName string, message string) *Message
- func NewMethodCallMessage(destination string, path ObjectPath, iface string, member string) *Message
- func NewMethodReturnMessage(methodCall *Message) *Message
- func NewSignalMessage(path ObjectPath, iface string, member string) *Message
- type MessageFilter
- type MessageFlag
- type MessageType
- type MethodData
- type NameFlags
- type NameWatch
- type ObjectPath
- type ObjectProxy
- type Properties
- type SignalData
- type SignalWatch
- type Signature
- type StandardBus
- type Variant
Constants ¶
View Source
const ( BUS_DAEMON_NAME = "org.freedesktop.DBus" BUS_DAEMON_PATH = ObjectPath("/org/freedesktop/DBus") BUS_DAEMON_IFACE = "org.freedesktop.DBus" )
View Source
const ( NameFlagAllowReplacement = NameFlags(0x1) NameFlagReplaceExisting = NameFlags(0x2) NameFlagDoNotQueue = NameFlags(0x4) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthDbusCookieSha1 ¶
type AuthDbusCookieSha1 struct { }
func (*AuthDbusCookieSha1) InitialResponse ¶
func (p *AuthDbusCookieSha1) InitialResponse() []byte
func (*AuthDbusCookieSha1) Mechanism ¶
func (p *AuthDbusCookieSha1) Mechanism() []byte
func (*AuthDbusCookieSha1) ProcessData ¶
func (p *AuthDbusCookieSha1) ProcessData(mesg []byte) ([]byte, error)
type AuthExternal ¶
type AuthExternal struct { }
func (*AuthExternal) InitialResponse ¶
func (p *AuthExternal) InitialResponse() []byte
func (*AuthExternal) Mechanism ¶
func (p *AuthExternal) Mechanism() []byte
func (*AuthExternal) ProcessData ¶
func (p *AuthExternal) ProcessData([]byte) ([]byte, error)
type Authenticator ¶
type BusDaemon ¶
type BusDaemon struct {
*ObjectProxy
}
func (*BusDaemon) GetConnectionUnixProcessID ¶
func (*BusDaemon) GetConnectionUnixUser ¶
func (*BusDaemon) GetNameOwner ¶
func (*BusDaemon) ListActivatableNames ¶
func (*BusDaemon) ListQueuedOwners ¶
func (*BusDaemon) NameHasOwner ¶
func (*BusDaemon) ReleaseName ¶
func (*BusDaemon) RemoveMatch ¶
func (*BusDaemon) RequestName ¶
func (*BusDaemon) StartServiceByName ¶
type Connection ¶
type Connection struct { UniqueName string // contains filtered or unexported fields }
func Connect ¶
func Connect(busType StandardBus) (*Connection, error)
func (*Connection) Authenticate ¶
func (p *Connection) Authenticate() (err error)
func (*Connection) Close ¶
func (p *Connection) Close() error
func (*Connection) Object ¶
func (p *Connection) Object(dest string, path ObjectPath) *ObjectProxy
Retrieve a specified object.
func (*Connection) RegisterMessageFilter ¶
func (p *Connection) RegisterMessageFilter(filter func(*Message) *Message) *MessageFilter
func (*Connection) RegisterObjectPath ¶
func (p *Connection) RegisterObjectPath(path ObjectPath, handler chan<- *Message)
func (*Connection) RequestName ¶
func (*Connection) Send ¶
func (p *Connection) Send(msg *Message) error
func (*Connection) SendWithReply ¶
func (p *Connection) SendWithReply(msg *Message) (*Message, error)
func (*Connection) UnregisterMessageFilter ¶
func (p *Connection) UnregisterMessageFilter(filter *MessageFilter)
func (*Connection) UnregisterObjectPath ¶
func (p *Connection) UnregisterObjectPath(path ObjectPath)
func (*Connection) WatchName ¶
func (p *Connection) WatchName(busName string, handler func(newOwner string)) (watch *NameWatch, err error)
func (*Connection) WatchSignal ¶
func (p *Connection) WatchSignal(rule *MatchRule, handler func(*Message)) (*SignalWatch, error)
Handle received signals.
type HasObjectPath ¶
type HasObjectPath interface {
GetObjectPath() ObjectPath
}
type InterfaceData ¶
type InterfaceData interface { GetMethodData(name string) MethodData GetSignalData(name string) SignalData GetName() string }
type Introspect ¶
type Introspect interface {
GetInterfaceData(name string) InterfaceData
}
func NewIntrospect ¶
func NewIntrospect(xmlIntro string) (Introspect, error)
type Introspectable ¶
type Introspectable struct {
*ObjectProxy
}
func (*Introspectable) Introspect ¶
func (o *Introspectable) Introspect() (data string, err error)
type MatchRule ¶
type MatchRule struct { Type MessageType Sender string Path ObjectPath Interface string Member string Arg0 string // contains filtered or unexported fields }
Matches all messages with equal type, interface, member, or path. Any missing/invalid fields are not matched against.
type Message ¶
type Message struct { Type MessageType Flags MessageFlag Protocol uint8 // header fields Path ObjectPath Iface string Member string ErrorName string Dest string Sender string // contains filtered or unexported fields }
func NewErrorMessage ¶
func NewMethodCallMessage ¶
func NewMethodCallMessage(destination string, path ObjectPath, iface string, member string) *Message
func NewMethodReturnMessage ¶
func NewSignalMessage ¶
func NewSignalMessage(path ObjectPath, iface string, member string) *Message
func (*Message) AppendArgs ¶
func (*Message) GetAllArgs ¶
func (p *Message) GetAllArgs() []interface{}
type MessageFilter ¶
type MessageFilter struct {
// contains filtered or unexported fields
}
type MessageFlag ¶
type MessageFlag uint8
const ( FlagNoReplyExpected MessageFlag = 1 << iota FlagNoAutoStart )
type MessageType ¶
type MessageType uint8
See the D-Bus tutorial for information about message types.
http://dbus.freedesktop.org/doc/dbus-tutorial.html#messages
const ( TypeInvalid MessageType = iota TypeMethodCall TypeMethodReturn TypeError TypeSignal )
func (MessageType) String ¶
func (t MessageType) String() string
type MethodData ¶
type ObjectPath ¶
type ObjectPath string
func (ObjectPath) GetObjectPath ¶
func (o ObjectPath) GetObjectPath() ObjectPath
type ObjectProxy ¶
type ObjectProxy struct {
// contains filtered or unexported fields
}
func (*ObjectProxy) Call ¶
func (o *ObjectProxy) Call(iface, method string, args ...interface{}) (*Message, error)
func (*ObjectProxy) GetObjectPath ¶
func (o *ObjectProxy) GetObjectPath() ObjectPath
func (*ObjectProxy) WatchSignal ¶
func (o *ObjectProxy) WatchSignal(iface, member string, handler func(*Message)) (*SignalWatch, error)
type Properties ¶
type Properties struct {
*ObjectProxy
}
func (*Properties) Get ¶
func (o *Properties) Get(interfaceName string, propertyName string) (value interface{}, err error)
type SignalData ¶
type SignalWatch ¶
type SignalWatch struct {
// contains filtered or unexported fields
}
func (*SignalWatch) Cancel ¶
func (watch *SignalWatch) Cancel() error
Click to show internal directories.
Click to hide internal directories.