/*This file is automatically generated by pkg.deepin.io/dbus-generator. Don't edit it*/
package grub2ext

import "pkg.deepin.io/lib/dbus"
import "pkg.deepin.io/lib/dbus/property"
import "reflect"
import "sync"
import "runtime"
import "fmt"
import "errors"

/*prevent compile error*/
var _ = fmt.Println
var _ = runtime.SetFinalizer
var _ = sync.NewCond
var _ = reflect.TypeOf
var _ = property.BaseObserver{}

type Grub2Ext struct {
	Path     dbus.ObjectPath
	DestName string
	core     *dbus.Object
}

func (obj *Grub2Ext) DoGenerateGrubMenu() (arg0 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoGenerateGrubMenu", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoGenerateThemeBackground(arg0 uint16, arg1 uint16) (arg2 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoGenerateThemeBackground", 0, arg0, arg1).Store(&arg2)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoResetThemeBackground() (arg0 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoResetThemeBackground", 0).Store(&arg0)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoSetThemeBackgroundSourceFile(arg0 string, arg1 uint16, arg2 uint16) (arg3 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoSetThemeBackgroundSourceFile", 0, arg0, arg1, arg2).Store(&arg3)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoWriteConfig(arg0 string) (arg1 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoWriteConfig", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoWriteGrubSettings(arg0 string) (arg1 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoWriteGrubSettings", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoWriteThemeMainFile(arg0 string) (arg1 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoWriteThemeMainFile", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Grub2Ext) DoWriteThemeTplFile(arg0 string) (arg1 bool, _err error) {
	_err = obj.core.Call("com.deepin.daemon.Grub2Ext.DoWriteThemeTplFile", 0, arg0).Store(&arg1)
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func NewGrub2Ext(destName string, path dbus.ObjectPath) (*Grub2Ext, error) {
	if !path.IsValid() {
		return nil, errors.New("The path of '" + string(path) + "' is invalid.")
	}

	core := getBus().Object(destName, path)

	obj := &Grub2Ext{Path: path, DestName: destName, core: core}

	return obj, nil
}
