summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Parser/PayloadParserFactoryCollection.h')
-rw-r--r--Swiften/Parser/PayloadParserFactoryCollection.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParserFactoryCollection.h b/Swiften/Parser/PayloadParserFactoryCollection.h
new file mode 100644
index 0000000..80a763b
--- /dev/null
+++ b/Swiften/Parser/PayloadParserFactoryCollection.h
@@ -0,0 +1,28 @@
+#ifndef SWIFTEN_PAYLOADPARSERFACTORYCOLLECTION_H
+#define SWIFTEN_PAYLOADPARSERFACTORYCOLLECTION_H
+
+#include <vector>
+
+#include "Swiften/Parser/AttributeMap.h"
+
+namespace Swift {
+ class PayloadParserFactory;
+ class String;
+
+ class PayloadParserFactoryCollection {
+ public:
+ PayloadParserFactoryCollection();
+
+ void addFactory(PayloadParserFactory* factory);
+ void removeFactory(PayloadParserFactory* factory);
+ void setDefaultFactory(PayloadParserFactory* factory);
+
+ PayloadParserFactory* getPayloadParserFactory(const String& element, const String& ns, const AttributeMap& attributes);
+
+ private:
+ std::vector<PayloadParserFactory*> factories_;
+ PayloadParserFactory* defaultFactory_;
+ };
+}
+
+#endif