KD SOAP API Documentation  2.1
Classes | Signals | Public Member Functions | List of all members
KDSoapPendingCallWatcher Class Reference

#include <KDSoapPendingCallWatcher.h>

Inheritance diagram for KDSoapPendingCallWatcher:
Inheritance graph
[legend]
Collaboration diagram for KDSoapPendingCallWatcher:
Collaboration graph
[legend]

Classes

class  Private
 

Signals

void finished (KDSoapPendingCallWatcher *self)
 

Public Member Functions

 KDSoapPendingCallWatcher (const KDSoapPendingCall &call, QObject *parent=nullptr)
 
 ~KDSoapPendingCallWatcher ()
 
- Public Member Functions inherited from KDSoapPendingCall
 KDSoapPendingCall (const KDSoapPendingCall &other)
 
 ~KDSoapPendingCall ()
 
bool isFinished () const
 
KDSoapPendingCalloperator= (const KDSoapPendingCall &other)
 
KDSoapHeaders returnHeaders () const
 
KDSoapMessage returnMessage () const
 
QVariant returnValue () const
 

Detailed Description

The KDSoapPendingCallWatcher class provides a convenient way for waiting for asynchronous replies.

KDSoapPendingCallWatcher provides the finished() signal that will be emitted when a reply arrives.

It is usually used like the following example:

KDSoapPendingCall pendingCall = client.asyncCall(QLatin1String("MethodName"), message);
KDSoapPendingCallWatcher *watcher = new KDSoapPendingCallWatcher(pendingCall, this);
QObject::connect(watcher, &KDSoapPendingCallWatcher::finished,
this, &MyClass::slotFinished);
void finished(KDSoapPendingCallWatcher *self)
friend class KDSoapPendingCallWatcher
Note
It is not necessary to keep the original KDSoapPendingCall object around since KDSoapPendingCallWatcher inherits from that class too.

Definition at line 35 of file KDSoapPendingCallWatcher.h.

Constructor & Destructor Documentation

◆ KDSoapPendingCallWatcher()

KDSoapPendingCallWatcher::KDSoapPendingCallWatcher ( const KDSoapPendingCall call,
QObject *  parent = nullptr 
)
explicit

Creates a KDSoapPendingCallWatcher object to watch for replies on the asynchronous pending call call and sets this object's parent to parent.

Definition at line 16 of file KDSoapPendingCallWatcher.cpp.

◆ ~KDSoapPendingCallWatcher()

KDSoapPendingCallWatcher::~KDSoapPendingCallWatcher ( )

Destroys this object. If this KDSoapPendingCallWatcher object was the last reference to the unfinished pending call, the call will be canceled.

Definition at line 26 of file KDSoapPendingCallWatcher.cpp.

Member Function Documentation

◆ finished

void KDSoapPendingCallWatcher::finished ( KDSoapPendingCallWatcher self)
signal

This signal is emitted when the pending call has finished and its reply is available. The self parameter is a pointer to the object itself, passed for convenience so that the slot can access the properties and determine the contents of the reply.

Referenced by KDSoapThreadTask::process().


The documentation for this class was generated from the following files:

© 2010-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-soap/
Generated on Tue Jun 13 2023 12:18:34 for KD SOAP API Documentation by doxygen 1.9.1