/*This file is automatically generated by pkg.deepin.io/dbus-generator. Don't edit it*/
package login1

import "pkg.deepin.io/lib/dbus"
import "pkg.deepin.io/lib/dbus/property"
import "reflect"
import "sync"
import "runtime"
import "fmt"
import "errors"

/*prevent compile error*/
var _ = fmt.Println
var _ = runtime.SetFinalizer
var _ = sync.NewCond
var _ = reflect.TypeOf
var _ = property.BaseObserver{}

type Manager struct {
	Path     dbus.ObjectPath
	DestName string
	core     *dbus.Object

	signals       map[<-chan *dbus.Signal]struct{}
	signalsLocker sync.Mutex

	ControlGroupHierarchy  *dbusPropertyManagerControlGroupHierarchy
	Controllers            *dbusPropertyManagerControllers
	ResetControllers       *dbusPropertyManagerResetControllers
	NAutoVTs               *dbusPropertyManagerNAutoVTs
	KillOnlyUsers          *dbusPropertyManagerKillOnlyUsers
	KillExcludeUsers       *dbusPropertyManagerKillExcludeUsers
	KillUserProcesses      *dbusPropertyManagerKillUserProcesses
	IdleHint               *dbusPropertyManagerIdleHint
	IdleSinceHint          *dbusPropertyManagerIdleSinceHint
	IdleSinceHintMonotonic *dbusPropertyManagerIdleSinceHintMonotonic
	BlockInhibited         *dbusPropertyManagerBlockInhibited
	DelayInhibited         *dbusPropertyManagerDelayInhibited
	InhibitDelayMaxUSec    *dbusPropertyManagerInhibitDelayMaxUSec
	HandlePowerKey         *dbusPropertyManagerHandlePowerKey
	HandleSuspendKey       *dbusPropertyManagerHandleSuspendKey
	HandleHibernateKey     *dbusPropertyManagerHandleHibernateKey
	HandleLidSwitch        *dbusPropertyManagerHandleLidSwitch
	IdleAction             *dbusPropertyManagerIdleAction
	IdleActionUSec         *dbusPropertyManagerIdleActionUSec
	PreparingForShutdown   *dbusPropertyManagerPreparingForShutdown
	PreparingForSleep      *dbusPropertyManagerPreparingForSleep
}

func (obj *Manager) _createSignalChan() <-chan *dbus.Signal {
	obj.signalsLocker.Lock()
	ch := getBus().Signal()
	obj.signals[ch] = struct{}{}
	obj.signalsLocker.Unlock()
	return ch
}
func (obj *Manager) _deleteSignalChan(ch <-chan *dbus.Signal) {
	obj.signalsLocker.Lock()
	delete(obj.signals, ch)
	getBus().DetachSignal(ch)
	obj.signalsLocker.Unlock()
}
func DestroyManager(obj *Manager) {
	obj.signalsLocker.Lock()
	defer obj.signalsLocker.Unlock()
	if obj.signals == nil {
		return
	}
	for ch, _ := range obj.signals {
		getBus().DetachSignal(ch)
	}
	obj.signals = nil

	runtime.SetFinalizer(obj, nil)

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.DBus.Properties',sender='" + obj.DestName + "',member='PropertiesChanged'")
	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='PropertiesChanged'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SessionNew'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SessionRemoved'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='UserNew'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='UserRemoved'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SeatNew'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SeatRemoved'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='PrepareForShutdown'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='PrepareForSleep'")

	obj.ControlGroupHierarchy.Reset()
	obj.Controllers.Reset()
	obj.ResetControllers.Reset()
	obj.NAutoVTs.Reset()
	obj.KillOnlyUsers.Reset()
	obj.KillExcludeUsers.Reset()
	obj.KillUserProcesses.Reset()
	obj.IdleHint.Reset()
	obj.IdleSinceHint.Reset()
	obj.IdleSinceHintMonotonic.Reset()
	obj.BlockInhibited.Reset()
	obj.DelayInhibited.Reset()
	obj.InhibitDelayMaxUSec.Reset()
	obj.HandlePowerKey.Reset()
	obj.HandleSuspendKey.Reset()
	obj.HandleHibernateKey.Reset()
	obj.HandleLidSwitch.Reset()
	obj.IdleAction.Reset()
	obj.IdleActionUSec.Reset()
	obj.PreparingForShutdown.Reset()
	obj.PreparingForSleep.Reset()
}

func (obj *Manager) GetSession(id string) (session dbus.ObjectPath, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.GetSession", 0, id).Store(&session)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) GetSessionByPID(pid uint32) (session dbus.ObjectPath, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.GetSessionByPID", 0, pid).Store(&session)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) GetUser(uid uint32) (user dbus.ObjectPath, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.GetUser", 0, uid).Store(&user)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) GetSeat(id string) (seat dbus.ObjectPath, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.GetSeat", 0, id).Store(&seat)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ListSessions() (sessions [][]interface{}, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ListSessions", 0).Store(&sessions)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ListUsers() (users [][]interface{}, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ListUsers", 0).Store(&users)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ListSeats() (seats [][]interface{}, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ListSeats", 0).Store(&seats)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CreateSession(uid uint32, leader uint32, service string, type_ string, class_ string, seat string, vtnr uint32, tty string, display string, remote bool, remote_user string, remote_host string, controllers []string, reset_controllers []string, kill_processes bool) (id string, path dbus.ObjectPath, runtime_path dbus.ObjectPath, fd dbus.UnixFD, seat_ string, vtnr_ uint32, existing bool, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CreateSession", 0, uid, leader, service, type_, class_, seat, vtnr, tty, display, remote, remote_user, remote_host, controllers, reset_controllers, kill_processes).Store(&id, &path, &runtime_path, &fd, &seat_, &vtnr_, &existing)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ReleaseSession(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ReleaseSession", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ActivateSession(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ActivateSession", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ActivateSessionOnSeat(id string, seat string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ActivateSessionOnSeat", 0, id, seat).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) LockSession(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.LockSession", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) UnlockSession(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.UnlockSession", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) LockSessions() (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.LockSessions", 0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) UnlockSessions() (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.UnlockSessions", 0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) KillSession(id string, who string, signal string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.KillSession", 0, id, who, signal).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) KillUser(uid uint32, signal string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.KillUser", 0, uid, signal).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) TerminateSession(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.TerminateSession", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) TerminateUser(uid uint32) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.TerminateUser", 0, uid).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) TerminateSeat(id string) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.TerminateSeat", 0, id).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) SetUserLinger(uid uint32, b bool, interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.SetUserLinger", 0, uid, b, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) AttachDevice(seat string, sysfs string, interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.AttachDevice", 0, seat, sysfs, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) FlushDevices(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.FlushDevices", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) PowerOff(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.PowerOff", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) Reboot(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.Reboot", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) Suspend(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.Suspend", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) Hibernate(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.Hibernate", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) HybridSleep(interactive bool) (_err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.HybridSleep", 0, interactive).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CanPowerOff() (result string, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CanPowerOff", 0).Store(&result)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CanReboot() (result string, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CanReboot", 0).Store(&result)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CanSuspend() (result string, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CanSuspend", 0).Store(&result)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CanHibernate() (result string, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CanHibernate", 0).Store(&result)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) CanHybridSleep() (result string, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.CanHybridSleep", 0).Store(&result)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) Inhibit(what string, who string, why string, mode string) (fd dbus.UnixFD, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.Inhibit", 0, what, who, why, mode).Store(&fd)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ListInhibitors() (inhibitors [][]interface{}, _err error) {
	_err = obj.core.Call("org.freedesktop.login1.Manager.ListInhibitors", 0).Store(&inhibitors)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Manager) ConnectSessionNew(callback func(id string, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.SessionNew" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(string), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectSessionRemoved(callback func(id string, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.SessionRemoved" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(string), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectUserNew(callback func(uid uint32, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.UserNew" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*uint32)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(uint32), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectUserRemoved(callback func(uid uint32, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.UserRemoved" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*uint32)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(uint32), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectSeatNew(callback func(id string, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.SeatNew" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(string), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectSeatRemoved(callback func(id string, path dbus.ObjectPath)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.SeatRemoved" || 2 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*dbus.ObjectPath)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(string), v.Body[1].(dbus.ObjectPath))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectPrepareForShutdown(callback func(active bool)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.PrepareForShutdown" || 1 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*bool)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(bool))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *Manager) ConnectPrepareForSleep(callback func(active bool)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "org.freedesktop.login1.Manager.PrepareForSleep" || 1 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*bool)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(bool))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

type dbusPropertyManagerControlGroupHierarchy struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerControlGroupHierarchy) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.ControlGroupHierarchy is not writable")
}

func (this *dbusPropertyManagerControlGroupHierarchy) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerControlGroupHierarchy) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "ControlGroupHierarchy").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerControlGroupHierarchy) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerControllers struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerControllers) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.Controllers is not writable")
}

