You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

49 lines
944 B

package music
import (
"yunyan/comm"
"yunyan/modules"
"yunyan/lego/core"
)
func NewModule() core.IModule {
m := new(Music)
return m
}
type Music struct {
modules.ModuleBase
api *apiComp
model *modelComp
options *Options
}
func (this *Music) GetType() core.M_Modules {
return comm.ModuleMusic
}
func (this *Music) NewOptions() (options core.IModuleOptions) {
return new(Options)
}
func (this *Music) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
this.options = options.(*Options)
if err = this.ModuleBase.Init(service, module, options); err != nil {
return
}
return
}
func (this *Music) Start() (err error) {
if err = this.ModuleBase.Start(); err != nil {
return
}
return
}
func (this *Music) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.model = this.RegisterComp(new(modelComp)).(*modelComp)
}