/src/sip/jabber/tomahawksipmessagefactory.h
http://github.com/tomahawk-player/tomahawk · C Header · 50 lines · 27 code · 6 blank · 17 comment · 0 complexity · 6cc9812c4281fc627b0b4c20300a33ee MD5 · raw file
- /* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
- *
- * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
- *
- * Tomahawk is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Tomahawk is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
- */
- #ifndef ENTITYTIMEFACTORY_P_H
- #define ENTITYTIMEFACTORY_P_H
- #include "tomahawksipmessage.h"
- #include <jreen/stanzaextension.h>
- #include "../sipdllmacro.h"
- class SIPDLLEXPORT TomahawkSipMessageFactory : public Jreen::PayloadFactory<TomahawkSipMessage>
- {
- public:
- TomahawkSipMessageFactory();
- virtual ~TomahawkSipMessageFactory();
- QStringList features() const;
- bool canParse(const QStringRef &name, const QStringRef &uri, const QXmlStreamAttributes &attributes);
- void handleStartElement(const QStringRef &name, const QStringRef &uri, const QXmlStreamAttributes &attributes);
- void handleEndElement(const QStringRef &name, const QStringRef &uri);
- void handleCharacterData(const QStringRef &text);
- void serialize(Jreen::Payload *extension, QXmlStreamWriter *writer);
- Jreen::Payload::Ptr createPayload();
- private:
- enum State { AtNowhere, AtTransport, AtCandidate } m_state;
- int m_depth;
- QString m_ip;
- int m_port;
- QString m_uniqname;
- QString m_key;
- bool m_visible;
- };
- #endif // ENTITYTIMEFACTORY_P_H