- DownloadView columns can be now hidden by user preference. Settings are persistent
[qtrapids] / src / include / qtrapids / dbus.hpp
index 173afbf..52462c8 100644 (file)
@@ -29,7 +29,8 @@ struct TorrentState {
                        , seeds(0)
                        , leeches(0)
                        , ratio(0)
-                       , total_size(0) { }
+                       , total_size(0)
+                       , total_done(0){ }
 
        QString hash;
        QString name;
@@ -42,6 +43,7 @@ struct TorrentState {
        uint leeches;
        uint ratio;
        qulonglong total_size;
+       qulonglong total_done;
 };
 
 typedef QHash<QString, QString> ParamsMap_t;
@@ -58,7 +60,7 @@ static inline QDBusArgument& operator << (QDBusArgument& argument
        argument.beginStructure();
        argument << state.hash << state.name << (uint)(state.action) << state.state << state.progress
        << state.down_rate << state.up_rate << state.seeds
-       << state.leeches << state.ratio << state.total_size;
+       << state.leeches << state.ratio << state.total_size << state.total_done;
        argument.endStructure();
        return argument;
 }
@@ -73,7 +75,7 @@ static inline QDBusArgument const& operator >> (QDBusArgument const& argument
        uint action;
        argument >> state.hash >> state.name >> action >> state.state >> state.progress
        >> state.down_rate >> state.up_rate >> state.seeds
-       >> state.leeches >> state.ratio >> state.total_size;
+       >> state.leeches >> state.ratio >> state.total_size >> state.total_done;
        state.action = (TorrentState::torrent_action)action;
        argument.endStructure();
        return argument;