xep0115

package
v0.0.0-...-aeec266 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EntityCaps

type EntityCaps struct {
	// contains filtered or unexported fields
}

EntityCaps represents global entity capabilities module

func New

func New(router router.Router, presencesRep repository.Presences, allocationID string) *EntityCaps

New returns a new presence hub instance.

func (*EntityCaps) MatchesIQ

func (x *EntityCaps) MatchesIQ(iq *xmpp.IQ) bool

MatchesIQ returns whether or not an IQ should be processed by the roster module.

func (*EntityCaps) PresencesMatchingJID

func (x *EntityCaps) PresencesMatchingJID(ctx context.Context, jid *jid.JID) ([]capsmodel.PresenceCaps, error)

PresencesMatchingJID returns current online presences matching a given JID.

func (*EntityCaps) ProcessIQ

func (x *EntityCaps) ProcessIQ(ctx context.Context, iq *xmpp.IQ)

ProcessIQ processes a roster IQ taking according actions over the associated stream.

func (*EntityCaps) RegisterPresence

func (x *EntityCaps) RegisterPresence(ctx context.Context, presence *xmpp.Presence) (alreadyRegistered bool, err error)

RegisterPresence keeps track of a new client presence, requesting capabilities when necessary.

func (*EntityCaps) Shutdown

func (x *EntityCaps) Shutdown() error

Shutdown shuts down blocking module.

func (*EntityCaps) UnregisterPresence

func (x *EntityCaps) UnregisterPresence(ctx context.Context, jid *jid.JID) error

UnregisterPresence removes a presence from the hub.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL