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 Factory ¶
type Factory func(*config.ApplicationConfig, *config.Account, func(tls.Verifier, tls.Factory) xi.Dialer) Session
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
Click to show internal directories.
Click to hide internal directories.