Beispiel #1
0
	void Xep0313ReqIq::parseElementFromChild (const QDomElement& element)
	{
		QXmppIq::parseElementFromChild (element);

		const auto& queryElem = element.firstChildElement ("query");

		QXmppDataForm form;
		form.parse (queryElem.firstChildElement ("x"));
		if (!form.isNull ())
			for (const auto& field : form.fields ())
				if (field.key () == "with")
					JID_ = field.value ().toString ();

		QXmppResultSetQuery q;
		q.parse (queryElem.firstChildElement ("set"));

		Count_ = q.max ();

		Dir_ = Direction::Unspecified;
		if (!q.after ().isNull ())
		{
			ItemId_ = q.after ().toLatin1 ();
			Dir_ = Direction::After;
		}
		else if (!q.before ().isNull ())
		{
			ItemId_ = q.before ().toLatin1 ();
			Dir_ = Direction::Before;
		}
	}