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

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

import (
	"unsafe"

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

type CursorHelper interface {
	cursorHelper // interface org.deepin.dde.CursorHelper1
	proxy.Object
}

type objectCursorHelper struct {
	interfaceCursorHelper // interface org.deepin.dde.CursorHelper1
	proxy.ImplObject
}

func NewCursorHelper(conn *dbus.Conn) CursorHelper {
	obj := new(objectCursorHelper)
	obj.ImplObject.Init_(conn, "org.deepin.dde.CursorHelper1", "/org/deepin/dde/CursorHelper1")
	return obj
}

type cursorHelper interface {
	GoSet(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call
	Set(flags dbus.Flags, name string) error
}

type interfaceCursorHelper struct{}

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

func (*interfaceCursorHelper) GetInterfaceName_() string {
	return "org.deepin.dde.CursorHelper1"
}

// method Set

func (v *interfaceCursorHelper) GoSet(flags dbus.Flags, ch chan *dbus.Call, name string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".Set", flags, ch, name)
}

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