Ruby XCAPClient

A XCAP client library written in Ruby language.

Introduction

XCAP is a protocol on top of HTTP which allows a client to manipulate the contents of Presence Information Data Format (PIDF) based presence documents. These documents are stored in a server in XML format and are fetched, modified, replaced or deleted by the client. The protocol allows multiple clients to manipulate the data, provided that they are authorized to do so. XCAP is already used in SIMPLE-based presence systems for manipulation of presence lists and presence authorization policies.

Ruby XCAPClient library implements the XCAP protocol in client side, allowing the applications to get, store, modify and delete XML documents 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