// Code generated by "./generator ./session/org.deepin.dde.audio1"; DO NOT EDIT.

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

import (
	"errors"
	"unsafe"

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

type Audio interface {
	audio // interface org.deepin.dde.Audio1
	proxy.Object
}

type objectAudio struct {
	interfaceAudio // interface org.deepin.dde.Audio1
	proxy.ImplObject
}

func NewAudio(conn *dbus.Conn) Audio {
	obj := new(objectAudio)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Audio1", "/org/deepin/dde/Audio1")
	return obj
}

type audio interface {
	GoSetDefaultSink(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call
	SetDefaultSink(flags dbus.Flags, name string) error
	GoSetDefaultSource(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call
	SetDefaultSource(flags dbus.Flags, name string) error
	GoSetPort(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string, direction int32) *dbus.Call
	SetPort(flags dbus.Flags, cardId uint32, portName string, direction int32) error
	GoSetPortEnabled(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string, enabled bool) *dbus.Call
	SetPortEnabled(flags dbus.Flags, cardId uint32, portName string, enabled bool) error
	GoIsPortEnabled(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string) *dbus.Call
	IsPortEnabled(flags dbus.Flags, cardId uint32, portName string) (bool, error)
	MaxUIVolume() proxy.PropDouble
	SinkInputs() proxy.PropObjectPathArray
	DefaultSink() proxy.PropObjectPath
	DefaultSource() proxy.PropObjectPath
	Cards() proxy.PropString
	CardsWithoutUnavailable() proxy.PropString
}

type interfaceAudio struct{}

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

func (*interfaceAudio) GetInterfaceName_() string {
	return "org.deepin.dde.Audio1"
}

// method SetDefaultSink

func (v *interfaceAudio) GoSetDefaultSink(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultSink", flags, ch, name)
}

func (v *interfaceAudio) SetDefaultSink(flags dbus.Flags, name string) error {
	return (<-v.GoSetDefaultSink(flags, make(chan *dbus.Call, 1), name).Done).Err
}

// method SetDefaultSource

func (v *interfaceAudio) GoSetDefaultSource(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetDefaultSource", flags, ch, name)
}

func (v *interfaceAudio) SetDefaultSource(flags dbus.Flags, name string) error {
	return (<-v.GoSetDefaultSource(flags, make(chan *dbus.Call, 1), name).Done).Err
}

// method SetPort

func (v *interfaceAudio) GoSetPort(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string, direction int32) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPort", flags, ch, cardId, portName, direction)
}

func (v *interfaceAudio) SetPort(flags dbus.Flags, cardId uint32, portName string, direction int32) error {
	return (<-v.GoSetPort(flags, make(chan *dbus.Call, 1), cardId, portName, direction).Done).Err
}

// method SetPortEnabled

func (v *interfaceAudio) GoSetPortEnabled(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string, enabled bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPortEnabled", flags, ch, cardId, portName, enabled)
}

func (v *interfaceAudio) SetPortEnabled(flags dbus.Flags, cardId uint32, portName string, enabled bool) error {
	return (<-v.GoSetPortEnabled(flags, make(chan *dbus.Call, 1), cardId, portName, enabled).Done).Err
}

// method IsPortEnabled

func (v *interfaceAudio) GoIsPortEnabled(flags dbus.Flags, ch chan *dbus.Call, cardId uint32, portName string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".IsPortEnabled", flags, ch, cardId, portName)
}

func (*interfaceAudio) StoreIsPortEnabled(call *dbus.Call) (enabled bool, err error) {
	err = call.Store(&enabled)
	return
}

func (v *interfaceAudio) IsPortEnabled(flags dbus.Flags, cardId uint32, portName string) (bool, error) {
	return v.StoreIsPortEnabled(
		<-v.GoIsPortEnabled(flags, make(chan *dbus.Call, 1), cardId, portName).Done)
}

// property MaxUIVolume d

func (v *interfaceAudio) MaxUIVolume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "MaxUIVolume",
	}
}

