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, ...@@ -369,7 +369,7 @@ func (m *Manager) handleRequest(cmixMsg format.Message,
partnerID, rndNum) partnerID, rndNum)
cbList := m.resetCallbacks.Get(c.ID) cbList := m.resetCallbacks.Get(c.ID)
for _, cb := range cbList { for _, cb := range cbList {
ccb := cb.(interfaces.ResetCallback) ccb := cb.(interfaces.ResetNotificationCallback)
go ccb(c) go ccb(c)
} }
} }
......
...@@ -102,7 +102,7 @@ func (m *Manager) RemoveSpecificConfirmCallback(id *id.ID) { ...@@ -102,7 +102,7 @@ func (m *Manager) RemoveSpecificConfirmCallback(id *id.ID) {
} }
// Adds a general callback to be used on auth session renegotiations. // 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) m.resetCallbacks.AddOverride(cb)
} }
......
...@@ -84,7 +84,7 @@ func (c *Client) ResetSession(recipientMarshaled, ...@@ -84,7 +84,7 @@ func (c *Client) ResetSession(recipientMarshaled,
// RegisterAuthCallbacks registers all callbacks for authenticated channels. // RegisterAuthCallbacks registers all callbacks for authenticated channels.
// This can only be called once // This can only be called once
func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback, func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback,
confirm AuthConfirmCallback, reset AuthResetCallback) { confirm AuthConfirmCallback, reset AuthResetNotificationCallback) {
requestFunc := func(requestor contact.Contact) { requestFunc := func(requestor contact.Contact) {
requestorBind := &Contact{c: &requestor} requestorBind := &Contact{c: &requestor}
...@@ -103,7 +103,7 @@ func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback, ...@@ -103,7 +103,7 @@ func (c *Client) RegisterAuthCallbacks(request AuthRequestCallback,
c.api.GetAuthRegistrar().AddGeneralConfirmCallback(confirmFunc) c.api.GetAuthRegistrar().AddGeneralConfirmCallback(confirmFunc)
c.api.GetAuthRegistrar().AddGeneralRequestCallback(requestFunc) c.api.GetAuthRegistrar().AddGeneralRequestCallback(requestFunc)
c.api.GetAuthRegistrar().AddResetCallback(resetFunc) c.api.GetAuthRegistrar().AddResetNotificationCallback(resetFunc)
} }
// ConfirmAuthenticatedChannel creates an authenticated channel out of a valid // ConfirmAuthenticatedChannel creates an authenticated channel out of a valid
......
...@@ -62,7 +62,7 @@ type AuthConfirmCallback interface { ...@@ -62,7 +62,7 @@ type AuthConfirmCallback interface {
// AuthRequestCallback notifies the register whenever they receive an auth // AuthRequestCallback notifies the register whenever they receive an auth
// request // request
type AuthResetCallback interface { type AuthResetNotificationCallback interface {
Callback(requestor *Contact) Callback(requestor *Contact)
} }
......
...@@ -14,7 +14,7 @@ import ( ...@@ -14,7 +14,7 @@ import (
type RequestCallback func(requestor contact.Contact) type RequestCallback func(requestor contact.Contact)
type ConfirmCallback func(partner contact.Contact) type ConfirmCallback func(partner contact.Contact)
type ResetCallback func(partner contact.Contact) type ResetNotificationCallback func(partner contact.Contact)
type Auth interface { type Auth interface {
// Adds a general callback to be used on auth requests. This will be preempted // Adds a general callback to be used on auth requests. This will be preempted
...@@ -43,8 +43,8 @@ type Auth interface { ...@@ -43,8 +43,8 @@ type Auth interface {
AddSpecificConfirmCallback(id *id.ID, cb ConfirmCallback) AddSpecificConfirmCallback(id *id.ID, cb ConfirmCallback)
// Removes a specific callback to be used on auth confirm. // Removes a specific callback to be used on auth confirm.
RemoveSpecificConfirmCallback(id *id.ID) RemoveSpecificConfirmCallback(id *id.ID)
// Add a callback to receive session renegotiations // Add a callback to receive session renegotiation notifications
AddResetCallback(cb ResetCallback) AddResetNotificationCallback(cb ResetNotificationCallback)
//Replays all pending received requests over tha callbacks //Replays all pending received requests over tha callbacks
ReplayRequests() ReplayRequests()
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment