[Marble-commits] KDE/kdeedu/marble/src/lib

Jens-Michael Hoffmann jensmh at gmx.de
Sun Oct 4 21:56:33 CEST 2009


SVN commit 1031372 by jmhoffmann:

Make HttpJob aware of DownloadUsage.

 M  +14 -1     HttpJob.cpp  
 M  +5 -0      HttpJob.h  


--- trunk/KDE/kdeedu/marble/src/lib/HttpJob.cpp #1031371:1031372
@@ -24,6 +24,7 @@
     QString        m_destinationFileName;
     QString        m_initiatorId;
     int            m_trialsLeft;
+    DownloadUsage  m_downloadUsage;
 };
 
 HttpJobPrivate::HttpJobPrivate( const QUrl & sourceUrl, const QString & destFileName,
@@ -31,7 +32,8 @@
     : m_sourceUrl( sourceUrl ),
       m_destinationFileName( destFileName ),
       m_initiatorId( id ),
-      m_trialsLeft( 3 )
+      m_trialsLeft( 3 ),
+      m_downloadUsage( DownloadBrowse )
 {
 }
 
@@ -76,6 +78,7 @@
     d->m_destinationFileName = fileName;
 }
 
+
 bool HttpJob::tryAgain()
 {
     if( d->m_trialsLeft > 0 ) {
@@ -87,4 +90,14 @@
     }
 }
 
+DownloadUsage HttpJob::downloadUsage() const
+{
+    return d->m_downloadUsage;
+}
+
+void HttpJob::setDownloadUsage( const DownloadUsage usage )
+{
+    d->m_downloadUsage = usage;
+}
+
 #include "HttpJob.moc"
--- trunk/KDE/kdeedu/marble/src/lib/HttpJob.h #1031371:1031372
@@ -19,6 +19,8 @@
 #include <QtCore/QString>
 #include <QtCore/QUrl>
 
+#include "global.h"
+
 #include "marble_export.h"
 
 namespace Marble
@@ -44,6 +46,9 @@
 
     bool tryAgain();
 
+    DownloadUsage downloadUsage() const;
+    void setDownloadUsage( const DownloadUsage );
+
  Q_SIGNALS:
     /**
      * errorCode contains 0, if there was no error and 1 otherwise


More information about the Marble-commits mailing list