Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BusType ¶
type BusType int
const ( BUS_TYPE_STARTER BusType = C.G_BUS_TYPE_STARTER BUS_TYPE_NONE BusType = C.G_BUS_TYPE_NONE BUS_TYPE_SYSTEM BusType = C.G_BUS_TYPE_SYSTEM BUS_TYPE_SESSION BusType = C.G_BUS_TYPE_SESSION )
type CallFlags ¶
type CallFlags int
const ( DBUS_CALL_FLAGS_NONE CallFlags = C.G_DBUS_CALL_FLAGS_NONE DBUS_CALL_FLAGS_NO_AUTO_START CallFlags = C.G_DBUS_CALL_FLAGS_NO_AUTO_START DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION CallFlags = C.G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION )
type Connection ¶
type Connection struct {
Native *C.GDBusConnection
}
func FromApplication ¶
func FromApplication(app *glib.Application) *Connection
func GetSessionBusSync ¶
func GetSessionBusSync() (*Connection, error)
func (*Connection) SignalSubscribe ¶
func (c *Connection) SignalSubscribe( sender, interfaceName, member, objectPath, arg0 string, flags SignalFlags, callback SignalCallback, ) uint
func (*Connection) SignalUnsubscribe ¶
func (c *Connection) SignalUnsubscribe(id uint)
type MPRISWatcher ¶
type MPRISWatcher struct { *Connection OnMetadata func(m Metadata, playing bool) OnPlaybackStatus func(m Metadata, playing bool) // contains filtered or unexported fields }
func NewMPRISWatcher ¶
func NewMPRISWatcher(c *Connection) *MPRISWatcher
func (*MPRISWatcher) IsEnabled ¶
func (w *MPRISWatcher) IsEnabled() bool
func (*MPRISWatcher) SetEnabled ¶
func (w *MPRISWatcher) SetEnabled(enabled bool)
type Metadata ¶
Metadata maps some fields from https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#index5h3
type Notification ¶
type Notifier ¶
type Notifier struct { *Connection // contains filtered or unexported fields }
func NewNotifier ¶
func NewNotifier(c *Connection) *Notifier
type SignalCallback ¶
type SignalCallback func( conn *Connection, senderName, objectPath, interfaceName, signalName string, parameters *glib.Variant, )
type SignalFlags ¶
type SignalFlags int
const ( DBUS_SIGNAL_FLAGS_NONE SignalFlags = C.G_DBUS_SIGNAL_FLAGS_NONE DBUS_SIGNAL_FLAGS_NO_MATCH_RULE SignalFlags = C.G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE SignalFlags = C.G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH SignalFlags = C.G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH )
Click to show internal directories.
Click to hide internal directories.