/* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace boost; namespace Swift { FullPayloadParserFactoryCollection::FullPayloadParserFactoryCollection() { factories_.push_back(boost::make_shared >("", "http://jabber.org/protocol/ibb")); factories_.push_back(boost::make_shared >("show")); factories_.push_back(boost::make_shared >("status")); factories_.push_back(boost::make_shared >("replace", "http://swift.im/protocol/replace")); factories_.push_back(boost::make_shared >("query", "jabber:iq:last")); factories_.push_back(boost::make_shared >("body")); factories_.push_back(boost::make_shared >("subject")); factories_.push_back(boost::make_shared >("priority")); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared >("delay", "urn:xmpp:delay")); factories_.push_back(boost::make_shared >("query", "jabber:iq:version")); factories_.push_back(boost::make_shared >("storage", "storage:bookmarks")); factories_.push_back(boost::make_shared >("x", "http://jabber.org/protocol/rosterx")); factories_.push_back(boost::make_shared >("query", "jabber:iq:roster")); factories_.push_back(boost::make_shared >("query", "http://jabber.org/protocol/disco#info")); factories_.push_back(boost::make_shared >("query", "http://jabber.org/protocol/disco#items")); factories_.push_back(boost::make_shared >("c", "http://jabber.org/protocol/caps")); factories_.push_back(boost::make_shared >("bind", "urn:ietf:params:xml:ns:xmpp-bind")); factories_.push_back(boost::make_shared >("session", "urn:ietf:params:xml:ns:xmpp-session")); factories_.push_back(boost::make_shared > >("block", "urn:xmpp:blocking")); factories_.push_back(boost::make_shared > >("blocklist", "urn:xmpp:blocking")); factories_.push_back(boost::make_shared > >("unblock", "urn:xmpp:blocking")); factories_.push_back(boost::make_shared()); factories_.push_back(boost::make_shared >("catalog", "urn:xmpp:sec-label:catalog:2")); factories_.push_back(boost::make_shared()); factories_.push_back(boost::make_shared >("command", "http://jabber.org/protocol/commands")); factories_.push_back(boost::make_shared >("query", "jabber:iq:register")); factories_.push_back(boost::make_shared >("query", "jabber:iq:search")); factories_.push_back(boost::make_shared >("si", "http://jabber.org/protocol/si")); factories_.push_back(boost::make_shared >("query", "http://jabber.org/protocol/bytestreams")); factories_.push_back(boost::make_shared >("x", "vcard-temp:x:update")); factories_.push_back(boost::make_shared >("vCard", "vcard-temp")); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared()); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared >("x", "jabber:x:conference")); factories_.push_back(boost::make_shared >("query", "http://jabber.org/protocol/muc#admin")); factories_.push_back(boost::make_shared >("destroy", "http://jabber.org/protocol/muc#user")); factories_.push_back(boost::make_shared >("destroy", "http://jabber.org/protocol/muc#owner")); factories_.push_back(boost::make_shared >("nick", "http://jabber.org/protocol/nick")); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared >("reason", "urn:xmpp:jingle:1")); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared >("transport", "urn:xmpp:jingle:transports:ibb:1")); factories_.push_back(boost::make_shared >("transport", "urn:xmpp:jingle:transports:s5b:1")); factories_.push_back(boost::make_shared(this)); factories_.push_back(boost::make_shared >("file", "http://jabber.org/protocol/si/profile/file-transfer")); factories_.push_back(boost::make_shared >("received", "urn:xmpp:jingle:apps:file-transfer:3")); factories_.push_back(boost::make_shared >("checksum")); factories_.push_back(boost::make_shared >("query", "http://jabber.org/protocol/bytestreams")); factories_.push_back(boost::make_shared >("wb", "http://swift.im/whiteboard")); factories_.push_back(boost::make_shared()); factories_.push_back(boost::make_shared()); foreach(shared_ptr factory, factories_) { addFactory(factory.get()); } defaultFactory_ = new RawXMLPayloadParserFactory(); setDefaultFactory(defaultFactory_); } FullPayloadParserFactoryCollection::~FullPayloadParserFactoryCollection() { setDefaultFactory(NULL); delete defaultFactory_; foreach(shared_ptr factory, factories_) { removeFactory(factory.get()); } } }