I'm really interested in this as well.
I've got a little atv2 running with XBMC and it's really working nicely with the Apple Remote.
I've got several other devices with XBMC running on them which all work better as the atv2 but the remotes
just suck as hell in my point of view.
Would be great if you could try to implement this functioniality to release the full potential fo the apple remote with Flirc :)
Greetings Marc