Task:Download client for extras-applications/Development
This part documentation explains how the code is structured and which parts are used as the client-side implementation of the REST API.
[edit] STRUCTURE
The [url git-repository] in garage contains the source code of the application. The source-folder contains to different directories:
- gui: This directory contains the implementation of the user interface. ATM this part of the code is a bit messy because of a complete change of the UI. This is pretty much work in progress and needs a proper clean-up.
- maemo: The back-end implementation of the REST API can be found here. The major API to request data from the server is located in MaemoApplicationHandler. This class takes care of the communication and parsing. Further several objects are defined here, like the MaemoApplication, it's subclass MaemoApplicationDetails and MaemoComment.
[edit] API
MaemoApplicationHandler
This file contains the API to request the data from the server.
- Request list of applications:
/* requests a list of all available applications * parameter: * OS -> lists the applications for the specified operating system ('OS2007','OS2008','Maemo5') * cat -> id of the category * page -> number of the page * pagesize -> applications/request * keyword -> search for applications regarding a specified keyword */ void requestApplications (QString OS, QString cat, int page, int pageSize, QString keyword);
- The response is returned as a list of MaemoApplication objects, when the following signal is emitted:
void ready (QList<MaemoApplication *>*);
- Request application details
/* parameter: * uid -> identifier of an application */ void requestApplicationData (QString uid);
- Signal, emitted when the data is received:
void detailsReady(MaemoApplicationDetails*);
- Request images:
//requests an image by a url void requestImage (QString url); //signal void imageReady(QPixmap*);
- This page was last modified on 11 May 2010, at 08:20.
- This page has been accessed 3,572 times.