libwsw & wswutil release

This article introduces libwsw - C++ library for Jabber clients which provides XEP-136 support, AKA server-side message archiving, and wswutil - the tool for import / export operations on user history for XEP-136 compliant servers.

libwsw

Intro

The goal of libwsw project is to develop cross-platform, easy to use and efficient library which can further be used by Jabber clients to support XEP-136 for server-side history archiving.

WSW stands for “Who Said What”

libwsw will provide high-level API to XEP-136 featues, i.e. retrieve collections / messages in the form convenient for Jabber clients, as well as for collections upload / removal, with the optional local caching support to speedup things and perform searches through the history.

Please note that currently the project is in its early stage, and is not ready for real use! I release it now mainly for usage with wswutil, see below. Of course, you can have a look at it for other purposes - for example, to help me with further development , but do not expect too much. Things that currently work OK are collections / messages direct retrieval and collections upload, both in synchronous and asynchronous mode. Cached mode is implemented, but it’s not yet debugged & tested well enough.

Documentation, as usual in such cases, does not exist yet, but the main files you need to be aware of are api.h and core.h, they are extensively commented, so it should be simple to understand how to use it. Also have a look at wswutil implementation for the example of library usage.

The library uses “drivers” concept to communicate with Jabber server - therefore it should be quite easy to add support for different XMPP libraries, including those that are embedded into clients implementations.

Currently gloox driver is provided, if I proceed with Psi integration - iris driver will also be added.

If you’d like to add support for new driver - have a look at drivers/xmpp/driver.h, it is also commented well enough to understand what should be done, plus, of course, have a look at gloox_drv.cpp for the example of implementation.

Downloading and building

libwsw downloads: sources of 1.0.0 version. The license is GPL. Compilation was tested on Win32/MSVC8 (with and without SOCI) and linux-amd64/g++-4.2 (currently only without SOCI). For compilation cmake is required.

Dependencies are:

  • boost - required, some header-only libs, date_time, optionally - threads for multi-threaded usage. Tested with 1.34.1 version.
  • gloox - currently required as so far it’s the only driver provided, in the future - optional. Tested with 0.9.6.1 version.
  • SOCI - optional, for databases support. Tested with 2.2.0 version.

Future directions

My nearest plans are to debug / test cached mode and to introduce several other API calls to make library usage easier for clients, such as flat messages retrieval (so, just page through the set of messages without caring about collections at all) and different calculation routines, such as messages number estimation based on cache content.

After this is complete, I’d like to try to integrate the library into at least one Jabber client, most likely Psi, to check that API is indeed convenient for the tasks Jabber clients have and adjust / extend API, if needed.

wswutil

Based on current libwsw implementation I’ve developed wswutil - this is a small tool which is able to import / export your history from / to XEP-136 compliant Jabber server (so far tested only with ejabberd + mod_archive_odbc). It uses XEP-136 format for message archiving as XML file with small extensions.

wswutil downloads: sources of 1.0.0 version, binaries of 1.0.0 version for Win32.

For Win32 binaries you’ll need run-time libraries from MS Visual C++ 2005 installed, can be downloaded here, though chances are you already have it.

The license is GPL. Compilation was tested on Win32/MSVC8 (with and without SOCI) and linux-amd64/g++-4.2 (currently only without SOCI). For compilation cmake is required.

The distribution also includes some (hacky) perl scripts to convert history exported from Miranda and Psi into XML format suitable for uploading.

Dependencies are:

  • libwsw - required (+ all its required dependencies, of course).
  • gloox - required, as it’s used directly to setup connection with server and communicate with it. Tested with 0.9.6.1 version.
  • expat - required, for XEP-136 file format parsing. Tested with 2.0.0 version.

Please, feel free to post any issues you encounter with any of these as comments to this article!

Post new comment

The content of this field is kept private and will not be shown publicly.
The content of this field is kept private and will not be shown publicly.
<Spammer note>Therefore there's no sense to post spam links here, noone will ever see them.</Spammer note>
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.
Syndicate content