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

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 NetworkManager struct {
	Path     dbus.ObjectPath
	DestName string
	core     *dbus.Object

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

	State             *dbusPropertyNetworkManagerState
	NetworkingEnabled *dbusPropertyNetworkManagerNetworkingEnabled
	VpnEnabled        *dbusPropertyNetworkManagerVpnEnabled
	Devices           *dbusPropertyNetworkManagerDevices
	Connections       *dbusPropertyNetworkManagerConnections
	ActiveConnections *dbusPropertyNetworkManagerActiveConnections
}

func (obj *NetworkManager) _createSignalChan() <-chan *dbus.Signal {
	obj.signalsLocker.Lock()
	ch := getBus().Signal()
	obj.signals[ch] = struct{}{}
	obj.signalsLocker.Unlock()
	return ch
}
func (obj *NetworkManager) _deleteSignalChan(ch <-chan *dbus.Signal) {
	obj.signalsLocker.Lock()
	delete(obj.signals, ch)
	getBus().DetachSignal(ch)
	obj.signalsLocker.Unlock()
}
func DestroyNetworkManager(obj *NetworkManager) {
	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='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='PropertiesChanged'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='NeedSecrets'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointAdded'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointRemoved'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointPropertiesChanged'")

	dbusRemoveMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='DeviceEnabled'")

	obj.State.Reset()
	obj.NetworkingEnabled.Reset()
	obj.VpnEnabled.Reset()
	obj.Devices.Reset()
	obj.Connections.Reset()
	obj.ActiveConnections.Reset()
}

func (obj *NetworkManager) ActivateAccessPoint(arg0 string, arg1 dbus.ObjectPath, arg2 dbus.ObjectPath) (arg3 dbus.ObjectPath, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.ActivateAccessPoint", 0, arg0, arg1, arg2).Store(&arg3)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) ActivateConnection(arg0 string, arg1 dbus.ObjectPath) (arg2 dbus.ObjectPath, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.ActivateConnection", 0, arg0, arg1).Store(&arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) CancelSecret(arg0 string, arg1 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.CancelSecret", 0, arg0, arg1).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) CreateConnection(arg0 string, arg1 dbus.ObjectPath) (arg2 dbus.ObjectPath, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.CreateConnection", 0, arg0, arg1).Store(&arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) CreateConnectionForAccessPoint(arg0 dbus.ObjectPath, arg1 dbus.ObjectPath) (arg2 dbus.ObjectPath, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.CreateConnectionForAccessPoint", 0, arg0, arg1).Store(&arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) DeactivateConnection(arg0 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.DeactivateConnection", 0, arg0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) DeleteConnection(arg0 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.DeleteConnection", 0, arg0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) DisconnectDevice(arg0 dbus.ObjectPath) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.DisconnectDevice", 0, arg0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) EditConnection(arg0 string, arg1 dbus.ObjectPath) (arg2 dbus.ObjectPath, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.EditConnection", 0, arg0, arg1).Store(&arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) EnableDevice(arg0 dbus.ObjectPath, arg1 bool) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.EnableDevice", 0, arg0, arg1).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) FeedSecret(arg0 string, arg1 string, arg2 string, arg3 bool) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.FeedSecret", 0, arg0, arg1, arg2, arg3).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetAccessPoints(arg0 dbus.ObjectPath) (arg1 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetAccessPoints", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetActiveConnectionInfo() (arg0 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetActiveConnectionInfo", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetAutoProxy() (arg0 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetAutoProxy", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetProxy(arg0 string) (arg1 string, arg2 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetProxy", 0, arg0).Store(&arg1, &arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetProxyMethod() (arg0 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetProxyMethod", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetSupportedConnectionTypes() (arg0 []string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetSupportedConnectionTypes", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) GetWiredConnectionUuid(arg0 dbus.ObjectPath) (arg1 string, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.GetWiredConnectionUuid", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) IsDeviceEnabled(arg0 dbus.ObjectPath) (arg1 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.IsDeviceEnabled", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) SetAutoProxy(arg0 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.SetAutoProxy", 0, arg0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) SetProxy(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.SetProxy", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) SetProxyMethod(arg0 string) (_err error) {
	_err = obj.core.Call("com.deepin.daemon.Network.SetProxyMethod", 0, arg0).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *NetworkManager) ConnectNeedSecrets(callback func(arg0 string, arg1 string, arg2 string, arg3 bool)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "com.deepin.daemon.Network.NeedSecrets" || 4 != len(v.Body) {
				continue
			}
			if reflect.TypeOf(v.Body[0]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[1]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[2]) != reflect.TypeOf((*string)(nil)).Elem() {
				continue
			}
			if reflect.TypeOf(v.Body[3]) != reflect.TypeOf((*bool)(nil)).Elem() {
				continue
			}

			callback(v.Body[0].(string), v.Body[1].(string), v.Body[2].(string), v.Body[3].(bool))
		}
	}()
	return func() {
		obj._deleteSignalChan(sigChan)
	}
}

