// Code generated by "./generator com.deepin.daemon.bluetooth/"; DO NOT EDIT.

package bluetooth

import (
	"unsafe"

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

type Bluetooth interface {
	bluetooth // interface com.deepin.daemon.Bluetooth
	proxy.Object
}

type objectBluetooth struct {
	interfaceBluetooth // interface com.deepin.daemon.Bluetooth
	proxy.ImplObject
}

func NewBluetooth(conn *dbus.Conn) Bluetooth {
	obj := new(objectBluetooth)
	obj.ImplObject.Init_(conn, "com.deepin.daemon.Bluetooth", "/com/deepin/daemon/Bluetooth")
	return obj
}

type bluetooth interface {
	GoDisconnectAllDevices(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	DisconnectAllDevices(flags dbus.Flags) error
}

type interfaceBluetooth struct{}

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

func (*interfaceBluetooth) GetInterfaceName_() string {
	return "com.deepin.daemon.Bluetooth"
}

// method DisconnectAllDevices

func (v *interfaceBluetooth) GoDisconnectAllDevices(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".DisconnectAllDevices", flags, ch)
}

func (v *interfaceBluetooth) DisconnectAllDevices(flags dbus.Flags) error {
	return (<-v.GoDisconnectAllDevices(flags, make(chan *dbus.Call, 1)).Done).Err
}
