Documentation ¶
Overview ¶
Package event contains events that may be emitted by the client.
Index ¶
- type ChatMessage
- type CloseChat
- type Connected
- type DeleteBookmark
- type DeleteRosterItem
- type ExecCommand
- type FetchBookmarks
- type FetchRoster
- type HistoryMessage
- type LoadingCommands
- type NewCaps
- type NewFeatures
- type OpenChannel
- type OpenChat
- type PullToRefreshChat
- type Receipt
- type StatusAway
- type StatusBusy
- type StatusOffline
- type StatusOnline
- type Subscribe
- type UpdateBookmark
- type UpdateRoster
- type UploadFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatMessage ¶
type ChatMessage struct { stanza.Message Body string `xml:"body,omitempty"` OriginID stanza.OriginID `xml:"urn:xmpp:sid:0 origin-id"` SID []stanza.ID `xml:"urn:xmpp:sid:0 stanza-id"` Delay delay.Delay `xml:"urn:xmpp:delay delay"` // Sent is true if this message is one that we sent from another device (for // example, a message forwarded to us by message carbons). Sent bool `xml:"-"` // Account is true if this message was sent by the server (empty from, or // from matching the bare JID of the authenticated account). Account bool `xml:"-"` }
ChatMessage is sent when messages of type "chat" or "normal" are received or sent.
type Connected ¶
type Connected struct{}
Connected is sent immediately after the connection is esablished.
type DeleteBookmark ¶
DeleteBookmark is sent when a bookmark has been removed.
type DeleteRosterItem ¶
DeleteRosterItem is sent when a roster item has been removed (eg. after UpdateRoster triggers a removal or it is removed in the UI).
type ExecCommand ¶
ExecCommand is sent by the UI when an ad-hoc command should be executed.
type FetchBookmarks ¶
type FetchBookmarks struct {
Items <-chan UpdateBookmark
}
FetchBookmarks is sent when the full list of bookmarks is fetched.
type FetchRoster ¶
type FetchRoster struct { Ver string Items <-chan UpdateRoster }
FetchRoster is sent when a roster is fetched.
type HistoryMessage ¶
type HistoryMessage struct { stanza.Message Result struct { QueryID string `xml:"queryid,attr"` ID string `xml:"id,attr"` Forward struct { forward.Forwarded Msg ChatMessage `xml:"jabber:client message"` } `xml:"urn:xmpp:forward:0 forwarded"` } `xml:"urn:xmpp:mam:2 result"` }
HistoryMessage is sent on incoming messages resulting from a history query.
type LoadingCommands ¶
LoadingCommands is sent by the UI when the ad-hoc command window opens.
type NewFeatures ¶
NewFeatures is sent when entity features should be refreshed.
type OpenChannel ¶
OpenChannel is sent when a bookmark is selected.
type PullToRefreshChat ¶
PullToRefreshChat is sent when we scroll up while already at the top of the history or when we simply scroll to the top of the history.
type Receipt ¶
type Receipt string
Receipt is sent when a message receipt is received and represents the ID of the message that should be marked as received. It may be sent by itself, or in addition to a ChatMessage event (or others) if the payload containing the receipt also contains other events.
type StatusAway ¶
StatusAway is sent when the user should change their status to away.
type StatusBusy ¶
StatusBusy is sent when the user should change their status to busy.
type StatusOffline ¶
StatusOffline is sent when the user should go offline.
type StatusOnline ¶
StatusOnline is sent when the user should come online.
type UpdateBookmark ¶
UpdateBookmark is sent when a bookmark should be updated (eg. if you have subscribed to bookmark updates and received a push).
type UpdateRoster ¶
UpdateRoster is sent when a roster item should be updated (eg. after a roster push).
type UploadFile ¶
type UploadFile struct { Path string Message ChatMessage }
UploadFile is sent to instruct the client to perform HTTP upload.