// Code generated by "./generator ./system/org.deepin.dde.authenticate1"; DO NOT EDIT.

// SPDX-FileCopyrightText: 2018 - 2023 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later
package authenticate1

import (
	"errors"
	"fmt"
	"unsafe"

	"github.com/godbus/dbus/v5"
	"github.com/linuxdeepin/go-lib/dbusutil"
	"github.com/linuxdeepin/go-lib/dbusutil/proxy"
)

type Authenticate interface {
	authenticate // interface org.deepin.dde.Authenticate1
	proxy.Object
}

type objectAuthenticate struct {
	interfaceAuthenticate // interface org.deepin.dde.Authenticate1
	proxy.ImplObject
}

func NewAuthenticate(conn *dbus.Conn) Authenticate {
	obj := new(objectAuthenticate)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Authenticate1", "/org/deepin/dde/Authenticate1")
	return obj
}

type authenticate interface {
	GoAuthenticate(flags dbus.Flags, ch chan *dbus.Call, username string, authFlags int32, appType int32) *dbus.Call
	Authenticate(flags dbus.Flags, username string, authFlags int32, appType int32) (string, error)
	GoGetLimits(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call
	GetLimits(flags dbus.Flags, username string) (string, error)
	GoPreOneKeyLogin(flags dbus.Flags, ch chan *dbus.Call, flag int32) *dbus.Call
	PreOneKeyLogin(flags dbus.Flags, flag int32) (string, error)
	GoResetLimits(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call
	ResetLimits(flags dbus.Flags, username string) error
	ConnectLimitUpdated(cb func(username string)) (dbusutil.SignalHandlerId, error)
	SupportEncrypts() proxy.PropString
	FrameworkState() proxy.PropInt32
	SupportedFlags() proxy.PropInt32
}

type interfaceAuthenticate struct{}

func (v *interfaceAuthenticate) GetObject_() *proxy.ImplObject {
	return (*proxy.ImplObject)(unsafe.Pointer(v))
}

func (*interfaceAuthenticate) GetInterfaceName_() string {
	return "org.deepin.dde.Authenticate1"
}

// method Authenticate

func (v *interfaceAuthenticate) GoAuthenticate(flags dbus.Flags, ch chan *dbus.Call, username string, authFlags int32, appType int32) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Authenticate", flags, ch, username, authFlags, appType)
}

func (*interfaceAuthenticate) StoreAuthenticate(call *dbus.Call) (path string, err error) {
	err = call.Store(&path)
	return
}

func (v *interfaceAuthenticate) Authenticate(flags dbus.Flags, username string, authFlags int32, appType int32) (string, error) {
	return v.StoreAuthenticate(
		<-v.GoAuthenticate(flags, make(chan *dbus.Call, 1), username, authFlags, appType).Done)
}

// method GetLimits

func (v *interfaceAuthenticate) GoGetLimits(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetLimits", flags, ch, username)
}

func (*interfaceAuthenticate) StoreGetLimits(call *dbus.Call) (limits string, err error) {
	err = call.Store(&limits)
	return
}

func (v *interfaceAuthenticate) GetLimits(flags dbus.Flags, username string) (string, error) {
	return v.StoreGetLimits(
		<-v.GoGetLimits(flags, make(chan *dbus.Call, 1), username).Done)
}

// method PreOneKeyLogin

func (v *interfaceAuthenticate) GoPreOneKeyLogin(flags dbus.Flags, ch chan *dbus.Call, flag int32) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".PreOneKeyLogin", flags, ch, flag)
}

func (*interfaceAuthenticate) StorePreOneKeyLogin(call *dbus.Call) (result string, err error) {
	err = call.Store(&result)
	return
}

func (v *interfaceAuthenticate) PreOneKeyLogin(flags dbus.Flags, flag int32) (string, error) {
	return v.StorePreOneKeyLogin(
		<-v.GoPreOneKeyLogin(flags, make(chan *dbus.Call, 1), flag).Done)
}

// method ResetLimits

func (v *interfaceAuthenticate) GoResetLimits(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ResetLimits", flags, ch, username)
}

func (v *interfaceAuthenticate) ResetLimits(flags dbus.Flags, username string) error {
	return (<-v.GoResetLimits(flags, make(chan *dbus.Call, 1), username).Done).Err
}

// signal LimitUpdated

