diff options
Diffstat (limited to 'Swiften/Chat/ChatStateNotifier.h')
-rw-r--r-- | Swiften/Chat/ChatStateNotifier.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Swiften/Chat/ChatStateNotifier.h b/Swiften/Chat/ChatStateNotifier.h new file mode 100644 index 0000000..0ef4255 --- /dev/null +++ b/Swiften/Chat/ChatStateNotifier.h @@ -0,0 +1,26 @@ +#pragma once + +#include <boost/signals.hpp> +#include <boost/shared_ptr.hpp> + +#include "Swiften/Elements/ChatState.h" + +namespace Swift { + class ChatStateNotifier { + public: + ChatStateNotifier(); + void setContactHas85Caps(bool hasCaps); + void setUserIsTyping(); + void userSentMessage(); + void userCancelledNewMessage(); + void receivedMessageFromContact(bool hasActiveElement); + bool contactShouldReceiveStates(); + + boost::signal<void (ChatState::ChatStateType)> onChatStateChanged; + private: + bool contactHas85Caps_; + bool isInConversation_; + bool contactHasSentActive_; + bool userIsTyping_; + }; +} |