JSDoc: Namespace: xmpp

# Namespace: xmpp

## jsxc.xmpp

Handle XMPP stuff.

Source:
  - jsxc.lib.xmpp.js, line 1

### Namespaces

bookmarks
carbons
chatState
httpUpload
mam

### Methods

#### (static) addBuddy(username, alias)

Add buddy to my friends

##### Parameters:

Name | Type | Description
--- | --- | ---
`username` | string | jid
`alias` | string |

Source:
  - jsxc.lib.xmpp.js, line 1244

#### (static) getCapabilitiesByJid(jid)

Retrieves capabilities.

##### Parameters:

Name | Type | Description
--- | --- | ---
`jid` |  |

Source:
  - jsxc.lib.xmpp.js, line 1425

##### Returns:

List of known capabilities

#### (static) hasFeatureByJid(jid, feature, cb) → {boolean}

Test if jid has given features

##### Parameters:

Name | Type | Description
--- | --- | ---
`jid` | string | Jabber id
`feature` | Array.<string> | Single feature or list of features
`cb` | function | Called with the result as first param.

Source:
  - jsxc.lib.xmpp.js, line 1448

##### Returns:

True, if jid has all given features. Null, if we do not know it currently.

Type
  boolean

#### (static) loadVcard(bid, cb, error_cb)

This function loads a vcard.

##### Parameters:

Name | Type | Description
--- | --- | ---
`bid` |  |
`cb` |  |
`error_cb` |  |

Source:
  - jsxc.lib.xmpp.js, line 1402

#### (static) logout(complete) → {Boolean}

Logs user out of his xmpp session and does some clean up.

##### Parameters:

Name | Type | Description
--- | --- | ---
`complete` | boolean | If set to false, roster will not be removed

Source:
  - jsxc.lib.xmpp.js, line 185

##### Returns:

Type
  Boolean

#### (static) onHeadlineMessage(stanza) → {Boolean}

Process message stanzas of type headline.

##### Parameters:

Name | Type | Description
--- | --- | ---
`stanza` | String | Message stanza of type headline

Source:
  - jsxc.lib.xmpp.js, line 1087

##### Returns:

Type
  Boolean

#### (static) onVersionRequest()

Respond to version request (XEP-0092).

Source:
  - jsxc.lib.xmpp.js, line 1116

#### (static) removeBuddy(jid)

Remove buddy from my friends

##### Parameters:

Name | Type | Description
--- | --- | ---
`jid` | type |

Source:
  - jsxc.lib.xmpp.js, line 1279

#### (static) resFriendReq(from, approve)

response to friendship request

##### Parameters:

Name | Type | Description
--- | --- | ---
`from` | string | jid from original friendship req
`approve` | boolean |

Source:
  - jsxc.lib.xmpp.js, line 1223

#### (static) sendMessage(bid, msg, uid)

Public function to send message.

##### Parameters:

Name | Type | Description
--- | --- | ---
`bid` |  | css jid of user
`msg` |  | message
`uid` |  | unique id

Source:
  - jsxc.lib.xmpp.js, line 1317

#### (static) sendPres()

Sends presence stanza to server.

Source:
  - jsxc.lib.xmpp.js, line 414