From 29c713400c9eda1a14aa69e960dc5b08bdea9689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= 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 { - public: - BodyParserFactory() : GenericPayloadParserFactory("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 { - public: - CapsInfoParserFactory() : GenericPayloadParserFactory("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 { - public: - DiscoInfoParserFactory() : GenericPayloadParserFactory("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 { - public: - DiscoItemsParserFactory() : GenericPayloadParserFactory("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 { - public: - ErrorParserFactory() : GenericPayloadParserFactory("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(new IBBParserFactory())); - factories_.push_back(shared_ptr(new StatusParserFactory())); - factories_.push_back(shared_ptr(new StatusShowParserFactory())); - factories_.push_back(shared_ptr(new BodyParserFactory())); - factories_.push_back(shared_ptr(new SubjectParserFactory())); - factories_.push_back(shared_ptr(new PriorityParserFactory())); - factories_.push_back(shared_ptr(new ErrorParserFactory())); - factories_.push_back(shared_ptr(new SoftwareVersionParserFactory())); - factories_.push_back(shared_ptr(new StorageParserFactory())); - factories_.push_back(shared_ptr(new RosterParserFactory())); - factories_.push_back(shared_ptr(new DiscoInfoParserFactory())); - factories_.push_back(shared_ptr(new DiscoItemsParserFactory())); - factories_.push_back(shared_ptr(new CapsInfoParserFactory())); - factories_.push_back(shared_ptr(new ResourceBindParserFactory())); - factories_.push_back(shared_ptr(new StartSessionParserFactory())); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("", "http://jabber.org/protocol/ibb"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("show"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("status"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("body"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("subject"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("priority"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("error"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("query", "jabber:iq:version"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("storage", "storage:bookmarks"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("query", "jabber:iq:roster"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("query", "http://jabber.org/protocol/disco#info"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("query", "http://jabber.org/protocol/disco#items"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("c", "http://jabber.org/protocol/caps"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("bind", "urn:ietf:params:xml:ns:xmpp-bind"))); + factories_.push_back(shared_ptr(new GenericPayloadParserFactory("session", "urn:ietf:params:xml:ns:xmpp-session"))); factories_.push_back(shared_ptr(new SecurityLabelParserFactory())); factories_.push_back(shared_ptr(new SecurityLabelsCatalogParserFactory())); factories_.push_back(shared_ptr(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 { - public: - IBBParserFactory() : GenericPayloadParserFactory("", "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 { - public: - PriorityParserFactory() : GenericPayloadParserFactory("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 { - public: - ResourceBindParserFactory() : GenericPayloadParserFactory("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 { - public: - RosterParserFactory() : GenericPayloadParserFactory("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 { - public: - SoftwareVersionParserFactory() : GenericPayloadParserFactory("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 { - public: - StartSessionParserFactory() : GenericPayloadParserFactory("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 { - public: - StatusParserFactory() : GenericPayloadParserFactory("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 { - public: - StatusShowParserFactory() : GenericPayloadParserFactory("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 { - public: - StorageParserFactory() : GenericPayloadParserFactory("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 { - public: - SubjectParserFactory() : GenericPayloadParserFactory("subject") {} - }; -} - -- cgit v0.10.2-6-g49f6