diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-09-03 15:07:47 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-09-03 19:06:29 (GMT) |
commit | a0185934b0c929622c5526b84235b86cd44aad1d (patch) | |
tree | 2b377a5e8754c35e1a40fe7405dd75804e66fd73 /Swift/Controllers/UIInterfaces | |
parent | fde15d66a75334b23ca8bbd56b44e33893c813c4 (diff) | |
download | swift-contrib-a0185934b0c929622c5526b84235b86cd44aad1d.zip swift-contrib-a0185934b0c929622c5526b84235b86cd44aad1d.tar.bz2 |
XEP-0198 Ack support in the UI
Resolves: #7
Diffstat (limited to 'Swift/Controllers/UIInterfaces')
-rw-r--r-- | Swift/Controllers/UIInterfaces/ChatWindow.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Swift/Controllers/UIInterfaces/ChatWindow.h b/Swift/Controllers/UIInterfaces/ChatWindow.h index 4d00dca..1ee632c 100644 --- a/Swift/Controllers/UIInterfaces/ChatWindow.h +++ b/Swift/Controllers/UIInterfaces/ChatWindow.h @@ -25,11 +25,18 @@ namespace Swift { class ChatWindow { public: + enum AckState {Pending, Received, Failed}; ChatWindow() {} virtual ~ChatWindow() {}; - virtual void addMessage(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) = 0; - virtual void addAction(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) = 0; + /** Add message to window. + * @return id of added message (for acks). + */ + virtual String addMessage(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) = 0; + /** Adds action to window. + * @return id of added message (for acks); + */ + virtual String addAction(const String& message, const String& senderName, bool senderIsSelf, const boost::optional<SecurityLabel>& label, const String& avatarPath, const boost::posix_time::ptime& time) = 0; virtual void addSystemMessage(const String& message) = 0; virtual void addPresenceMessage(const String& message) = 0; virtual void addErrorMessage(const String& message) = 0; @@ -49,6 +56,7 @@ namespace Swift { virtual void setRosterModel(Roster* model) = 0; virtual void setTabComplete(TabComplete* completer) = 0; virtual void replaceLastMessage(const String& message) = 0; + virtual void setAckState(const String& id, AckState state) = 0; boost::signal<void ()> onClosed; boost::signal<void ()> onAllMessagesRead; |