![]() |
![]() |
![]() |
![]() |
Home | Documentation ... Contact |
![]() |
The Jabber extension is used to send Jabber instant messages. The checkers weblication uses it to send player moves back and forth over the network in a two player game.
A Session is necessary for sending and receiving Messages and Presences (which are user status updates).
Constants |
|
readonly short MESSAGE_NORMAL |
|
readonly short MESSAGE_ERROR |
|
readonly short MESSAGE_CHAT |
|
readonly short MESSAGE_GROUPCHAT |
|
readonly short MESSAGE_HEADLINE |
|
readonly short STATUS_UNKNOWN |
|
readonly short STATUS_OFFLINE |
|
readonly short STATUS_ONLINE |
|
readonly short STATUS_CHAT |
|
readonly short STATUS_AWAY |
|
readonly short STATUS_XA |
|
readonly short STATUS_DND |
|
readonly short PRESENCE_SUBSCRIBED |
|
readonly short PRESENCE_UNSUBSCRIBED |
|
readonly short PRESENCE_AVAILABLE |
|
readonly short PRESENCE_UNAVAILABLE |
|
Constructors |
|
Session |
Creates a Jabber session. |
Message |
Creates a Jabber message. |
Presence |
Creates a Jabber presence. |
RosterItem |
Creates a Jabber roster item. |
Properties |
|
sashIJabberJID JID |
Access the JID. |
sashIJabberPresenceInfo PresenceInfo |
Access the current status. |
Event
|
Receiver prototype
|
Description
|
OnConnected |
handler(sashIJabberSession session) |
Fired when the session is connected. |
OnDisconnected |
handler(sashIJabberSession session) |
Fired when the session is discconnected. |
OnMessage |
handler(sashIJabberSession session,
sashIJabberMessage message) |
Fired when a message is received in a session. |
OnPresence |
handler(sashIJabberSession session,
sashIJabberPresence presence) |
Fired when a presence is received in a session. |
Properties |
|
string Username |
Username for a session. |
string Password |
Password for a session. |
string Resource |
|
readonly string JID |
Jabber ID for a session. |
Methods |
|
void Connect() |
|
void Disconnect() |
|
void SetPresence(short status,
string message) |
Sets a user's presence to some status with a message. |
void SendMessage(sashIJabberMessage message) |
Sends a Jabber message. |
void SendPresence(sashIJabberPresence presence) |
Sends a Jabber presence. |
void SendXML(string xml) |
Sends a string. |
Properties |
|
string ID |
|
string To |
|
string From |
|
short Status |
|
string StatusMsg |
|
string Priority |
|
short Type |
|
Methods |
|
void AddExtension(string xmlns
string xmlelement
string xml) |
|
void GetExtension(string xmlns
string xmlelement) |
Properties |
|
short Status |
|
string StatusMsg |
Properties |
|
string ID |
|
string To |
|
string From |
|
string Subject |
|
string Body |
|
string Thread |
|
short Type |
|
Methods |
|
void AddExtension(string xmlns
string xmlelement
string xml) |
|
void GetExtension(string xmlns
string xmlelement) |
Properties |
|
string JID |
|
string Nickname |
|
array Groups |
|
sashIJabberPresenceInfo Presence |
|
array Resources |
Methods |
|
string GetResource(string jid) |
|
string GetUserHost(string jid) |
|
string GetHost(string jid) |
|
string GetUser(string jid) |