func (this *dbusPropertyManagerControllers) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyManagerControllers) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "Controllers").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyManagerControllers) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyManagerResetControllers struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerResetControllers) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.ResetControllers is not writable")
}

func (this *dbusPropertyManagerResetControllers) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyManagerResetControllers) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "ResetControllers").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyManagerResetControllers) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyManagerNAutoVTs struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerNAutoVTs) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.NAutoVTs is not writable")
}

func (this *dbusPropertyManagerNAutoVTs) Get() uint32 {
	v, _ := this.GetValue()
	return v.(uint32)
}
func (this *dbusPropertyManagerNAutoVTs) GetValue() (interface{} /*uint32*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "NAutoVTs").Store(&r)
	if err == nil && r.Signature().String() == "u" {
		return r.Value().(uint32), nil
	}
	return *new(uint32), err
}
func (this *dbusPropertyManagerNAutoVTs) GetType() reflect.Type {
	return reflect.TypeOf((*uint32)(nil)).Elem()
}

type dbusPropertyManagerKillOnlyUsers struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerKillOnlyUsers) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.KillOnlyUsers is not writable")
}

func (this *dbusPropertyManagerKillOnlyUsers) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyManagerKillOnlyUsers) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "KillOnlyUsers").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyManagerKillOnlyUsers) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyManagerKillExcludeUsers struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerKillExcludeUsers) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.KillExcludeUsers is not writable")
}

func (this *dbusPropertyManagerKillExcludeUsers) Get() []string {
	v, _ := this.GetValue()
	return v.([]string)
}
func (this *dbusPropertyManagerKillExcludeUsers) GetValue() (interface{} /*[]string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "KillExcludeUsers").Store(&r)
	if err == nil && r.Signature().String() == "as" {
		return r.Value().([]string), nil
	}
	return *new([]string), err
}
func (this *dbusPropertyManagerKillExcludeUsers) GetType() reflect.Type {
	return reflect.TypeOf((*[]string)(nil)).Elem()
}

type dbusPropertyManagerKillUserProcesses struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerKillUserProcesses) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.KillUserProcesses is not writable")
}

func (this *dbusPropertyManagerKillUserProcesses) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyManagerKillUserProcesses) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "KillUserProcesses").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyManagerKillUserProcesses) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyManagerIdleHint struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerIdleHint) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.IdleHint is not writable")
}

func (this *dbusPropertyManagerIdleHint) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyManagerIdleHint) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "IdleHint").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyManagerIdleHint) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyManagerIdleSinceHint struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerIdleSinceHint) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.IdleSinceHint is not writable")
}

func (this *dbusPropertyManagerIdleSinceHint) Get() uint64 {
	v, _ := this.GetValue()
	return v.(uint64)
}
func (this *dbusPropertyManagerIdleSinceHint) GetValue() (interface{} /*uint64*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "IdleSinceHint").Store(&r)
	if err == nil && r.Signature().String() == "t" {
		return r.Value().(uint64), nil
	}
	return *new(uint64), err
}
func (this *dbusPropertyManagerIdleSinceHint) GetType() reflect.Type {
	return reflect.TypeOf((*uint64)(nil)).Elem()
}

type dbusPropertyManagerIdleSinceHintMonotonic struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerIdleSinceHintMonotonic) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.IdleSinceHintMonotonic is not writable")
}

func (this *dbusPropertyManagerIdleSinceHintMonotonic) Get() uint64 {
	v, _ := this.GetValue()
	return v.(uint64)
}
func (this *dbusPropertyManagerIdleSinceHintMonotonic) GetValue() (interface{} /*uint64*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "IdleSinceHintMonotonic").Store(&r)
	if err == nil && r.Signature().String() == "t" {
		return r.Value().(uint64), nil
	}
	return *new(uint64), err
}
func (this *dbusPropertyManagerIdleSinceHintMonotonic) GetType() reflect.Type {
	return reflect.TypeOf((*uint64)(nil)).Elem()
}

type dbusPropertyManagerBlockInhibited struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerBlockInhibited) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.BlockInhibited is not writable")
}

func (this *dbusPropertyManagerBlockInhibited) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerBlockInhibited) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "BlockInhibited").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerBlockInhibited) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerDelayInhibited struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerDelayInhibited) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.DelayInhibited is not writable")
}

func (this *dbusPropertyManagerDelayInhibited) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerDelayInhibited) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "DelayInhibited").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerDelayInhibited) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerInhibitDelayMaxUSec struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerInhibitDelayMaxUSec) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.InhibitDelayMaxUSec is not writable")
}

func (this *dbusPropertyManagerInhibitDelayMaxUSec) Get() uint64 {
	v, _ := this.GetValue()
	return v.(uint64)
}
func (this *dbusPropertyManagerInhibitDelayMaxUSec) GetValue() (interface{} /*uint64*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "InhibitDelayMaxUSec").Store(&r)
	if err == nil && r.Signature().String() == "t" {
		return r.Value().(uint64), nil
	}
	return *new(uint64), err
}
func (this *dbusPropertyManagerInhibitDelayMaxUSec) GetType() reflect.Type {
	return reflect.TypeOf((*uint64)(nil)).Elem()
}

type dbusPropertyManagerHandlePowerKey struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerHandlePowerKey) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.HandlePowerKey is not writable")
}

func (this *dbusPropertyManagerHandlePowerKey) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerHandlePowerKey) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "HandlePowerKey").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerHandlePowerKey) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerHandleSuspendKey struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerHandleSuspendKey) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.HandleSuspendKey is not writable")
}

func (this *dbusPropertyManagerHandleSuspendKey) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerHandleSuspendKey) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "HandleSuspendKey").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerHandleSuspendKey) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerHandleHibernateKey struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerHandleHibernateKey) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.HandleHibernateKey is not writable")
}

func (this *dbusPropertyManagerHandleHibernateKey) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerHandleHibernateKey) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "HandleHibernateKey").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerHandleHibernateKey) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerHandleLidSwitch struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerHandleLidSwitch) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.HandleLidSwitch is not writable")
}

func (this *dbusPropertyManagerHandleLidSwitch) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerHandleLidSwitch) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "HandleLidSwitch").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerHandleLidSwitch) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerIdleAction struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerIdleAction) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.IdleAction is not writable")
}

func (this *dbusPropertyManagerIdleAction) Get() string {
	v, _ := this.GetValue()
	return v.(string)
}
func (this *dbusPropertyManagerIdleAction) GetValue() (interface{} /*string*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "IdleAction").Store(&r)
	if err == nil && r.Signature().String() == "s" {
		return r.Value().(string), nil
	}
	return *new(string), err
}
func (this *dbusPropertyManagerIdleAction) GetType() reflect.Type {
	return reflect.TypeOf((*string)(nil)).Elem()
}

type dbusPropertyManagerIdleActionUSec struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerIdleActionUSec) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.IdleActionUSec is not writable")
}

func (this *dbusPropertyManagerIdleActionUSec) Get() uint64 {
	v, _ := this.GetValue()
	return v.(uint64)
}
func (this *dbusPropertyManagerIdleActionUSec) GetValue() (interface{} /*uint64*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "IdleActionUSec").Store(&r)
	if err == nil && r.Signature().String() == "t" {
		return r.Value().(uint64), nil
	}
	return *new(uint64), err
}
func (this *dbusPropertyManagerIdleActionUSec) GetType() reflect.Type {
	return reflect.TypeOf((*uint64)(nil)).Elem()
}

type dbusPropertyManagerPreparingForShutdown struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerPreparingForShutdown) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.PreparingForShutdown is not writable")
}

func (this *dbusPropertyManagerPreparingForShutdown) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyManagerPreparingForShutdown) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "PreparingForShutdown").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyManagerPreparingForShutdown) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

type dbusPropertyManagerPreparingForSleep struct {
	*property.BaseObserver
	core *dbus.Object
}

func (this *dbusPropertyManagerPreparingForSleep) SetValue(notwritable interface{}) {
	fmt.Println("org.freedesktop.login1.Manager.PreparingForSleep is not writable")
}

func (this *dbusPropertyManagerPreparingForSleep) Get() bool {
	v, _ := this.GetValue()
	return v.(bool)
}
func (this *dbusPropertyManagerPreparingForSleep) GetValue() (interface{} /*bool*/, error) {
	var r dbus.Variant
	err := this.core.Call("org.freedesktop.DBus.Properties.Get", 0, "org.freedesktop.login1.Manager", "PreparingForSleep").Store(&r)
	if err == nil && r.Signature().String() == "b" {
		return r.Value().(bool), nil
	}
	return *new(bool), err
}
func (this *dbusPropertyManagerPreparingForSleep) GetType() reflect.Type {
	return reflect.TypeOf((*bool)(nil)).Elem()
}

