Skip to content
Snippets Groups Projects
Commit cf3209e7 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

ResetCallback -> ResetNotificationCallback

parent 4003d906
No related branches found
No related tags found
3 merge requests!231Revert "Update store to print changes to the partners list",!187Xx 3829/triggers,!184Cleanup for ResetSession
......@@ -369,7 +369,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
partnerID, rndNum)
cbList := m.resetCallbacks.Get(c.ID)
for _, cb := range cbList {
ccb := cb.(interfaces.ResetCallback)
ccb := cb.(interfaces.ResetNotificationCallback)
go ccb(c)
}
}
......
......@@ -102,7 +102,7 @@ func (m *Manager) RemoveSpecificConfirmCallback(id *id.ID) {
}
// Adds a general callback to be used on auth session renegotiations.
func (m *Manager) AddResetCallback(cb interfaces.ResetCallback) {
func (m *Manager) AddResetNotificationCallback(cb interfaces.ResetNotificationCallback) {
m.resetCallbacks.AddOverride(cb)
}
......
......@@ -84,7 +84,7 @@ func (c *Client) ResetSession(recipientMarshaled,
// RegisterAuthCallbacks registers all callbacks for authenticated channels.
// This can only be called once
func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback,
confirm AuthConfirmCallback, reset AuthResetCallback) {
confirm AuthConfirmCallback, reset AuthResetNotificationCallback) {
requestFunc := func(requestor contact.Contact) {
requestorBind := &Contact{c: &requestor}
......@@ -103,7 +103,7 @@ func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback,
c.api.GetAuthRegistrar().AddGeneralConfirmCallback(confirmFunc)
c.api.GetAuthRegistrar().AddGeneralRequestCallback(requestFunc)
c.api.GetAuthRegistrar().AddResetCallback(resetFunc)
c.api.GetAuthRegistrar().AddResetNotificationCallback(resetFunc)
}
// ConfirmAuthenticatedChannel creates an authenticated channel out of a valid
......
......@@ -62,7 +62,7 @@ type AuthConfirmCallback interface {
// AuthRequestCallback notifies the register whenever they receive an auth
// request
type AuthResetCallback interface {
type AuthResetNotificationCallback interface {
Callback(requestor *Contact)
}
......
......@@ -14,7 +14,7 @@ import (
type RequestCallback func(requestor contact.Contact)
type ConfirmCallback func(partner contact.Contact)
type ResetCallback func(partner contact.Contact)
type ResetNotificationCallback func(partner contact.Contact)
type Auth interface {
// Adds a general callback to be used on auth requests. This will be preempted
......@@ -43,8 +43,8 @@ type Auth interface {
AddSpecificConfirmCallback(id *id.ID, cb ConfirmCallback)
// Removes a specific callback to be used on auth confirm.
RemoveSpecificConfirmCallback(id *id.ID)
// Add a callback to receive session renegotiations
AddResetCallback(cb ResetCallback)
// Add a callback to receive session renegotiation notifications
AddResetNotificationCallback(cb ResetNotificationCallback)
//Replays all pending received requests over tha callbacks
ReplayRequests()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment