Common Lisp Package: CL-XMPP

README:

FUNCTION

Public

CONNECT (&KEY (HOSTNAME *DEFAULT-HOSTNAME*) (PORT *DEFAULT-PORT*) (RECEIVE-STANZAS T) (BEGIN-XML-STREAM T) JID-DOMAIN-PART (CLASS 'CONNECTION))

Open TCP connection to hostname. By default this will set up the complete XML stream and receive the initial two stanzas (which would typically be stream:stream and stream:features) to make sure the connection object is fully loaded with the features, mechanisms and stream-id. If this is causing a problem for you just specify :receive-stanzas nil. Using the same idea, you can disable the calling to begin-xml-stream. Some XMPP server's addresses are not the same as the domain part of the JID (eg. talk.google.com vs gmail.com) so we provide the option of passing that in here. Could perhaps be taken care of by the library but I'm trying not to optimize too early plus if you are going to do in-band registration (JEP0077) then you don't have a JID until after you've connected.

Private

ENSURE-KEYWORD (THING)

Makes a keyword except when it gets nil it just returns nil.

XML-OUTPUT (STREAM STRING)

Write string to stream as a sequence of bytes and not characters.

Undocumented

ADD-AUTH-METHOD (NAME OPERATOR)

DEFAULT-STANZA-CALLBACK (STANZA CONNECTION &KEY DOM-REPR)

DIGESTIFY-STRING (STRING)

FLATTEN (LIST)

GET-AUTH-METHOD (NAME)

GET-ERROR-DATA-CODE (CODE)

GET-ERROR-DATA-NAME (NAME)

LIST-AUTH-METHOD-NAMES

MAKE-DIGEST-PASSWORD (STREAM-ID PASSWORD)

MAP-ERROR-TYPE-TO-CLASS (TYPE)

READ-STANZA (CONNECTION)

VECTOR-TO-ARRAY (VECTOR)

MACRO

Public

WITH-IQ ((CONNECTION &KEY ID TO (TYPE get)) &BODY BODY)

Macro to make it easier to write IQ stanzas.

WITH-IQ-QUERY ((CONNECTION &KEY XMLNS ID TO NODE (TYPE get)) &BODY BODY)

Macro to make it easier to write QUERYs.

Private

WITH-XML-STREAM ((STREAM CONNECTION) &BODY BODY)

Helper macro to make it easy to control outputting XML to the debug stream. It's not strictly /with/ xml-stream so it should probably be renamed.

Undocumented

FMT (STRING &REST ARGS)

WITH-XML-OUTPUT ((CONNECTION) &BODY BODY)

GENERIC-FUNCTION

Public

Undocumented

APPROVE-SUBSCRIPTION (CONNECTION TO)

AUTH (CONNECTION USERNAME PASSWORD RESOURCE &KEY (MECHANISM PLAIN) (BIND-ET-AL T) (SEND-PRESENCE T))

AUTH-REQUIREMENTS (CONNECTION USERNAME)

BEGIN-XML-STREAM (CONNECTION &KEY (XML-IDENTIFIER T))

BIND (CONNECTION RESOURCE)

CONNECTEDP (CONNECTION)

DENY/CANCEL-SUBSCRIPTION (CONNECTION TO)

DISCONNECT (CONNECTION)

DISCOVER (CONNECTION &KEY (TYPE INFO) TO NODE)

END-XML-STREAM (CONNECTION)

FEATURE-P (CONNECTION FEATURE-NAME)

FEATURE-REQUIRED-P (CONNECTION FEATURE-NAME)

GET-ATTRIBUTE (ELEMENT NAME &KEY (TEST 'EQ))

GET-ELEMENT (ELEMENT NAME &KEY (TEST 'EQ))

GET-PRIVACY-LIST (CONNECTION NAME)

GET-PRIVACY-LISTS (CONNECTION)

GET-ROSTER (CONNECTION)

HANDLE (CONNECTION LIST)

MECHANISM-P (CONNECTION MECHANISM-NAME)

MESSAGE (CONNECTION TO BODY &KEY ID (TYPE CHAT))

PRESENCE (CONNECTION &KEY TYPE TO STATUS SHOW PRIORITY)

RECEIVE-STANZA (CONNECTION &KEY (STANZA-CALLBACK 'DEFAULT-STANZA-CALLBACK) DOM-REPR)

RECEIVE-STANZA-LOOP (CONNECTION &KEY (STANZA-CALLBACK 'DEFAULT-STANZA-CALLBACK) DOM-REPR)

REGISTER (CONNECTION USERNAME PASSWORD NAME EMAIL)

REGISTRATION-REQUIREMENTS (CONNECTION)

REQUEST-SUBSCRIPTION (CONNECTION TO)

ROSTER-ADD (CONNECTION JID NAME GROUP)

ROSTER-REMOVE (CONNECTION JID)

SESSION (CONNECTION)

UNSUBSCRIBE (CONNECTION TO)

Private

Undocumented

%DIGEST-MD5-AUTH% (CONNECTION USERNAME PASSWORD RESOURCE)

%PLAIN-AUTH% (CONNECTION USERNAME PASSWORD RESOURCE)

CANCEL-REGISTRATION (CONNECTION)

CHANGE-PASSWORD (CONNECTION NEW-PASSWORD)

DOM-TO-EVENT (CONNECTION OBJECTS)

MAKE-DISCO-INFO (OBJECT)

MAKE-DISCO-ITEMS (OBJECT)

MAKE-ERROR (OBJECT)

MAKE-FEATURE (OBJECT)

MAKE-IDENTITY (OBJECT)

MAKE-ITEM (OBJECT)

MAKE-ROSTER (OBJECT)

PARSE-RESULT (CONNECTION OBJECTS)

XML-ELEMENT-TO-EVENT (CONNECTION OBJECT NAME)

SLOT-ACCESSOR

Public

FEATURES (OBJECT)

List of xml-element objects representing the various features the host at the other end of the connection supports.

SETFFEATURES (NEW-VALUE OBJECT)

List of xml-element objects representing the various features the host at the other end of the connection supports.

MECHANISMS (OBJECT)

List of xml-element objects representing the various mechainsms the host at the other end of the connection will accept.

SETFMECHANISMS (NEW-VALUE OBJECT)

List of xml-element objects representing the various mechainsms the host at the other end of the connection will accept.

NODE (OBJECT)

Attaching CXML DOM node here but please do not rely on it beyond introspection. If you find yourself in need of getting data from it stick it somewhere in the cl-xmpp-created data and access it that way instead.

SETFNODE (NEW-VALUE OBJECT)

Attaching CXML DOM node here but please do not rely on it beyond introspection. If you find yourself in need of getting data from it stick it somewhere in the cl-xmpp-created data and access it that way instead.

Undocumented

ATTRIBUTES (OBJECT)

SETFATTRIBUTES (NEW-VALUE OBJECT)

BODY (OBJECT)

SETFBODY (NEW-VALUE OBJECT)

DATA (OBJECT)

SETFDATA (NEW-VALUE OBJECT)

ELEMENTS (OBJECT)

SETFELEMENTS (NEW-VALUE OBJECT)

FROM (OBJECT)

SETFFROM (NEW-VALUE OBJECT)

HOSTNAME (OBJECT)

SETFHOSTNAME (NEW-VALUE OBJECT)

IDENTITIES (OBJECT)

SETFIDENTITIES (NEW-VALUE OBJECT)

ITEMS (OBJECT)

SETFITEMS (NEW-VALUE OBJECT)

JID (OBJECT)

SETFJID (NEW-VALUE OBJECT)

NAME (OBJECT)

SETFNAME (NEW-VALUE OBJECT)

PORT (OBJECT)

SETFPORT (NEW-VALUE OBJECT)

SERVER-STREAM (OBJECT)

SETFSERVER-STREAM (NEW-VALUE OBJECT)

TO (OBJECT)

SETFTO (NEW-VALUE OBJECT)

USERNAME (OBJECT)

SETFUSERNAME (NEW-VALUE OBJECT)

VALUE (OBJECT)

SETFVALUE (NEW-VALUE OBJECT)

XML-ELEMENT (OBJECT)

SETFXML-ELEMENT (NEW-VALUE OBJECT)

Private

STREAM-ID (OBJECT)

Stream ID attribute of the <stream> element as gotten when we call BEGIN-XML-STREAM.

SETFSTREAM-ID (NEW-VALUE OBJECT)

Stream ID attribute of the <stream> element as gotten when we call BEGIN-XML-STREAM.

Undocumented

CATEGORY (OBJECT)

SETFCATEGORY (NEW-VALUE OBJECT)

CODE (OBJECT)

SETFCODE (NEW-VALUE OBJECT)

ID (OBJECT)

SETFID (NEW-VALUE OBJECT)

JID-DOMAIN-PART (OBJECT)

SETFJID-DOMAIN-PART (NEW-VALUE OBJECT)

SERVER-SOURCE (OBJECT)

SETFSERVER-SOURCE (NEW-VALUE OBJECT)

SHOW (OBJECT)

SETFSHOW (NEW-VALUE OBJECT)

SUBSCRIPTION (OBJECT)

SETFSUBSCRIPTION (NEW-VALUE OBJECT)

TYPE- (OBJECT)

SETFTYPE- (NEW-VALUE OBJECT)

VAR (OBJECT)

SETFVAR (NEW-VALUE OBJECT)

VARIABLE

Public

*DEBUG-STREAM*

A character stream, or nil

Undocumented

*DEFAULT-HOSTNAME*

*ERRORS*

Private

*AUTH-METHODS*

Alist of method name to operator. Operators must accept the following operands: connection username password resource

Undocumented

*DEFAULT-PORT*

CLASS

Public

CONNECTION

A TCP connection between this XMPP client and an, assumed, XMPP compliant server. The connection does not know whether or not the XML stream has been initiated nor whether there may be any reply waiting to be read from the stream. These details are left to the programmer.

Undocumented

DISCO

DISCO-INFO

DISCO-ITEMS

EVENT

IDENTITY-

ITEM

MESSAGE (CONNECTION TO BODY &KEY ID (TYPE CHAT))

PRESENCE (CONNECTION &KEY TYPE TO STATUS SHOW PRIORITY)

ROSTER

XML-ATTRIBUTE

XML-ELEMENT (OBJECT)

XMPP-PROTOCOL-ERROR

XMPP-PROTOCOL-ERROR-AUTH

XMPP-PROTOCOL-ERROR-CANCEL

XMPP-PROTOCOL-ERROR-MODIFY

XMPP-PROTOCOL-ERROR-WAIT

Private

Undocumented

CONTACT

FEATURE