// Adds a OnChangeCallback identified with the given key.
// If a callback is already defined for that name, it is overwritten
17642
func (s *Settings) AddOnChange(key string, cb OnChangeCallback) {
	s.lock.Lock()
	defer s.lock.Unlock()
	if s.onChangeCallbacks == nil {
		s.onChangeCallbacks = make(map[string]OnChangeCallback)
	}
	s.onChangeCallbacks[key] = cb
}
1103976
func stateChangeCallback(a *C.utp_callback_arguments) C.uint64 {
	s := libContextToSocket[a.context]
	c := s.conns[a.socket]
	if logCallbacks {
		Logger.Printf("state changed: conn %p: %s", c, libStateName(a.state()))
	}
	switch a.state() {
	case C.UTP_STATE_CONNECT:
		c.setConnected()
		// A dialled connection will not tell the remote it's ready until it
		// writes. If the dialer has no intention of writing, this will stall
		// everything. We do an empty write to get things rolling again. This
		// circumstance occurs when c1 in the RacyRead nettest is the dialer.
		C.utp_write(a.socket, nil, 0)
	case C.UTP_STATE_WRITABLE:
		c.cond.Broadcast()
	case C.UTP_STATE_EOF:
		c.setGotEOF()
	case C.UTP_STATE_DESTROYING:
		c.onDestroyed()
		s.onLibSocketDestroyed(a.socket)
	default:
		panic(a.state)
	}
	return 0
}
941246
func (s *CreateRuleInput) SetChangeToken(v string) *CreateRuleInput {
	s.ChangeToken = &v
	return s
}
261419
func (lobby *Lobby) OnChange(base bool) {
	switch lobby.State {
	case Waiting, InProgress, ReadyingUp:
		BroadcastLobby(lobby)
		if base {
			BroadcastLobbyList()
		}
	}
}
1222982
func (s *CreateSqlInjectionMatchSetInput) SetChangeToken(v string) *CreateSqlInjectionMatchSetInput {
	s.ChangeToken = &v
	return s
}
662877
func (l Listener) OnChannelChange(e *gumble.ChannelChangeEvent) {
	if l.ChannelChange != nil {
		l.ChannelChange(e)
	}
}
527346
func (cl *memChangelist) Add(c Change) error {
	cl.changes = append(cl.changes, c)
	return nil
}
142047
func (s *DeleteRegexPatternSetOutput) SetChangeToken(v string) *DeleteRegexPatternSetOutput {
	s.ChangeToken = &v
	return s
}
635658
func SelectionChange(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "selectionchange", Listener: listener}
}
1050329
func (s *CreateWebACLOutput) SetChangeToken(v string) *CreateWebACLOutput {
	s.ChangeToken = &v
	return s
}
22806
func domainEventBalloonChangeCallback(c C.virConnectPtr, d C.virDomainPtr,
	actual uint64, opaque int) {

	domain := VirDomain{ptr: d}
	connection := VirConnection{ptr: c}

	eventDetails := DomainBalloonChangeEvent{
		Actual: actual,
	}

	callDomainCallbackId(opaque, &connection, &domain, eventDetails)
}
371073
func (c *Callbacks) OnCUserMessageKeyHintText(fn func(*dota.CUserMessageKeyHintText) error) {
	c.onCUserMessageKeyHintText = append(c.onCUserMessageKeyHintText, fn)
}
256478
func NewChange(key string, value proto.Message, rev int64, changeType datasync.Op) *Change {
	return &Change{
		changeType: changeType,
		KeyVal:     &KeyVal{key, &lazyProto{value}, rev},
	}
}
476701
func (c *Callbacks) OnCMsgClearEntityDecalsEvent(fn func(*dota.CMsgClearEntityDecalsEvent) error) {
	c.onCMsgClearEntityDecalsEvent = append(c.onCMsgClearEntityDecalsEvent, fn)
}
1071927
func (s *UpdateByteMatchSetInput) SetChangeToken(v string) *UpdateByteMatchSetInput {
	s.ChangeToken = &v
	return s
}
561548
func (s *DeleteGeoMatchSetOutput) SetChangeToken(v string) *DeleteGeoMatchSetOutput {
	s.ChangeToken = &v
	return s
}
713046
func (s *DeleteRuleGroupInput) SetChangeToken(v string) *DeleteRuleGroupInput {
	s.ChangeToken = &v
	return s
}