A XCAP client library written in Ruby language.
XCAP is a protocol on top of HTTP allowing a client (usually built within a SIP user agent) to manipulate the content of XML documents stored in a server. These documents represent per user buddy list, presence authorization policy, media content (i.e. user avatar) and other kind of features.
XCAPClient library implements the XCAP protocol in client side, allowing the application to get, store, modify and delete XML documents (totally or partially) in the server.
The library provides the Ruby
XCAPClient module to built applications making use of XCAP protocol. It works in Ruby 1.8 and 1.9.
The library implements the following features:
- Fetch, create/replace and delete a XML document.
- Fetch, create/replace and delete a XML node.
- Fetch, create/replace and delete a XML node attribute.
- Fetch node namespace bindings as they are used in the server (RFC 4825 Section 7.10).
- Full configurable parameters allowing customized fields for each XCAP application, such auid, XML namespace, MIME-Type, scope (:user or :global) and default document name ("index" if not set).
- Custom identity header (as “X-XCAP-Preferred-Identity”) required in some XCAP/XDM environments.
- Fetch the namespaces and prefixes of a document node as they are used in the server.
- Manage of multiple documents per XCAP application.
- Fetch the XCAP server auids, extensions and namespaces ("xcap-caps" application).
- Digest and Basic HTTP authentication.
- Raise custom Ruby exception for each HTTP error response.
~# gem install xcapclient
The GEM is also available in Gemcutter
Get the full API documentation of Ruby
- RFC 4825 -- The Extensible Markup Language (XML) Configuration Access Protocol (XCAP)
The following specifications are applications built on top of XCAP protocol:
- RFC 4826 -- XML Formats for Representing Resource Lists
- RFC 4827 -- XCAP Usage for Manipulating Presence Document Contents
- RFC 5025 -- Presence Authorization Rules
- RFC 4745 -- Common Policy: A Document Format for Expressing Privacy Preferences
XCAPClient doesn't implement these applications by itself. Instead, the high level application using the library must implement them according to its requeriments.
Iñaki Baz Castillo <firstname.lastname@example.org>