access

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: GPL-3.0 Imports: 12 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(jid.WithoutResource, string) error
	AutoApprove(string)
	AwaitVersionReply(<-chan data.Stanza, string)
	Close()
	CommandManager() otr_client.CommandManager
	Config() *config.ApplicationConfig
	Conn() xi.Conn
	Connect(string, tls.Verifier) error
	ConversationManager() otr_client.ConversationManager
	CreateSymmetricKeyFor(jid.Any) []byte
	DenyPresenceSubscription(jid.WithoutResource, string) error
	DisplayName() string
	EncryptAndSendTo(jid.Any, string) (int, bool, error)
	GetConfig() *config.Account
	GetInMemoryLog() *bytes.Buffer
	GroupDelimiter() string
	HandleConfirmOrDeny(jid.WithoutResource, bool)
	IsConnected() bool
	IsDisconnected() bool
	ManuallyEndEncryptedChat(jid.Any) error
	PrivateKeys() []otr3.PrivateKey
	R() *roster.List
	ReloadKeys()
	RemoveContact(string)
	RequestPresenceSubscription(jid.WithoutResource, string) error
	Send(jid.Any, string) error
	SendPing()
	SetCommandManager(otr_client.CommandManager)
	SetConnectionLogger(io.Writer)
	SetConnector(Connector)
	SetLastActionTime(time.Time)
	SetSessionEventHandler(EventHandler)
	SetWantToBeOnline(bool)
	Subscribe(chan<- interface{})
	Timeout(data.Cookie, time.Time)
	Info(string)
	Warn(string)
	SendIQError(*data.ClientIQ, interface{})
	SendIQResult(*data.ClientIQ, interface{})
	PublishEvent(interface{})
	SendFileTo(jid.Any, string, bool) *sdata.FileTransferControl
	SendDirTo(jid.Any, string, bool) *sdata.FileTransferControl
	StartSMP(jid.WithResource, string, string)
	FinishSMP(jid.WithResource, string)
	AbortSMP(jid.WithResource)
}

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