I've taken something of a break from DAAP work, though not really. For the past couple of days I've been working on finishing the last.fm support that
Seb started, which was mostly a backport of Qt4 code from
Muesli's official Last.fm Player. With a few fixes of the existing code, I was able to get it to login and retrieve the URL of the stream. It was in-fact almost in beta1, until Mark noted that I had used a synchronous get function introduced in KDE 3.4. I really needed a synchronous function since without refactoring a lot of code it was necessary to turn the "fake" lastfm:// URLs into the real http:// MP3 stream URL within the EngineController::load function. KDE 3.3 lacks a synchronous function that doesn't put up a bunch of annoying popups.
The solution was to create a proxy server: this way the proxy server URL could be returned immediately. And a proxy server would have to be created anyways since the Last.FM stream includes "SYNC" commands that let the client know to fetch new metadata. This is actually why I was working on Last.FM support: thanks to Apple's quasi-DRM, DAAP requires special headers be sent with the HTTP requests so I knew I would eventually have to create a proxy server anyways.
So I created a really basic proxy server using QSocket and QServerSocket. It worked with the Helix Engine, but with the Xine Engine it would just hang all of Amarok (Alexandre looked at the Xine code, it actually has an infinite loop in it). So Mark made the server threaded. He says that this still did not work, which doesn't make sense to me (he never committed this code). Currently Mark is working making the proxy server be a separate process, as just a ruby script (less overhead then starting a QApplication).
And oh yea... go Japan! On that note, this morning I was turned into a USA fan into a Ghanaian fan.
sigh It would've been fun to see the USA get into the quarter finals again, but we just didn't play that well this year. So too bad USA, hooray Ghana!