From 570d45311fc7f493f60dac7a271245bc123c7b4d Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Tue, 14 Sep 2010 16:19:41 +0000 Subject: * use capabilities() from the discoveryManager * move presenceExtensions() from outgoingClientStream to clientPrivate --- src/QXmppOutgoingClient.cpp | 61 --------------------------------------------- 1 file changed, 61 deletions(-) (limited to 'src/QXmppOutgoingClient.cpp') diff --git a/src/QXmppOutgoingClient.cpp b/src/QXmppOutgoingClient.cpp index 0348d1db..97f97c02 100644 --- a/src/QXmppOutgoingClient.cpp +++ b/src/QXmppOutgoingClient.cpp @@ -808,64 +808,3 @@ void QXmppOutgoingClient::addFeatures(const QStringList &features) { d->extraFeatures << features; } - -// TODO: use the one in discoveryManager -QXmppDiscoveryIq QXmppOutgoingClient::capabilities() const -{ - QXmppDiscoveryIq iq; - iq.setType(QXmppIq::Result); - iq.setQueryType(QXmppDiscoveryIq::InfoQuery); - - // features - QStringList features; - features - << ns_rpc // XEP-0009: Jabber-RPC - << ns_disco_info // XEP-0030: Service Discovery - << ns_ibb // XEP-0047: In-Band Bytestreams - << ns_vcard // XEP-0054: vcard-temp - << ns_bytestreams // XEP-0065: SOCKS5 Bytestreams - << ns_chat_states // XEP-0085: Chat State Notifications - << ns_stream_initiation // XEP-0095: Stream Initiation - << ns_stream_initiation_file_transfer // XEP-0096: SI File Transfer - << ns_capabilities // XEP-0115 : Entity Capabilities - << ns_jingle // XEP-0166 : Jingle - << ns_jingle_rtp // XEP-0167 : Jingle RTP Sessions - << ns_jingle_rtp_audio - << ns_jingle_ice_udp // XEP-0176 : Jingle ICE-UDP Transport Method - << ns_ping; // XEP-0199: XMPP Ping - features << d->extraFeatures; - iq.setFeatures(features); - - // identities - QList identities; - QXmppDiscoveryIq::Identity identity; - - identity.setCategory("automation"); - identity.setType("rpc"); - identities.append(identity); - - identity.setCategory("client"); - identity.setType("pc"); - identity.setName(QString("%1 %2").arg(qApp->applicationName(), qApp->applicationVersion())); - identities.append(identity); - - iq.setIdentities(identities); - return iq; -} - -QXmppElementList QXmppOutgoingClient::presenceExtensions() const -{ - QXmppElementList extensions; - - QXmppElement caps; - caps.setTagName("c"); - caps.setAttribute("xmlns", ns_capabilities); - caps.setAttribute("hash", "sha-1"); - caps.setAttribute("node", QString(capabilities_node)); - // TODO: refer the capabilities() in discoveryManager - caps.setAttribute("ver", capabilities().verificationString().toBase64()); - extensions << caps; - - return extensions; -} - -- cgit v1.2.3