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

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

import (
	"unsafe"

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

type OSD interface {
	osd // interface org.deepin.dde.Osd1
	proxy.Object
}

type objectOSD struct {
	interfaceOsd // interface org.deepin.dde.Osd1
	proxy.ImplObject
}

func NewOSD(conn *dbus.Conn) OSD {
	obj := new(objectOSD)
	obj.ImplObject.Init_(conn, "org.deepin.dde.Osd1", "/")
	return obj
}

type osd interface {
	GoShowOSD(flags dbus.Flags, ch chan *dbus.Call, osd string) *dbus.Call
	ShowOSD(flags dbus.Flags, osd string) error
}

type interfaceOsd struct{}

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

func (*interfaceOsd) GetInterfaceName_() string {
	return "org.deepin.dde.Osd1"
}

// method ShowOSD

func (v *interfaceOsd) GoShowOSD(flags dbus.Flags, ch chan *dbus.Call, osd string) *dbus.Call {
	return v.GetObject_().Go_(v.GetInterfaceName_()+".ShowOSD", flags, ch, osd)
}

func (v *interfaceOsd) ShowOSD(flags dbus.Flags, osd string) error {
	return (<-v.GoShowOSD(flags, make(chan *dbus.Call, 1), osd).Done).Err
}
