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

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 Logger struct {
	Path     dbus.ObjectPath
	DestName string
	core     *dbus.Object
}

func (obj *Logger) Debug(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.api.Logger.Debug", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Logger) Error(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.api.Logger.Error", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

func (obj *Logger) Fatal(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.api.Logger.Fatal", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

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

func (obj *Logger) Info(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.api.Logger.Info", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

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

func (obj *Logger) Warning(arg0 string, arg1 string, arg2 string) (_err error) {
	_err = obj.core.Call("com.deepin.api.Logger.Warning", 0, arg0, arg1, arg2).Store()
	if _err != nil {
		fmt.Println(_err)
	}
	return
}

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

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

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

	return obj, nil
}
