Lines Matching refs:stanza
145 void XmppChannel::OnStanza(std::unique_ptr<XmlNode> stanza) {
146 // Handle stanza asynchronously, since XmppChannel::OnStanza() is a callback
147 // from expat XML parser and some stanza could cause the XMPP stream to be
153 base::Passed(std::move(stanza))),
157 void XmppChannel::HandleStanza(std::unique_ptr<XmlNode> stanza) {
158 VLOG(2) << "XMPP stanza received: " << stanza->ToString();
162 if (stanza->name() == "stream:features") {
163 auto children = stanza->FindChildren("mechanisms/mechanism", false);
174 if (stanza->name() == "success") {
178 } else if (stanza->name() == "failure") {
179 if (stanza->FindFirstChild("not-authorized", false)) {
186 if (stanza->name() == "stream:features" &&
187 stanza->FindFirstChild("bind", false)) {
198 if (stanza->name() == "message") {
199 HandleMessageStanza(std::move(stanza));
201 } else if (stanza->name() == "iq") {
202 if (!iq_stanza_handler_->HandleIqStanza(std::move(stanza))) {
203 LOG(ERROR) << "Failed to handle IQ stanza";
208 LOG(INFO) << "Unexpected XMPP stanza ignored: " << stanza->ToString();
212 LOG(ERROR) << "Error condition occurred handling stanza: "
213 << stanza->ToString() << " in state: " << static_cast<int>(state_);
267 void XmppChannel::HandleMessageStanza(std::unique_ptr<XmlNode> stanza) {
268 const XmlNode* node = stanza->FindFirstChild("push:push/push:data", true);
270 LOG(WARNING) << "XMPP message stanza is missing <push:data> element";