• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • transfer-plugins
  • mirrorsearch
mirrorsearchtransferdatasource.cpp
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright (C) 2008 Manolo Valdes <nolis71cu@gmail.com>
4 
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 */
10 
11 #include "mirrorsearchtransferdatasource.h"
12 #include "mirrors.h"
13 #include <kdebug.h>
14 
15 MirrorSearchTransferDataSource::MirrorSearchTransferDataSource(const KUrl &srcUrl, QObject *parent)
16  : TransferDataSource(srcUrl, parent)
17 {
18  m_filename = m_sourceUrl.fileName();
19  kDebug(5001) << m_filename;
20 }
21 
22 void MirrorSearchTransferDataSource::start()
23 {
24  kDebug(5001);
25  if(!m_filename.isEmpty())
26  MirrorSearch (m_filename, this, SLOT(slotSearchUrls(QList<KUrl>&)));
27 }
28 
29 void MirrorSearchTransferDataSource::stop()
30 {
31  kDebug(5001);
32 }
33 
34 void MirrorSearchTransferDataSource::addSegments(const QPair<KIO::fileoffset_t, KIO::fileoffset_t> &segmentSize, const QPair<int, int> &segmentRange)
35 {
36  Q_UNUSED(segmentSize)
37  Q_UNUSED(segmentRange)
38  kDebug(5001);
39 }
40 
41 void MirrorSearchTransferDataSource::slotSearchUrls(QList<KUrl>& Urls)
42 {
43  emit data(Urls);
44 }
45 
46 #include "mirrorsearchtransferdatasource.moc"
TransferDataSource::m_sourceUrl
KUrl m_sourceUrl
Definition: transferdatasource.h:242
mirrors.h
MirrorSearchTransferDataSource::stop
void stop()
Definition: mirrorsearchtransferdatasource.cpp:29
TransferDataSource
This Class is an interface for inter-plugins data change.
Definition: transferdatasource.h:26
QObject
mirrorsearchtransferdatasource.h
MirrorSearchTransferDataSource::start
void start()
Definition: mirrorsearchtransferdatasource.cpp:22
TransferDataSource::data
void data(KIO::fileoffset_t offset, const QByteArray &data, bool &worked)
Returns data in the forms of chucks.
MirrorSearchTransferDataSource::addSegments
void addSegments(const QPair< KIO::fileoffset_t, KIO::fileoffset_t > &segmentSize, const QPair< int, int > &segmentRange)
Adds multiple continuous segments that should be downloaded by this TransferDataSource.
Definition: mirrorsearchtransferdatasource.cpp:34
MirrorSearchTransferDataSource::MirrorSearchTransferDataSource
MirrorSearchTransferDataSource(const KUrl &srcUrl, QObject *parent)
Definition: mirrorsearchtransferdatasource.cpp:15
MirrorSearch
void MirrorSearch(const KUrl &url, QObject *receiver, const char *member)
Definition: mirrors.cpp:90
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal