roster

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnlinePresencesMatchingJID added in v0.3.0

func OnlinePresencesMatchingJID(j *jid.JID) []*xml.Presence

OnlinePresencesMatchingJID returns current online presences matching a given JID.

Types

type Config

type Config struct {
	Versioning bool `yaml:"versioning"`
}

Config represents a roster configuration.

type PresenceHandler added in v0.3.0

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

PresenceHandler represents a roster presence handler.

func NewPresenceHandler added in v0.3.0

func NewPresenceHandler(cfg *Config) *PresenceHandler

NewPresenceHandler returns a new presence handler instance.

func (*PresenceHandler) ProcessPresence added in v0.3.0

func (ph *PresenceHandler) ProcessPresence(presence *xml.Presence) error

ProcessPresence processes an incoming presence stanza.

type Roster

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

Roster represents a roster server stream module.

func New

func New(cfg *Config, stm stream.C2S) *Roster

New returns a roster server stream module.

func (*Roster) MatchesIQ

func (r *Roster) MatchesIQ(iq *xml.IQ) bool

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

func (*Roster) ProcessIQ

func (r *Roster) ProcessIQ(iq *xml.IQ)

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

func (*Roster) ProcessPresence

func (r *Roster) ProcessPresence(presence *xml.Presence)

ProcessPresence process an incoming roster presence.

func (*Roster) RegisterDisco added in v0.3.0

func (r *Roster) RegisterDisco(_ *xep0030.DiscoInfo)

RegisterDisco registers disco entity features/items associated to roster module.

Jump to

Keyboard shortcuts

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