summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParsers/ChatStateParser.cpp')
-rw-r--r--Swiften/Parser/PayloadParsers/ChatStateParser.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/Swiften/Parser/PayloadParsers/ChatStateParser.cpp b/Swiften/Parser/PayloadParsers/ChatStateParser.cpp
index a85dcf7..75ec699 100644
--- a/Swiften/Parser/PayloadParsers/ChatStateParser.cpp
+++ b/Swiften/Parser/PayloadParsers/ChatStateParser.cpp
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2010 Kevin Smith
- * Licensed under the GNU General Public License v3.
- * See Documentation/Licenses/GPLv3.txt for more information.
+ * Copyright (c) 2010 Isode Limited.
+ * All rights reserved.
+ * See the COPYING file for more information.
*/
#include <Swiften/Parser/PayloadParsers/ChatStateParser.h>
@@ -12,26 +12,26 @@ ChatStateParser::ChatStateParser() : level_(0) {
}
void ChatStateParser::handleStartElement(const std::string& element, const std::string&, const AttributeMap&) {
- if (level_ == 0) {
- ChatState::ChatStateType state = ChatState::Active;
- if (element == "active") {
- state = ChatState::Active;
- } else if (element == "composing") {
- state = ChatState::Composing;
- } else if (element == "inactive") {
- state = ChatState::Inactive;
- } else if (element == "paused") {
- state = ChatState::Paused;
- } else if (element == "gone") {
- state = ChatState::Gone;
- }
- getPayloadInternal()->setChatState(state);
- }
- ++level_;
+ if (level_ == 0) {
+ ChatState::ChatStateType state = ChatState::Active;
+ if (element == "active") {
+ state = ChatState::Active;
+ } else if (element == "composing") {
+ state = ChatState::Composing;
+ } else if (element == "inactive") {
+ state = ChatState::Inactive;
+ } else if (element == "paused") {
+ state = ChatState::Paused;
+ } else if (element == "gone") {
+ state = ChatState::Gone;
+ }
+ getPayloadInternal()->setChatState(state);
+ }
+ ++level_;
}
void ChatStateParser::handleEndElement(const std::string&, const std::string&) {
- --level_;
+ --level_;
}
void ChatStateParser::handleCharacterData(const std::string&) {