presence

package
v0.0.0-...-ee83f8d Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presence

type Presence struct {
	RequestHandler
	UpdateHandler
	// contains filtered or unexported fields
}

Presence holds the state of the presence service

func (*Presence) Allow

func (p *Presence) Allow(jid xmpp.JID)

Allow user to subscribe

func (*Presence) Deny

func (p *Presence) Deny(jid xmpp.JID)

Deny user to subscribe

func (*Presence) HandlePresence

func (p *Presence) HandlePresence(pres *xmpp.Presence)

func (*Presence) HandleStanza

func (p *Presence) HandleStanza(s xmpp.Stanza)

func (*Presence) Offline

func (p *Presence) Offline(error)

func (*Presence) Online

func (p *Presence) Online(s xmpp.Session)

func (*Presence) SetPriority

func (p *Presence) SetPriority(priority int)

SetPriority sets resource priority

func (*Presence) SetShow

func (p *Presence) SetShow(show string)

SetShow sets presence type (away, xa, dnd, chat or an empty string)

func (*Presence) SetStatus

func (p *Presence) SetStatus(status string)

SetStatus sets the status text

func (*Presence) Subscribe

func (p *Presence) Subscribe(jid xmpp.JID)

Subscribe to a user's presence

func (*Presence) Unsubscribe

func (p *Presence) Unsubscribe(jid xmpp.JID)

Unsubscribe from a user's presence

type Request

type Request struct {
	JID xmpp.JID
	// contains filtered or unexported fields
}

func (*Request) Allow

func (req *Request) Allow()

func (*Request) Deny

func (req *Request) Deny()

type RequestHandler

type RequestHandler func(*Request)

type Update

type Update struct {
	JID      xmpp.JID
	Online   bool
	Status   string
	Show     string
	Priority int
}

type UpdateHandler

type UpdateHandler func(*Update)

Jump to

Keyboard shortcuts

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