From 29c713400c9eda1a14aa69e960dc5b08bdea9689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Sun, 13 Feb 2011 12:16:15 +0100 Subject: Removed some boilerplate classes. diff --git a/3rdParty/Boost/update.sh b/3rdParty/Boost/update.sh index c013b06..4be35df 100755 --- a/3rdParty/Boost/update.sh +++ b/3rdParty/Boost/update.sh @@ -32,7 +32,6 @@ fi regex.hpp \ boost/unordered_map.hpp \ boost/algorithm/string.hpp \ - boost/functional/factory.hpp \ $TARGET_DIR rm -rf $TARGET_DIR/libs/config diff --git a/Swiften/Parser/PayloadParsers/BodyParserFactory.h b/Swiften/Parser/PayloadParsers/BodyParserFactory.h deleted file mode 100644 index e2720e9..0000000 --- a/Swiften/Parser/PayloadParsers/BodyParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_BodyParserFACTORY_H -#define SWIFTEN_BodyParserFACTORY_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/BodyParser.h" - -namespace Swift { - class BodyParserFactory : public GenericPayloadParserFactory<BodyParser> { - public: - BodyParserFactory() : GenericPayloadParserFactory<BodyParser>("body") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/CapsInfoParserFactory.h b/Swiften/Parser/PayloadParsers/CapsInfoParserFactory.h deleted file mode 100644 index 6910ff8..0000000 --- a/Swiften/Parser/PayloadParsers/CapsInfoParserFactory.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/CapsInfoParser.h" - -namespace Swift { - class CapsInfoParserFactory : public GenericPayloadParserFactory<CapsInfoParser> { - public: - CapsInfoParserFactory() : GenericPayloadParserFactory<CapsInfoParser>("c", "http://jabber.org/protocol/caps") {} - }; -} diff --git a/Swiften/Parser/PayloadParsers/DiscoInfoParserFactory.h b/Swiften/Parser/PayloadParsers/DiscoInfoParserFactory.h deleted file mode 100644 index 94c949b..0000000 --- a/Swiften/Parser/PayloadParsers/DiscoInfoParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_DiscoInfoParserFactory_H -#define SWIFTEN_DiscoInfoParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/DiscoInfoParser.h" - -namespace Swift { - class DiscoInfoParserFactory : public GenericPayloadParserFactory<DiscoInfoParser> { - public: - DiscoInfoParserFactory() : GenericPayloadParserFactory<DiscoInfoParser>("query", "http://jabber.org/protocol/disco#info") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/DiscoItemsParserFactory.h b/Swiften/Parser/PayloadParsers/DiscoItemsParserFactory.h deleted file mode 100644 index 5b53031..0000000 --- a/Swiften/Parser/PayloadParsers/DiscoItemsParserFactory.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#pragma once - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/DiscoItemsParser.h" - -namespace Swift { - class DiscoItemsParserFactory : public GenericPayloadParserFactory<DiscoItemsParser> { - public: - DiscoItemsParserFactory() : GenericPayloadParserFactory<DiscoItemsParser>("query", "http://jabber.org/protocol/disco#items") {} - }; -} - diff --git a/Swiften/Parser/PayloadParsers/ErrorParserFactory.h b/Swiften/Parser/PayloadParsers/ErrorParserFactory.h deleted file mode 100644 index 442073d..0000000 --- a/Swiften/Parser/PayloadParsers/ErrorParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_ErrorParserFactory_H -#define SWIFTEN_ErrorParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/ErrorParser.h" - -namespace Swift { - class ErrorParserFactory : public GenericPayloadParserFactory<ErrorParser> { - public: - ErrorParserFactory() : GenericPayloadParserFactory<ErrorParser>("error") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp index 70dd81e..e20c06d 100644 --- a/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp +++ b/Swiften/Parser/PayloadParsers/FullPayloadParserFactoryCollection.cpp @@ -8,21 +8,21 @@ #include "Swiften/Base/foreach.h" #include "Swiften/Parser/GenericPayloadParser.h" #include "Swiften/Parser/PayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/ErrorParserFactory.h" -#include "Swiften/Parser/PayloadParsers/BodyParserFactory.h" -#include "Swiften/Parser/PayloadParsers/SubjectParserFactory.h" +#include "Swiften/Parser/PayloadParsers/ErrorParser.h" +#include "Swiften/Parser/PayloadParsers/BodyParser.h" +#include "Swiften/Parser/PayloadParsers/SubjectParser.h" #include "Swiften/Parser/PayloadParsers/ChatStateParserFactory.h" -#include "Swiften/Parser/PayloadParsers/PriorityParserFactory.h" -#include "Swiften/Parser/PayloadParsers/ResourceBindParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StartSessionParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StatusParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StatusShowParserFactory.h" -#include "Swiften/Parser/PayloadParsers/RosterParserFactory.h" -#include "Swiften/Parser/PayloadParsers/SoftwareVersionParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StorageParserFactory.h" -#include "Swiften/Parser/PayloadParsers/DiscoInfoParserFactory.h" -#include "Swiften/Parser/PayloadParsers/DiscoItemsParserFactory.h" -#include "Swiften/Parser/PayloadParsers/CapsInfoParserFactory.h" +#include "Swiften/Parser/PayloadParsers/PriorityParser.h" +#include "Swiften/Parser/PayloadParsers/ResourceBindParser.h" +#include "Swiften/Parser/PayloadParsers/StartSessionParser.h" +#include "Swiften/Parser/PayloadParsers/StatusParser.h" +#include "Swiften/Parser/PayloadParsers/StatusShowParser.h" +#include "Swiften/Parser/PayloadParsers/RosterParser.h" +#include "Swiften/Parser/PayloadParsers/SoftwareVersionParser.h" +#include "Swiften/Parser/PayloadParsers/StorageParser.h" +#include "Swiften/Parser/PayloadParsers/DiscoInfoParser.h" +#include "Swiften/Parser/PayloadParsers/DiscoItemsParser.h" +#include "Swiften/Parser/PayloadParsers/CapsInfoParser.h" #include "Swiften/Parser/PayloadParsers/SecurityLabelParserFactory.h" #include "Swiften/Parser/PayloadParsers/SecurityLabelsCatalogParserFactory.h" #include "Swiften/Parser/PayloadParsers/FormParserFactory.h" @@ -31,7 +31,7 @@ #include "Swiften/Parser/PayloadParsers/SearchPayloadParserFactory.h" #include "Swiften/Parser/PayloadParsers/StreamInitiationParserFactory.h" #include "Swiften/Parser/PayloadParsers/BytestreamsParserFactory.h" -#include "Swiften/Parser/PayloadParsers/IBBParserFactory.h" +#include "Swiften/Parser/PayloadParsers/IBBParser.h" #include "Swiften/Parser/PayloadParsers/VCardUpdateParserFactory.h" #include "Swiften/Parser/PayloadParsers/VCardParserFactory.h" #include "Swiften/Parser/PayloadParsers/RawXMLPayloadParserFactory.h" @@ -45,21 +45,21 @@ using namespace boost; namespace Swift { FullPayloadParserFactoryCollection::FullPayloadParserFactoryCollection() { - factories_.push_back(shared_ptr<PayloadParserFactory>(new IBBParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new StatusParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new StatusShowParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new BodyParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new SubjectParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new PriorityParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new ErrorParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new SoftwareVersionParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new StorageParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new RosterParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new DiscoInfoParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new DiscoItemsParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new CapsInfoParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new ResourceBindParserFactory())); - factories_.push_back(shared_ptr<PayloadParserFactory>(new StartSessionParserFactory())); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<IBBParser>("", "http://jabber.org/protocol/ibb"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<StatusShowParser>("show"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<StatusParser>("status"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<BodyParser>("body"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<SubjectParser>("subject"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<PriorityParser>("priority"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<ErrorParser>("error"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<SoftwareVersionParser>("query", "jabber:iq:version"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<StorageParser>("storage", "storage:bookmarks"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<RosterParser>("query", "jabber:iq:roster"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<DiscoInfoParser>("query", "http://jabber.org/protocol/disco#info"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<DiscoItemsParser>("query", "http://jabber.org/protocol/disco#items"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<CapsInfoParser>("c", "http://jabber.org/protocol/caps"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<ResourceBindParser>("bind", "urn:ietf:params:xml:ns:xmpp-bind"))); + factories_.push_back(shared_ptr<PayloadParserFactory>(new GenericPayloadParserFactory<StartSessionParser>("session", "urn:ietf:params:xml:ns:xmpp-session"))); factories_.push_back(shared_ptr<PayloadParserFactory>(new SecurityLabelParserFactory())); factories_.push_back(shared_ptr<PayloadParserFactory>(new SecurityLabelsCatalogParserFactory())); factories_.push_back(shared_ptr<PayloadParserFactory>(new FormParserFactory())); diff --git a/Swiften/Parser/PayloadParsers/IBBParserFactory.h b/Swiften/Parser/PayloadParsers/IBBParserFactory.h deleted file mode 100644 index aa323f7..0000000 --- a/Swiften/Parser/PayloadParsers/IBBParserFactory.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/IBBParser.h" - -namespace Swift { - class IBBParserFactory : public GenericPayloadParserFactory<IBBParser> { - public: - IBBParserFactory() : GenericPayloadParserFactory<IBBParser>("", "http://jabber.org/protocol/ibb") {} - }; -} diff --git a/Swiften/Parser/PayloadParsers/PriorityParserFactory.h b/Swiften/Parser/PayloadParsers/PriorityParserFactory.h deleted file mode 100644 index cbfcc58..0000000 --- a/Swiften/Parser/PayloadParsers/PriorityParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_PriorityParserFactory_H -#define SWIFTEN_PriorityParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/PriorityParser.h" - -namespace Swift { - class PriorityParserFactory : public GenericPayloadParserFactory<PriorityParser> { - public: - PriorityParserFactory() : GenericPayloadParserFactory<PriorityParser>("priority") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/ResourceBindParserFactory.h b/Swiften/Parser/PayloadParsers/ResourceBindParserFactory.h deleted file mode 100644 index b6f4e50..0000000 --- a/Swiften/Parser/PayloadParsers/ResourceBindParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_ResourceBindParserFactory_H -#define SWIFTEN_ResourceBindParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/ResourceBindParser.h" - -namespace Swift { - class ResourceBindParserFactory : public GenericPayloadParserFactory<ResourceBindParser> { - public: - ResourceBindParserFactory() : GenericPayloadParserFactory<ResourceBindParser>("bind", "urn:ietf:params:xml:ns:xmpp-bind") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/RosterParserFactory.h b/Swiften/Parser/PayloadParsers/RosterParserFactory.h deleted file mode 100644 index c75620c..0000000 --- a/Swiften/Parser/PayloadParsers/RosterParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_RosterParserFactory_H -#define SWIFTEN_RosterParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/RosterParser.h" - -namespace Swift { - class RosterParserFactory : public GenericPayloadParserFactory<RosterParser> { - public: - RosterParserFactory() : GenericPayloadParserFactory<RosterParser>("query", "jabber:iq:roster") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/SoftwareVersionParserFactory.h b/Swiften/Parser/PayloadParsers/SoftwareVersionParserFactory.h deleted file mode 100644 index 5afae5a..0000000 --- a/Swiften/Parser/PayloadParsers/SoftwareVersionParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_SoftwareVersionParserFactory_H -#define SWIFTEN_SoftwareVersionParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/SoftwareVersionParser.h" - -namespace Swift { - class SoftwareVersionParserFactory : public GenericPayloadParserFactory<SoftwareVersionParser> { - public: - SoftwareVersionParserFactory() : GenericPayloadParserFactory<SoftwareVersionParser>("query", "jabber:iq:version") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/StartSessionParserFactory.h b/Swiften/Parser/PayloadParsers/StartSessionParserFactory.h deleted file mode 100644 index 8a7dbe6..0000000 --- a/Swiften/Parser/PayloadParsers/StartSessionParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_StartSessionParserFactory_H -#define SWIFTEN_StartSessionParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StartSessionParser.h" - -namespace Swift { - class StartSessionParserFactory : public GenericPayloadParserFactory<StartSessionParser> { - public: - StartSessionParserFactory() : GenericPayloadParserFactory<StartSessionParser>("session", "urn:ietf:params:xml:ns:xmpp-session") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/StatusParserFactory.h b/Swiften/Parser/PayloadParsers/StatusParserFactory.h deleted file mode 100644 index dea1b47..0000000 --- a/Swiften/Parser/PayloadParsers/StatusParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_StatusParserFactory_H -#define SWIFTEN_StatusParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StatusParser.h" - -namespace Swift { - class StatusParserFactory : public GenericPayloadParserFactory<StatusParser> { - public: - StatusParserFactory() : GenericPayloadParserFactory<StatusParser>("status") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/StatusShowParserFactory.h b/Swiften/Parser/PayloadParsers/StatusShowParserFactory.h deleted file mode 100644 index c7fe111..0000000 --- a/Swiften/Parser/PayloadParsers/StatusShowParserFactory.h +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2010 Remko Tronçon - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#ifndef SWIFTEN_StatusShowParserFactory_H -#define SWIFTEN_StatusShowParserFactory_H - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StatusShowParser.h" - -namespace Swift { - class StatusShowParserFactory : public GenericPayloadParserFactory<StatusShowParser> { - public: - StatusShowParserFactory() : GenericPayloadParserFactory<StatusShowParser>("show") {} - }; -} - -#endif diff --git a/Swiften/Parser/PayloadParsers/StorageParserFactory.h b/Swiften/Parser/PayloadParsers/StorageParserFactory.h deleted file mode 100644 index e58d034..0000000 --- a/Swiften/Parser/PayloadParsers/StorageParserFactory.h +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/StorageParser.h" - -namespace Swift { - class StorageParserFactory : public GenericPayloadParserFactory<StorageParser> { - public: - StorageParserFactory() : GenericPayloadParserFactory<StorageParser>("storage", "storage:bookmarks") {} - }; -} diff --git a/Swiften/Parser/PayloadParsers/SubjectParserFactory.h b/Swiften/Parser/PayloadParsers/SubjectParserFactory.h deleted file mode 100644 index 8ac45c6..0000000 --- a/Swiften/Parser/PayloadParsers/SubjectParserFactory.h +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2010 Kevin Smith - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. - */ - -#pragma once - -#include "Swiften/Parser/GenericPayloadParserFactory.h" -#include "Swiften/Parser/PayloadParsers/SubjectParser.h" - -namespace Swift { - class SubjectParserFactory : public GenericPayloadParserFactory<SubjectParser> { - public: - SubjectParserFactory() : GenericPayloadParserFactory<SubjectParser>("subject") {} - }; -} - -- cgit v0.10.2-6-g49f6