Queries about amarok services

Arvind S Raj sraj.arvind at gmail.com
Sat Jul 23 14:44:34 CEST 2011


Hey everyone,
My name's Arvind and I'm working with Amarok as a part of Season of KDE
under Leo Franchi. My project's implementing compatibility with Tomahawk(
http://tomahawk-player.org) and implement the same features in Amarok. I've
been looking at how Ampache works and had a few queries regarding Ampache
and a service in general. Leo suggested posting a query here so I can get
some insight into this.

*Ampache*
I am trying to figure out how Ampache works and am stuck after a point with
an unsure explanation on how things work.
1. AmpacheServiceFactory creates an AmpacheService class for each server
that it reads from the config object.
    Query: The class declares the config object and without initialization.
Then how does config.servers() retrieve the list of
servers(AmpacheService.cpp line 52)?

2. AmpacheService creates an instance of AmpacheAccountLogin class, which
calls The::networkAccessManager()->getData(). This function retrieves the
particular URL and calls authenticate() as the slot function. After this,
I'm completely blank on how the execution proceeds. getData() fetches the
data from the URL and calls authenticate(), which does the same to
authenticationComplete()? Could someone throw some light on this?

3. authenticationComplete() parses the XML reply to determine is
authentication was successful and emits onLoginSuccessful(), which adds the
remote collection to an unmanaged collection. After this, the remote
collection is part of the existing collection.

4. How do other operations such as querying the remote collection etc
happen? Do the base class functions call the functions of the inherited
classes? Is that how it works?

*Amarok Service*
I'll be implementing the features as a separate service and so was thinking
about how the implementation would be done. I came up with following
functions.

The main functions are peer discovery, collection discovery and collection
querying. So there will a query maker class, a service class, a service
factory class, artist/track/album class, peer class to maintain peer status
and a Track2Url class. I could think about this much. Are these sufficient
for any generic service?

-- 
Arvind S Raj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20110723/3e777e8f/attachment.htm 


More information about the Amarok-devel mailing list