diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-08-28 21:45:20 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-08-28 21:54:37 (GMT) |
commit | 30bbee78103b3dc125eba0f81c25e5399032d6ef (patch) | |
tree | 8aba7a0099eb6fff7c8b73a113b8a8b561d15706 /Swiften/Elements | |
parent | 7f1bcf974efac0ed87b6f8f639e1fdc16a89eb09 (diff) | |
download | swift-30bbee78103b3dc125eba0f81c25e5399032d6ef.zip swift-30bbee78103b3dc125eba0f81c25e5399032d6ef.tar.bz2 |
Added elements, parsers & serializers for XEP-0198 Stanza Acking.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r-- | Swiften/Elements/EnableSessionManagement.h | 17 | ||||
-rw-r--r-- | Swiften/Elements/SessionManagementEnabled.h | 17 | ||||
-rw-r--r-- | Swiften/Elements/SessionManagementFailed.h | 17 | ||||
-rw-r--r-- | Swiften/Elements/StanzaAck.h | 32 | ||||
-rw-r--r-- | Swiften/Elements/StanzaAckRequest.h | 15 |
5 files changed, 98 insertions, 0 deletions
diff --git a/Swiften/Elements/EnableSessionManagement.h b/Swiften/Elements/EnableSessionManagement.h new file mode 100644 index 0000000..f89ac2e --- /dev/null +++ b/Swiften/Elements/EnableSessionManagement.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Elements/Element.h" +#include "Swiften/Base/Shared.h" + +namespace Swift { + class EnableSessionManagement : public Element, public Shared<EnableSessionManagement> { + public: + EnableSessionManagement() {} + }; +} diff --git a/Swiften/Elements/SessionManagementEnabled.h b/Swiften/Elements/SessionManagementEnabled.h new file mode 100644 index 0000000..1645ca4 --- /dev/null +++ b/Swiften/Elements/SessionManagementEnabled.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Elements/Element.h" +#include "Swiften/Base/Shared.h" + +namespace Swift { + class SessionManagementEnabled : public Element, public Shared<SessionManagementEnabled> { + public: + SessionManagementEnabled() {} + }; +} diff --git a/Swiften/Elements/SessionManagementFailed.h b/Swiften/Elements/SessionManagementFailed.h new file mode 100644 index 0000000..e71f2a6 --- /dev/null +++ b/Swiften/Elements/SessionManagementFailed.h @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Elements/Element.h" +#include "Swiften/Base/Shared.h" + +namespace Swift { + class SessionManagementFailed : public Element, public Shared<SessionManagementFailed> { + public: + SessionManagementFailed() {} + }; +} diff --git a/Swiften/Elements/StanzaAck.h b/Swiften/Elements/StanzaAck.h new file mode 100644 index 0000000..a1a39f8 --- /dev/null +++ b/Swiften/Elements/StanzaAck.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Elements/Element.h" +#include "Swiften/Base/Shared.h" + +namespace Swift { + class StanzaAck : public Element, public Shared<StanzaAck> { + public: + StanzaAck() : handledStanzasCount(-1) {} + + int getHandledStanzasCount() const { + return handledStanzasCount; + } + + void setHandledStanzasCount(int i) { + handledStanzasCount = i; + } + + bool isValid() const { + return handledStanzasCount != -1; + } + + private: + int handledStanzasCount; + }; +} diff --git a/Swiften/Elements/StanzaAckRequest.h b/Swiften/Elements/StanzaAckRequest.h new file mode 100644 index 0000000..ab4f354 --- /dev/null +++ b/Swiften/Elements/StanzaAckRequest.h @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include "Swiften/Elements/Element.h" +#include "Swiften/Base/Shared.h" + +namespace Swift { + class StanzaAckRequest : public Element, public Shared<StanzaAckRequest> { + }; +} |