JSJaC

## Class JSJaCPresence

    Object
       |
       +--JSJaCPacket
             |
             +--JSJaCPresence

class JSJaCPresence
extends JSJaCPacket

Models the XMPP notion of a 'presence' packet
Defined in JSJaCPacket.js

Fields inherited from class JSJaCPacket
`xml`

Constructor Summary
`JSJaCPresence()` A jabber/XMPP presence packet

Method Summary
`int` | `getPriority()` Gets the priority of this status message
`String` | `getShow()` Gets the status of this presence.
`String` | `getStatus()` Gets the status message of this presence
`JSJaCPacket` | `setPresence(<String> show,<String> status,<int> prio)` Some combined method that allowes for setting show, status and priority at once
`JSJaCPacket` | `setPriority(<int> prio)` Sets the priority of the resource bind to with this connection
`JSJaCPacket` | `setShow(<String> show)` Sets the online status for this presence packet.
`JSJaCPacket` | `setStatus(<String> status)` Sets the status message for current status.

Methods inherited from class JSJaCPacket
`pType, getDoc, getNode, setTo, setFrom, setID, setType, setXMLLang, getTo, getFrom, getToJID, getFromJID, getID, getType, getXMLLang, getXMLNS, getChild, getChildVal, clone, isError, errorReply, buildNode, appendNode`

Constructor Detail

### JSJaCPresence

    JSJaCPresence()

A jabber/XMPP presence packet

Method Detail

### getPriority

    int getPriority()

Gets the priority of this status message

Returns:

A resource priority

### getShow

    String getShow()

Gets the status of this presence. Either one of 'chat', 'away', 'xa' or 'dnd' or null.

Returns:

The status indicator as defined by XMPP

### getStatus

    String getStatus()

Gets the status message of this presence

Returns:

The (human readable) status message

### setPresence

    JSJaCPacket setPresence(<String> show,<String> status,<int> prio)

Some combined method that allowes for setting show, status and priority at once

Parameters:

`show` - A status message

`status` - A status indicator as defined by XMPP

`prio` - A priority for this resource

Returns:

this

### setPriority

    JSJaCPacket setPriority(<int> prio)

Sets the priority of the resource bind to with this connection

Parameters:

`prio` - The priority to set this resource to

Returns:

this

### setShow

    JSJaCPacket setShow(<String> show)

Sets the online status for this presence packet.

Parameters:

`show` - An XMPP complient status indicator. Must be one of 'chat', 'away', 'xa', 'dnd'

Returns:

this

### setStatus

    JSJaCPacket setStatus(<String> status)

Sets the status message for current status. Usually this is set to some human readable string indicating what the user is doing/feel like currently.

Parameters:

`status` - A status message

Returns:

this

JSJaC

Documentation generated by JSDoc on Tue Jan 5 02:48:26 2021