QXmpp: QXmppRpcManager.h Source File

QXmpp Version: 1.14.2

Loading...
Searching...
No Matches
QXmppRpcManager.h
1// SPDX-FileCopyrightText: 2010 Jeremy Lainé <jeremy.laine@m4x.org>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPRPCMANAGER_H
6#define QXMPPRPCMANAGER_H
7
8#include "QXmppClientExtension.h"
9#include "QXmppInvokable.h"
10#include "QXmppRemoteMethod.h"
11
12#include <QMap>
13#include <QVariant>
14
15class QXmppRpcErrorIq;
16class QXmppRpcInvokeIq;
17class QXmppRpcResponseIq;
18
20#if QXMPP_DEPRECATED_SINCE(1, 12)
21QT_WARNING_PUSH
22QT_WARNING_DISABLE_DEPRECATED
23
41class QXMPP_EXPORT Q_DECL_DEPRECATED_X("Removed from public API (unmaintained)") QXmppRpcManager : public QXmppClientExtension
42{
43 Q_OBJECT
44
45public:
46 QXmppRpcManager();
47
48 void addInvokableInterface(QXmppInvokable *interface);
49 QXmppRemoteMethodResult callRemoteMethod(const QString &jid,
50 const QString &interface,
51 const QVariant &arg1 = QVariant(),
52 const QVariant &arg2 = QVariant(),
53 const QVariant &arg3 = QVariant(),
54 const QVariant &arg4 = QVariant(),
55 const QVariant &arg5 = QVariant(),
56 const QVariant &arg6 = QVariant(),
57 const QVariant &arg7 = QVariant(),
58 const QVariant &arg8 = QVariant(),
59 const QVariant &arg9 = QVariant(),
60 const QVariant &arg10 = QVariant());
61
62 QStringList discoveryFeatures() const override;
63 QList<QXmppDiscoIdentity> discoveryIdentities() const override;
64 bool handleStanza(const QDomElement &element) override;
65
66 Q_SIGNAL void rpcCallResponse(const QXmppRpcResponseIq &result);
67 Q_SIGNAL void rpcCallError(const QXmppRpcErrorIq &err);
68
69private:
70 void invokeInterfaceMethod(const QXmppRpcInvokeIq &iq);
71
72 QMap<QString, QXmppInvokable *> m_interfaces;
73};
74
75QT_WARNING_POP
76#endif
78
79#endif
QXmppClientExtension
The QXmppClientExtension class is the base class for QXmppClient extensions.
Definition QXmppClientExtension.h:32
QXmppClientExtension::discoveryIdentities
virtual QList< QXmppDiscoIdentity > discoveryIdentities() const
Definition QXmppClientExtension.cpp:30
QXmppClientExtension::discoveryFeatures
virtual QStringList discoveryFeatures() const
Definition QXmppClientExtension.cpp:22
QXmppClientExtension::handleStanza
virtual bool handleStanza(const QDomElement &stanza)
You need to implement this method to process incoming XMPP stanzas.
Definition client/compat/removed_api.cpp:44
QXmppRpcInvokeIq
The QXmppRpcInvokeIq class represents an IQ used to carry an RPC invocation as specified by XEP-0009:...
Definition QXmppRpcIq.h:61
QXmppRpcResponseIq
The QXmppRpcResponseIq class represents an IQ used to carry an RPC response as specified by XEP-0009:...
Definition QXmppRpcIq.h:26