~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/dlnaexport/extra/qtsoap/src/qtsoap.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
 
4
** Contact: Nokia Corporation (qt-info@nokia.com)
 
5
**
 
6
** This file is part of a Qt Solutions component.
 
7
**
 
8
** Commercial Usage
 
9
** Licensees holding valid Qt Commercial licenses may use this file in
 
10
** accordance with the Qt Solutions Commercial License Agreement provided
 
11
** with the Software or, alternatively, in accordance with the terms
 
12
** contained in a written agreement between you and Nokia.
 
13
**
 
14
** GNU Lesser General Public License Usage
 
15
** Alternatively, this file may be used under the terms of the GNU Lesser
 
16
** General Public License version 2.1 as published by the Free Software
 
17
** Foundation and appearing in the file LICENSE.LGPL included in the
 
18
** packaging of this file.  Please review the following information to
 
19
** ensure the GNU Lesser General Public License version 2.1 requirements
 
20
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 
21
**
 
22
** In addition, as a special exception, Nokia gives you certain
 
23
** additional rights. These rights are described in the Nokia Qt LGPL
 
24
** Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this
 
25
** package.
 
26
**
 
27
** GNU General Public License Usage
 
28
** Alternatively, this file may be used under the terms of the GNU
 
29
** General Public License version 3.0 as published by the Free Software
 
30
** Foundation and appearing in the file LICENSE.GPL included in the
 
31
** packaging of this file.  Please review the following information to
 
32
** ensure the GNU General Public License version 3.0 requirements will be
 
33
** met: http://www.gnu.org/copyleft/gpl.html.
 
34
**
 
35
** Please note Third Party Software included with Qt Solutions may impose
 
36
** additional restrictions and it is the user's responsibility to ensure
 
37
** that they have met the licensing requirements of the GPL, LGPL, or Qt
 
38
** Solutions Commercial license and the relevant license of the Third
 
39
** Party Software they are using.
 
40
**
 
41
** If you are unsure which license is appropriate for your use, please
 
42
** contact Nokia at qt-info@nokia.com.
 
43
**
 
44
****************************************************************************/
 
45
 
 
46
#ifndef QTSOAP_H
 
47
#define QTSOAP_H
 
48
 
 
49
#include <QtCore/QString>
 
50
#include <QtCore/QVariant>
 
51
#include <QtXml/QtXml>
 
52
#include <QtNetwork/QNetworkAccessManager>
 
53
#include <QtCore/QUrl>
 
54
#include <QtCore/QHash>
 
55
#include <QtCore/QLinkedList>
 
56
#include <QtCore/QPointer>
 
57
#include <QtCore/QScopedPointer>
 
58
 
 
59
#if defined(Q_WS_WIN)
 
60
#  if !defined(QT_QTSOAP_EXPORT) && !defined(QT_QTSOAP_IMPORT)
 
61
#    define QT_QTSOAP_EXPORT
 
62
#  elif defined(QT_QTSOAP_IMPORT)
 
63
#    if defined(QT_QTSOAP_EXPORT)
 
64
#      undef QT_QTSOAP_EXPORT
 
65
#    endif
 
66
#    define QT_QTSOAP_EXPORT __declspec(dllimport)
 
67
#  elif defined(QT_QTSOAP_EXPORT)
 
68
#    undef QT_QTSOAP_EXPORT
 
69
#    define QT_QTSOAP_EXPORT __declspec(dllexport)
 
70
#  endif
 
71
#else
 
72
#  define QT_QTSOAP_EXPORT
 
73
#endif
 
74
 
 
75
#define SOAPv11_ENVELOPE    "http://schemas.xmlsoap.org/soap/envelope/"
 
76
#define SOAPv11_ENCODING    "http://schemas.xmlsoap.org/soap/encoding/"
 
77
#define SOAPv11_ACTORNEXT   "http://schemas.xmlsoap.org/soap/actor/next"
 
78
 
 
79
#define XML_SCHEMA          "http://www.w3.org/1999/XMLSchema"
 
80
#define XML_SCHEMA_INSTANCE "http://www.w3.org/1999/XMLSchema-instance"
 
81
#define XML_NAMESPACE       "http://www.w3.org/XML/1998/namespace"
 
82
 
 
83
template <class T>
 
84
class QtSmartPtr
 
85
{
 
86
public:
 
87
    inline QtSmartPtr(T *data = 0)
 
88
    {
 
89
        d = data;
 
90
        r = new int;
 
91
        *r = 1;
 
92
    }
 
93
 
 
94
    inline QtSmartPtr(const QtSmartPtr &copy)
 
95
    {
 
96
        if (*copy.r != 0)
 
97
            ++(*copy.r);
 
98
 
 
99
        r = copy.r;
 
100
        d = copy.d;
 
101
    }
 
102
 
 
103
    inline ~QtSmartPtr()
 
104
    {
 
105
        if ((*r) == 0)
 
106
            delete r;
 
107
        else if ((*r) != 0 && --(*r) == 0) {
 
108
            delete r;
 
109
            if (d) delete d;
 
110
        }
 
111
    }
 
112
 
 
113
    inline QtSmartPtr &operator =(const QtSmartPtr &copy)
 
114
    {
 
115
        if (*copy.r != 0)
 
116
            ++(*copy.r);
 
117
 
 
118
        if ((*r) == 0)
 
119
            delete r;
 
120
        else if ((*r) != 0 && --(*r) == 0) {
 
121
            delete r;
 
122
            if (d) delete d;
 
123
        }
 
124
 
 
125
        r = copy.r;
 
126
        d = copy.d;
 
127
        return *this;
 
128
    }
 
129
 
 
130
    inline T &operator *() const
 
131
    {
 
132
        return *d;
 
133
    }
 
134
 
 
135
    inline T *operator ->() const
 
136
    {
 
137
            return d;
 
138
    }
 
139
 
 
140
    inline T *ptr() const
 
141
    {
 
142
        return d;
 
143
    }
 
144
 
 
145
    inline T &ref() const
 
146
    {
 
147
        return *d;
 
148
    }
 
149
 
 
150
    inline T *releasedPtr() const
 
151
    {
 
152
        (*r) = 0;
 
153
        return d;
 
154
    }
 
155
 
 
156
    inline bool isNull() const
 
157
    {
 
158
        return d == 0;
 
159
    }
 
160
 
 
161
private:
 
162
    int *r;
 
163
    T *d;
 
164
};
 
165
 
 
166
class QT_QTSOAP_EXPORT QtSoapQName
 
167
{
 
168
public:
 
169
    QtSoapQName(const QString &name = QString::null, const QString &uri = QString::null);
 
170
    ~QtSoapQName();
 
171
 
 
172
    QtSoapQName &operator =(const QString &s);
 
173
 
 
174
    QString name() const;
 
175
    QString uri() const;
 
176
 
 
177
private:
 
178
    QString n;
 
179
    QString nuri;
 
180
};
 
181
 
 
182
bool operator ==(const QtSoapQName &n1, const QtSoapQName &n2);
 
183
bool operator <(const QtSoapQName &n1, const QtSoapQName &n2);
 
184
 
 
185
class QT_QTSOAP_EXPORT QtSoapType
 
