mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2026-09-06 13:34:36 +02:00
add warehouse code,pass 1st complie,app_notifier needs installation function
This commit is contained in:
47
Menu/GameShell/21_Warehouse/app_notifier.go
Normal file
47
Menu/GameShell/21_Warehouse/app_notifier.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package Warehouse
|
||||
|
||||
import(
|
||||
"log"
|
||||
//"os"
|
||||
"github.com/zyxar/argo/rpc"
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
type AppNotifier struct {
|
||||
Parent *WareHouse
|
||||
}
|
||||
|
||||
func (self AppNotifier) OnDownloadStart(events []rpc.Event) {
|
||||
log.Printf("warehouse %s started.", events)
|
||||
}
|
||||
|
||||
func (self AppNotifier) OnDownloadPause(events []rpc.Event){
|
||||
log.Printf("warehouse %s paused.", events)
|
||||
}
|
||||
|
||||
func (self AppNotifier) OnDownloadStop(events []rpc.Event){
|
||||
log.Printf("warehouse %s stopped.", events)
|
||||
}
|
||||
|
||||
|
||||
func (self AppNotifier) OnDownloadComplete(events []rpc.Event){
|
||||
|
||||
log.Printf("warehouse %s complete",events)
|
||||
for _,v := range events {
|
||||
self.Parent.OnAria2CompleteCb(v.Gid)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func (self AppNotifier) OnDownloadError(events []rpc.Event) {
|
||||
log.Printf("warehouse %s error.", events)
|
||||
}
|
||||
|
||||
func (self AppNotifier) OnBtDownloadComplete(events []rpc.Event) {
|
||||
|
||||
log.Printf("warehouse bt %s completed.", events)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user