aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppRpcIq.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-08-10 09:04:12 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-08-10 09:04:12 +0000
commit7729fa4a4727c724df9e31cc524334f0629c558b (patch)
tree5761e38927607ff8b8e6a9473447a1599cc7b26c /source/QXmppRpcIq.cpp
parent7e200ac65474aba6069dca506db3bb57704d4fdd (diff)
downloadqxmpp-7729fa4a4727c724df9e31cc524334f0629c558b.tar.gz
RPC: splitting methodName should not be done at the QXmppRpcIq level,
it is perfectly legitimate to not use the INTERFACE.METHOD convention in a Jabber-RPC IQ
Diffstat (limited to 'source/QXmppRpcIq.cpp')
-rw-r--r--source/QXmppRpcIq.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/source/QXmppRpcIq.cpp b/source/QXmppRpcIq.cpp
index def28458..41007312 100644
--- a/source/QXmppRpcIq.cpp
+++ b/source/QXmppRpcIq.cpp
@@ -369,23 +369,21 @@ void QXmppRpcInvokeIq::setArguments(const QVariantList &arguments)
m_arguments = arguments;
}
+/// Returns the method name.
+///
+
QString QXmppRpcInvokeIq::method() const
{
return m_method;
}
-void QXmppRpcInvokeIq::setMethod( const QString &method )
-{
- m_method = method;
-}
-QString QXmppRpcInvokeIq::interface() const
-{
- return m_interface;
-}
+/// Sets the method name.
+///
+/// \param method
-void QXmppRpcInvokeIq::setInterface( const QString &interface )
+void QXmppRpcInvokeIq::setMethod(const QString &method)
{
- m_interface = interface;
+ m_method = method;
}
bool QXmppRpcInvokeIq::isRpcInvokeIq(const QDomElement &element)
@@ -401,12 +399,7 @@ void QXmppRpcInvokeIq::parseElementFromChild(const QDomElement &element)
QDomElement queryElement = element.firstChildElement("query");
QDomElement methodElement = queryElement.firstChildElement("methodCall");
- const QString methodName = methodElement.firstChildElement("methodName").text();
- if (methodName.count('.') == 1)
- {
- m_interface = methodName.split('.').first();
- m_method = methodName.split('.').last();
- }
+ m_method = methodElement.firstChildElement("methodName").text();
const QDomElement methodParams = methodElement.firstChildElement("params");
m_arguments.clear();
@@ -431,7 +424,7 @@ void QXmppRpcInvokeIq::toXmlElementFromChild(QXmlStreamWriter *writer) const
helperToXmlAddAttribute(writer, "xmlns", ns_rpc);
writer->writeStartElement("methodCall");
- writer->writeTextElement("methodName", m_interface + "." + m_method);
+ writer->writeTextElement("methodName", m_method);
if (!m_arguments.isEmpty())
{
writer->writeStartElement("params");