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

KNewStuff

soap.h

Go to the documentation of this file.
00001 /*
00002     This file is part of KNewStuff2.
00003     Copyright (c) 2007 Josef Spillner <spillner@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KNEWSTUFF2_DXS_SOAP_H
00022 #define KNEWSTUFF2_DXS_SOAP_H
00023 
00024 #include <QtCore/QObject>
00025 #include <QtNetwork/QAbstractSocket>
00026 
00027 namespace KIO
00028 {
00029 class Job;
00030 }
00031 class KJob;
00032 
00033 class QDomDocument;
00034 class QDomNode;
00035 class QDomElement;
00036 class QTcpSocket;
00037 
00038 namespace KNS
00039 {
00040 
00052 class Soap : public QObject
00053 {
00054     Q_OBJECT
00055 public:
00056     Soap(QObject* parent);
00057     ~Soap();
00058 
00059     enum Model {
00060         soap,
00061         canonicaltree
00062     };
00063 
00068     void setModel(Model m);
00069 
00075     int call(const QDomElement& element, const QString &endpoint);
00076 
00082     QString localname(const QDomNode& node);
00083 
00090     QString xpath(const QDomNode& node, const QString &expr);
00097     QList<QDomNode> directChildNodes(const QDomNode& node, const QString &name);
00098 
00099 signals:
00100     void signalResult(QDomNode node, int jobid);
00101     void signalError();
00102 
00103 private slots:
00104     void slotData(KIO::Job *job, const QByteArray& data);
00105     void slotResult(KJob *job);
00106     void slotSocket();
00107     void slotSocketError(QAbstractSocket::SocketError error);
00108 
00109 private:
00115     int call_soap(QDomElement element, const QString& endpoint);
00116 
00122     void call_tree(const QDomElement& element, const QString& endpoint);
00130     QDomDocument buildtree(QDomDocument doc, QDomElement cur, const QString& data);
00131 
00132     QString m_data;
00133     Model m_model;
00134     QTcpSocket *m_socket;
00135     QByteArray m_buffer;
00136     bool m_inprogress;
00137     QMap<KJob*, int> m_jobids;
00138     int m_lastjobid;
00139 };
00140 
00141 }
00142 
00143 #endif

KNewStuff

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal