Showing posts with label new feature. Show all posts
Showing posts with label new feature. Show all posts

08 August 2007

check out. again...

It seems I do have a strange problem when it comes to using CVS. It's not version control systems in general, but CVS. Or at least, the CVS I'm using here, on Sip Communicator. Somehow, I never get it right. Each and every time I try to update my sources to the latest version in the repository something goes wrong and I end up with an uncompilable sandbox and a ton of error messages. And the final solution is always cvs co sip-communicator.
That was a little digression just to release some frustrations :D
The midterm review went fine, and I'm pretty pleased with the results so far. The reader looks a lot nicer now and I thinks it's a little more useful too. You can get to see a screenshot of the new plugin in the news section on www.sip-communicator.org. But, as the midterm went and passed the final evaluation is coming in pretty fast.
After some discussions with Vincent (of which I haven't seen that much recently) and Emil, the main things that should be ready by around 20 August are:
  • a meaningful way of uniquely identifying items within a RSS feed (that's work in progress, hopefully I'll finish this tonight)
  • making the online/offline button really work (right now you can sign-in/sign-out your RSS account but that will make no difference)
  • marking unreachable feeds as offline (timeouts, HTTP 404's, HTTP 403's, HTTP 500's, you name it)
  • least but not last, writing unit tests for the protocol
Hopefully, with a little help and counseling all the above bullets will get a checkmark. I had a block for the last dozen of days or so, and a problem on confidence (like being unable to write anything useful, with LOTS of times asking myself if I can do this or not), but Emil proved to be a great mentor, not only technically, but also on the more human side of open-source developement in GSoC :) Thanks man!
That's kinda all for today, I gotta go finish that patch.

06 July 2007

Favicon - check!

Finally, favicon retrieval support is here. What is this all about? Almost all IM protocols out there allow you to specify and associate an image to your account (a so called avatar), either natively (e.g. Y!M), either through extensions (e.g. XMPP/Jabber). As RSS isn't quite a "real" protocol, the need for an image represeting a feed isn't the first feature you'll look for, or ask for.

But as the basic features were implemented, I thought it would be nice to have some more visual clues as to what feed the user is currently reading, so the favicon spring to mind almost naturally.
(The favicon is a file usually called favicon.ico - hence the name :) - located in the root of the webserver. Browsers usually use it to identify bookmarks, shortcuts, tabs or the address in the address bar. There's also a standardised way of specifing favicons which allows for bigger flexibilty, but that works only with (X)HTML files. )

So basically, today's patch retrieves (if possible) the favicon.ico from the server originating the feed, decodes it (using the excellent AC.lib-ICO library), chooses the biggest/most colorful icon in case the icon contains multiple images, converts it to PNG and returns the binary representation of the image).

Why converting to PNG you might ask, and you are right to do it, as I asked that myself too :) . From what I could understand from the code and the documentation, the one who develops a plugin for a certain protocol has to implement in the ContactXXXImpl class (where XXX is the name of the protocol) the method getImage() which, to my big amazement returns a byte[]. Yep, a byte array. That is then decoded by the ChatContact class that takes care of the GUI part of SIP-Communicator.

While this may contribute to some separation between strictly speaking protocol implementation and the GUI usage of this implementation, I do believe that avatar retrieval AND decoding should be done by the protocol implementation. What if some obscure protocol uses an equally obscure image format for the avatar? The only solution is that of an intermediary image format (the very hack I used). Wouldn't this be a lot more elegant if each protocol implementation should deliver an abstract, already decoded Image? or BufferedImage? or no matter what image that does not need further decoding/deserialization?

I'll end this post here, with the hope that I didn't upset anybody with my rhetorical questions, and that the bits and pieces shared here will help someone.

HTML formatting, here I come! :D