• 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
  • kio
transferKio.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2 
3  Copyright (C) 2004 Dario Massarin <nekkar@libero.it>
4  Copyright (C) 2009 Matthias Fuchs <mat69@gmx.net>
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 */
11 
12 
13 #ifndef TRANSFER_KIO_H
14 #define TRANSFER_KIO_H
15 
16 #include <kio/job.h>
17 
18 #include "core/transfer.h"
19 
25 class Verifier;
26 
27 class TransferKio : public Transfer
28 {
29  Q_OBJECT
30 
31  public:
32  TransferKio(TransferGroup * parent, TransferFactory * factory,
33  Scheduler * scheduler, const KUrl & src, const KUrl & dest,
34  const QDomElement * e = 0);
35 
41  virtual bool setDirectory(const KUrl &newDirectory);
42 
43  bool repair(const KUrl &file = KUrl());
44 
45  Verifier *verifier(const KUrl &file = KUrl());
46  Signature *signature(const KUrl &file = KUrl());
47 
48  public slots:
49  bool setNewDestination(const KUrl &newDestination);
50 
51  // --- Job virtual functions ---
52  void start();
53  void stop();
54 
55  void deinit(Transfer::DeleteOptions options);
56 
57  private:
58  void createJob();
59 
60  KIO::FileCopyJob * m_copyjob;
61  bool m_stopped;
62  bool m_movingFile;
63 
64  private slots:
65  void slotResult( KJob * kioJob );
66  void slotInfoMessage( KJob * kioJob, const QString & msg );
67  void slotPercent( KJob * kioJob, unsigned long percent );
68  void slotTotalSize( KJob * kioJob, qulonglong size );
69  void slotProcessedSize( KJob * kioJob, qulonglong size );
70  void slotSpeed( KJob * kioJob, unsigned long bytes_per_second );
71  void newDestResult(KJob *result);
72  void slotVerified(bool isVerified);
73 
74  private:
75  Verifier *m_verifier;
76  Signature *m_signature;
77 };
78 
79 #endif
TransferKio::start
void start()
Definition: transferKio.cpp:86
TransferKio::signature
Signature * signature(const KUrl &file=KUrl())
Definition: transferKio.cpp:314
TransferKio::verifier
Verifier * verifier(const KUrl &file=KUrl())
Definition: transferKio.cpp:301
TransferGroup
class TransferGroup:
Definition: transfergroup.h:46
Scheduler
Scheduler class: what handle all the jobs in kget.
Definition: scheduler.h:32
TransferKio::deinit
void deinit(Transfer::DeleteOptions options)
Definition: transferKio.cpp:119
Job::scheduler
Scheduler * scheduler() const
Definition: job.h:106
Transfer::percent
int percent() const
Definition: transfer.h:178
TransferKio::TransferKio
TransferKio(TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, const QDomElement *e=0)
Definition: transferKio.cpp:29
Transfer::factory
TransferFactory * factory() const
Definition: transfer.h:272
TransferKio
Definition: transferKio.h:27
TransferKio::setDirectory
virtual bool setDirectory(const KUrl &newDirectory)
Move the download to the new destination.
Definition: transferKio.cpp:41
Verifier
Definition: verifier.h:68
Transfer::dest
const KUrl & dest() const
Definition: transfer.h:149
TransferKio::setNewDestination
bool setNewDestination(const KUrl &newDestination)
Definition: transferKio.cpp:48
transfer.h
Signature
Class to verify signatures.
Definition: signature.h:38
TransferKio::repair
bool repair(const KUrl &file=KUrl())
Tries to repair file.
Definition: transferKio.cpp:278
TransferFactory
TransferFactory.
Definition: transferfactory.h:52
KJob
TransferKio::stop
void stop()
Definition: transferKio.cpp:99
Transfer
Definition: transfer.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 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