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.
12 #ifndef TRANSFERDATASOURCE_H
13 #define TRANSFERDATASOURCE_H
15 #include "kget_export.h"
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
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;
38 Returns data in the forms of chucks
40 void data( const KIO::fileoffset_t
&offset
,const QByteArray
&data
);
43 Returns data in the forms of URL List
45 void data( const QList
<KUrl
> &data
);
48 emitted when there is no more data
49 @param source the datasource, sending the signal
54 Alert that datasource is no able to send any data
55 @param source the datasource, sending the signal