aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/QXmppRpcManager.cpp10
-rw-r--r--src/QXmppRpcManager.h20
2 files changed, 28 insertions, 2 deletions
diff --git a/src/QXmppRpcManager.cpp b/src/QXmppRpcManager.cpp
index 06c58451..63885556 100644
--- a/src/QXmppRpcManager.cpp
+++ b/src/QXmppRpcManager.cpp
@@ -34,11 +34,19 @@ QXmppRpcManager::QXmppRpcManager()
{
}
+/// Adds a local interface which can be queried using RPC.
+///
+/// \param interface
+
void QXmppRpcManager::addInvokableInterface( QXmppInvokable *interface )
{
m_interfaces[ interface->metaObject()->className() ] = interface;
}
+/// Invokes a remote interface using RPC.
+///
+/// \param iq
+
void QXmppRpcManager::invokeInterfaceMethod( const QXmppRpcInvokeIq &iq )
{
QXmppStanza::Error error;
@@ -90,6 +98,8 @@ void QXmppRpcManager::invokeInterfaceMethod( const QXmppRpcInvokeIq &iq )
client()->sendPacket(errorIq);
}
+/// Call a remote method using RPC with the specified arguments.
+
QXmppRemoteMethodResult QXmppRpcManager::callRemoteMethod( const QString &jid,
const QString &interface,
const QVariant &arg1,
diff --git a/src/QXmppRpcManager.h b/src/QXmppRpcManager.h
index 65415bb1..3f12fe0b 100644
--- a/src/QXmppRpcManager.h
+++ b/src/QXmppRpcManager.h
@@ -28,13 +28,29 @@
#include <QVariant>
#include "QXmppClientExtension.h"
+#include "QXmppInvokable.h"
+#include "QXmppRemoteMethod.h"
-class QXmppInvokable;
-struct QXmppRemoteMethodResult;
class QXmppRpcErrorIq;
class QXmppRpcInvokeIq;
class QXmppRpcResponseIq;
+/// \brief The QXmppRpcManager class make it possible to invoke remote methods
+/// and to expose local interfaces for remote procedure calls, as specified by
+/// XEP-0009: Jabber-RPC.
+///
+/// To make use of this manager, you need to instantiate it and load it into
+/// the QXmppClient instance as follows:
+///
+/// \code
+/// QXmppRpcManager *manager = new QXmppRpcManager;
+/// client->addExtension(manager);
+/// \endcode
+///
+/// \note THIS API IS NOT FINALIZED YET
+///
+/// \ingroup Managers
+
class QXmppRpcManager : public QXmppClientExtension
{
Q_OBJECT