access

package
v0.3.6-pre2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector interface {
	Connect()
}

Connector represents something that connect

type EventHandler

type EventHandler interface {
	RegisterCallback(title, instructions string, fields []interface{}) error
}

EventHandler represents the main notifications that the session can emit It's really more an observer than an even handler

type Factory

Factory is a function that can create new Sessions

type OfflineError

type OfflineError struct {
	Msg string
}

OfflineError is returned when we try to do an action that can only be done when online

func (*OfflineError) Error

func (v *OfflineError) Error() string

type Session

type Session interface {
	ApprovePresenceSubscription(string, string) error
	AutoApprove(string)
	AwaitVersionReply(<-chan data.Stanza, string)
	Close()
	CommandManager() client.CommandManager
	Config() *config.ApplicationConfig
	Conn() xi.Conn
	Connect(string, tls.Verifier) error
	ConversationManager() client.ConversationManager
	DenyPresenceSubscription(string, string) error
	DisplayName() string
	EncryptAndSendTo(string, string, string) error
	GetConfig() *config.Account
	GroupDelimiter() string
	HandleConfirmOrDeny(string, bool)
	IsConnected() bool
	IsDisconnected() bool
	OtrEventHandler() map[string]*event.OtrEventHandler
	PrivateKeys() []otr3.PrivateKey
	R() *roster.List
	ReloadKeys()
	RemoveContact(string)
	RequestPresenceSubscription(string, string) error
	Send(string, string, string) error
	SetCommandManager(client.CommandManager)
	SetConnectionLogger(io.Writer)
	SetConnector(Connector)
	SetLastActionTime(time.Time)
	SetSessionEventHandler(EventHandler)
	SetWantToBeOnline(bool)
	Subscribe(chan<- interface{})
	Timeout(data.Cookie, time.Time)
}

Session is an interface that defines the functionality of a Session

Jump to

Keyboard shortcuts

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