186
{
 
187
public:
 
188
    enum Type {
 
189
        Duration, DateTime, Time, Date, GYearMonth, GYear, GMonthDay,
 
190
        GDay, GMonth, Boolean, Base64Binary, HexBinary, Float, Double,
 
191
        AnyURI, QName, NOTATION, String, NormalizedString, Token, Language,
 
192
        Name, NMTOKEN, NCName, ID, IDREF, ENTITY, Decimal, Integer,
 
193
        NonPositiveInteger, NegativeInteger, Long, Int, Short,
 
194
        Byte, NonNegativeInteger, UnsignedLong, PositiveInteger,
 
195
        UnsignedInt, UnsignedShort, UnsignedByte,
 
196
        Array, Struct, Other
 
197
    };
 
198
 
 
199
    QtSoapType();
 
200
    QtSoapType(const QtSoapQName &name, Type t = Other);
 
201
    QtSoapType(const QtSoapType &copy);
 
202
    QtSoapType &operator =(const QtSoapType &copy);
 
203
    virtual ~QtSoapType();
 
204
 
 
205
    virtual void clear();
 
206
 
 
207
    virtual bool parse(QDomNode);
 
208
    virtual bool isValid() const;
 
209
 
 
210
    virtual int count() const;
 
211
    virtual QVariant value() const;
 
212
 
 
213
    virtual QtSoapType &operator [](int);
 
214
    virtual QtSoapType &operator [](const QtSoapQName &s);
 
215
    virtual QtSoapType &operator [](const QString &name);
 
216
 
 
217
    virtual const QtSoapType &operator [](int) const;
 
218
    virtual const QtSoapType &operator [](const QtSoapQName &s) const;
 
219
    virtual const QtSoapType &operator [](const QString &name) const;
 
220
 
 
221
    virtual QDomElement toDomElement(QDomDocument) const;
 
222
 
 
223
    virtual Type type() const;
 
224
    virtual QString id() const;
 
225
    virtual QString href() const;
 
226
    virtual QString typeName() const;
 
227
    virtual QtSoapQName name() const;
 
228
 
 
229
    virtual QString toString() const;
 
230
    virtual int toInt() const;
 
231
    virtual bool toBool() const;
 
232
 
 
233
    void setName(const QtSoapQName &);
 
234
    void setId(const QString &);
 
235
    void setHref(const QString &);
 
236
 
 
237
    QString errorString() const;
 
238
 
 
239
    static QString typeToName(QtSoapType::Type t);
 
240
    static Type nameToType(const QString &);
 
241
 
 
242
protected:
 
243
    Type t;
 
244
    QString errorStr;
 
245
    QString i;
 
246
    QtSoapQName n;
 
247
    QString u;
 
248
    QString h;
 
249
};
 
250
 
 
251
class QtSoapArrayIterator;
 
252
 
 
253
class QT_QTSOAP_EXPORT QtSoapArray : public QtSoapType
 
254
{
 
255
public:
 
256
    QtSoapArray();
 
257
    QtSoapArray(const QtSoapQName &name, QtSoapType::Type type = Other,
 
258
                int size0 = -1, int size1 = -1, int size2 = -1, int size3 = -1, int size4 = -1);
 
259
    QtSoapArray(const QtSoapArray &copy);
 
260
    QtSoapArray &operator = (const QtSoapArray &copy);
 
261
    ~QtSoapArray();
 
262
 
 
263
    void clear();
 
264
 
 
265
    bool parse(QDomNode node);
 
266
    bool isValid() const;
 
267
 
 
268
    int count() const;
 
269
 
 
270
    QtSoapType &at(int pos0);
 
271
    QtSoapType &at(int pos0, int pos1);
 
272
    QtSoapType &at(int pos0, int pos1, int pos2);
 
273
    QtSoapType &at(int pos0, int pos1, int pos2, int pos3);
 
274
    QtSoapType &at(int pos0, int pos1, int pos2, int pos3, int pos4);
 
275
    QtSoapType &operator [](int i);
 
276
    QtSoapType &operator [](const QString &);
 
277
    QtSoapType &operator [](const QtSoapQName &);
 
278
 
 
279
    const QtSoapType &at(int pos) const;
 
280
    const QtSoapType &at(int pos0, int pos1) const;
 
281
    const QtSoapType &at(int pos0, int pos1, int pos2) const;
 
282
    const QtSoapType &at(int pos0, int pos1, int pos2, int pos3) const;
 
283
    const QtSoapType &at(int pos0, int pos1, int pos2, int pos3, int pos4) const;
 
284
    const QtSoapType &operator [](int i) const;
 
285
    const QtSoapType &operator [](const QString &) const;
 
286
    const QtSoapType &operator [](const QtSoapQName &) const;
 
287
 
 
288
    void append(QtSoapType *item);
 
289
    void insert(int pos0, QtSoapType *item);
 
290
    void insert(int pos0,int pos1, QtSoapType *item);
 
291
    void insert(int pos0,int pos1,int pos2, QtSoapType *item);
 
292
    void insert(int pos0,int pos1,int pos2,int pos3, QtSoapType *item);
 
293
    void insert(int pos0,int pos1,int pos2,int pos3,int pos4, QtSoapType *item);
 
294
 
 
295
    QDomElement toDomElement(QDomDocument doc) const;
 
296
 
 
297
    friend class QtSoapArrayIterator;
 
298
 
 
299
protected:
 
300
    QString arraySizeString() const;
 
301
    QString arrayTypeString() const;
 
302
 
 
303
    QHash<int, QtSmartPtr<QtSoapType> > array;
 
304
    int lastIndex;
 
305
 
 
306
private:
 
307
    Type arrayType;
 
308
    int order;
 
309
    int siz0, siz1, siz2, siz3, siz4;
 
310
};
 
311
 
 
312
class QT_QTSOAP_EXPORT QtSoapArrayIterator
 
313
{
 
314
public:
 
315
    QtSoapArrayIterator(QtSoapArray &);
 
316
    QtSoapArrayIterator(const QtSoapArrayIterator &copy);
 
317
    QtSoapArrayIterator &operator =(const QtSoapArrayIterator &j);
 
318
    ~QtSoapArrayIterator();
 
319
 
 
320
    int pos() const;
 
321
    void pos(int *pos0, int *pos1 = 0, int *pos2 = 0, int *pos3 = 0, int *pos4 = 0) const;
 
322
 
 
323
    QtSoapType *data();
 
324
    const QtSoapType *current() const;
 
325
 
 
326
    void operator ++();
 
327
    bool operator !=(const QtSoapArrayIterator &j) const;
 
328
    bool operator ==(const QtSoapArrayIterator &j) const;
 
329
 
 
330
    bool atEnd() const;
 
331
 
 
332
private:
 
333
    QHash<int, QtSmartPtr<QtSoapType> >::Iterator it;
 
334
    QtSoapArray *arr;
 
335
};
 
336
 
 
337
class QtSoapStructIterator;
 
338
 
 
339
class QT_QTSOAP_EXPORT QtSoapStruct : public QtSoapType
 
340
{
 
341
public:
 
342
    QtSoapStruct();
 
343
    QtSoapStruct(const QtSoapQName &name);
 
344
    QtSoapStruct(const QtSoapStruct &copy);
 
345
    QtSoapStruct &operator =(const QtSoapStruct &copy);
 
346
    ~QtSoapStruct();
 
347
 
 
348
    void clear();
 
349
 
 
350
    bool parse(QDomNode node);
 
351
    bool isValid() const;
 
352
 
 
353
    int count() const;
 
354
 
 
355
    QtSoapType &at(const QtSoapQName &key);
 
356
    const QtSoapType &at(const QtSoapQName &key) const;
 
357
 
 
358
    QtSoapType &operator [](int);
 
359
    QtSoapType &operator [](const QtSoapQName &key);
 
360
    QtSoapType &operator [](const QString &key);
 
361
 
 
362
    const QtSoapType &operator [](int) const;
 
363
    const QtSoapType &operator [](const QtSoapQName &key) const;
 
364
    const QtSoapType &operator [](const QString &key) const;
 
365
 
 
366
    void insert(QtSoapType *item);
 
367
 
 
368
    QDomElement toDomElement(QDomDocument doc) const;
 
369
 
 
370
    friend class QtSoapStructIterator;
 
371
 
 
372
protected:
 
373
    QList<QtSmartPtr<QtSoapType> > dict;
 
374
};
 
375
 
 
376
class QT_QTSOAP_EXPORT QtSoapStructIterator
 
377
{
 
378
public:
 
379
    QtSoapStructIterator(QtSoapStruct &);
 
380
    ~QtSoapStructIterator();
 
381
 
 
382
    QtSoapQName key() const;
 
383
    QtSoapType *data();
 
384
    const QtSoapType *current() const;
 
385
 
 
386
    void operator ++();
 
387
    bool operator !=(const QtSoapStructIterator &j) const;
 
388
    bool operator ==(const QtSoapStructIterator &j) const;
 
389
 
 
390
private:
 
391
    QList<QtSmartPtr<QtSoapType> >::Iterator it;
 
392
    QList<QtSmartPtr<QtSoapType> >::Iterator itEnd;
 
393
};
 
