@@ -0,0 +1,60 @@
2+ * Copyright (C) 2013 - Canonical Ltd.
4+ * This program is free software: you can redistribute it and/or modify it
5+ * under the terms of the GNU Lesser General Public License, as
6+ * published by the Free Software Foundation; either version 2.1 or 3.0
9+ * This program is distributed in the hope that it will be useful, but
10+ * WITHOUT ANY WARRANTY; without even the implied warranties of
11+ * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
12+ * PURPOSE. See the applicable version of the GNU Lesser General Public
13+ * License for more details.
15+ * You should have received a copy of both the GNU Lesser General Public
16+ * License along with this program. If not, see <http://www.gnu.org/licenses/>
18+ * Authored by: Diego Sarmentero <diego.sarmentero@canonical.com>
28+class DownloadTracker : public QObject
31+ Q_DISABLE_COPY(DownloadTracker)
32+ Q_PROPERTY(QString service WRITE setService)
33+ Q_PROPERTY(QString dbusPath WRITE setDbusPath)
34+ Q_PROPERTY(bool serviceReady READ isServiceReady)
37+ explicit DownloadTracker(QObject *parent = 0);
39+ void setDbusPath(QString& path);
40+ void setService(QString& service);
41+ bool isServiceReady();
44+ void canceled(bool success);
45+ void error(const QString &error);
46+ void finished(const QString &path);
47+ void paused(bool success);
48+ void progress(qulonglong received, qulonglong total);
49+ void resumed(bool success);
50+ void started(bool success);