// property SinkInputs ao

func (v *interfaceAudio) SinkInputs() proxy.PropObjectPathArray {
	return &proxy.ImplPropObjectPathArray{
		Impl: v,
		Name: "SinkInputs",
	}
}

// property DefaultSink o

func (v *interfaceAudio) DefaultSink() proxy.PropObjectPath {
	return &proxy.ImplPropObjectPath{
		Impl: v,
		Name: "DefaultSink",
	}
}

// property DefaultSource o

func (v *interfaceAudio) DefaultSource() proxy.PropObjectPath {
	return &proxy.ImplPropObjectPath{
		Impl: v,
		Name: "DefaultSource",
	}
}

// property Cards s

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

// property CardsWithoutUnavailable s

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

type Sink interface {
	sink // interface org.deepin.dde.Audio1.Sink
	proxy.Object
}

type objectSink struct {
	interfaceSink // interface org.deepin.dde.Audio1.Sink
	proxy.ImplObject
}

func NewSink(conn *dbus.Conn, path dbus.ObjectPath) (Sink, error) {
	if !path.IsValid() {
		return nil, errors.New("path is invalid")
	}
	obj := new(objectSink)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Audio1", path)
	return obj, nil
}

type sink interface {
	GoGetMeter(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	GetMeter(flags dbus.Flags) (dbus.ObjectPath, error)
	GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetBalance(flags dbus.Flags, value float64, isPlay bool) error
	GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call
	SetFade(flags dbus.Flags, value float64) error
	GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call
	SetMute(flags dbus.Flags, value bool) error
	GoSetPort(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call
	SetPort(flags dbus.Flags, name string) error
	GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetVolume(flags dbus.Flags, value float64, isPlay bool) error
	SupportBalance() proxy.PropBool
	Ports() PropPortInfoSlice
	Name() proxy.PropString
	Mute() proxy.PropBool
	Volume() proxy.PropDouble
	Balance() proxy.PropDouble
	ActivePort() PropPortInfo
	Card() proxy.PropUint32
	Description() proxy.PropString
	BaseVolume() proxy.PropDouble
	Fade() proxy.PropDouble
	SupportFade() proxy.PropBool
}

type interfaceSink struct{}

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

func (*interfaceSink) GetInterfaceName_() string {
	return "org.deepin.dde.Audio1.Sink"
}

// method GetMeter

func (v *interfaceSink) GoGetMeter(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetMeter", flags, ch)
}

func (*interfaceSink) StoreGetMeter(call *dbus.Call) (meter dbus.ObjectPath, err error) {
	err = call.Store(&meter)
	return
}

func (v *interfaceSink) GetMeter(flags dbus.Flags) (dbus.ObjectPath, error) {
	return v.StoreGetMeter(
		<-v.GoGetMeter(flags, make(chan *dbus.Call, 1)).Done)
}

// method SetBalance

func (v *interfaceSink) GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetBalance", flags, ch, value, isPlay)
}

func (v *interfaceSink) SetBalance(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetBalance(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// method SetFade

func (v *interfaceSink) GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetFade", flags, ch, value)
}

func (v *interfaceSink) SetFade(flags dbus.Flags, value float64) error {
	return (<-v.GoSetFade(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetMute

func (v *interfaceSink) GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetMute", flags, ch, value)
}

func (v *interfaceSink) SetMute(flags dbus.Flags, value bool) error {
	return (<-v.GoSetMute(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetPort

func (v *interfaceSink) GoSetPort(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPort", flags, ch, name)
}

func (v *interfaceSink) SetPort(flags dbus.Flags, name string) error {
	return (<-v.GoSetPort(flags, make(chan *dbus.Call, 1), name).Done).Err
}

// method SetVolume

func (v *interfaceSink) GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetVolume", flags, ch, value, isPlay)
}

func (v *interfaceSink) SetVolume(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetVolume(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// property SupportBalance b

func (v *interfaceSink) SupportBalance() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportBalance",
	}
}

// property Ports a(ssy)

func (v *interfaceSink) Ports() PropPortInfoSlice {
	return &implPropPortInfoSlice{
		Impl: v,
		Name: "Ports",
	}
}

// property Name s

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

// property Mute b

func (v *interfaceSink) Mute() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "Mute",
	}
}

// property Volume d

func (v *interfaceSink) Volume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Volume",
	}
}

// property Balance d

func (v *interfaceSink) Balance() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Balance",
	}
}

