10 class QNetworkAccessManager;
13 /** Search for books, display and download results. */
14 class Search: public QObject
24 QStringList languages;
36 bool operator ==(const Result &other) const {
37 return (source == other.source) && (id == other.id);
41 /** Download status. */
49 static Search *instance();
56 void beginDownload(int totalBlocks);
57 void downloading(int blocks);
58 void endDownload(int status, const Search::Result &result,
59 const QString &fileName);
62 void start(const Query &query);
63 QList<Result> results();
64 void download(const Result &result, const QString &fileName);
66 void downloadFinished();
70 QNetworkAccessManager *manager;
71 QNetworkAccessManager *downloadManager;
73 QNetworkReply *downloadReply;
74 QList<Result> searchResults;
75 Search::Result downloadResult;
76 QString downloadFileName;