Initial drop of the GCS code.
[meego-garage:garage-client-services.git] / src / catalog.h
1 #ifndef CATALOG_H
2 #define CATALOG_H
3
4 #include <QObject>
5 #include <application.h>
6 #include <category.h>
7
8 namespace MeeGoGarage {
9 class Catalog : public QObject
10 {
11 Q_OBJECT
12 public:
13     //The list of all categories
14     QList<Category*> *getCategoryList () const;
15     void requestCategoryList();
16     bool isCategoryListReady();
17
18     //Search in all applications
19     void requestSearchApplications (QString &keyword);
20     bool cancelSearchApplications ();
21
22     //Dump functions for debugging
23     void dumpCategoryList();
24
25     friend class GarageClientServices;
26
27 signals:
28     void categoryListReady(Catalog*);
29     void searchApplicationsReady(QString &, QList<Application*>*);
30
31 public slots:
32     void categoryListDownloaded();
33
34 private:
35     Catalog(QObject *parent = 0);
36     QList<Category*> *categoryList;
37     bool categoryListIsReady;
38
39     //All applications
40     QList<Application*> *applicationList;
41 };
42 } //MeeGoGarage namespace
43 #endif // CATALOG_H