presencehub

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailablePresenceInfo

type AvailablePresenceInfo struct {
	Presence *xmpp.Presence
	Caps     *model.Capabilities
}

AvailablePresenceInfo contains an active presence reference along with its capabilities.

type PresenceHub

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

PresenceHub represents global presence hub

func New

func New(router *router.Router) *PresenceHub

New returns a new presence hub instance.

func (*PresenceHub) AvailablePresencesMatchingJID

func (x *PresenceHub) AvailablePresencesMatchingJID(j *jid.JID) []AvailablePresenceInfo

AvailablePresencesMatchingJID returns current online presences matching a given JID.

func (*PresenceHub) MatchesIQ

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

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

func (*PresenceHub) ProcessIQ

func (x *PresenceHub) ProcessIQ(iq *xmpp.IQ)

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

func (*PresenceHub) RegisterPresence

func (x *PresenceHub) RegisterPresence(presence *xmpp.Presence) (err error, alreadyRegistered bool)

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

func (*PresenceHub) Shutdown

func (x *PresenceHub) Shutdown() error

Shutdown shuts down blocking module.

func (*PresenceHub) UnregisterPresence

func (x *PresenceHub) UnregisterPresence(presence *xmpp.Presence)

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