• 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
  • metalink
metalinkhttp.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) 2012 Aish Raj Dahal <dahalaishraj@gmail.com>
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 METALINKHTTP_H
14 #define METALINKHTTP_H
15 
16 #include <KIO/Job>
17 
18 #include "core/datasourcefactory.h"
19 #include "core/transfer.h"
20 #include "transfer-plugins/metalink/abstractmetalink.h"
21 
22 #include "ui/metalinkcreator/metalinker.h"
23 
24 
25 class MetalinkHttp : public AbstractMetalink
26 {
27  Q_OBJECT
28 
29  public:
30  MetalinkHttp(TransferGroup * parent, TransferFactory * factory,
31  Scheduler * scheduler, const KUrl & src, const KUrl & dest,
32  KGetMetalink::MetalinkHttpParser *httpParser, const QDomElement * e = 0 );
33  ~MetalinkHttp();
34 
35  public Q_SLOTS:
36 
37  // --- Job virtual functions ---
38  void start();
39  void save(const QDomElement &element);
40  void load(const QDomElement *element);
41  void deinit(Transfer::DeleteOptions options);
42  void slotSignatureVerified();
43 
44  private Q_SLOTS:
50  bool metalinkHttpInit();
51 
56  void setSignature(KUrl & dest, QByteArray & data, DataSourceFactory* dataFactory);
57 
63  void setDigests();
68  void setLinks();
69 
70  private:
71  KUrl m_signatureUrl;
72  KUrl m_metalinkxmlUrl ;
73  void startMetalink();
74  KGetMetalink::MetalinkHttpParser *m_httpparser;
75  QList<KGetMetalink::HttpLinkHeader> m_linkheaderList;
76  QHash<QString, QString> m_DigestList;
77 
82  static QString adaptDigestType(const QString& );
83 };
84 
85 #endif //METALINKHTTP_H
TransferGroup
class TransferGroup:
Definition: transfergroup.h:46
Scheduler
Scheduler class: what handle all the jobs in kget.
Definition: scheduler.h:32
KGetMetalink::MetalinkHttpParser
Definition: metalinker.h:419
DataSourceFactory
This class manages multiple DataSources and saves the received data to the file.
Definition: datasourcefactory.h:38
MetalinkHttp::MetalinkHttp
MetalinkHttp(TransferGroup *parent, TransferFactory *factory, Scheduler *scheduler, const KUrl &src, const KUrl &dest, KGetMetalink::MetalinkHttpParser *httpParser, const QDomElement *e=0)
Definition: metalinkhttp.cpp:54
MetalinkHttp::~MetalinkHttp
~MetalinkHttp()
Definition: metalinkhttp.cpp:66
Job::scheduler
Scheduler * scheduler() const
Definition: job.h:106
MetalinkHttp::start
void start()
Definition: metalinkhttp.cpp:123
metalinker.h
Transfer::factory
TransferFactory * factory() const
Definition: transfer.h:272
MetalinkHttp::slotSignatureVerified
void slotSignatureVerified()
Definition: metalinkhttp.cpp:145
MetalinkHttp
Definition: metalinkhttp.h:25
AbstractMetalink
Definition: abstractmetalink.h:22
MetalinkHttp::save
void save(const QDomElement &element)
Definition: metalinkhttp.cpp:93
abstractmetalink.h
Transfer::dest
const KUrl & dest() const
Definition: transfer.h:149
datasourcefactory.h
transfer.h
MetalinkHttp::load
void load(const QDomElement *element)
Definition: metalinkhttp.cpp:71
MetalinkHttp::deinit
void deinit(Transfer::DeleteOptions options)
Definition: metalinkhttp.cpp:272
TransferFactory
TransferFactory.
Definition: transferfactory.h:52
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