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 235

#### <private, static> addToLocal(room, alias, nick, autojoin)

  Adds or overwrites bookmark for given room in local storage.

  ##### 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 279

#### <private, static> addToRemote(room, alias, nick, autojoin)

  Adds or overwrites bookmark for given room in remote storage.

  ##### 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 252

#### <static> delete(room, soft)

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

  ##### Parameters:

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

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

#### <private, static> deleteFromLocal(room, soft)

  Delete bookmark from local storage.

  ##### Parameters:

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

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

#### <private, static> deleteFromRemote(room, soft)

  Delete bookmark from remote storage.

  ##### Parameters:

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

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

#### <static> load()

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

#### <private, static> loadFromLocal()

  Load bookmarks from local storage.
  Source:
    - jsxc.lib.xmpp.bookmarks.js, line 49

#### <private, static> loadFromRemote()

  Load bookmarks from remote storage.
  Source:
    - jsxc.lib.xmpp.bookmarks.js, line 76

#### <static> parseErr(stanza) → {object}

  Parse received error.

  ##### Parameters:

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

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

  ##### 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 299