JSJaC

## Class JSJaCIQ

    Object
       |
       +--JSJaCPacket
             |
             +--JSJaCIQ

class JSJaCIQ
extends JSJaCPacket

Models the XMPP notion of an 'iq' packet
Defined in JSJaCPacket.js

Fields inherited from class JSJaCPacket
`xml`

Constructor Summary
`JSJaCIQ()` A jabber/XMPP iq packet

Method Summary
`Node` | `getQuery()` Gets the 'query' node of this packet
`String` | `getQueryXMLNS()` Gets the XMLNS of the query node contained within this packet
`JSJaCIQ` | `reply(<Element> payload)` Creates an IQ reply with type set to 'result'.
`JSJaCIQ` | `setIQ(<String> to,<String> type,<String> id)` Some combined method to set 'to', 'type' and 'id' at once
`Node` | `setQuery(<String> xmlns)` Creates a 'query' child node with given XMLNS

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

### JSJaCIQ

    JSJaCIQ()

A jabber/XMPP iq packet

Method Detail

### getQuery

    Node getQuery()

Gets the 'query' node of this packet

Returns:

The query node

### getQueryXMLNS

    String getQueryXMLNS()

Gets the XMLNS of the query node contained within this packet

Returns:

The namespace of the query node

### reply

    JSJaCIQ reply(<Element> payload)

Creates an IQ reply with type set to 'result'. If given appends payload to first child if IQ. Payload maybe XML as string or a DOM element (or an array of such elements as well).

Parameters:

`payload` - A payload to be appended [optional]

Returns:

An IQ reply packet

### setIQ

    JSJaCIQ setIQ(<String> to,<String> type,<String> id)

Some combined method to set 'to', 'type' and 'id' at once

Parameters:

`to` - the recepients JID

`type` - A XMPP compliant iq type (one of 'set', 'get', 'result' and 'error'

`id` - A packet ID

Returns:

this

### setQuery

    Node setQuery(<String> xmlns)

Creates a 'query' child node with given XMLNS

Parameters:

`xmlns` - The namespace for the 'query' node

Returns:

The query node

JSJaC

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