Disable clipboardsharing in view only mode.
[kdenetwork.git] / kget / core / transferdatasource.h
blob32e08c8210e43140ea45387b23f3265404d01789
1 /* This file is part of the KDE project
3 Copyright (C) 2008 Manolo Valdes <nolis71cu@gmail.com>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9 */
12 #ifndef TRANSFERDATASOURCE_H
13 #define TRANSFERDATASOURCE_H
15 #include "kget_export.h"
17 #include <QObject>
19 #include <kio/job.h>
21 /**
22 This Class is an interface for inter-plugins data change.
23 allowing to use already implemented features from others plugins
25 class KGET_EXPORT TransferDataSource : public QObject
27 Q_OBJECT
28 public:
29 TransferDataSource(QObject *parent);
30 virtual ~TransferDataSource();
32 virtual void start() = 0;
33 virtual void stop() = 0;
34 virtual void addSegment(const KUrl &srcUrl, const KIO::fileoffset_t offset, const KIO::fileoffset_t bytes) = 0;
36 signals:
37 /**
38 Returns data in the forms of chucks
40 void data( const KIO::fileoffset_t &offset,const QByteArray &data );
42 /**
43 Returns data in the forms of URL List
45 void data( const QList<KUrl> &data );
47 /**
48 emitted when there is no more data
49 @param source the datasource, sending the signal
51 void finished();
53 /**
54 Alert that datasource is no able to send any data
55 @param source the datasource, sending the signal
57 void broken();
59 #endif