Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 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 EncryptAndSendTo(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) 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
Click to show internal directories.
Click to hide internal directories.