summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/session.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-05 14:24:49 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-05 14:24:49 (GMT)
commitf2e1ae7dc36e6894d5f8e1d5b512d6b5437d4f21 (patch)
tree20da85381e31e530eaf01536d29a77d00ba4b8bf /src/helsinki.at/rhimport/session.go
parent7506bd000e605d2f8c4f7069e1fbf9e6022e3e71 (diff)
minor refactoring
Diffstat (limited to 'src/helsinki.at/rhimport/session.go')
-rw-r--r--src/helsinki.at/rhimport/session.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimport/session.go b/src/helsinki.at/rhimport/session.go
index 82ab3cf..80acee1 100644
--- a/src/helsinki.at/rhimport/session.go
+++ b/src/helsinki.at/rhimport/session.go
@@ -62,7 +62,7 @@ type SessionProgressCB struct {
}
type SessionDoneCB struct {
- cb func(ImportResult, interface{}) bool
+ cb ImportDoneCB
userdata interface{}
}
@@ -88,7 +88,7 @@ type sessionAddDoneHandlerResponse struct {
type sessionAddDoneHandlerRequest struct {
userdata interface{}
- callback func(ImportResult, interface{}) bool
+ callback ImportDoneCB
response chan<- sessionAddDoneHandlerResponse
}
@@ -148,7 +148,7 @@ func (self *Session) addProgressHandler(userdata interface{}, cb ImportProgressC
return
}
-func (self *Session) addDoneHandler(userdata interface{}, cb func(ImportResult, interface{}) bool) (resp sessionAddDoneHandlerResponse) {
+func (self *Session) addDoneHandler(userdata interface{}, cb ImportDoneCB) (resp sessionAddDoneHandlerResponse) {
if self.state != SESSION_NEW && self.state != SESSION_RUNNING {
resp.err = fmt.Errorf("session is already done/canceled")
}
@@ -262,7 +262,7 @@ func (self *SessionChan) AddProgressHandler(userdata interface{}, cb ImportProgr
return res.err
}
-func (self *SessionChan) AddDoneHandler(userdata interface{}, cb func(ImportResult, interface{}) bool) error {
+func (self *SessionChan) AddDoneHandler(userdata interface{}, cb ImportDoneCB) error {
resCh := make(chan sessionAddDoneHandlerResponse)
req := sessionAddDoneHandlerRequest{}
req.userdata = userdata