diff --git a/include/transport/abstractconversation.h b/include/transport/abstractconversation.h new file mode 100644 index 0000000000000000000000000000000000000000..ded4b9a2ce9992c5511ada964c89a64450b9b691 --- /dev/null +++ b/include/transport/abstractconversation.h @@ -0,0 +1,53 @@ +/** + * XMPP - libpurple transport + * + * Copyright (C) 2009, Jan Kaluza + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA + */ + +#pragma once + +#include +#include +#include "transport/transport.h" + +#include "Swiften/Swiften.h" +#include "Swiften/Elements/Message.h" + +namespace Transport { + +class ConversationManager; + +class AbstractConversation { + public: + /// Constructor. + AbstractConversation(ConversationManager *conversationManager, const std::string &legacyName); + + /// Destructor + virtual ~AbstractConversation(); + + const std::string &getLegacyName() { return m_legacyName; } + + void handleMessage(boost::shared_ptr &message); + + virtual void sendMessage(boost::shared_ptr &message) = 0; + + private: + ConversationManager *m_conversationManager; + std::string m_legacyName; +}; + +}