Tag: gloox

Finally a Library Which Takes Extensibility in XMPP for Real

I'm working on a new monitor for XMPP networks, in which I most likely take Jabbermonitor down. The upcoming monitor, called xmppmon, is distributed and flexible.

The whole thing is written in C++ using gloox, the 1.0-alpha. This new version introduces gloox::StanzaExtension which makes extending XMPP with your own custom protocols a job of some minutes.

You are just creating a class which you can use on both sides, for receiving and sending the new protocol. Only three tiny steps need to be done if you have the protocol already in mind.

This is our intended protocol for sending and receiving account infos:

You just need to create some function which converts such data into your internal data structure and vice versa and the XPath string that detects such stanza, in this case: /iq/list[@xmlns='http://ayena.de/protocol/xmppmon#serverlistupdate'].

Since gloox now knows about the XPath string it can automatically detect new incoming stanzas which match the new protocol.You can read about the exact mechanics in the gloox documentation.

While most APIs for C++ make you use some complex code the way gloox does this really elegant.

I'm using this a lot in the new xmppmon which I hopefully get finished during the next days.

Cheers
Tobias

Posted with tags ,