Ruby XCAPClient

A XCAP client library written in Ruby language.

Introduction

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.

Ruby 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.

Features

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).
  • SSL.
  • Digest and Basic HTTP authentication.
  • Raise custom Ruby exception for each HTTP error response.

Install

~# gem install xcapclient

The GEM is also available in Gemcutter

Documentation

Library API

Get the full API documentation of Ruby XCAPClient.

XCAP references

  • 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 3863 -- PDIF: Presence Information Data Format
    • RFC 4479 -- A Data Model for Presence
    • RFC 4480 -- RPID: Rich Presence Extensions to the Presence Information Data Format
    • RFC 4482 -- CIPID: Contact Information for the Presence Information Data Format
  • RFC 5025 -- Presence Authorization Rules
    • RFC 4745 -- Common Policy: A Document Format for Expressing Privacy Preferences

Ruby XCAPClient doesn't implement these applications by itself. Instead, the high level application using the library must implement them according to its requeriments.

Sections

Author

Iñaki Baz Castillo <>

http://dev.sipdoc.net

Also available in: HTML TXT