JSDoc: Namespace: bookmarks

# Namespace: bookmarks

## jsxc.xmpp.bookmarks

Load and save bookmarks according to XEP-0048.

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

### Methods

#### (static) add(room, alias, nick, autojoin)

Adds or overwrites bookmark for given room.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | room jid
`alias` | string | room alias
`nick` | string | preferred user nickname
`autojoin` | boolean | should we join this room after login?

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 239

#### (static) delete(room, softopt)

Deletes the bookmark for the given room and removes it from the roster if soft is false.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`room` | string |  |  | room jid
`soft` | boolean | <optional> | false | True: leave room in roster

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 169

#### (static) load()

Load bookmarks from pubsub.

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 22

#### (static) parseErr(stanza) → {object|string|array}

Parse received error.

##### Parameters:

Name | Type | Description
--- | --- | ---
`stanza` | string |

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 150

##### Returns:

- err - The parsed error
  Type
    object
- err.type - XMPP error type
  Type
    string
- err.reasons - Array of error reasons
  Type
    array

#### (static) remote() → {boolean}

Determines if server is able to store bookmarks.

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 13

##### Returns:

True: Server supports bookmark storage

Type
  boolean

#### (static) showDialog(room)

Show dialog to edit bookmark.

##### Parameters:

Name | Type | Description
--- | --- | ---
`room` | string | room jid

Source:
  - jsxc.lib.xmpp.bookmarks.js, line 303