func NewManager(destName string, path dbus.ObjectPath) (*Manager, error) {
	if !path.IsValid() {
		return nil, errors.New("The path of '" + string(path) + "' is invalid.")
	}

	core := getBus().Object(destName, path)

	obj := &Manager{Path: path, DestName: destName, core: core, signals: make(map[<-chan *dbus.Signal]struct{})}

	obj.ControlGroupHierarchy = &dbusPropertyManagerControlGroupHierarchy{&property.BaseObserver{}, core}
	obj.Controllers = &dbusPropertyManagerControllers{&property.BaseObserver{}, core}
	obj.ResetControllers = &dbusPropertyManagerResetControllers{&property.BaseObserver{}, core}
	obj.NAutoVTs = &dbusPropertyManagerNAutoVTs{&property.BaseObserver{}, core}
	obj.KillOnlyUsers = &dbusPropertyManagerKillOnlyUsers{&property.BaseObserver{}, core}
	obj.KillExcludeUsers = &dbusPropertyManagerKillExcludeUsers{&property.BaseObserver{}, core}
	obj.KillUserProcesses = &dbusPropertyManagerKillUserProcesses{&property.BaseObserver{}, core}
	obj.IdleHint = &dbusPropertyManagerIdleHint{&property.BaseObserver{}, core}
	obj.IdleSinceHint = &dbusPropertyManagerIdleSinceHint{&property.BaseObserver{}, core}
	obj.IdleSinceHintMonotonic = &dbusPropertyManagerIdleSinceHintMonotonic{&property.BaseObserver{}, core}
	obj.BlockInhibited = &dbusPropertyManagerBlockInhibited{&property.BaseObserver{}, core}
	obj.DelayInhibited = &dbusPropertyManagerDelayInhibited{&property.BaseObserver{}, core}
	obj.InhibitDelayMaxUSec = &dbusPropertyManagerInhibitDelayMaxUSec{&property.BaseObserver{}, core}
	obj.HandlePowerKey = &dbusPropertyManagerHandlePowerKey{&property.BaseObserver{}, core}
	obj.HandleSuspendKey = &dbusPropertyManagerHandleSuspendKey{&property.BaseObserver{}, core}
	obj.HandleHibernateKey = &dbusPropertyManagerHandleHibernateKey{&property.BaseObserver{}, core}
	obj.HandleLidSwitch = &dbusPropertyManagerHandleLidSwitch{&property.BaseObserver{}, core}
	obj.IdleAction = &dbusPropertyManagerIdleAction{&property.BaseObserver{}, core}
	obj.IdleActionUSec = &dbusPropertyManagerIdleActionUSec{&property.BaseObserver{}, core}
	obj.PreparingForShutdown = &dbusPropertyManagerPreparingForShutdown{&property.BaseObserver{}, core}
	obj.PreparingForSleep = &dbusPropertyManagerPreparingForSleep{&property.BaseObserver{}, core}

	dbusAddMatch("type='signal',path='" + string(path) + "',interface='org.freedesktop.DBus.Properties',sender='" + destName + "',member='PropertiesChanged'")
	dbusAddMatch("type='signal',path='" + string(path) + "',interface='org.freedesktop.login1.Manager',sender='" + destName + "',member='PropertiesChanged'")
	sigChan := obj._createSignalChan()
	go func() {
		typeString := reflect.TypeOf("")
		typeKeyValues := reflect.TypeOf(map[string]dbus.Variant{})
		typeArrayValues := reflect.TypeOf([]string{})
		for v := range sigChan {
			if v.Name == "org.freedesktop.DBus.Properties.PropertiesChanged" &&
				len(v.Body) == 3 &&
				reflect.TypeOf(v.Body[0]) == typeString &&
				reflect.TypeOf(v.Body[1]) == typeKeyValues &&
				reflect.TypeOf(v.Body[2]) == typeArrayValues &&
				v.Body[0].(string) == "org.freedesktop.login1.Manager" {
				props := v.Body[1].(map[string]dbus.Variant)
				for key, _ := range props {
					if false {
					} else if key == "ControlGroupHierarchy" {
						obj.ControlGroupHierarchy.Notify()

					} else if key == "Controllers" {
						obj.Controllers.Notify()

					} else if key == "ResetControllers" {
						obj.ResetControllers.Notify()

					} else if key == "NAutoVTs" {
						obj.NAutoVTs.Notify()

					} else if key == "KillOnlyUsers" {
						obj.KillOnlyUsers.Notify()

					} else if key == "KillExcludeUsers" {
						obj.KillExcludeUsers.Notify()

					} else if key == "KillUserProcesses" {
						obj.KillUserProcesses.Notify()

					} else if key == "IdleHint" {
						obj.IdleHint.Notify()

					} else if key == "IdleSinceHint" {
						obj.IdleSinceHint.Notify()

					} else if key == "IdleSinceHintMonotonic" {
						obj.IdleSinceHintMonotonic.Notify()

					} else if key == "BlockInhibited" {
						obj.BlockInhibited.Notify()

					} else if key == "DelayInhibited" {
						obj.DelayInhibited.Notify()

					} else if key == "InhibitDelayMaxUSec" {
						obj.InhibitDelayMaxUSec.Notify()

					} else if key == "HandlePowerKey" {
						obj.HandlePowerKey.Notify()

					} else if key == "HandleSuspendKey" {
						obj.HandleSuspendKey.Notify()

					} else if key == "HandleHibernateKey" {
						obj.HandleHibernateKey.Notify()

					} else if key == "HandleLidSwitch" {
						obj.HandleLidSwitch.Notify()

					} else if key == "IdleAction" {
						obj.IdleAction.Notify()

					} else if key == "IdleActionUSec" {
						obj.IdleActionUSec.Notify()

					} else if key == "PreparingForShutdown" {
						obj.PreparingForShutdown.Notify()

					} else if key == "PreparingForSleep" {
						obj.PreparingForSleep.Notify()
					}
				}
			} else if v.Name == "org.freedesktop.login1.Manager.PropertiesChanged" && len(v.Body) == 1 && reflect.TypeOf(v.Body[0]) == typeKeyValues {
				for key, _ := range v.Body[0].(map[string]dbus.Variant) {
					if false {
					} else if key == "ControlGroupHierarchy" {
						obj.ControlGroupHierarchy.Notify()

					} else if key == "Controllers" {
						obj.Controllers.Notify()

					} else if key == "ResetControllers" {
						obj.ResetControllers.Notify()

					} else if key == "NAutoVTs" {
						obj.NAutoVTs.Notify()

					} else if key == "KillOnlyUsers" {
						obj.KillOnlyUsers.Notify()

					} else if key == "KillExcludeUsers" {
						obj.KillExcludeUsers.Notify()

					} else if key == "KillUserProcesses" {
						obj.KillUserProcesses.Notify()

					} else if key == "IdleHint" {
						obj.IdleHint.Notify()

					} else if key == "IdleSinceHint" {
						obj.IdleSinceHint.Notify()

					} else if key == "IdleSinceHintMonotonic" {
						obj.IdleSinceHintMonotonic.Notify()

					} else if key == "BlockInhibited" {
						obj.BlockInhibited.Notify()

					} else if key == "DelayInhibited" {
						obj.DelayInhibited.Notify()

					} else if key == "InhibitDelayMaxUSec" {
						obj.InhibitDelayMaxUSec.Notify()

					} else if key == "HandlePowerKey" {
						obj.HandlePowerKey.Notify()

					} else if key == "HandleSuspendKey" {
						obj.HandleSuspendKey.Notify()

					} else if key == "HandleHibernateKey" {
						obj.HandleHibernateKey.Notify()

					} else if key == "HandleLidSwitch" {
						obj.HandleLidSwitch.Notify()

					} else if key == "IdleAction" {
						obj.IdleAction.Notify()

					} else if key == "IdleActionUSec" {
						obj.IdleActionUSec.Notify()

					} else if key == "PreparingForShutdown" {
						obj.PreparingForShutdown.Notify()

					} else if key == "PreparingForSleep" {
						obj.PreparingForSleep.Notify()
					}
				}
			}
		}
	}()

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SessionNew'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SessionRemoved'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='UserNew'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='UserRemoved'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SeatNew'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='SeatRemoved'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='PrepareForShutdown'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='org.freedesktop.login1.Manager',sender='" + obj.DestName + "',member='PrepareForSleep'")

	runtime.SetFinalizer(obj, func(_obj *Manager) { DestroyManager(_obj) })
	return obj, nil
}
