QXmpp Version: 1.10.0
QXmppRemoteMethod.h
1// SPDX-FileCopyrightText: 2009 Ian Reinhart Geiser <geiseri@kde.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPREMOTEMETHOD_H
6#define QXMPPREMOTEMETHOD_H
7
8#include "QXmppRpcIq.h"
9
10#include <QObject>
11#include <QVariant>
12
13class QXmppClient;
14
15struct QXmppRemoteMethodResult {
16 QXmppRemoteMethodResult() : hasError(false), code(0) { }
17 bool hasError;
18 int code;
19 QString errorMessage;
20 QVariant result;
21};
22
23class QXMPP_EXPORT QXmppRemoteMethod : public QObject
24{
25 Q_OBJECT
26public:
27 QXmppRemoteMethod(const QString &jid, const QString &method, const QVariantList &args, QXmppClient *client);
28 QXmppRemoteMethodResult call();
29
30private Q_SLOTS:
31 void gotError(const QXmppRpcErrorIq &iq);
32 void gotResult(const QXmppRpcResponseIq &iq);
33
34Q_SIGNALS:
35 void callDone();
36
37private:
38 QXmppRpcInvokeIq m_payload;
39 QXmppClient *m_client;
40 QXmppRemoteMethodResult m_result;
41};
42
43#endif // QXMPPREMOTEMETHOD_H
Main class for starting and managing connections to XMPP servers.
Definition: QXmppClient.h:62
The QXmppRpcInvokeIq class represents an IQ used to carry an RPC invocation as specified by XEP-0009:...
Definition: QXmppRpcIq.h:61
The QXmppRpcResponseIq class represents an IQ used to carry an RPC response as specified by XEP-0009:...
Definition: QXmppRpcIq.h:26