1

Does anyone know of a good non GPL C/C++ XMPP client library that works for embedded Linux in ARM machines?

I've checked out txmpp but the last update seems to be 2 years ago. qxmpp seems to require Qt, which I'm not sure is supported in embedded Linux. Also, AFAIK Qt is for GUI, so I'm not sure why a library requires it. I also checked out gloox, but it's GPL and seems to be over a year old too.

frogatto
  • 28,539
  • 11
  • 83
  • 129
user1118764
  • 9,255
  • 18
  • 61
  • 113
  • Does this txmpp library work for you? I.e. does it work, and does it meet your project's functional requirements? If so then what does it matter when it was last updated? Code that hasn't been updated even for decades is still useful and usable. – Greg A. Woods Nov 23 '12 at 03:20
  • I'm not sure, haven't looked at the specifics, but my requirements are support for embedded Linux, C/C++ due to familiarity, lightweight, TLS support, as well as the usual XMPP client functionality. I'm just concerned that standards and features in the last couple of years would not have been integrated into the library as it's not in active development. – user1118764 Nov 23 '12 at 03:23

2 Answers2

1

Non GPL C/C++ XMPP client library for embedded Linux

libstrophe - dual-licensed under Mit/GPLv3. However, I'm not sure if it will compile on ARM, although it should be fairly portable.

so I'm not sure why a library requires it.

Because Qt provides XML parser and signal/slot framework. XMPP requires XML parser, and signal/slot framework makes your life easier. If you try implementing entire XMPP with all extensions in OOP fashion, you'll need something similar to Qt. If you simply need to send a command or two, then bare bones solution will do.

libstrophe is bare bones. You won't get dozens of wrappers representing different xmpp concepts (and legion of extensions), but you'll be able to send commands you need/want. You'll have to read XMPP specifications, of course.

Advice: when it comes to C++, there aren't many good xmpp libraries available. I think it happens for following reasons (personal opinion):

  1. Too many protocol extensions
  2. It is easy to get distracted while making xmpp libraries. Xmpp contains fairly large number of possible errors, and OOP-minded programmist will be extremely tempted to make a class for everything, which doesn't work well in this scenario and requires something like Qt 4 to make it work properly.
  3. XMPP requires XML parser.

As a result, it might make sense to try python - IF your embedded platform can handle it. For python, there's xmpppy. Although I strongly dislike python, I think it'll be easier to work with XMPP in python using xmpppy than in C++ using libstrophe. This is because xmpp requires plenty of key-value pair lists, and python represents such constructs in more "natural" way, using dictionaries.

SigTerm
  • 26,089
  • 6
  • 66
  • 115
  • Thanks. I'll give libstrophe a shot. Also found iksemel which seems interesting as well. noob question but what exactly does an XML parser do? I understand that XMPP uses XML in its stanzas. Does the XML parser take in user input, for example, chat messages in ASCII text, and produce the XMPP XML code? – user1118764 Nov 23 '12 at 04:14
  • @user1118764: XML parser reads XML code and converts it into some other form program can understand (tree of objects, for example). You need XML parser, because XML isn't simple to read, and you definitely wouldn't want to write parser from scratch. In case of libstrophe, libstrophe uses XML parser to convert XML input stream into "stanza_t" structures which are then passed to callbacks. – SigTerm Nov 23 '12 at 04:46
1

I had the same problem so i rolled my own. Released under BOOST license; http://deusexmachinae.se/dxmpp

It only supports core functionality + proper authentication (including TLS and SCRAM-SHA-1).

stefan
  • 2,886
  • 21
  • 27