blob: c903e3a9d8469c15c7be67ada33c4a85c6c7f13d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*
* Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#pragma once
#include <memory>
#include <boost/signals2.hpp>
#include <Swiften/Base/API.h>
#include <Swiften/Elements/ChatState.h>
#include <Swiften/Elements/Message.h>
#include <Swiften/Elements/Presence.h>
namespace Swift {
class SWIFTEN_API ChatStateTracker {
public:
ChatStateTracker();
void handleMessageReceived(std::shared_ptr<Message> message);
void handlePresenceChange(std::shared_ptr<Presence> newPresence);
boost::signals2::signal<void (ChatState::ChatStateType)> onChatStateChange;
private:
void changeState(ChatState::ChatStateType state);
ChatState::ChatStateType currentState_;
};
}
|