// property ActivePort (ssy)

func (v *interfaceSink) ActivePort() PropPortInfo {
	return &implPropPortInfo{
		Impl: v,
		Name: "ActivePort",
	}
}

// property Card u

func (v *interfaceSink) Card() proxy.PropUint32 {
	return &proxy.ImplPropUint32{
		Impl: v,
		Name: "Card",
	}
}

// property Description s

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

// property BaseVolume d

func (v *interfaceSink) BaseVolume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "BaseVolume",
	}
}

// property Fade d

func (v *interfaceSink) Fade() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Fade",
	}
}

// property SupportFade b

func (v *interfaceSink) SupportFade() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportFade",
	}
}

type Source interface {
	source // interface org.deepin.dde.Audio1.Source
	proxy.Object
}

type objectSource struct {
	interfaceSource // interface org.deepin.dde.Audio1.Source
	proxy.ImplObject
}

func NewSource(conn *dbus.Conn, path dbus.ObjectPath) (Source, error) {
	if !path.IsValid() {
		return nil, errors.New("path is invalid")
	}
	obj := new(objectSource)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Audio1", path)
	return obj, nil
}

type source interface {
	GoGetMeter(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call
	GetMeter(flags dbus.Flags) (dbus.ObjectPath, error)
	GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetBalance(flags dbus.Flags, value float64, isPlay bool) error
	GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call
	SetFade(flags dbus.Flags, value float64) error
	GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call
	SetMute(flags dbus.Flags, value bool) error
	GoSetPort(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call
	SetPort(flags dbus.Flags, name string) error
	GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetVolume(flags dbus.Flags, value float64, isPlay bool) error
	Mute() proxy.PropBool
	Balance() proxy.PropDouble
	SupportBalance() proxy.PropBool
	Fade() proxy.PropDouble
	Ports() PropPortInfoSlice
	Card() proxy.PropUint32
	BaseVolume() proxy.PropDouble
	Description() proxy.PropString
	Volume() proxy.PropDouble
	SupportFade() proxy.PropBool
	ActivePort() PropPortInfo
	Name() proxy.PropString
}

type interfaceSource struct{}

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

func (*interfaceSource) GetInterfaceName_() string {
	return "org.deepin.dde.Audio1.Source"
}

// method GetMeter

func (v *interfaceSource) GoGetMeter(flags dbus.Flags, ch chan *dbus.Call) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".GetMeter", flags, ch)
}

func (*interfaceSource) StoreGetMeter(call *dbus.Call) (meter dbus.ObjectPath, err error) {
	err = call.Store(&meter)
	return
}

func (v *interfaceSource) GetMeter(flags dbus.Flags) (dbus.ObjectPath, error) {
	return v.StoreGetMeter(
		<-v.GoGetMeter(flags, make(chan *dbus.Call, 1)).Done)
}

// method SetBalance

func (v *interfaceSource) GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetBalance", flags, ch, value, isPlay)
}