394
 
 
395
class QT_QTSOAP_EXPORT QtSoapSimpleType : public QtSoapType
 
396
{
 
397
public:
 
398
    QtSoapSimpleType();
 
399
    QtSoapSimpleType(const QtSoapQName &name);
 
400
    QtSoapSimpleType(const QtSoapQName &name, int n);
 
401
    QtSoapSimpleType(const QtSoapQName &name, bool n, int dummy);
 
402
    QtSoapSimpleType(const QtSoapQName &name, const QString &n);
 
403
    QtSoapSimpleType(const QtSoapSimpleType &copy);
 
404
    QtSoapSimpleType &operator =(const QtSoapSimpleType &copy);
 
405
    ~QtSoapSimpleType();
 
406
 
 
407
    void clear();
 
408
 
 
409
    bool parse(QDomNode node);
 
410
    bool isValid() const;
 
411
 
 
412
    QString toString() const;
 
413
    int toInt() const;
 
414
    bool toBool() const;
 
415
    QVariant value() const;
 
416
 
 
417
    QDomElement toDomElement(QDomDocument doc) const;
 
418
 
 
419
protected:
 
420
    QVariant v;
 
421
};
 
422
 
 
423
class QT_QTSOAP_EXPORT QtSoapMessage
 
424
{
 
425
    friend class QtSoapHttpServer;
 
426
 
 
427
public:
 
428
    QtSoapMessage();
 
429
    QtSoapMessage(const QtSoapMessage &copy);
 
430
    ~QtSoapMessage();
 
431
 
 
432
    QtSoapMessage &operator =(const QtSoapMessage &copy);
 
433
 
 
434
    bool setContent(const QByteArray &buffer);
 
435
    bool setContent(QDomDocument &d);
 
436
 
 
437
    void addBodyItem(QtSoapType *);
 
438
    void addHeaderItem(QtSoapType *);
 
439
 
 
440
    // Method and response
 
441
    const QtSoapType &method() const;
 
442
    const QtSoapType &returnValue() const;
 
443
    void setMethod(const QtSoapQName &);
 
444
    void setMethod(const QString &name, const QString &url = QString::null);
 
445
    void addMethodArgument(QtSoapType *);
 
446
    void addMethodArgument(const QString &uri, const QString &name, const QString &value);
 
447
    void addMethodArgument(const QString &uri, const QString &name, bool value, int dummy);
 
448
    void addMethodArgument(const QString &uri, const QString &name, int value);
 
449
 
 
450
    // Fault
 
451
    enum FaultCode {
 
452
        VersionMismatch,
 
453
        MustUnderstand,
 
454
        Client,
 
455
        Server,
 
456
        Other
 
457
    };
 
458
 
 
459
    bool isFault() const;
 
460
    FaultCode faultCode() const;
 
461
    const QtSoapType &faultString() const;
 
462
    const QtSoapType &faultDetail() const;
 
463
    void setFaultCode(FaultCode code);
 
464
    void setFaultString(const QString &fstring);
 
465
    void addFaultDetail(QtSoapType *detail);
 
466
 
 
467
    // Generating
 
468
    void clear();
 
469
    QString toXmlString(int indent = 0) const;
 
470
 
 
471
    // Errors
 
472
    QString errorString() const;
 
473
 
 
474
protected:
 
475
    enum MessageType {
 
476
        Fault,
 
477
        MethodRequest,
 
478
        MethodResponse,
 
479
        OtherType
 
480
    };
 
481
 
 
482
    bool isValidSoapMessage(const QDomDocument &candidate);
 
483
 
 
484
    QtSoapStruct &body() const;
 
485
    QtSoapStruct &header() const;
 
486
 
 
487
    void init();
 
488
 
 
489
private:
 
490
    MessageType type;
 
491
 
 
492
    mutable QtSoapStruct envelope;
 
493
 
 
494
    QtSoapQName m;
 
495
    QtSoapStruct margs;
 
496
 
 
497
    QString errorStr;
 
498
};
 
499
 
 
500
class QT_QTSOAP_EXPORT QtSoapTypeConstructorBase
 
