Files
@ 7a0e5e31e6e2
Branch filter:
Location: libtransport.git/include/transport/conversation.h - annotation
7a0e5e31e6e2
2.1 KiB
text/plain
Moved RosterResponder out of UserManager
76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d b5c026470f07 76c678dd6f1d 8e03fbec4701 8e03fbec4701 76c678dd6f1d 943dc1925b7c 76c678dd6f1d 76c678dd6f1d b5c026470f07 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 2add374fbd61 8e03fbec4701 0a33a3100eb9 0a33a3100eb9 0a33a3100eb9 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d b62274f1ddda b62274f1ddda b62274f1ddda b62274f1ddda 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 943dc1925b7c 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d 0a33a3100eb9 943dc1925b7c 943dc1925b7c 76c678dd6f1d 76c678dd6f1d 76c678dd6f1d | /**
* XMPP - libpurple transport
*
* Copyright (C) 2009, Jan Kaluza <hanzz@soc.pidgin.im>
*
* 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 <string>
#include <algorithm>
#include "transport/transport.h"
#include "Swiften/Swiften.h"
#include "Swiften/Elements/Message.h"
namespace Transport {
class ConversationManager;
class Conversation {
public:
enum ParticipantFlag {None, Moderator};
/// Constructor.
Conversation(ConversationManager *conversationManager, const std::string &legacyName, bool m_muc = false);
/// Destructor
virtual ~Conversation();
const std::string &getLegacyName() { return m_legacyName; }
void handleMessage(boost::shared_ptr<Swift::Message> &message, const std::string &nickname = "");
void handleParticipantChanged(const std::string &nickname, int flag, int status = Swift::StatusShow::None, const std::string &statusMessage = "", const std::string &newname = "");
void setNickname(const std::string &nickname) {
m_nickname = nickname;
}
virtual void sendMessage(boost::shared_ptr<Swift::Message> &message) = 0;
ConversationManager *getConversationManager() {
return m_conversationManager;
}
bool isMUC() {
return m_muc;
}
void setRoom(const std::string &room) {
m_room = room;
}
const std::string &getRoom() {
return m_room;
}
private:
ConversationManager *m_conversationManager;
std::string m_legacyName;
std::string m_nickname;
std::string m_room;
bool m_muc;
};
}
|