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

KNewStuff

  • sources
  • kde-4.12
  • kdelibs
  • knewstuff
  • knewstuff2
  • dxs
soap.h
Go to the documentation of this file.
1 /*
2  This file is part of KNewStuff2.
3  Copyright (c) 2007 Josef Spillner <spillner@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef KNEWSTUFF2_DXS_SOAP_H
20 #define KNEWSTUFF2_DXS_SOAP_H
21 
22 #include <QtCore/QObject>
23 #include <QtNetwork/QAbstractSocket>
24 
25 namespace KIO
26 {
27 class Job;
28 }
29 class KJob;
30 
31 class QDomDocument;
32 class QDomNode;
33 class QDomElement;
34 class QTcpSocket;
35 
36 namespace KNS
37 {
38 
50 class Soap : public QObject
51 {
52  Q_OBJECT
53 public:
54  Soap(QObject* parent);
55  ~Soap();
56 
57  enum Model {
58  soap,
59  canonicaltree
60  };
61 
65  void setModel(Model m);
66 
70  int call(const QDomElement& element, const QString &endpoint);
71 
75  QString localname(const QDomNode& node);
76 
83  QString xpath(const QDomNode& node, const QString &expr);
84  QList<QDomNode> directChildNodes(const QDomNode& node, const QString &name);
85 
86 signals:
87  void signalResult(QDomNode node, int jobid);
88  void signalError();
89 
90 private slots:
91  void slotData(KIO::Job *job, const QByteArray& data);
92  void slotResult(KJob *job);
93  void slotSocket();
94  void slotSocketError(QAbstractSocket::SocketError error);
95 
96 private:
102  int call_soap(QDomElement element, const QString& endpoint);
103 
107  void call_tree(const QDomElement& element, const QString& endpoint);
108  QDomDocument buildtree(QDomDocument doc, QDomElement cur, const QString& data);
109 
110  QString m_data;
111  Model m_model;
112  QTcpSocket *m_socket;
113  QByteArray m_buffer;
114  bool m_inprogress;
115  QMap<KJob*, int> m_jobids;
116  int m_lastjobid;
117 };
118 
119 }
120 
121 #endif
KNS::Soap::setModel
void setModel(Model m)
Set the model to be either soap or canonicaltree.
Definition: soap.cpp:262
KNS::Soap::signalError
void signalError()
KNS::Soap::directChildNodes
QList< QDomNode > directChildNodes(const QDomNode &node, const QString &name)
Definition: soap.cpp:224
KNS::Soap::xpath
QString xpath(const QDomNode &node, const QString &expr)
Find the text element to a xpath like expression.
Definition: soap.cpp:238
KNS::Soap::~Soap
~Soap()
Definition: soap.cpp:43
KNS::Soap::Model
Model
Definition: soap.h:57
QString
QObject
KNS::Soap::soap
Definition: soap.h:58
KNS::Soap::localname
QString localname(const QDomNode &node)
Name of the QDomElement for node without the namespace.
Definition: soap.cpp:217
QTcpSocket
KNS::Soap::signalResult
void signalResult(QDomNode node, int jobid)
KNS::Soap::Soap
Soap(QObject *parent)
Definition: soap.cpp:33
KNS::Soap
KNewStuff transport layer.
Definition: soap.h:50
KIO::Job
KNS::Soap::call
int call(const QDomElement &element, const QString &endpoint)
Send to the server - uses either soap or tree.
Definition: soap.cpp:47
KJob
KNS::Soap::canonicaltree
Definition: soap.h:59
QMap< KJob *, int >
QList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KNewStuff

Skip menu "KNewStuff"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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