func New(conn *dbus.Conn, path dbus.ObjectPath, props map[string]map[string]*Prop) *Properties {
	p := &Properties{m: props, conn: conn, path: path}
	conn.Export(p, path, "org.freedesktop.DBus.Properties")
	return p
}
New returns a new Properties structure that manages the given properties.
The key for the first-level map of props is the name of the interface; the
second-level key is the name of the property. The returned structure will be
exported as org.freedesktop.DBus.Properties on path.
package prop
import (
	"github.com/godbus/dbus"
	"github.com/godbus/dbus/introspect"
	"sync"
)
type EmitType byte
const (
	EmitFalse EmitType = iota
	EmitTrue
	EmitInvalidates
)
var ErrIfaceNotFound = &dbus.Error{"org.freedesktop.DBus.Properties.Error.InterfaceNotFound", nil}
var ErrPropNotFound = &dbus.Error{"org.freedesktop.DBus.Properties.Error.PropertyNotFound", nil}
var ErrReadOnly = &dbus.Error{"org.freedesktop.DBus.Properties.Error.ReadOnly", nil}
var ErrInvalidArg = &dbus.Error{"org.freedesktop.DBus.Properties.Error.InvalidArg", nil}
var IntrospectData = introspect.Interface{
	Name: "org.freedesktop.DBus.Properties",
	Methods: []introspect.Method{
		{
			Name: "Get",
			Args: []introspect.Arg{
				{"interface", "s", "in"},
				{"property", "s", "in"},
				{"value", "v", "out"},
			},
		},
		{
			Name: "GetAll",
			Args: []introspect.Arg{
				{"interface", "s", "in"},
				{"props", "a{sv}", "out"},
			},
		},
		{
			Name: "Set",
			Args: []introspect.Arg{
				{"interface", "s", "in"},
				{"property", "s", "in"},
				{"value", "v", "in"},
			},
		},
	},
	Signals: []introspect.Signal{
		{
			Name: "PropertiesChanged",
			Args: []introspect.Arg{
				{"interface", "s", "out"},
				{"changed_properties", "a{sv}", "out"},
				{"invalidates_properties", "as", "out"},
			},
		},
	},
}
const IntrospectDataString = `
	<interface name="org.freedesktop.DBus.Introspectable">
		<method name="Get">
			<arg name="interface" direction="in" type="s"/>
			<arg name="property" direction="in" type="s"/>
			<arg name="value" direction="out" type="v"/>
		</method>
		<method name="GetAll">
			<arg name="interface" direction="in" type="s"/>
			<arg name="props" direction="out" type="a{sv}"/>
		</method>
		<method name="Set">
			<arg name="interface" direction="in" type="s"/>
			<arg name="property" direction="in" type="s"/>
			<arg name="value" direction="in" type="v"/>
		</method>
		<signal name="PropertiesChanged">
			<arg name="interface" type="s"/>
			<arg name="changed_properties" type="a{sv}"/>
			<arg name="invalidates_properties" type="as"/>
		</signal>
	</interface>
`
type Prop struct {
	Value interface{}
	Writable bool
	Emit EmitType
	Callback func(*Change) *dbus.Error
}
type Change struct {
	Props *Properties
	Iface string
	Name  string
	Value interface{}
}
type Properties struct {
	m    map[string]map[string]*Prop
	mut  sync.RWMutex
	conn *dbus.Conn
	path dbus.ObjectPath
}