QXmpp Version:0.7.6

- Main Page
- Modules
- Classes
- Files

- File List

All Classes Functions Variables Enumerations Enumerator Properties Groups
QXmppRpcManager.h
1 /*
2 * Copyright (C) 2008-2012 The QXmpp developers
3 *
4 * Author:
5 * Jeremy Lainé
6 *
7 * Source:
8 * http://code.google.com/p/qxmpp
9 *
10 * This file is a part of QXmpp library.
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 */
23
24 #ifndef QXMPPRPCMANAGER_H
25 #define QXMPPRPCMANAGER_H
26
27 #include <QMap>
28 #include <QVariant>
29
30 #include "QXmppClientExtension.h"
31 #include "QXmppInvokable.h"
32 #include "QXmppRemoteMethod.h"
33
34 class QXmppRpcErrorIq;
35 class QXmppRpcInvokeIq;
36 class QXmppRpcResponseIq;
37
53
54 class QXMPP_EXPORT QXmppRpcManager : public QXmppClientExtension
55 {
56 Q_OBJECT
57
58 public:
59 QXmppRpcManager();
60
61 void addInvokableInterface( QXmppInvokable *interface );
62 QXmppRemoteMethodResult callRemoteMethod( const QString &jid,
63 const QString &interface,
64 const QVariant &arg1 = QVariant(),
65 const QVariant &arg2 = QVariant(),
66 const QVariant &arg3 = QVariant(),
67 const QVariant &arg4 = QVariant(),
68 const QVariant &arg5 = QVariant(),
69 const QVariant &arg6 = QVariant(),
70 const QVariant &arg7 = QVariant(),
71 const QVariant &arg8 = QVariant(),
72 const QVariant &arg9 = QVariant(),
73 const QVariant &arg10 = QVariant() );
74
76 QStringList discoveryFeatures() const;
77 virtual QList<QXmppDiscoveryIq::Identity> discoveryIdentities() const;
78 bool handleStanza(const QDomElement &element);
80
81 signals:
83 void rpcCallResponse(const QXmppRpcResponseIq& result);
84 void rpcCallError(const QXmppRpcErrorIq &err);
86
87 private:
88 void invokeInterfaceMethod(const QXmppRpcInvokeIq &iq);
89
90 QMap<QString,QXmppInvokable*> m_interfaces;
91 };
92
93 #endif