~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to noatun/noatun/library/downloader.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _DOWNLOADER_H
2
 
#define _DOWNLOADER_H
3
 
#include <kurl.h>
4
 
#include <qobject.h>
5
 
#include <qlist.h>
6
 
#include <job.h>
7
 
 
8
 
class QFile;
9
 
class PlaylistItem;
10
 
class QTimer;
11
 
 
12
 
 
13
 
/**
14
 
 * download playlistitems, in a queue based fasion
15
 
 **/
16
 
class Downloader : public QObject
17
 
{
18
 
Q_OBJECT
19
 
        struct QueueItem
20
 
        {
21
 
                PlaylistItem *notifier;
22
 
                KURL file;
23
 
                QString local;
24
 
        };
25
 
 
26
 
public:
27
 
        Downloader(QObject *parent=0);
28
 
        virtual ~Downloader();
29
 
 
30
 
        QString enqueue(PlaylistItem *notifier, const KURL &file);
31
 
        void dequeue(PlaylistItem *notifier);
32
 
 
33
 
private:
34
 
        void getNext();
35
 
        
36
 
private slots:
37
 
        void data( KIO::Job *, const QByteArray &data);
38
 
        void percent( KIO::Job *, unsigned long percent);
39
 
        void jobDone( KIO::Job *);
40
 
        void giveUpWithThisDownloadServerIsRunningNT();
41
 
        
42
 
private:
43
 
        QList<Downloader::QueueItem> mQueue;
44
 
        QFile *localfile;
45
 
        Downloader::QueueItem *current; 
46
 
        KIO::TransferJob *mJob;
47
 
        QTimer *mTimeout;
48
 
};
49
 
 
50
 
#endif
51