Project announcement: Telemeter widget / plasmoid

Lately I’ve been running low on my internet download/upload quota. Although my ISP (Telenet) trippled my quota, a combination of new suse release, new steam games and my isp failing to reset my quota (bug in upgrade process I guess), I managed to reach its limit inadvertently at 200 MB left. Since a) my ISP offers a webservice to access your usage data, b) I always wanted to write a useful plasmoid and c) wanted to try out soap services using Qt, I contemplated to write a quota monitor widget / plasmoid. This evening I gave it a shot.

After comparing available c++ toolkits for web services, I stuck to gSOAP rather than QtSoap as gSOAP seems the de facto standard when it comes to soap and cpp. gSOAP has some handy JAXB-ish utils to convert your wsdl into proxy classes. For a moment, I was afraid I would have to give up the nice and easy Qt network support (proxy, ssl,..) but it seems gSOAP has abundant support. All in all, in a few hours I had it up and running. Actually, I lost most of the time finding the relevant webservice url (you have to subscribe to a private wiki although eventually someone mailed it to me through a fairly private mailinglist I found on a user forum). In the meantime I found that putting a #define in my main is not the same as adding it as a compiler flag even when you rebuild everything. 😉 Adding a compiler flag the right way using qmake, goes like this:

QMAKE_CXXFLAGS += -DWITH_OPENSSL

When I finally could connect to the webservice, I received bogus data, all 0 usage! Only to find out that this was a problem with my account only. Btw, I good and cross platform tool to try out / debug webservices is SoapUI.

To keep it a little sexy, I threw in the QNeedleIndicator I recently stumbled upon on qt-apps.org and adapted it a bit to my needs and voila, we have an alpha:

Telemeter widget

It is not a plasmoid yet and credentials are hardcoded so it’s not useful to anybody but I couldn’t wait to blog. 😉 Note that in the screenshot I seem to have plenty of quota left. That’s only because it shows my parent’s account usage. 🙂

It is currently developed as a Qt app but I definitely plan on wrapping it in a plasmoid. Maybe I’ll keep the Qt app alive for some poor windows users. After I clean it up a bit I will post the code on gitorious.

One thought on “Project announcement: Telemeter widget / plasmoid”

Leave a Reply

Your email address will not be published. Required fields are marked *