func (v *interfaceAuthenticate) ConnectLimitUpdated(cb func(username string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "LimitUpdated", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".LimitUpdated",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var username string
		err := dbus.Store(sig.Body, &username)
		if err == nil {
			cb(username)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// property SupportEncrypts s

func (v *interfaceAuthenticate) SupportEncrypts() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "SupportEncrypts",
	}
}

// property FrameworkState i

func (v *interfaceAuthenticate) FrameworkState() proxy.PropInt32 {
	return &proxy.ImplPropInt32{
		Impl: v,
		Name: "FrameworkState",
	}
}

// property SupportedFlags i

func (v *interfaceAuthenticate) SupportedFlags() proxy.PropInt32 {
	return &proxy.ImplPropInt32{
		Impl: v,
		Name: "SupportedFlags",
	}
}

type Fingerprint interface {
	fingerprint // interface org.deepin.dde.Authenticate1.Fingerprint
	proxy.Object
}

type objectFingerprint struct {
	interfaceFingerprint // interface org.deepin.dde.Authenticate1.Fingerprint
	proxy.ImplObject
}

func NewFingerprint(conn *dbus.Conn) Fingerprint {
	obj := new(objectFingerprint)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Authenticate1", "/org/deepin/dde/Authenticate1/Fingerprint")
	return obj
}

type fingerprint interface {
	GoClaim(flags dbus.Flags, ch chan *dbus.Call, username string, claimed bool) *dbus.Call
	Claim(flags dbus.Flags, username string, claimed bool) error
	GoDeleteAllFingers(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call
	DeleteAllFingers(flags dbus.Flags, username string) error
	GoDeleteFinger(flags dbus.Flags, ch chan *dbus.Call, username string, finger string) *dbus.Call
	DeleteFinger(flags dbus.Flags, username string, finger string) error
	GoEnroll(flags dbus.Flags, ch chan *dbus.Call, finger string) *dbus.Call
	Enroll(flags dbus.Flags, finger string) error
	GoListFingers(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call
	ListFingers(flags dbus.Flags, username string) ([]string, error)
	GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, device string) *dbus.Call
	SetDefaultDevice(flags dbus.Flags, device string) error
	GoStopEnroll(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	StopEnroll(flags dbus.Flags) error
	GoStopVerify(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	StopVerify(flags dbus.Flags) error
	GoVerify(flags dbus.Flags, ch chan *dbus.Call, finger string) *dbus.Call
	Verify(flags dbus.Flags, finger string) error
	ConnectEnrollStatus(cb func(id string, code int32, msg string)) (dbusutil.SignalHandlerId, error)
	ConnectVerifyStatus(cb func(id string, code int32, msg string)) (dbusutil.SignalHandlerId, error)
	ConnectTouch(cb func(id string, pressed bool)) (dbusutil.SignalHandlerId, error)
	DefaultDevice() proxy.PropString
	Devices() proxy.PropString
}

type interfaceFingerprint struct{}

func (v *interfaceFingerprint) GetObject_() *proxy.ImplObject {
	return (*proxy.ImplObject)(unsafe.Pointer(v))
}

func (*interfaceFingerprint) GetInterfaceName_() string {
	return "org.deepin.dde.Authenticate1.Fingerprint"
}

// method Claim

func (v *interfaceFingerprint) GoClaim(flags dbus.Flags, ch chan *dbus.Call, username string, claimed bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Claim", flags, ch, username, claimed)
}

func (v *interfaceFingerprint) Claim(flags dbus.Flags, username string, claimed bool) error {
	return (<-v.GoClaim(flags, make(chan *dbus.Call, 1), username, claimed).Done).Err
}

// method DeleteAllFingers

func (v *interfaceFingerprint) GoDeleteAllFingers(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteAllFingers", flags, ch, username)
}

func (v *interfaceFingerprint) DeleteAllFingers(flags dbus.Flags, username string) error {
	return (<-v.GoDeleteAllFingers(flags, make(chan *dbus.Call, 1), username).Done).Err
}

// method DeleteFinger

func (v *interfaceFingerprint) GoDeleteFinger(flags dbus.Flags, ch chan *dbus.Call, username string, finger string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteFinger", flags, ch, username, finger)
}

func (v *interfaceFingerprint) DeleteFinger(flags dbus.Flags, username string, finger string) error {
	return (<-v.GoDeleteFinger(flags, make(chan *dbus.Call, 1), username, finger).Done).Err
}

// method Enroll

func (v *interfaceFingerprint) GoEnroll(flags dbus.Flags, ch chan *dbus.Call, finger string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Enroll", flags, ch, finger)
}

func (v *interfaceFingerprint) Enroll(flags dbus.Flags, finger string) error {
	return (<-v.GoEnroll(flags, make(chan *dbus.Call, 1), finger).Done).Err
}

// method ListFingers

func (v *interfaceFingerprint) GoListFingers(flags dbus.Flags, ch chan *dbus.Call, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ListFingers", flags, ch, username)
}

func (*interfaceFingerprint) StoreListFingers(call *dbus.Call) (fingers []string, err error) {
	err = call.Store(&fingers)
	return
}

func (v *interfaceFingerprint) ListFingers(flags dbus.Flags, username string) ([]string, error) {
	return v.StoreListFingers(
		<-v.GoListFingers(flags, make(chan *dbus.Call, 1), username).Done)
}

// method SetDefaultDevice

func (v *interfaceFingerprint) GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, device string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultDevice", flags, ch, device)
}

func (v *interfaceFingerprint) SetDefaultDevice(flags dbus.Flags, device string) error {
	return (<-v.GoSetDefaultDevice(flags, make(chan *dbus.Call, 1), device).Done).Err
}

// method StopEnroll

func (v *interfaceFingerprint) GoStopEnroll(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StopEnroll", flags, ch)
}

func (v *interfaceFingerprint) StopEnroll(flags dbus.Flags) error {
	return (<-v.GoStopEnroll(flags, make(chan *dbus.Call, 1)).Done).Err
}

// method StopVerify

func (v *interfaceFingerprint) GoStopVerify(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StopVerify", flags, ch)
}

func (v *interfaceFingerprint) StopVerify(flags dbus.Flags) error {
	return (<-v.GoStopVerify(flags, make(chan *dbus.Call, 1)).Done).Err
}

// method Verify

func (v *interfaceFingerprint) GoVerify(flags dbus.Flags, ch chan *dbus.Call, finger string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Verify", flags, ch, finger)
}

func (v *interfaceFingerprint) Verify(flags dbus.Flags, finger string) error {
	return (<-v.GoVerify(flags, make(chan *dbus.Call, 1), finger).Done).Err
}

// signal EnrollStatus

func (v *interfaceFingerprint) ConnectEnrollStatus(cb func(id string, code int32, msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "EnrollStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".EnrollStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var code int32
		var msg string
		err := dbus.Store(sig.Body, &id, &code, &msg)
		if err == nil {
			cb(id, code, msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal VerifyStatus

func (v *interfaceFingerprint) ConnectVerifyStatus(cb func(id string, code int32, msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "VerifyStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".VerifyStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var code int32
		var msg string
		err := dbus.Store(sig.Body, &id, &code, &msg)
		if err == nil {
			cb(id, code, msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal Touch

func (v *interfaceFingerprint) ConnectTouch(cb func(id string, pressed bool)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "Touch", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".Touch",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var pressed bool
		err := dbus.Store(sig.Body, &id, &pressed)
		if err == nil {
			cb(id, pressed)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// property DefaultDevice s

func (v *interfaceFingerprint) DefaultDevice() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "DefaultDevice",
	}
}

// property Devices s

func (v *interfaceFingerprint) Devices() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "Devices",
	}
}

type UKey interface {
	ukey // interface org.deepin.dde.Authenticate1.UKey
	proxy.Object
}

type objectUKey struct {
	interfaceUkey // interface org.deepin.dde.Authenticate1.UKey
	proxy.ImplObject
}

func NewUKey(conn *dbus.Conn) UKey {
	obj := new(objectUKey)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Authenticate1", "/org/deepin/dde/Authenticate1/UKey")
	return obj
}

type ukey interface {
	GoConstructVerification(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, useDefaultService bool) *dbus.Call
	ConstructVerification(flags dbus.Flags, serviceName string, username string, useDefaultService bool) (string, error)
	GoGetPINLength(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, useDefaultDevice bool) *dbus.Call
	GetPINLength(flags dbus.Flags, serviceName string, username string, useDefaultDevice bool) (int32, error)
	GoGetUserList(flags dbus.Flags, ch chan *dbus.Call, serviceName string, useDefaultDevice bool) *dbus.Call
	GetUserList(flags dbus.Flags, serviceName string, useDefaultDevice bool) ([]string, error)
	GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, device string) *dbus.Call
	SetDefaultDevice(flags dbus.Flags, device string) error
	GoSetPin(flags dbus.Flags, ch chan *dbus.Call, id string, pin string) *dbus.Call
	SetPin(flags dbus.Flags, id string, pin string) error
	GoSetSessionPath(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	SetSessionPath(flags dbus.Flags, id string) error
	GoStartVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	StartVerify(flags dbus.Flags, id string) error
	GoStopVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	StopVerify(flags dbus.Flags, id string) error
	ConnectVerifyResult(cb func(id string, msg string)) (dbusutil.SignalHandlerId, error)
	ConnectState(cb func(id string, state int32)) (dbusutil.SignalHandlerId, error)
	ValidDevices() proxy.PropString
	DefaultDevice() proxy.PropString
}

type interfaceUkey struct{}

func (v *interfaceUkey) GetObject_() *proxy.ImplObject {
	return (*proxy.ImplObject)(unsafe.Pointer(v))
}

func (*interfaceUkey) GetInterfaceName_() string {
	return "org.deepin.dde.Authenticate1.UKey"
}

// method ConstructVerification

func (v *interfaceUkey) GoConstructVerification(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, useDefaultService bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ConstructVerification", flags, ch, serviceName, username, useDefaultService)
}

func (*interfaceUkey) StoreConstructVerification(call *dbus.Call) (id string, err error) {
	err = call.Store(&id)
	return
}

func (v *interfaceUkey) ConstructVerification(flags dbus.Flags, serviceName string, username string, useDefaultService bool) (string, error) {
	return v.StoreConstructVerification(
		<-v.GoConstructVerification(flags, make(chan *dbus.Call, 1), serviceName, username, useDefaultService).Done)
}

// method GetPINLength

func (v *interfaceUkey) GoGetPINLength(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, useDefaultDevice bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetPINLength", flags, ch, serviceName, username, useDefaultDevice)
}

func (*interfaceUkey) StoreGetPINLength(call *dbus.Call) (length int32, err error) {
	err = call.Store(&length)
	return
}

func (v *interfaceUkey) GetPINLength(flags dbus.Flags, serviceName string, username string, useDefaultDevice bool) (int32, error) {
	return v.StoreGetPINLength(
		<-v.GoGetPINLength(flags, make(chan *dbus.Call, 1), serviceName, username, useDefaultDevice).Done)
}

// method GetUserList

func (v *interfaceUkey) GoGetUserList(flags dbus.Flags, ch chan *dbus.Call, serviceName string, useDefaultDevice bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetUserList", flags, ch, serviceName, useDefaultDevice)
}

func (*interfaceUkey) StoreGetUserList(call *dbus.Call) (users []string, err error) {
	err = call.Store(&users)
	return
}

func (v *interfaceUkey) GetUserList(flags dbus.Flags, serviceName string, useDefaultDevice bool) ([]string, error) {
	return v.StoreGetUserList(
		<-v.GoGetUserList(flags, make(chan *dbus.Call, 1), serviceName, useDefaultDevice).Done)
}

// method SetDefaultDevice

func (v *interfaceUkey) GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, device string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultDevice", flags, ch, device)
}

func (v *interfaceUkey) SetDefaultDevice(flags dbus.Flags, device string) error {
	return (<-v.GoSetDefaultDevice(flags, make(chan *dbus.Call, 1), device).Done).Err
}

// method SetPin

func (v *interfaceUkey) GoSetPin(flags dbus.Flags, ch chan *dbus.Call, id string, pin string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPin", flags, ch, id, pin)
}

func (v *interfaceUkey) SetPin(flags dbus.Flags, id string, pin string) error {
	return (<-v.GoSetPin(flags, make(chan *dbus.Call, 1), id, pin).Done).Err
}

// method SetSessionPath

func (v *interfaceUkey) GoSetSessionPath(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetSessionPath", flags, ch, id)
}

func (v *interfaceUkey) SetSessionPath(flags dbus.Flags, id string) error {
	return (<-v.GoSetSessionPath(flags, make(chan *dbus.Call, 1), id).Done).Err
}

// method StartVerify

func (v *interfaceUkey) GoStartVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StartVerify", flags, ch, id)
}

func (v *interfaceUkey) StartVerify(flags dbus.Flags, id string) error {
	return (<-v.GoStartVerify(flags, make(chan *dbus.Call, 1), id).Done).Err
}

// method StopVerify

func (v *interfaceUkey) GoStopVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StopVerify", flags, ch, id)
}

func (v *interfaceUkey) StopVerify(flags dbus.Flags, id string) error {
	return (<-v.GoStopVerify(flags, make(chan *dbus.Call, 1), id).Done).Err
}

// signal VerifyResult

func (v *interfaceUkey) ConnectVerifyResult(cb func(id string, msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "VerifyResult", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".VerifyResult",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var msg string
		err := dbus.Store(sig.Body, &id, &msg)
		if err == nil {
			cb(id, msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal State

func (v *interfaceUkey) ConnectState(cb func(id string, state int32)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "State", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".State",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var state int32
		err := dbus.Store(sig.Body, &id, &state)
		if err == nil {
			cb(id, state)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// property ValidDevices s

func (v *interfaceUkey) ValidDevices() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "ValidDevices",
	}
}

// property DefaultDevice s

func (v *interfaceUkey) DefaultDevice() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "DefaultDevice",
	}
}

type Face interface {
	face // interface org.deepin.dde.Authenticate1.Face
	proxy.Object
}

type objectFace struct {
	interfaceFace // interface org.deepin.dde.Authenticate1.Face
	proxy.ImplObject
}

func NewFace(conn *dbus.Conn) Face {
	obj := new(objectFace)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Authenticate1", "/org/deepin/dde/Authenticate1/Face")
	return obj
}

type face interface {
	GoDeleteFace(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, faceName string) *dbus.Call
	DeleteFace(flags dbus.Flags, serviceName string, username string, faceName string) error
	GoDeleteFaces(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string) *dbus.Call
	DeleteFaces(flags dbus.Flags, serviceName string, username string) error
	GoGetShareMemInfo(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	GetShareMemInfo(flags dbus.Flags, id string) (string, string, int32, error)
	GoListFaces(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string) *dbus.Call
	ListFaces(flags dbus.Flags, serviceName string, username string) ([]string, error)
	GoRenameFace(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, oldFace string, newFace string) *dbus.Call
	RenameFace(flags dbus.Flags, serviceName string, username string, oldFace string, newFace string) error
	GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, serviceName string, device string) *dbus.Call
	SetDefaultDevice(flags dbus.Flags, serviceName string, device string) error
	GoSetDefaultService(flags dbus.Flags, ch chan *dbus.Call, serviceName string) *dbus.Call
	SetDefaultService(flags dbus.Flags, serviceName string) error
	GoStartEnroll(flags dbus.Flags, ch chan *dbus.Call, username string, serviceName string, faceName string) *dbus.Call
	StartEnroll(flags dbus.Flags, username string, serviceName string, faceName string) (string, error)
	GoStartVerify(flags dbus.Flags, ch chan *dbus.Call, username string, serviceName string, timeout int32) *dbus.Call
	StartVerify(flags dbus.Flags, username string, serviceName string, timeout int32) (string, error)
	GoStopEnroll(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	StopEnroll(flags dbus.Flags, id string) error
	GoStopVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call
	StopVerify(flags dbus.Flags, id string) error
	ConnectEnrollStatus(cb func(id string, user string, code int32, msg string)) (dbusutil.SignalHandlerId, error)
	ConnectVerifyStatus(cb func(id string, user string, code int32, msg string)) (dbusutil.SignalHandlerId, error)
	ConnectDeviceStatus(cb func(serviceName string, code int32)) (dbusutil.SignalHandlerId, error)
	DefaultDevice() proxy.PropString
	DefaultService() proxy.PropString
	ServiceList() proxy.PropString
}

type interfaceFace struct{}

func (v *interfaceFace) GetObject_() *proxy.ImplObject {
	return (*proxy.ImplObject)(unsafe.Pointer(v))
}

func (*interfaceFace) GetInterfaceName_() string {
	return "org.deepin.dde.Authenticate1.Face"
}

// method DeleteFace

func (v *interfaceFace) GoDeleteFace(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, faceName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteFace", flags, ch, serviceName, username, faceName)
}

func (v *interfaceFace) DeleteFace(flags dbus.Flags, serviceName string, username string, faceName string) error {
	return (<-v.GoDeleteFace(flags, make(chan *dbus.Call, 1), serviceName, username, faceName).Done).Err
}

// method DeleteFaces

func (v *interfaceFace) GoDeleteFaces(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".DeleteFaces", flags, ch, serviceName, username)
}

func (v *interfaceFace) DeleteFaces(flags dbus.Flags, serviceName string, username string) error {
	return (<-v.GoDeleteFaces(flags, make(chan *dbus.Call, 1), serviceName, username).Done).Err
}

// method GetShareMemInfo

func (v *interfaceFace) GoGetShareMemInfo(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetShareMemInfo", flags, ch, id)
}

func (*interfaceFace) StoreGetShareMemInfo(call *dbus.Call) (sockPath string, key string, size int32, err error) {
	err = call.Store(&sockPath, &key, &size)
	return
}

func (v *interfaceFace) GetShareMemInfo(flags dbus.Flags, id string) (string, string, int32, error) {
	return v.StoreGetShareMemInfo(
		<-v.GoGetShareMemInfo(flags, make(chan *dbus.Call, 1), id).Done)
}

// method ListFaces

func (v *interfaceFace) GoListFaces(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ListFaces", flags, ch, serviceName, username)
}

func (*interfaceFace) StoreListFaces(call *dbus.Call) (faces []string, err error) {
	err = call.Store(&faces)
	return
}

func (v *interfaceFace) ListFaces(flags dbus.Flags, serviceName string, username string) ([]string, error) {
	return v.StoreListFaces(
		<-v.GoListFaces(flags, make(chan *dbus.Call, 1), serviceName, username).Done)
}

// method RenameFace

func (v *interfaceFace) GoRenameFace(flags dbus.Flags, ch chan *dbus.Call, serviceName string, username string, oldFace string, newFace string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".RenameFace", flags, ch, serviceName, username, oldFace, newFace)
}

func (v *interfaceFace) RenameFace(flags dbus.Flags, serviceName string, username string, oldFace string, newFace string) error {
	return (<-v.GoRenameFace(flags, make(chan *dbus.Call, 1), serviceName, username, oldFace, newFace).Done).Err
}

// method SetDefaultDevice

func (v *interfaceFace) GoSetDefaultDevice(flags dbus.Flags, ch chan *dbus.Call, serviceName string, device string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultDevice", flags, ch, serviceName, device)
}

func (v *interfaceFace) SetDefaultDevice(flags dbus.Flags, serviceName string, device string) error {
	return (<-v.GoSetDefaultDevice(flags, make(chan *dbus.Call, 1), serviceName, device).Done).Err
}

// method SetDefaultService

func (v *interfaceFace) GoSetDefaultService(flags dbus.Flags, ch chan *dbus.Call, serviceName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultService", flags, ch, serviceName)
}

func (v *interfaceFace) SetDefaultService(flags dbus.Flags, serviceName string) error {
	return (<-v.GoSetDefaultService(flags, make(chan *dbus.Call, 1), serviceName).Done).Err
}

// method StartEnroll

func (v *interfaceFace) GoStartEnroll(flags dbus.Flags, ch chan *dbus.Call, username string, serviceName string, faceName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StartEnroll", flags, ch, username, serviceName, faceName)
}

func (*interfaceFace) StoreStartEnroll(call *dbus.Call) (id string, err error) {
	err = call.Store(&id)
	return
}

func (v *interfaceFace) StartEnroll(flags dbus.Flags, username string, serviceName string, faceName string) (string, error) {
	return v.StoreStartEnroll(
		<-v.GoStartEnroll(flags, make(chan *dbus.Call, 1), username, serviceName, faceName).Done)
}

// method StartVerify

func (v *interfaceFace) GoStartVerify(flags dbus.Flags, ch chan *dbus.Call, username string, serviceName string, timeout int32) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StartVerify", flags, ch, username, serviceName, timeout)
}

func (*interfaceFace) StoreStartVerify(call *dbus.Call) (id string, err error) {
	err = call.Store(&id)
	return
}

func (v *interfaceFace) StartVerify(flags dbus.Flags, username string, serviceName string, timeout int32) (string, error) {
	return v.StoreStartVerify(
		<-v.GoStartVerify(flags, make(chan *dbus.Call, 1), username, serviceName, timeout).Done)
}

// method StopEnroll

func (v *interfaceFace) GoStopEnroll(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StopEnroll", flags, ch, id)
}

func (v *interfaceFace) StopEnroll(flags dbus.Flags, id string) error {
	return (<-v.GoStopEnroll(flags, make(chan *dbus.Call, 1), id).Done).Err
}

// method StopVerify

func (v *interfaceFace) GoStopVerify(flags dbus.Flags, ch chan *dbus.Call, id string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".StopVerify", flags, ch, id)
}

func (v *interfaceFace) StopVerify(flags dbus.Flags, id string) error {
	return (<-v.GoStopVerify(flags, make(chan *dbus.Call, 1), id).Done).Err
}

// signal EnrollStatus

func (v *interfaceFace) ConnectEnrollStatus(cb func(id string, user string, code int32, msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "EnrollStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".EnrollStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var user string
		var code int32
		var msg string
		err := dbus.Store(sig.Body, &id, &user, &code, &msg)
		if err == nil {
			cb(id, user, code, msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal VerifyStatus

func (v *interfaceFace) ConnectVerifyStatus(cb func(id string, user string, code int32, msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "VerifyStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".VerifyStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var id string
		var user string
		var code int32
		var msg string
		err := dbus.Store(sig.Body, &id, &user, &code, &msg)
		if err == nil {
			cb(id, user, code, msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal DeviceStatus

func (v *interfaceFace) ConnectDeviceStatus(cb func(serviceName string, code int32)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "DeviceStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".DeviceStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var serviceName string
		var code int32
		err := dbus.Store(sig.Body, &serviceName, &code)
		if err == nil {
			cb(serviceName, code)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// property DefaultDevice s

func (v *interfaceFace) DefaultDevice() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "DefaultDevice",
	}
}

// property DefaultService s

func (v *interfaceFace) DefaultService() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "DefaultService",
	}
}

// property ServiceList s

func (v *interfaceFace) ServiceList() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "ServiceList",
	}
}

type CharaManger interface {
	charaManger // interface org.deepin.dde.Authenticate1.CharaManger
	proxy.Object
}

type objectCharaManger struct {
	interfaceCharaManger // interface org.deepin.dde.Authenticate1.CharaManger
	proxy.ImplObject
}

func NewCharaManger(conn *dbus.Conn) CharaManger {
	obj := new(objectCharaManger)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Authenticate1", "/org/deepin/dde/Authenticate1/CharaManger")
	return obj
}

type charaManger interface {
	GoDelete(flags dbus.Flags, ch chan *dbus.Call, charaType int32, charaName string) *dbus.Call
	Delete(flags dbus.Flags, charaType int32, charaName string) error
	GoEnrollStart(flags dbus.Flags, ch chan *dbus.Call, driverName string, charaType int32, charaName string) *dbus.Call
	EnrollStart(flags dbus.Flags, driverName string, charaType int32, charaName string) (dbus.UnixFD, error)
	GoEnrollStop(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	EnrollStop(flags dbus.Flags) error
	GoList(flags dbus.Flags, ch chan *dbus.Call, driverName string, charaType int32) *dbus.Call
	List(flags dbus.Flags, driverName string, charaType int32) (string, error)
	GoRename(flags dbus.Flags, ch chan *dbus.Call, charaType int32, oldName string, newName string) *dbus.Call
	Rename(flags dbus.Flags, charaType int32, oldName string, newName string) error
	ConnectEnrollStatus(cb func(Sender string, Code int32, Msg string)) (dbusutil.SignalHandlerId, error)
	ConnectCharaUpdated(cb func(DriverName string, CharaType int32)) (dbusutil.SignalHandlerId, error)
	ConnectDriverChanged(cb func()) (dbusutil.SignalHandlerId, error)
	DriverInfo() proxy.PropString
}

type interfaceCharaManger struct{}

func (v *interfaceCharaManger) GetObject_() *proxy.ImplObject {
	return (*proxy.ImplObject)(unsafe.Pointer(v))
}

func (*interfaceCharaManger) GetInterfaceName_() string {
	return "org.deepin.dde.Authenticate1.CharaManger"
}

// method Delete

func (v *interfaceCharaManger) GoDelete(flags dbus.Flags, ch chan *dbus.Call, charaType int32, charaName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Delete", flags, ch, charaType, charaName)
}

func (v *interfaceCharaManger) Delete(flags dbus.Flags, charaType int32, charaName string) error {
	return (<-v.GoDelete(flags, make(chan *dbus.Call, 1), charaType, charaName).Done).Err
}

// method EnrollStart

func (v *interfaceCharaManger) GoEnrollStart(flags dbus.Flags, ch chan *dbus.Call, driverName string, charaType int32, charaName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".EnrollStart", flags, ch, driverName, charaType, charaName)
}

func (*interfaceCharaManger) StoreEnrollStart(call *dbus.Call) (outArg0 dbus.UnixFD, err error) {
	err = call.Store(&outArg0)
	return
}

func (v *interfaceCharaManger) EnrollStart(flags dbus.Flags, driverName string, charaType int32, charaName string) (dbus.UnixFD, error) {
	return v.StoreEnrollStart(
		<-v.GoEnrollStart(flags, make(chan *dbus.Call, 1), driverName, charaType, charaName).Done)
}

// method EnrollStop

func (v *interfaceCharaManger) GoEnrollStop(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".EnrollStop", flags, ch)
}

func (v *interfaceCharaManger) EnrollStop(flags dbus.Flags) error {
	return (<-v.GoEnrollStop(flags, make(chan *dbus.Call, 1)).Done).Err
}

// method List

func (v *interfaceCharaManger) GoList(flags dbus.Flags, ch chan *dbus.Call, driverName string, charaType int32) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".List", flags, ch, driverName, charaType)
}

func (*interfaceCharaManger) StoreList(call *dbus.Call) (outArg0 string, err error) {
	err = call.Store(&outArg0)
	return
}

func (v *interfaceCharaManger) List(flags dbus.Flags, driverName string, charaType int32) (string, error) {
	return v.StoreList(
		<-v.GoList(flags, make(chan *dbus.Call, 1), driverName, charaType).Done)
}

// method Rename

func (v *interfaceCharaManger) GoRename(flags dbus.Flags, ch chan *dbus.Call, charaType int32, oldName string, newName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Rename", flags, ch, charaType, oldName, newName)
}

func (v *interfaceCharaManger) Rename(flags dbus.Flags, charaType int32, oldName string, newName string) error {
	return (<-v.GoRename(flags, make(chan *dbus.Call, 1), charaType, oldName, newName).Done).Err
}

// signal EnrollStatus

func (v *interfaceCharaManger) ConnectEnrollStatus(cb func(Sender string, Code int32, Msg string)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "EnrollStatus", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".EnrollStatus",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var Sender string
		var Code int32
		var Msg string
		err := dbus.Store(sig.Body, &Sender, &Code, &Msg)
		if err == nil {
			cb(Sender, Code, Msg)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal CharaUpdated

func (v *interfaceCharaManger) ConnectCharaUpdated(cb func(DriverName string, CharaType int32)) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "CharaUpdated", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".CharaUpdated",
	}
	handlerFunc := func(sig *dbus.Signal) {
		var DriverName string
		var CharaType int32
		err := dbus.Store(sig.Body, &DriverName, &CharaType)
		if err == nil {
			cb(DriverName, CharaType)
		}
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// signal DriverChanged

func (v *interfaceCharaManger) ConnectDriverChanged(cb func()) (dbusutil.SignalHandlerId, error) {
	if cb == nil {
		return 0, errors.New("nil callback")
	}
	obj := v.GetObject_()
	rule := fmt.Sprintf(
		"type='signal',interface='%s',member='%s',path='%s',sender='%s'",
		v.GetInterfaceName_(), "DriverChanged", obj.Path_(), obj.ServiceName_())

	sigRule := &dbusutil.SignalRule{
		Path: obj.Path_(),
		Name: v.GetInterfaceName_() + ".DriverChanged",
	}
	handlerFunc := func(sig *dbus.Signal) {
		cb()
	}

	return obj.ConnectSignal_(rule, sigRule, handlerFunc)
}

// property DriverInfo s

func (v *interfaceCharaManger) DriverInfo() proxy.PropString {
	return &proxy.ImplPropString{
		Impl: v,
		Name: "DriverInfo",
	}
}