func (obj *NetworkManager) ConnectAccessPointAdded(callback func(arg0 string, arg1 string)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "com.deepin.daemon.Network.AccessPointAdded" || 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((*string)(nil)).Elem() {
				continue
			}

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

func (obj *NetworkManager) ConnectAccessPointRemoved(callback func(arg0 string, arg1 string)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "com.deepin.daemon.Network.AccessPointRemoved" || 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((*string)(nil)).Elem() {
				continue
			}

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

func (obj *NetworkManager) ConnectAccessPointPropertiesChanged(callback func(arg0 string, arg1 string)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "com.deepin.daemon.Network.AccessPointPropertiesChanged" || 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((*string)(nil)).Elem() {
				continue
			}

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

func (obj *NetworkManager) ConnectDeviceEnabled(callback func(arg0 string, arg1 bool)) func() {
	sigChan := obj._createSignalChan()
	go func() {
		for v := range sigChan {
			if v.Path != obj.Path || v.Name != "com.deepin.daemon.Network.DeviceEnabled" || 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((*bool)(nil)).Elem() {
				continue
			}

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

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

func (this *dbusPropertyNetworkManagerState) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Network.State is not writable")
}

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

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

func (this *dbusPropertyNetworkManagerNetworkingEnabled) SetValue(v interface{} /*bool*/) {
	if reflect.TypeOf(v) == reflect.TypeOf((*bool)(nil)).Elem() {
		this.core.Call("org.freedesktop.DBus.Properties.Set", 0, "com.deepin.daemon.Network", "NetworkingEnabled", dbus.MakeVariant(v))
	} else {
		fmt.Println("The property NetworkingEnabled of com.deepin.daemon.Network is an bool but Set with an ", reflect.TypeOf(v))
	}
}
func (this *dbusPropertyNetworkManagerNetworkingEnabled) Set(v bool) {
	this.SetValue(v)
}

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

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

func (this *dbusPropertyNetworkManagerVpnEnabled) SetValue(v interface{} /*bool*/) {
	if reflect.TypeOf(v) == reflect.TypeOf((*bool)(nil)).Elem() {
		this.core.Call("org.freedesktop.DBus.Properties.Set", 0, "com.deepin.daemon.Network", "VpnEnabled", dbus.MakeVariant(v))
	} else {
		fmt.Println("The property VpnEnabled of com.deepin.daemon.Network is an bool but Set with an ", reflect.TypeOf(v))
	}
}
func (this *dbusPropertyNetworkManagerVpnEnabled) Set(v bool) {
	this.SetValue(v)
}

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

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

func (this *dbusPropertyNetworkManagerDevices) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Network.Devices is not writable")
}

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

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

func (this *dbusPropertyNetworkManagerConnections) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Network.Connections is not writable")
}

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

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

func (this *dbusPropertyNetworkManagerActiveConnections) SetValue(notwritable interface{}) {
	fmt.Println("com.deepin.daemon.Network.ActiveConnections is not writable")
}

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

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

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

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

	obj.State = &dbusPropertyNetworkManagerState{&property.BaseObserver{}, core}
	obj.NetworkingEnabled = &dbusPropertyNetworkManagerNetworkingEnabled{&property.BaseObserver{}, core}
	obj.VpnEnabled = &dbusPropertyNetworkManagerVpnEnabled{&property.BaseObserver{}, core}
	obj.Devices = &dbusPropertyNetworkManagerDevices{&property.BaseObserver{}, core}
	obj.Connections = &dbusPropertyNetworkManagerConnections{&property.BaseObserver{}, core}
	obj.ActiveConnections = &dbusPropertyNetworkManagerActiveConnections{&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='com.deepin.daemon.Network',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) == "com.deepin.daemon.Network" {
				props := v.Body[1].(map[string]dbus.Variant)
				for key, _ := range props {
					if false {
					} else if key == "State" {
						obj.State.Notify()

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

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

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

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

					} else if key == "ActiveConnections" {
						obj.ActiveConnections.Notify()
					}
				}
			} else if v.Name == "com.deepin.daemon.Network.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 == "State" {
						obj.State.Notify()

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

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

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

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

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

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='NeedSecrets'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointAdded'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointRemoved'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='AccessPointPropertiesChanged'")

	dbusAddMatch("type='signal',path='" + string(obj.Path) + "',interface='com.deepin.daemon.Network',sender='" + obj.DestName + "',member='DeviceEnabled'")

	runtime.SetFinalizer(obj, func(_obj *NetworkManager) { DestroyNetworkManager(_obj) })
	return obj, nil
}