func (v *interfaceSource) SetBalance(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetBalance(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// method SetFade

func (v *interfaceSource) GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetFade", flags, ch, value)
}

func (v *interfaceSource) SetFade(flags dbus.Flags, value float64) error {
	return (<-v.GoSetFade(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetMute

func (v *interfaceSource) GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetMute", flags, ch, value)
}

func (v *interfaceSource) SetMute(flags dbus.Flags, value bool) error {
	return (<-v.GoSetMute(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetPort

func (v *interfaceSource) GoSetPort(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetPort", flags, ch, name)
}

func (v *interfaceSource) SetPort(flags dbus.Flags, name string) error {
	return (<-v.GoSetPort(flags, make(chan *dbus.Call, 1), name).Done).Err
}

// method SetVolume

func (v *interfaceSource) GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetVolume", flags, ch, value, isPlay)
}

func (v *interfaceSource) SetVolume(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetVolume(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// property Mute b

func (v *interfaceSource) Mute() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "Mute",
	}
}

// property Balance d

func (v *interfaceSource) Balance() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Balance",
	}
}

// property SupportBalance b

func (v *interfaceSource) SupportBalance() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportBalance",
	}
}

// property Fade d

func (v *interfaceSource) Fade() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Fade",
	}
}

// property Ports a(ssy)

func (v *interfaceSource) Ports() PropPortInfoSlice {
	return &implPropPortInfoSlice{
		Impl: v,
		Name: "Ports",
	}
}

// property Card u

func (v *interfaceSource) Card() proxy.PropUint32 {
	return &proxy.ImplPropUint32{
		Impl: v,
		Name: "Card",
	}
}

// property BaseVolume d

func (v *interfaceSource) BaseVolume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "BaseVolume",
	}
}

// property Description s

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

// property Volume d

func (v *interfaceSource) Volume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Volume",
	}
}

// property SupportFade b

func (v *interfaceSource) SupportFade() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportFade",
	}
}

// property ActivePort (ssy)

func (v *interfaceSource) ActivePort() PropPortInfo {
	return &implPropPortInfo{
		Impl: v,
		Name: "ActivePort",
	}
}

// property Name s

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

type SinkInput interface {
	sinkInput // interface org.deepin.dde.Audio1.SinkInput
	proxy.Object
}

type objectSinkInput struct {
	interfaceSinkInput // interface org.deepin.dde.Audio1.SinkInput
	proxy.ImplObject
}

func NewSinkInput(conn *dbus.Conn, path dbus.ObjectPath) (SinkInput, error) {
	if !path.IsValid() {
		return nil, errors.New("path is invalid")
	}
	obj := new(objectSinkInput)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Audio1", path)
	return obj, nil
}

type sinkInput interface {
	GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetBalance(flags dbus.Flags, value float64, isPlay bool) error
	GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call
	SetFade(flags dbus.Flags, value float64) error
	GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call
	SetMute(flags dbus.Flags, value bool) error
	GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call
	SetVolume(flags dbus.Flags, value float64, isPlay bool) error
	Volume() proxy.PropDouble
	Balance() proxy.PropDouble
	SupportBalance() proxy.PropBool
	Fade() proxy.PropDouble
	SupportFade() proxy.PropBool
	Name() proxy.PropString
	Icon() proxy.PropString
	Mute() proxy.PropBool
}

type interfaceSinkInput struct{}

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

func (*interfaceSinkInput) GetInterfaceName_() string {
	return "org.deepin.dde.Audio1.SinkInput"
}

// method SetBalance

func (v *interfaceSinkInput) GoSetBalance(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetBalance", flags, ch, value, isPlay)
}

func (v *interfaceSinkInput) SetBalance(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetBalance(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// method SetFade

func (v *interfaceSinkInput) GoSetFade(flags dbus.Flags, ch chan *dbus.Call, value float64) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetFade", flags, ch, value)
}

func (v *interfaceSinkInput) SetFade(flags dbus.Flags, value float64) error {
	return (<-v.GoSetFade(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetMute

func (v *interfaceSinkInput) GoSetMute(flags dbus.Flags, ch chan *dbus.Call, value bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetMute", flags, ch, value)
}

func (v *interfaceSinkInput) SetMute(flags dbus.Flags, value bool) error {
	return (<-v.GoSetMute(flags, make(chan *dbus.Call, 1), value).Done).Err
}

// method SetVolume

func (v *interfaceSinkInput) GoSetVolume(flags dbus.Flags, ch chan *dbus.Call, value float64, isPlay bool) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".SetVolume", flags, ch, value, isPlay)
}

func (v *interfaceSinkInput) SetVolume(flags dbus.Flags, value float64, isPlay bool) error {
	return (<-v.GoSetVolume(flags, make(chan *dbus.Call, 1), value, isPlay).Done).Err
}

// property Volume d

func (v *interfaceSinkInput) Volume() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Volume",
	}
}

