From c4b64106e7b9493c7b28cc653797457d5f7fbdda Mon Sep 17 00:00:00 2001
From: Richard Maudsley <richard.maudsley@isode.com>
Date: Mon, 28 Apr 2014 16:36:22 +0100
Subject: Make ToplevelElement and Payload inherit from Element.

Change-Id: I962e59a25e49d593c62fa852d60e178f349eb3c4

diff --git a/Swiften/Elements/Element.cpp b/Swiften/Elements/Element.cpp
new file mode 100644
index 0000000..6014ea2
--- /dev/null
+++ b/Swiften/Elements/Element.cpp
@@ -0,0 +1,14 @@
+/*
+ * Copyright (c) 2010-2014 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include <Swiften/Elements/Element.h>
+
+namespace Swift {
+
+Element::~Element() {
+}
+
+}
diff --git a/Swiften/Elements/Element.h b/Swiften/Elements/Element.h
new file mode 100644
index 0000000..d07dae2
--- /dev/null
+++ b/Swiften/Elements/Element.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (c) 2010-2014 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <Swiften/Base/API.h>
+
+namespace Swift {
+	class SWIFTEN_API Element {
+		public:
+			virtual ~Element();
+	};
+}
diff --git a/Swiften/Elements/Payload.h b/Swiften/Elements/Payload.h
index 7d6789c..7cc00da 100644
--- a/Swiften/Elements/Payload.h
+++ b/Swiften/Elements/Payload.h
@@ -9,10 +9,10 @@
 #include <boost/shared_ptr.hpp>
 
 #include <Swiften/Base/API.h>
-#include <Swiften/Elements/ToplevelElement.h>
+#include <Swiften/Elements/Element.h>
 
 namespace Swift {
-	class SWIFTEN_API Payload : public ToplevelElement {
+	class SWIFTEN_API Payload : public Element {
 		public:
 			typedef boost::shared_ptr<Payload> ref;
 		public:
diff --git a/Swiften/Elements/ToplevelElement.h b/Swiften/Elements/ToplevelElement.h
index b3f60c7..bce90b9 100644
--- a/Swiften/Elements/ToplevelElement.h
+++ b/Swiften/Elements/ToplevelElement.h
@@ -7,9 +7,10 @@
 #pragma once
 
 #include <Swiften/Base/API.h>
+#include <Swiften/Elements/Element.h>
 
 namespace Swift {
-	class SWIFTEN_API ToplevelElement {
+	class SWIFTEN_API ToplevelElement : public Element {
 		public:
 			ToplevelElement() {}
 			SWIFTEN_DEFAULT_COPY_CONSTRUCTOR(ToplevelElement)
diff --git a/Swiften/SConscript b/Swiften/SConscript
index d898bfa..7656c83 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -122,6 +122,7 @@ if env["SCONS_STAGE"] == "build" :
 			"Elements/Form.cpp",
 			"Elements/FormField.cpp",
 			"Elements/StreamFeatures.cpp",
+			"Elements/Element.cpp",
 			"Elements/ToplevelElement.cpp",
 			"Elements/IQ.cpp",
 			"Elements/Payload.cpp",
-- 
cgit v0.10.2-6-g49f6