501
{
 
502
public:
 
503
    inline QtSoapTypeConstructorBase()
 
504
    {
 
505
    }
 
506
 
 
507
    virtual inline ~QtSoapTypeConstructorBase()
 
508
    {
 
509
    }
 
510
 
 
511
    virtual QtSoapType *createObject(QDomNode) = 0;
 
512
 
 
513
    virtual QString errorString() const = 0;
 
514
};
 
515
 
 
516
template <class T>
 
517
class QT_QTSOAP_EXPORT QtSoapTypeConstructor : public QtSoapTypeConstructorBase
 
518
{
 
519
public:
 
520
    QtSoapTypeConstructor()
 
521
    {
 
522
    }
 
523
 
 
524
    QtSoapType *createObject(QDomNode node)
 
525
    {
 
526
        T *t = new T();
 
527
        if (t->parse(node)) {
 
528
            return t;
 
529
        } else {
 
530
            errorStr = t->errorString();
 
531
            delete t;
 
532
            return 0;
 
533
        }
 
534
    }
 
535
 
 
536
    QString errorString() const
 
537
    {
 
538
        return errorStr;
 
539
    }
 
540
 
 
541
private:
 
542
    mutable QString errorStr;
 
543
};
 
544
 
 
545
class QT_QTSOAP_EXPORT QtSoapTypeFactory
 
546
{
 
547
private:
 
548
    QtSoapTypeFactory();
 
549
 
 
550
    static QScopedPointer<QtSoapTypeFactory> s_instance;
 
551
    static QMutex s_initMutex;
 
552
 
 
553
public:
 
554
    ~QtSoapTypeFactory();
 
555
 
 
556
    static QtSoapTypeFactory &instance();
 
557
 
 
558
    bool registerHandler(const QString &name, QtSoapTypeConstructorBase *handler);
 
559
 
 
560
    QtSmartPtr<QtSoapType> soapType(QDomNode node) const;
 
561
 
 
562
    QString errorString() const;
 
563
 
 
564
private:
 
565
    mutable QString errorStr;
 
566
    QHash<QString, QtSoapTypeConstructorBase *> typeHandlers;
 
567
    QLinkedList<QtSoapTypeConstructorBase*> deleteList;
 
568
};
 
569
 
 
570
class QT_QTSOAP_EXPORT QtSoapNamespaces
 
571
{
 
572
public:
 
573
    void registerNamespace(const QString &prefix, const QString &uri);
 
574
    QString prefixFor(const QString &ns);
 
575
 
 
576
    static QtSoapNamespaces &instance();
 
577
 
 
578
private:
 
579
    static QScopedPointer<QtSoapNamespaces> s_instance;
 
580
    static QMutex s_initMutex;
 
581
 
 
582
    QMap<QString, QString> namespaces;
 
583
    mutable QMutex namespacesMutex;
 
584
 
 
585
    QtSoapNamespaces();
 
586
};
 
587
 
 
588
class QT_QTSOAP_EXPORT QtSoapHttpTransport : public QObject
 
589
{
 
590
    Q_OBJECT
 
591
 
 
592
public:
 
593
    QtSoapHttpTransport(QObject *parent = 0);
 
594
    ~QtSoapHttpTransport();
 
595
 
 
596
    void setHost(const QString &host, bool useSecureHTTP = false, int port = 0);
 
597
    void setHost(const QString &host, int port); //obsolete
 
598
    void setAction(const QString &action);
 
599
    void submitRequest(QtSoapMessage &request, const QString &path);
 
600
    const QtSoapMessage &getResponse() const;
 
601
 
 
602
    QNetworkAccessManager *networkAccessManager();
 
603
    QNetworkReply *networkReply();
 
604
 
 
605
Q_SIGNALS:
 
606
    void responseReady();
 
607
    void responseReady(const QtSoapMessage &response);
 
608
 
 
609
private Q_SLOTS:
 
610
    void readResponse(QNetworkReply *reply);
 
611
 
 
612
private:
 
613
    QNetworkAccessManager networkMgr;
 
614
    QPointer<QNetworkReply> networkRep;
 
615
    QUrl url;
 
616
    QString soapAction;
 
617
    QtSoapMessage soapResponse;
 
618
};
 
619
 
 
620
#endif