// property Balance d

func (v *interfaceSinkInput) Balance() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Balance",
	}
}

// property SupportBalance b

func (v *interfaceSinkInput) SupportBalance() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportBalance",
	}
}

// property Fade d

func (v *interfaceSinkInput) Fade() proxy.PropDouble {
	return &proxy.ImplPropDouble{
		Impl: v,
		Name: "Fade",
	}
}

// property SupportFade b

func (v *interfaceSinkInput) SupportFade() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "SupportFade",
	}
}

// property Name s

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

// property Icon s

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

// property Mute b

func (v *interfaceSinkInput) Mute() proxy.PropBool {
	return &proxy.ImplPropBool{
		Impl: v,
		Name: "Mute",
	}
}

type PropPortInfoSlice interface {
	Get(flags dbus.Flags) (value []PortInfo, err error)
	Set(flags dbus.Flags, value []PortInfo) error
	ConnectChanged(cb func(hasValue bool, value []PortInfo)) error
}

type implPropPortInfoSlice struct {
	Impl proxy.Implementer
	Name string
}

func (p implPropPortInfoSlice) Get(flags dbus.Flags) (value []PortInfo, err error) {
	err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
		p.Name, &value)
	return
}

func (p implPropPortInfoSlice) Set(flags dbus.Flags, value []PortInfo) error {
	return p.Impl.GetObject_().SetProperty_(flags, p.Impl.GetInterfaceName_(), p.Name, value)
}

func (p implPropPortInfoSlice) ConnectChanged(cb func(hasValue bool, value []PortInfo)) error {
	if cb == nil {
		return errors.New("nil callback")
	}
	cb0 := func(hasValue bool, value interface{}) {
		if hasValue {
			var v []PortInfo
			err := dbus.Store([]interface{}{value}, &v)
			if err != nil {
				return
			}
			cb(true, v)
		} else {
			cb(false, nil)
		}
	}
	return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
		p.Name, cb0)
}

type PropPortInfo interface {
	Get(flags dbus.Flags) (value PortInfo, err error)
	Set(flags dbus.Flags, value PortInfo) error
	ConnectChanged(cb func(hasValue bool, value PortInfo)) error
}

type implPropPortInfo struct {
	Impl proxy.Implementer
	Name string
}

func (p implPropPortInfo) Get(flags dbus.Flags) (value PortInfo, err error) {
	err = p.Impl.GetObject_().GetProperty_(flags, p.Impl.GetInterfaceName_(),
		p.Name, &value)
	return
}

func (p implPropPortInfo) Set(flags dbus.Flags, value PortInfo) error {
	return p.Impl.GetObject_().SetProperty_(flags, p.Impl.GetInterfaceName_(), p.Name, value)
}

func (p implPropPortInfo) ConnectChanged(cb func(hasValue bool, value PortInfo)) error {
	if cb == nil {
		return errors.New("nil callback")
	}
	cb0 := func(hasValue bool, value interface{}) {
		if hasValue {
			var v PortInfo
			err := dbus.Store([]interface{}{value}, &v)
			if err != nil {
				return
			}
			cb(true, v)
		} else {
			cb(false, PortInfo{})
		}
	}
	return p.Impl.GetObject_().ConnectPropertyChanged_(p.Impl.GetInterfaceName_(),
		p.Name, cb0)
}
