roster

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2018 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubscriptionNone   = "none"
	SubscriptionFrom   = "from"
	SubscriptionTo     = "to"
	SubscriptionBoth   = "both"
	SubscriptionRemove = "remove"
)

roster subscription values

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config represents roster module configuration.

type Roster

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

Roster represents a roster server stream module.

func New

func New(cfg *Config, stm c2s.Stream) *Roster

New returns a roster server stream module.

func (*Roster) AssociatedNamespaces

func (r *Roster) AssociatedNamespaces() []string

AssociatedNamespaces returns namespaces associated with roster module.

func (*Roster) BroadcastPresence

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

BroadcastPresence broadcasts presence to all outbound roster contacts.

func (*Roster) BroadcastPresenceAndWait

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

BroadcastPresenceAndWait broadcasts presence to all outbound roster contacts in a synchronous manner.

func (*Roster) DeliverPendingApprovalNotifications

func (r *Roster) DeliverPendingApprovalNotifications()

DeliverPendingApprovalNotifications delivers any pending roster notification to the associated stream.

func (*Roster) Done

func (r *Roster) Done()

Done signals stream termination.

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) ReceivePresences

func (r *Roster) ReceivePresences()

ReceivePresences delivers all inbound roster available presences to the associated module stream.

Jump to

Keyboard shortcuts

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