summaryrefslogtreecommitdiffstats
blob: c7771b9fee84c76e595569e2c73fe79f4bf89ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "Swiften/Parser/PayloadParsers/StatusParser.h"

namespace Swift {

StatusParser::StatusParser() : level_(0) {
}

void StatusParser::handleStartElement(const String&, const String&, const AttributeMap&) {
	++level_;
}

void StatusParser::handleEndElement(const String&, const String&) {
	--level_;
	if (level_ == 0) {
		getPayloadInternal()->setText(text_);
	}
}

void StatusParser::handleCharacterData(const String& data) {
	text_ += data;
}

}