sigildocs

(sigil xmpp roster)

(sigil xmpp roster) - XMPP Roster Management

Provides roster (contact list) management including fetching, adding/removing contacts, and subscription handling.

Exports

roster-itemprocedure

Construct a roster-item struct.

roster-item?procedure

Test if a value is a roster-item struct.

Get the jid field of a roster-item struct.

Get the name field of a roster-item struct.

Get the subscription field of a roster-item struct.

Get the groups field of a roster-item struct.

Get the ask field of a roster-item struct.

Request the roster from the server.

Calls callback with a list of roster-item records.

(xmpp-request-roster conn
  (lambda (items)
    (for-each (lambda (item)
                (display (roster-item-jid item)))
              items)))
xmpp-rosterprocedure

Get the cached roster as a list of roster-items.

Returns #f if the roster hasn't been fetched yet.

Look up a specific contact in the cached roster.

Add or update a contact in the roster.

(xmpp-roster-add conn "friend@example.com" name: "Friend")

Remove a contact from the roster.

Send a subscription request to a JID.

Accept a subscription request from a JID.

Deny a subscription request from a JID.

Unsubscribe from a JID's presence.