QXmpp: QXmppRemoteMethod.h Source File

QXmpp Version: 1.14.3

Loading...
Searching...
No Matches
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
15#if QXMPP_DEPRECATED_SINCE(1, 12)
16QT_WARNING_PUSH
17QT_WARNING_DISABLE_DEPRECATED
18
20struct [[deprecated("Removed from public API (unmaintained)")]] QXmppRemoteMethodResult {
21 QXmppRemoteMethodResult() : hasError(false), code(0) { }
22 bool hasError;
23 int code;
24 QString errorMessage;
25 QVariant result;
26};
27
28class QXMPP_EXPORT Q_DECL_DEPRECATED_X("Removed from public API (unmaintained)") QXmppRemoteMethod : public QObject
29{
30 Q_OBJECT
31public:
32 QXmppRemoteMethod(const QString &jid, const QString &method, const QVariantList &args, QXmppClient *client);
33 QXmppRemoteMethodResult call();
34
35 Q_SIGNAL void callDone();
36
37private:
38 Q_SLOT void gotError(const QXmppRpcErrorIq &iq);
39 Q_SLOT void gotResult(const QXmppRpcResponseIq &iq);
40
41 QXmppRpcInvokeIq m_payload;
42 QXmppClient *m_client;
43 QXmppRemoteMethodResult m_result;
44};
46
47QT_WARNING_POP
48#endif
49
50#endif // QXMPPREMOTEMETHOD_H
QXmppClient
Main class for starting and managing connections to XMPP servers.
Definition QXmppClient.h:62
QXmpp::hasError
bool hasError(const Result< T > &r)
Definition QXmppGlobal.h:224