summaryrefslogtreecommitdiff
path: root/rhimport/session.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-14 22:33:17 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-14 22:33:17 (GMT)
commit82a53d6d2801a7b6c0dc0ea06172a26e9de9f39e (patch)
tree11f89f620d6d6d75b322222a79ffd18cd681b9f4 /rhimport/session.go
parent79dfe23a8cfabe4688a3b05998178a11ea51150c (diff)
include cart/cut in progress if available
Diffstat (limited to 'rhimport/session.go')
-rw-r--r--rhimport/session.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/rhimport/session.go b/rhimport/session.go
index f260aaa..2059525 100644
--- a/rhimport/session.go
+++ b/rhimport/session.go
@@ -72,6 +72,8 @@ type ProgressData struct {
StepName string
Current float64
Total float64
+ Cart uint
+ Cut uint
}
type sessionAddProgressHandlerResponse struct {
@@ -94,9 +96,9 @@ type sessionAddDoneHandlerRequest struct {
response chan<- sessionAddDoneHandlerResponse
}
-func sessionProgressCallback(step int, stepName string, current, total float64, userdata interface{}) bool {
+func sessionProgressCallback(step int, stepName string, current, total float64, cart, cut uint, userdata interface{}) bool {
out := userdata.(chan<- ProgressData)
- out <- ProgressData{step, stepName, current, total}
+ out <- ProgressData{step, stepName, current, total, cart, cut}
return true
}
@@ -173,7 +175,7 @@ func (self *Session) addDoneHandler(userdata interface{}, cb DoneCB) (resp sessi
func (self *Session) callProgressHandler(p *ProgressData) {
for _, cb := range self.progressCBs {
if cb.cb != nil {
- if keep := cb.cb(p.Step, p.StepName, p.Current, p.Total, cb.userdata); !keep {
+ if keep := cb.cb(p.Step, p.StepName, p.Current, p.Total, p.Cart, p.Cut, cb.userdata); !keep {
cb.cb = nil
}
}