forked from TokTok/go-toxcore-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hooks.go
25 lines (20 loc) · 766 Bytes
/
hooks.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package tox
type callHookMethods struct {
ConferenceJoin func(friendNumber uint32, groupNumber uint32, cookie string)
ConferenceDelete func(groupNumber uint32)
ConferenceNew func(groupNumber uint32)
ConferenceSetTitle func(groupNumber uint32, title string)
}
// include av group
func (this *Tox) HookConferenceJoin(fn func(friendNumber uint32, groupNumber uint32, cookie string)) {
this.hooks.ConferenceJoin = fn
}
func (this *Tox) HookConferenceDelete(fn func(groupNumber uint32)) {
this.hooks.ConferenceDelete = fn
}
func (this *Tox) HookConferenceNew(fn func(groupNumber uint32)) {
this.hooks.ConferenceDelete = fn
}
func (this *Tox) HookConferenceSetTitle(fn func(groupNumber uint32, title string)) {
this.hooks.ConferenceSetTitle = fn
}