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

KNewStuff

  • 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
25namespace KIO
26{
27class Job;
28}
29class KJob;
30
31class QDomDocument;
32class QDomNode;
33class QDomElement;
34class QTcpSocket;
35
36namespace KNS
37{
38
50class Soap : public QObject
51{
52 Q_OBJECT
53public:
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
86signals:
87 void signalResult(QDomNode node, int jobid);
88 void signalError();
89
90private 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
96private:
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
KIO::Job
KJob
KNS::Soap
KNewStuff transport layer.
Definition: soap.h:51
KNS::Soap::localname
QString localname(const QDomNode &node)
Name of the QDomElement for node without the namespace.
Definition: soap.cpp:217
KNS::Soap::setModel
void setModel(Model m)
Set the model to be either soap or canonicaltree.
Definition: soap.cpp:262
KNS::Soap::Model
Model
Definition: soap.h:57
KNS::Soap::canonicaltree
@ canonicaltree
Definition: soap.h:59
KNS::Soap::soap
@ soap
Definition: soap.h:58
KNS::Soap::signalResult
void signalResult(QDomNode node, int jobid)
KNS::Soap::directChildNodes
QList< QDomNode > directChildNodes(const QDomNode &node, const QString &name)
Definition: soap.cpp:224
KNS::Soap::~Soap
~Soap()
Definition: soap.cpp:43
KNS::Soap::call
int call(const QDomElement &element, const QString &endpoint)
Send to the server - uses either soap or tree.
Definition: soap.cpp:47
KNS::Soap::signalError
void signalError()
KNS::Soap::xpath
QString xpath(const QDomNode &node, const QString &expr)
Find the text element to a xpath like expression.
Definition: soap.cpp:238
QList
QMap
QObject
QTcpSocket
KIO
KNS
Definition: knewstuff2/core/author.h:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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